#flipper-zero #manifest #metadata #fam

nightly flipper0-fam-build

Flipper0 Application Manifest generator

7 releases

Uses new Rust 2021

0.1.6 Nov 5, 2022
0.1.5 Oct 17, 2022

#173 in Build Utils

Download history 139/week @ 2022-10-05 49/week @ 2022-10-12 26/week @ 2022-10-19 24/week @ 2022-10-26 54/week @ 2022-11-02 25/week @ 2022-11-09 24/week @ 2022-11-16 7/week @ 2022-11-23 9/week @ 2022-11-30

69 downloads per month
Used in 2 crates

MIT license

39KB
722 lines

Flipper Zero Application Manifest Generator

Builds FAM from one of two possible sources:

  • Metadata in the crate manifest (usually Cargo.toml)
  • Flipper.toml near by crate manifest

Uses cargo metadata.

Usage

Cargo.toml:

[package]
build = "build.rs"
# ...

[package.metadata.fam]
main = "init"
name = "Hello, Flipper"            # optional, default is crate name
# id = "hello-flipper"             # optional, default is crate name
# type = "FlipperAppType.EXTERNAL" # optional, default is FlipperAppType.EXTERNAL
# icon-file = "icon_10px.png"      # optional, path relative to the root of crate
# category = "Misc"                # optional, default Misc

[build-dependencies.fam-build]
package = "flipper0-fam-build"
version = "*"

build.rs:

fn main() {
	let fam = fam_build::manifest().unwrap();
	let path = fam.save_to_out_dir().unwrap();
	// or...   fam.save_to(some other path)

	println!("Exported FAM path: {}", path.display());
}

Entry-point main

Metadata field package.metadata.fam.main is required by default.

But it's optional if feature optional_entry_point enabled. That optionality needed in cases when this used in couple with macro crate that also writes to manifest. So you can omit package.metadata.fam.main in that case.

Examples


Official format documentation.

Dependencies

~2.1–3MB
~65K SLoC