/miyoo-mini-rust-template

An example of how to write apps for the Miyoo Mini in Rust

Primary LanguageRustMIT LicenseMIT

Miyoo Mini Rust Template

About

This repository is an example of how to write a Rust program that can read inputs and draw to the screen on the Miyoo Mini.

For graphics, we use embedded_graphics for drawing to a framebuffer, which we then use blit to the device's framebuffer.

For inputs, we use evdev to poll for inputs.

Building

Development

Requirements

  1. cargo
  2. SDL2 (optional, if simulator is not used)
  3. cross: cargo install cross --git https://github.com/cross-rs/cross (optional, for cross-compilation)

Simulator

For development work, there is a simulator that requires SDL2 to be installed.

cargo run

Miyoo Mini

We use cross for cross-compilation to the arm-unknown-gnueabihf target for the Miyoo Mini.

cross build --release
cp -r static/. dist
cp target/arm-unknown-linux-gnueabihf/release/miyoo-mini-rust-template "dist/Rust App Example.pak/"