-
Notifications
You must be signed in to change notification settings - Fork 13
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
Determine minimum required rust version #5
Comments
I think there is very little being used from |
I don't know. I copied those lines. My guess is no. In fact if I edit the I started to copy the code. It is straightforward. Although it would be really nice to avoid vendoring it. I'll open issues upstream for these incorrect MSRVs. |
I expect there isn't a remedy available upstream. The msrv for everything rust-analyzer was 1.70 at the time, they likely weren't trying to set an msrv per crate and only doing it in the workspace as trying to track |
Fwiw we raised the msrv in qiskit to 1.70 in anticipation of using this library with an msrv of 1.70 here Qiskit/qiskit#11493 |
I knew it was under consideration, but I didn't search because I didn't think it was done yet. Last night, I went ahead with trying 1.64 compatibility. In all the workspace crates there were a very small number of ">1.64"isms that could be easily changed. I thought it is gratuitous to leave them. But maintaining 1.64 compatibility will get harder, not least because generic associated types will be more common. In any case this workspace has an MSRV of 1.70 already, so there is nothing to do. I'll close this. |
[Manually migrated from original repo]
I added
rust-toolchain.toml
. How to organize this? For use in qiskit we want to check the min required rust version (MRRV) and adjust it down if possible. But we don't want to limit the use as a library elsewhere. Do we includerust-toolchain.toml
in the repo? Will this interfere with distributing crates?@mtreinish commented:
I took a quick look and because of the rust-analyzer upstream crates
ra_ap_stdx
andra_ap_limit
(as an aside is there a reason they're both not at version0.0.188
?) the MSRV for this library will be 1.70.0. I don't think there is any getting around that because those crates set their rust version in the cargo.toml and cargo will error if you try to use an older version of rust.As for the mechanics, the best way to set the MSRV is via the
rust-version
field in the cargo.toml (which you already do correctly). I don't believe the rust-toolchain.toml file will have any effect for a published crate so if qiskit depends on a crate from here it will use whatever version of rust is being used to compile qiskit and cargo will check therust-version
metadata to ensure the msrv is being fulfilled.The text was updated successfully, but these errors were encountered: