-
Notifications
You must be signed in to change notification settings - Fork 726
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please add support for generating Rust client #3502
Comments
I would really like to see a AutoRest extension for Rust added as well. In fact, I would love to work on it at work if the opportunity came about. Meanwhile, I looked into what it would take to get this started and lay out what I think would work best for the architecture. I think it would be best to build the extension in Rust and target WASI. Rust has great code generation libraries like syn and quote. That can be used to generate the code. rustfmt can be used as a library to format the generated code. All of those libraries compile to WebAssembly. That is how ts2rust works, which I wrote. I am willing to contirbute some code from ts2rust under an MIT to help out this effort. AutoRest extensions get launched as sub processses that then communicate using JSON-RPC 2.0 with the main processs over stdio (stdin, stdout, stderr). This is where I got stuck and need help. What is the easiest way to get JSON-RPC 2.0 + Rust async + WASI? There are several available codebases that could be brought up-to-date, derived from, etc. I'm not sure the easiest path. I would prefer Rust async that build off of tokio. A target, probably the first one, for the generated code would be support for reqwest because we've been using it in production for a year and it supports WebAssembly. Here are some links to varios JSON-RPC 2.0 codebases:
|
You may want to try OpenAPI Generator for the time being as it comes with both Rust client and server generators. The output needs some minor tweaks though for my use cases. |
It's not likely that our team will have resources to develop this officially so we will have to depend on the community to drive this effort. @ctaggart's AutoRust is one example of such a project (thanks for spearheading that!) I'm going to close this issue for now since it's not a request our team can fulfill for the forseeable future. |
While AWS enjoys pretty extensive Rust support via
rusoto
framework, there is nothing for Azure. Having Rust client libraries automatically generated will accelerate adoption of the Azure cloud for Rust native application.The text was updated successfully, but these errors were encountered: