Installing the command-line executable
Assuming you have Rust/Cargo installed , run this command in a terminal:
cargo install ldtk-codegen
It will make the ldtk-codegen command available in your PATH if you've allowed the PATH to be modified when installing Rust . cargo uninstall ldtk-codegen uninstalls.
Back to the crate overview .
Readme
LDtk Code Gen
Generate typed rust code from LDtk Project, just like Haxe API (almost...)!
Installation:
Just use cargo install or cargo binstall:
cargo install ldtk-codegen
Examples:
Generate demo.rs from project demo.ldtk using raylib Vector2 and Color:
ldtk- codegen demo. ldtk - v 'raylib : : prelude:: Vector2' - c 'raylib : : prelude:: Color'
Generate project.rs from project demo.ldtk with serde support and preserving case:
ldtk- codegen demo. ldtk - o project. rs - p - s
For more info, see ldtk- codegen - - help