I changed the syntax from handles
to fn
and the field from handlers
to functions
.
You can check out the file: - data/test.svc to see what the description language looks like. - generators/cpp-like.rhai to see what a generator could look like. - generators/cpp-like.rhai.tym to see what a typemapping file looks like. - generators/simple.hbs to see what a simple handlebars template looks like. - generators/simple.lqd to see what a simple liquid template looks like. - generators/simple.tera to see what a simple tera template looks like.
shell
cargo install --locked ssd
```shell ➜ ssd help Simple Service Description & Code Generator
Usage: ssd [COMMAND]
Commands: debug Print debug representation of the parsed file generate Generate source code rhai-metadata Print script engine metadata (function definitions, etc.) as json help Print this message or the help of the given subcommand(s)
Options: -h, --help Print help ```
```shell ➜ ssd generate help Generate source code
Usage: ssd generate
Commands: rhai Use a rhai based generator handlebars Use a handlebars based template. https://handlebarsjs.com/ tera Use a tera based template. https://tera.netlify.app/ liquid Use a liquid based templates. https://shopify.github.io/liquid/ help Print this message or the help of the given subcommand(s)
Options: -h, --help Print help ```
```shell ➜ ssd generate rhai --help Use a rhai based generator
Usage: ssd generate rhai [OPTIONS]