Closed kurkpitaine closed 1 month ago
Good point! Thank you for your proposal. Release v0.5.2
will generate rasn
bindings hat use FixedOctetString
and FixedBitString
.
Wow! I did not expect this fast answer! In fact, I started looking at patching the code 😄 Thank you very much!
Apart from Asn.1 stuff, I see you work on V2x stuff. As I do for the last 10 years around projects in France and Europe.
I started a Rust #![no_std]
implementation of ETSI Geonetworking, as a challenge to learn Rust and overcome some s****y commercial implementations. Feel free to look at it.
This is not an issue, but a proposal for improvement.
Currently, the compiler output assign Rasn's
OctetString
type for all Asn.1 OctetString fields. Rasn library has aFixedOctetString<N>
type which can be used to represent strictly constrained OctetString, ie:my_field OCTET STRING(SIZE (8))
would beFixedOctetString<8>
in generated code. Benefits of the usage ofFixedOctetString
is the guarantee of the size constraint respect, since it is statically checked by the compiler and stack allocation instead of heap.