This is a simple entity generator for Rust and Typescript.
- Download the binary.
- Create a yml file like this:
sample.yml
type: struct
rust:
derive: [Debug, Clone, "::serde::Serialize"]
attrs: ['serde(rename_all = "camelCase")']
members:
int128: i128
uint128: u128
boolean: bool
text: string
optText:
type: string
optional: true
Also, there's type definition schema: definition.schema.json Note that that schema is not always up-to-date. If you need the latest "shape" of input, refer src/entities/inputs/root.rs.
- Run the binary like this:
egen -i sample.yml -j yaml -o build -p rust
- You'll get the following files:
build/sample.rs
- Done 👍
Refer src/cmd/mod.rs. Also, you will see what type of input/output is supported there.
This software is architected in SOLID principle. So, please obey it when you send PR here. Plus, please add test cases for your PR.
Refer LICENSE.