-
Notifications
You must be signed in to change notification settings - Fork 127
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
Support Rust no_std
environments
#347
Conversation
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.
Nice, I like these changes. Thanks! Just one thing I'd like to point out (see my comment below), but it's not your problem. I'd like to have @asn-d6 and @pawanjay176 also review this before merging.
v.push(Blob::from_hex(blob)?); | ||
} | ||
return Ok(v); | ||
self.blobs.iter().map(|blob| Blob::from_hex(blob)).collect() |
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.
For some reason, this change causes a stack overflow for me; testing on an M1 MacBook Air. This isn't really your problem though. I suspect it will be resolved if/when we start boxing blobs.
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 like it's failing in CI as well, will revert
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.
LGTM overall.
The feature checks need to set the working directory and also the no-std
check doesn't compile on the tests
88484a8
to
1ef16a9
Compare
Should be good now |
@DaniPopes Ah sorry, that windows stack overflow issue is unrelated to your PR. We just fixed this. See:
You just need to pull in changes from main. Thanks for your work on this 🥇 |
Add a "std" feature flag to the Rust bindings, enabled by default, which when disabled by consumers with
no-default-features = true
activates#![no_std]
attribute.This is achieved by using
alloc
for ownedString
andVec
, and using&CStr
instead of&Path
whenstd
is not available.I've also included some small warnings and lint fixes.