-
Notifications
You must be signed in to change notification settings - Fork 950
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
*: Migrate to Rust 2021 edition #2339
Conversation
Thanks @nukemandan for the upgrade work!
https://blog.rust-lang.org/2021/05/11/edition-2021.html If I am not mistaken there is no downside for rust-libp2p to upgrade to edition 2021. Anyone objecting? Not sure what the best practice is, but I would still consider an upgrade to 2021 to be a breaking change. Thus this pull request would need to add a changelog entry to each crate's |
AFAIK it will bump the MSRV to 1.56. Are we okay with that? |
It is also strongly suggested that we included a minimal rust version to use, specifically 1.56.1
rust-version = "1.56.1" https://doc.rust-lang.org/cargo/reference/manifest.html#the-rust-version-field
More discussion: |
I am fine with it. Anyone out there objecting?
What is the benefit of explicitly setting the version? Isn't it already implicitly set by moving to Rust |
I have not played with behavior for different versions with and without this included, but I believe it enforces builds with no less than this version, and in this case the 1.56.1 (with the security patch) will be required to build, without specifying a flag to ignore it. |
Uniform [package] fields style
For reference, I tried to get this to
With Should be good to go with a squash merge to make the commit log clean on |
Thanks for testing. I understand that |
I think it should give a much better error message? At least for version 1.54 on-wards (where |
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.
Thanks @nukemandan for the help!
Co-authored-by: Max Inden <mail@max-inden.de>
Confirmed to build locally on Ubuntu 20.04.3 LTS: