-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Put encoding_rs dependency behind a Cargo feature? #1785
Comments
Sounds potentially useful for when we do the next breaking change! At the same time, I suspect calling |
Perhaps we could include |
I believe this should be equivalent. Closes seanmonstar#1785
Keeping it as a default feature so that the default user experience isn't to be confused about the lack of `text`. It is possible that `text` (but not `text_with_charset`) exists without the `encoding_rs` feature by only trying to decode the response as utf-8 in that case. However that would mean that the behaviour changes if the feature is later added since the method would start to respect `Content-Type` then. Closes seanmonstar#1785
Keeping it as a default feature so that the default user experience isn't to be confused about the lack of `text`. It is possible that `text` (but not `text_with_charset`) exists without the `encoding_rs` feature by only trying to decode the response as utf-8 in that case. However that would mean that the behaviour changes if the feature is later added since the method would start to respect `Content-Type` then. Closes seanmonstar#1785
Keeping it as a default feature so that the default user experience isn't to be confused about the lack of `text`. It is possible that `text` (but not `text_with_charset`) exists without the `encoding_rs` feature by only trying to decode the response as utf-8 in that case. However that would mean that the behaviour changes if the feature is later added since the method would start to respect `Content-Type` then. Closes seanmonstar#1785
Keeping it as a default feature so that the default user experience isn't to be confused about the lack of `text`. It is possible that `text` (but not `text_with_charset`) exists without the `encoding_rs` feature by only trying to decode the response as utf-8 in that case. However that would mean that the behaviour changes if the feature is later added since the method would start to respect `Content-Type` then. Closes seanmonstar#1785
I believe this should be equivalent. Closes seanmonstar#1785
I believe this should be equivalent. Closes seanmonstar#1785
I believe this should be equivalent. Closes seanmonstar#1785
I believe this should be equivalent. Closes #1785
I believe this should be equivalent. Closes #1785
Done in #2175, will be part of 0.12 soon. |
I believe this should be equivalent. Closes #1785
I'm doing binary size analysis of my release binary using Size Bench: https://devblogs.microsoft.com/performance-diagnostics/sizebench-a-new-tool-for-analyzing-windows-binary-size/
A significant contributor to the size of the .rdata section is encoding_rs's data tables: https://raw.githubusercontent.com/hsivonen/encoding_rs/master/src/data.rs
It would be nice to place the dependency on encoding_rs behind a Cargo feature to avoid this size increase, e.g. in cases where Reqwest is used only to consume binary data or REST endpoints that speak utf-8.
The text was updated successfully, but these errors were encountered: