#ldtk #codegen #gamedev #api-bindings

app ldtk-codegen

Generate typed rust code from LDtk Project

5 releases (3 stable)

1.0.2 Aug 24, 2024
1.0.0 Aug 23, 2024
0.1.1 Aug 7, 2023
0.1.0 Aug 7, 2023

#302 in FFI

Download history 114/week @ 2024-08-17 279/week @ 2024-08-24 6/week @ 2024-08-31 26/week @ 2024-09-14 20/week @ 2024-09-21 9/week @ 2024-09-28 1/week @ 2024-10-05 3/week @ 2024-10-12 1/week @ 2024-10-19

193 downloads per month

Apache-2.0

120KB
2.5K SLoC

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

Dependencies

~5MB
~93K SLoC