[WIP] no_std support#339
[WIP] no_std support#339VictorKoenders wants to merge 2 commits intobincode-org:masterfrom VictorKoenders:no_std
Conversation
… alloc and no_std by features
|
I think there's a much better solution for us to find before taking this route. Maintaining three versions of the primitives the library uses is asking for subtle, annoying bugs to track down. And we'd also be forcing that inconvenience on users - they'd have to deal with an We floated the idea of a separate crate for the |
|
Yeah, I would be interested in making a bincode_core crate, beraking whatever you want in that. And reshimming it to match the bincode api from the bincode crate. |
|
Zoey and I started work on bincode-core here: https://github.com/bincode-org/bincode-core Closing this PR in favor of that |
Started working on
no_stdsupportThis PR adds 3 new features:
std(enabled by default)allochas no std support, but does support strings, collections and boxesno_std. This disables all allocations and OS-specific code.The changes in this PR are: (unchecked features are not final)
std::io::Read/Writedoesn't exist incore(tracking issue) This is solved by implementing our ownRead/Writetraitsstd::io::Errorandstd::error::Errorare also not available. We create our own io error type, and we explicitly implementserde::de::Errorwhen we're in no_std modebyteorder::ReadBytesExtandbyteorder::WriteBytesExtare not available outside ofstdmode. (Related issue that states that they're waiting on RFC 2262)