|2.1.0||Jun 5, 2022|
|2.0.1||Jun 5, 2022|
|2.0.0||Jun 4, 2022|
|1.0.1||Jun 1, 2022|
|1.0.0||May 29, 2022|
#738 in Development tools
TrueGRF YAML to GRF compiler (CLI and NPM)
This repository is the Rust part of the project, which offers a YAML to GRF compiler, both for the stand-alone tool and as npm library (via WASM).
Installation / usage
cargo run --release -- --help
Have latest rust installed, and install
cargo install wasm-pack).
wasm-pack build --release --target web
This gives you the required WASM files in the
wasm-pack how to use it in your own project.
PS: in some cases you want to replace in
module key with
main and add
sed -i 's/"module": "truegrf.js",/"main": "truegrf.js",\n "type": "module",/' pkg/package.json
Currently TrueGRF only supports a small selection of the GRF specifications:
- Industry tiles
All other features are not (yet) supported.
In order for TrueGRF to compile the YAML to GRF, the YAML files need to be in a specific structure.
truegrf.yaml: the main file, to indicate it is a TrueGRF project.
cargoes/<name>.yaml: one cargo definition.
industries/<name>.yaml: one industry definition.
Sprites can refer to PNG files based from the root-folder.
The specific structure of the YAML can be deduced from the source files.