WireWeaver¶
Crates for designing no_std APIs with a rich type system, no allocation and a dense bit-level wire format, plus a whole set of standard types and traits, all in Rust.
Pages are marked by how deep they go: Basic, Advanced or Nomicon. See reading levels.
What it does¶
-
Dense zero-copy, no-alloc and no_std wire format. Dynamically sized user-defined types and vectors (on no_std as well). Bit level packing and more, real-world use cases.
-
Define and call methods with any number of arguments and return type. Call using blocking, async or promise interface.
-
Stream data of any type, observe property changes. Both to and from device.
-
Evolve data types and API while still allowing:
- newer code to work with older devices
- older code to work with newer devices
The evolution checker tells whether a change is compatible.
-
USB, Ethernet, CAN and more
Host and device drivers. Plus a framer that can put many small messages in one packet or a bigger message across multiple packets.
-
Numerical, SI, date & time, version and other types. GPIO, I2C, CAN, UART, SPI, logging, firmware update and other traits.
-
Automatically generate owned types for std usage from referenced ones.
&'i [u8]becomesVec<u8>,MyType<'i>MyTypeOwned, etc. -
First class MCU support
Geared towards bare-metal development with FLASH and RAM in mind. No allocation with full feature support.
-
Tooling
CLI and GUI for debugging. Virtual devices. Introspection and tracing. Dynamic Python clients.