-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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] Client library choice between hyper and reqwest #1258
Changes from 17 commits
ef0a2a2
aac88a5
a347327
7b4dfc2
e7c99c5
3c7c52a
0ef969d
a1c865c
e5f514a
970f996
556231e
457ff19
9327601
0b1f506
0eff82b
595a4fc
4208034
e13b3e1
605f950
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,14 +4,21 @@ version = "{{{packageVersion}}}" | |
authors = ["OpenAPI Generator team and contributors"] | ||
|
||
[dependencies] | ||
serde = "1.0" | ||
serde_derive = "1.0" | ||
serde = "^1.0" | ||
serde_derive = "^1.0" | ||
serde_json = "^1.0" | ||
url = "1.5" | ||
{{#hyper}} | ||
hyper = "~0.11" | ||
serde_yaml = "0.7" | ||
serde_json = "1.0" | ||
base64 = "~0.7.0" | ||
futures = "0.1.16" | ||
hyper = "0.11.6" | ||
url = "1.5" | ||
futures = "0.1.23" | ||
{{/hyper}} | ||
{{#reqwest}} | ||
reqwest = "~0.9" | ||
{{/reqwest}} | ||
|
||
[dev-dependencies] | ||
{{#hyper}} | ||
tokio-core = "*" | ||
{{/hyper}} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My highest-level question - why make the decision at codegen time rather than at compile time? You could presumably achieve the same effect with Rust features. I'm not saying you're wrong - merely curious as to why you chose as you did. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't have a good reason for that. I am a beginner in Rust development and learning. I don't know what purpose this dev lib deserves. Since I could generate my project without it in the Cargo file, I dropped it, simply to keep the file as tiny as possible. If you think it is a mistake, I can put it back. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I probably misunderstood your question (I thought it was about For the whole library choice, the main reason is that since I'm learning Rust, I don't know how to use it yet. Another reason whould be that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That seems reasonable. I could well imagine that trying to have both in the same crate could cause problems if they ever had incompatible dependencies. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Usually, we create another script (e.g.
bin/rust-petstore-reqwest.sh
) for a different HTTP library. (You will find a lot of./bin/java-petstore-{library}.sh
scripts for different HTTP libraries supported by the Java client generator)I suggest we do the same for Rust reqwest instead of putting both into one singel script.