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
// 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
| 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.
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:
stdfeature flag (enabled by default)stdand replace withcorealternativesFor dependencies:
stdfeature flag (enabled by default)stdand replace withcorealternativesI 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.