A command line app similar to AutoRest, but is written in Rust to generate Rust code. The goal is to be able to generate code from the documents in Azure/azure-rest-api-specs/specification. If we can figure out the Language Server Protocol for AutoRest, we hope to compile an AutoRest Extension as well.
By default, building the project is very straight forward:
cargo build
The generated code is not formatted. To format the generated code, run cargo fmt.
The command line args are a subset of those supported by autorest
.
cargo run -- --help
cargo run -- --input-file=../azure-rest-api-specs/specification/vmware/resource-manager/Microsoft.AVS/stable/2020-03-20/vmware.json
cargo run -- --input-file ../OpenAPI-Specification/examples/v2.0/json/petstore.json
It is early days. The generated code is not finished. No binaries have been published. You will probably get panics trying out other specs. I've posted some status videos to an AutoRust YouTube playlist. TODO items are starting to be annotated with the GitHub issue numbers using GitHub Pull Requests and Issues extension for VS Code.