istio-api-rs-codegen is a code generator using Kopium. It generate Rust code directly from the Istio CRD yaml file.
To start quickly, just run:
cargo run -- -f -r -g
All the codes will be generated at ./output
, you can also check ./resources
to for the mid product.
You can also make a release build the binary instead of using cargo run
for better performance. For more information, use -h
, or just dive into the sources!
Feel free to use or start any issue!
To update the generated code for newest istio, do:
- Check new version of
kopium
simply by runningcargo install kopium
. - Check new version of
k8s-openapi
to update the supported kubernetes API version (with the crate feature). Also check thekube
crate's version if possible. - Add new version string in
src/constant/mod.rs
: modify theISTIO_VERSIONS
variable by adding aMAJOR.MINOR.0
version string. - Run
istio-api-rs-codegen
bycargo run -- -f -r -g
. - Fetch the newest codes in
output/