-
-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Description
After reading the bevy 0.16 release, I'm very excited for no-std. I'd love to see this package also head in that direction
I've had a quick look around the codebase and would likely do:
- Core migration
- Add
stdfeature flag (enabled by default) - Replace all usages of
stdand replace withcorealternatives - Conditional imports for some imports:
// I think this is how they do it?
#[cfg(feature = "std")]
use std::collections::HashMap;
#[cfg(not(feature = "std"))]
use alloc::collections::HashMap;For dependencies:
| Dependency | no-std compatible |
|---|---|
| prost | ✔️ |
| serde | ✔️ |
| bevy | ✔️ |
| variadics_please | ✔️ |
- Runtime migration
- Add
stdfeature flag (enabled by default) - Replace all usages of
stdand replace withcorealternatives - Allow for platform-agnostic alternatives:
| Dependency | no-std compatible |
|---|---|
| unicode-normalization | ✔️ |
| unicode-segmentation | ✔️ |
| bevy | ✔️ |
| variadics_please | ✔️ |
| log | ? |
| icu_plurals | ✔️ |
| icu_locid | ✔️ |
| fixed_decimal | ✔️ |
| once_cell | ✔️ |
| regex | ✔️ |
| serde | ✔️ |
- Compiler
I guess the compiler could stay std. Not sure really. antlr-rust last update was 3 years ago, but its usages of std also don't seem super platform dependent.
The last consideration would be to get some tests up and early. Bevy has some that build to wasm targets which should be feasible to adapt.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels