Crate firefly_rust

source ·
Expand description

§firefly-rust

Rust SDK for making Firefly Zero games.

§Installation

cargo add firefly_rust

§Cargo features

  • std: required if you don’t build your project with #![no_std]. It will remove from the crate the custom panic handler to avoid conflicts with the standard library.
  • alloc: required if you want to use FileBuf. Allows the crate to do memory allocations. If you enable alloc but not std, you have to also provide a global allocator. We recommend using talc.
  • sudo: required if you want to use sudo module. Enables privileged access to the device.
  • nalgebra_support: can be activated if you use nalgebra. Enables type conversion to and from nalgebra vectors.

§License

MIT License. You can do whatever you want with the SDK, modify it, embed into any apps and games. Have fun!

Re-exports§

Modules§

  • Functions for accessing files in the app data dir.
  • Draw shapes, images, and text on the screen.
  • A few useful math (trigonometric) functions for f32.
  • Functions for accessing files in the app ROM.
  • Structs for working with shapes as values.
  • Functions available only to privileged apps.

Structs§

  • State of the buttons.
  • DPad-like representation of the Pad.
  • A file loaded from ROM or data dir into the memory.
  • Like File but owns the buffer.
  • A loaded font file.
  • A loaded image file.
  • A finger position on the touch pad.
  • A subregion of an image. Constructed using Image::sub.

Enums§

Functions§