-
Notifications
You must be signed in to change notification settings - Fork 157
feat: add no_std support for cluster-type crate
#337
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
base: master
Are you sure you want to change the base?
feat: add no_std support for cluster-type crate
#337
Conversation
vadorovsky
left a comment
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.
Amazing stuff! Let's add that crate to scripts/check-no-std.sh, to make sure it's tested in CI.
22fcbb5 to
aa5c23d
Compare
|
looks like this MR is blocked by #323 error[E0599]: no method named `fetch_add` found for struct `core::sync::atomic::AtomicU64` in the current scope
--> atomic-u64/src/lib.rs:15:20
|
15 | self.0.fetch_add(v, atomic::Ordering::Relaxed)
| ^^^^^^^^^ method not found in `core::sync::atomic::AtomicU64`
Some errors have detailed explanations: E0463, E0599.
For more information about an error, try `rustc --explain E0463`. |
aa5c23d to
8c74f33
Compare
|
I went ahead and rebased it. #323 fixed the error you mentioned, but then the next one appeared (we were using |
many thanks. Will take a look shortly |
|
@joncinque I'll let you review, since I touched the code 🙂 |
joncinque
left a comment
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.
Looks good overall! Just a few small things
joncinque
left a comment
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.
A few more questions, sorry for the back and forth
The only use of `alloc` was construction of the error message. To make the crate build for the upstream eBPF targets and without `alloc`, use `thiserror` without default features for the error enum.
Co-authored-by: Jon C <[email protected]>
04e88fa to
87e41f9
Compare
Problem
solana-cluster-typecrate has nono_stdsupportSummary of Changes
stdfeature and make it enabled by defaultserdeandsolana-hashand and their std features in std mode of thesolana-cluster-typecratesolana-genesis-configcrate dependency to not use std featuresolana-cluster-type