-
Notifications
You must be signed in to change notification settings - Fork 43
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
scopeguard breaking no_std build #168
Comments
Thanks for the report! This should have been fixed in the |
I'll look at this and fix it tomorrow (in 14h-ish); are you using wasm? In theory |
Nope, I'm building for thumbv7em-none-eabi, Cortex M4 bare metal, no_std, no_main, nightly rust. is it possible my target is unsupported for libc? seeing as how i have no os.. how are wasm targets handled? the library will be used from zephyr, which has it's own minimal libc library. not sure if i can link to it |
if you look here libc doesn't support my target. curious to know how you think i can approach this, as I really want to use safer_ffi for bare metal static libraries. |
there's an old commit that fixes this issue for wasm (got to it from this issue), i believe the thumb targets need the same handling. if you use size_t like with wasm, it will work here too. basically any platform without libc support will need this handling. |
Yes, exactly. Thanks for pointing that out. I think I'll exceptionally put in place a feature flag for these platforms rather than trying to list them all: [dependencies.safer_ffi]
version = "…"
default-features = false # no std
features = ["libc-is-empty"] # opt out of libc types Although currently my usage of
|
@unovongalixor #170 should be fixing this, you can test it early with a [patch.crates-io.safer-ffi]
git = "https://github.com/getditto/safer_ffi.git"
rev = "7d0770d7936c5a732a67bd59f447eb1655011622" Otherwise it will eventually be released as |
I'm trying to use safer_ffi to handle ffi stuff on an embedded device. i'm building my no_std project for --target thumbv7em-none-eabi, and i've included safer_ffi in cargo.toml with default-features = false, yet when i try to build, i get errors about missing STD from scopeguard. i checked and it seems scopeguard should work without std as well if default features are disabled. Is it possible this feature isn't getting forwarded to the dependencies?
Compiling scopeguard v1.1.0 error[E0463]: can't find crate for std
The text was updated successfully, but these errors were encountered: