async-google-apis
async-google-apis copied to clipboard
Feature Request: Replace Python Generator with Rust/Cargo
Appreciate all the work for certain! Would be awesome if the generate was callable from cargo instead. Maybe even as a single binary. This way, perhaps, could cargo install the generator, and then generate the files directly inside an existing project.
Well, obviously a typesafe Rust generator would be nice to have. The main reason I wrote it in Python was speed of development, which was definitely a plus, although it already catches up in some places (as you have seen in the issues you filed - thank you again).
One aspect going in favor of a rust generator now would be that we can already generate the whole Discovery schema with the existing generator and bootstrap a typesafe Rust generator this way. And we already have the target in mind, i.e. what the generated code should (or could) look like.
I will take a look at the PR you've filed.
I left some comments on #4 -- what do you think, are you interested in collaborating on this? Or do you have a different idea of how to achieve it?
Yes would like to help where I can. I would suggest we first try and get a working port of the existing code, then optimize. I have very little experience with parsers and what not on rust.
I saw your updates, and agree that a port of what we have is probably the fastest way forward to get what you asked for initially (calling it in the build process, IIRC).
So while completely refactoring and being fancy is maybe not productive, I think we can still put a bit more attention to making the code more understandable than I did in the first version :-) (should be a low bar)