Docs.rs
  • firefly-rust-0.2.2
    • firefly-rust 0.2.2
    • Docs.rs crate page
    • MIT
    • Links
    • Repository
    • crates.io
    • Source
    • Owners
    • orsinium
    • Dependencies
      • nalgebra ^0.32.5 normal optional
    • Versions
    • 41.18% of the crate is documented
  • Go to latest version
  • Platform
    • i686-pc-windows-msvc
    • i686-unknown-linux-gnu
    • x86_64-apple-darwin
    • x86_64-pc-windows-msvc
    • x86_64-unknown-linux-gnu
  • Feature flags
  • docs.rs
    • About docs.rs
    • Badges
    • Builds
    • Metadata
    • Shorthand URLs
    • Download
    • Rustdoc JSON
    • Build queue
    • Privacy policy
  • Rust
    • Rust website
    • The Book
    • Standard Library API Reference
    • Rust by Example
    • The Cargo Guide
    • Clippy Documentation

Crate firefly_rust

firefly_rust0.2.2

  • All Items
  • Modules
  • Structs
  • Enums
  • Functions

Crates

  • firefly_rust
?
Settings

Crate firefly_rust

source ·
Expand description

§firefly-rust

Rust SDK for making Firefly Zero games.

  • ▶️ getting started
  • 📄 api docs
  • 📦 crates.io
  • 🐙 github

§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§

  • pub use graphics::*;

Modules§

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

Structs§

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

Enums§

  • Player
    The player ID.

Functions§

  • add_menu_item
    Add a custom item on the app menu.
  • get_random
    Get a random value.
  • log_debug
    Log a debug message.
  • log_error
    Log an error message.
  • open_menu
    Open the app menu.
  • quit
    Exit the app after the current update is finished.
  • read_buttons
    Get the currently pressed buttons.
  • read_pad
    Get the current touch pad state.
  • remove_menu_item
    Remove a custom menu item with the given index.
  • set_seed
    Set the random seed.

Results

Query parser error: "Unexpected - (did you mean ->?)".