You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While some parts of the high-level ciborium crate by their nature require alloc (in particular, Value doesn't work without), most of it should manage well without.
It'd be great if structs with serde based serializations could be used on embedded targets where alloc is typically unavailable.
Acceptance Criteria
The encode_vec test works when replacing the Vec with a heapless::vec in a build configuration that does not use extern crate alloc.
The crate is added to the category no-std::no-alloc in its Cargo.toml.
Suggestions for a technical implementation
ciborium could introduce a crate feature alloc that is in the default set.
Then, parts of the library that depend on alloc are marked #[cfg(feature=alloc)].
As the crate is already no-std, the relevant parts should be trivially discoverable by grepping for alloc, and further grepping for the names of all types that get disabled without it.
The text was updated successfully, but these errors were encountered:
Is there an existing issue for this?
Description
While some parts of the high-level ciborium crate by their nature require alloc (in particular, Value doesn't work without), most of it should manage well without.
It'd be great if structs with serde based serializations could be used on embedded targets where alloc is typically unavailable.
Acceptance Criteria
The
encode_vec
test works when replacing the Vec with a heapless::vec in a build configuration that does not useextern crate alloc
.The crate is added to the category
no-std::no-alloc
in its Cargo.toml.Suggestions for a technical implementation
ciborium could introduce a crate feature
alloc
that is in the default set.Then, parts of the library that depend on alloc are marked
#[cfg(feature=alloc)]
.As the crate is already no-std, the relevant parts should be trivially discoverable by grepping for
alloc
, and further grepping for the names of all types that get disabled without it.The text was updated successfully, but these errors were encountered: