-
Notifications
You must be signed in to change notification settings - Fork 83
Replace crate core_io
with core2
to support more rust toolchain versions
#210
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
Conversation
`core_io` has not been updated for a long time. The latest rust version it supports is 2021-03-25. We can use `core2` instead which does not depend on the rust toolchain versions. Signed-off-by: Jiaqi Gao <jiaqi.gao@intel.com>
Hello, is there any feedback for this one? |
First of all - apologies for the late response on this PR. I gave a look to Alternatively, PR #211 proposes to remove |
Thanks @MihirLuthra , I agree with you that using code from an older version along with a new toolchain is not a good choice, but it may take a lot effort to maintain |
@gaojiaqi7 we have discussed this internally and we were good with the solution proposed in #211. But the review is pending there. We will try to complete it soon. (hopefully in the coming week) |
@MihirLuthra that's great! thank you :) |
Closing this in favour of #211. |
211: Remove core_io dependency and add alternative interface for no_std environments r=zugzwang a=DrTobe As already stated in #210, `core_io` "has not been updated for a long time, the latest rust version it supports is 2021-03-25." Since `no_std` usage of `rust-mbedtls` currently depends on `core_io`, this is a major barrier when adopting `rust-mbedtls` in `no_std` environments. As opposed to #210, I propose to remove any `std::io` replacement altogether because we need a different interface (non `io::Write`, non `io::Read`) for DTLS anyways. So this interface can be used for TLS in `no_std` environments, too, which removes the necessity to have a `std::io` replacement at all. If you think the benefits are worth the effort, a `std::io` replacement could be added optionally with a feature. I have not had a detailed look at `core2` but I found working with `core_io` very limiting, so maybe `core2` could be a better option. When working on these changes, I have also fixed some other minor issues with `no_std` usage. Specifically, this should also fix #208 (making #209 obsolete) while bringing `rust-mbedtls` to 32 bit targets (specifically the ARM `thumb...` targets commonly found on MCUs). With the changes presented in this PR, I was finally able to successfully use `rust-mbedtls` on an STM32L452CCUx MCU. Co-authored-by: Tobias Naumann <tobias.naumann@iml.fraunhofer.de>
211: Remove core_io dependency and add alternative interface for no_std environments r=zugzwang a=DrTobe As already stated in #210, `core_io` "has not been updated for a long time, the latest rust version it supports is 2021-03-25." Since `no_std` usage of `rust-mbedtls` currently depends on `core_io`, this is a major barrier when adopting `rust-mbedtls` in `no_std` environments. As opposed to #210, I propose to remove any `std::io` replacement altogether because we need a different interface (non `io::Write`, non `io::Read`) for DTLS anyways. So this interface can be used for TLS in `no_std` environments, too, which removes the necessity to have a `std::io` replacement at all. If you think the benefits are worth the effort, a `std::io` replacement could be added optionally with a feature. I have not had a detailed look at `core2` but I found working with `core_io` very limiting, so maybe `core2` could be a better option. When working on these changes, I have also fixed some other minor issues with `no_std` usage. Specifically, this should also fix #208 (making #209 obsolete) while bringing `rust-mbedtls` to 32 bit targets (specifically the ARM `thumb...` targets commonly found on MCUs). With the changes presented in this PR, I was finally able to successfully use `rust-mbedtls` on an STM32L452CCUx MCU. Co-authored-by: Tobias Naumann <tobias.naumann@iml.fraunhofer.de> Co-authored-by: Tobbe <tobias.naumann@iml.fraunhofer.de>
core_io
has not been updated for a long time, the latest rust version it supports is 2021-03-25.To support more rust toolchain versions, we can use
core2
instead which does not depend on specific nightly versions.Signed-off-by: Jiaqi Gao jiaqi.gao@intel.com