Crates.io | noproto |
lib.rs | noproto |
version | 0.1.0 |
source | src |
created_at | 2023-06-15 01:01:56.811389 |
updated_at | 2023-12-20 13:12:36.354333 |
description | no-std, no-alloc protocol buffers implementation for embedded systems. |
homepage | |
repository | https://github.com/embassy-rs/noproto |
max_upload_size | |
id | 890711 |
size | 36,649 |
No-std
, no-alloc
protocol buffers (protobuf) implementation in Rust, for embedded systems.
Optimized for binary size and memory usage, not for performance.
Status: very experimental, :radioactive: do not use in production yet. In particular, it doesn't handle many protobuf types well (see below).
Implemented:
heapless::Vec
, heapless::String
impls.optional
repeated
oneof
enum
Not implemented (yet?):
noproto
currently assumes the Rust type is enough
to deduce how it should be encoded on the wire, which is not true.alloc
containers (goal is to be no-alloc
, but we could still have them optionally).&[T]
for repeated fields (only doable for writing, not reading).proto
files into Rust code.Protobuf | Rust |
---|---|
bool |
bool |
int32 |
TODO |
uint32 |
u32 |
sint32 |
i32 |
fixed32 |
TODO |
sfixed32 |
TODO |
int64 |
TODO |
uint64 |
u64 |
sint64 |
i64 |
fixed64 |
TODO |
sfixed64 |
TODO |
float |
TODO |
double |
TODO |
string |
heapless::String<N> |
bytes |
heapless::Vec<u8, N> |
noproto
is guaranteed to compile on the latest stable Rust version at the time of release. It might compile with older versions but that may change in any new patch release.
This work is licensed under either of
at your option.