Skip to content
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

Closed
imp opened this issue May 18, 2020 · 4 comments
Closed

Please add support for generating Rust client #3502

imp opened this issue May 18, 2020 · 4 comments
Labels

Comments

@imp
Copy link

imp commented May 18, 2020

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.

@ctaggart
Copy link

ctaggart commented Jul 30, 2020

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:

@douyoung
Copy link

There was a similar request but covering more languages: #2452. I would love to see a Rust client generator too but I don't think the autorest team plans to support more languages in this project. Even the PHP support was dropped earlier due to the reorg.

@nicw19
Copy link

nicw19 commented Aug 19, 2020

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.

@daviwil
Copy link
Contributor

daviwil commented Oct 8, 2020

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.

@daviwil daviwil closed this as completed Oct 8, 2020
@daviwil daviwil added the Rust label Oct 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants