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
I try this awesome library to create firmware for microcontrollers.
Because it supports no_std I expected it works but seems currently Encoder and Decoder implementations uses Vec type from std/alloc. I got the following errors:
error[E0412]: cannot find type `Vec` in this scope
I added dependency as follows:
[dependencies.bitcode]
version = "0.6"default-features = falsefeatures = ["derive"]
Is it possible to use this crate without std and alloc at all?
The text was updated successfully, but these errors were encountered:
Dropping the alloc dependency would require some redesigning and refactoring, and would probably add complexity. You're welcome to try writing a PR to do it (I'd be interested to see how far you can get). I anticipate you would need to use a lot of stack-allocated, fixed-sized vectors that abort instead of growing.
finnbear
changed the title
Using derive for types in no_std context
Support using without allocAug 4, 2024
I try this awesome library to create firmware for microcontrollers.
Because it supports
no_std
I expected it works but seems currentlyEncoder
andDecoder
implementations usesVec
type fromstd
/alloc
. I got the following errors:I added dependency as follows:
Is it possible to use this crate without
std
andalloc
at all?The text was updated successfully, but these errors were encountered: