Closed
Description
I've had a few conversations on IRC about using #![no_std]
in Rust libraries. There are comments around (such as here in html5ever) that using #![no_std]
should be used if one wants to write a Rust library that is going to be used from other languages. It's not really clear to me how accurate that recommendation still is currently / will be at 1.0 with the changes to std that have happened over the past months; however, assuming it's still true, I think there are a couple of problems that don't seem to have easy solutions:
- It's really easy to accidentally pull in std by using another crate that links std (html5ever currently has this problem - html5ever uses #![no_std] but depends on phf which links std servo/html5ever#47).
- According to the unsafe docs, a crate using
#![no_std]
needs to define a few lang_items likestack_exhausted
. If two independently-developed crates both define the lang items, you get duplicate name errors when trying to use both simultaneously.
Metadata
Metadata
Assignees
Labels
No labels