-
Notifications
You must be signed in to change notification settings - Fork 6k
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
[Rust, Rust-server] should we merge the two rust generators into one? #7347
Comments
@frol @farcaller @wing328 - I don't know if you have any views on this? I don't know |
I am not the right person to ask this. I have not done anything but reviews of PRs to the Rust generators (I mean, I won't be able to implement any of the two generators myself in Rust), so I cannot make any decision here. I agree that a single implementation would be easier to maintain, so if someone is willing to make that move, that would be great! |
I see the benefit of merging this two implementations (having one source of truth, increasing maintainability, no need to patch 2 different place etc.). However, what should people do that only need client code in case of these implementations are merged? Should they generate code and remove server code later? Exact opposite is also valid if they only need server code. As far as I see from other languages, client and server codes are generated separately. So, it may make sense to extract client code from Please let me know if you have different kind of concerns about separating 2 implementations without leaving dependencies between them |
Theoretically, we can hide the server code behind a cfg gate. |
Based on my experiences with other generators, I would suggest:
The consolidation does not imply which Rust client ( The goal is to consolidate all efforts into one Rust client generator so that all Rust developers are better off maintaining just one generator for Rust client. Ref: #6756 |
Well, I can take over this issue, however I think it'd make sense to wait hyper version upgrade to deal with less complications |
Agreed 👍 |
A few comments based on my knowledge of the design of
Currently,
When creating
|
Another option is to leverage the .swagger-codegen-ignore file to skip generating files for client or server if the user only needs either one of them.
|
Description
I'm currently seeing a lot of PRs for
rust
seeking to add features thatrust-server
already has. It's going to be rather tedious to keep maintaining two parallel Rust generators.Suggest a fix/enhancement
It would surely be more efficient to either pick only one for future maintenance or merge the two?
The text was updated successfully, but these errors were encountered: