Crates.io | flipper0-fam-build |
lib.rs | flipper0-fam-build |
version | 0.1.6 |
source | src |
created_at | 2022-10-05 20:52:09.774208 |
updated_at | 2022-11-05 11:12:00.470052 |
description | Flipper0 Application Manifest generator |
homepage | https://github.com/boozook/flipper0/tree/master/build/fam-build |
repository | https://github.com/boozook/flipper0.git |
max_upload_size | |
id | 680752 |
size | 26,300 |
Builds FAM from one of two possible sources:
Uses cargo metadata
.
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());
}
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.