Crates.io | flip-ui |
lib.rs | flip-ui |
version | 0.1.3 |
source | src |
created_at | 2024-05-13 18:17:16.480776 |
updated_at | 2024-06-01 22:04:17.586384 |
description | Rust integration for handling and compiling the UI built via the UI Flip UI Builder |
homepage | |
repository | https://github.com/flip-ui/flip-ui-rs |
max_upload_size | |
id | 1238741 |
size | 9,183 |
Rust integration for handling and compiling the UI built via the Website.
Add this to your Cargo.toml
:
[dependencies]
flip_ui = "0.1.3"
#![no_main]
#![no_std]
// Required for panic handler
extern crate flipperzero_rt;
use core::ffi::CStr;
use flip_ui::flip_ui;
use flipperzero_rt::{entry, manifest};
// Define the FAP Manifest for this application
manifest!(
name = "Flipper Zero Rust",
app_version = 1,
has_icon = false,
);
// Define the entry function
entry!(main);
// Getting UI data && events
flip_ui! {
App,
"src/main.json",
next => next,
close => close,
back => back,
}
// Entry point
fn main(_args: Option<&CStr>) -> i32 {
let mut app = App::create();
app.show();
0
}