#device-tree #macro #node #blobs #parser #deforest

macro deforest_derive

derive macros for the crate deforest

2 unstable releases

0.3.0 Feb 13, 2024
0.1.0 Oct 3, 2023

#10 in #device-tree

36 downloads per month
Used in deforest

MIT license

13KB
296 lines

Rust crate deforest

Efficient #![no_std] parser for devicetree blobs compliant (hopefully) with version 0.4 of the specification.

The crate tries to be efficient by avoiding allocations (it can be used without alloc) and only iterating over nodes once, but I have no realistic benchmarks. On the downside, the interface isn't the most ergonomic.

Alternatives

  • fdt-rs: can even build an index to interact with DTBs faster
  • fdt: comes with extra types for a couple of common nodes

lib.rs:

Derive macro for deforest, a #![no_std] devicetree parser.

Dependencies

~335–790KB
~19K SLoC