-
Notifications
You must be signed in to change notification settings - Fork 597
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
[3/3] no-std support phase I #1502
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1502 +/- ##
==========================================
- Coverage 95.97% 95.96% -0.02%
==========================================
Files 85 86 +1
Lines 18727 18818 +91
==========================================
+ Hits 17974 18059 +85
- Misses 753 759 +6 ☔ View full report in Codecov by Sentry. |
I think this exists and is |
I think this would be much easier to digest if it was split into smaller commits, for example:
|
6c91150
to
78046e4
Compare
the PR has been split in commits to make it easier to review. all the "rm (..)" commits can be squashed at a later time. also, there are several warning that I haven't fixed and they involve cfg-ing away more code. for now, I have only removed what's need to make rustls compile with |
I think the |
c2b4ac0
to
d486330
Compare
I reordered the commits a bit and now only these contiguous commits:
make The first commit of this PR basically adds this to #![no_std]
extern crate std; this switches the prelude from I think it would be worthwhile to land that change in a separate PR ahead of this one: it'll prevent relying on implicit |
extracted that into PR #1524 |
d486330
to
aa732f2
Compare
quick update: I have rebased this PR now that #1524 has been merged. I have also pushed a commit that makes turns out that ring has this sealed for more context: I'm building a small rustls no-std demo that only depends on |
@japaric probably also good to open a ring issue to signal this there and see if there is a better solution there. (Please link the issue here if you do so.) |
@djc done. submitted briansmith/ring#1734 |
02db629
to
eeb4008
Compare
e3a0a74
to
c804e50
Compare
rebased this on top of #1583 and marked it as ready for review |
c804e50
to
e2f7220
Compare
will be back in phase II
no-std users must use the new ServerConfig::builder_with_details(), which requires a `TimeProvider` to be provided up-front. For std builds, the `ServerConfig` uses the `DefaultTimeProvider` for existing, other `ServerConfig::builder*` functions.
default Resumption to disabled
will be back in phase II
When built w/ the `std` feature, the `DEFAULT_CRYPTO_PROVIDER` and assoc. fns use a standard `once_cell::sync::OnceCell`. When built w/o the `std` feature we use `once_cell::race::OnceBox`, requiring some minor adjustments to account for the expectation of storing a `Box<Arc<CryptoProvider>>` in place of a `Arc<CryptoProvider>`.
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 for landing those last tweaks @ctz
this PR implements phase I of RFC #1399 . NOTE that this PR is built on top of PR #1583
originally phase I aimed to only allowing client functionality in no-std context but turns out that the changes were sufficient to also enable server functionality as evidenced in #1534
breaking changes: implementing the RFC requires no breaking changes
blockers:
this PR is best reviewed on a commit by commit basis (do skip PR#1583 commits)