Skip to content

CascadeOS/zig-devicetree

zig-devicetree

A read-only Flattened Devicetree (DTB) API.

None of the API requires allocation except the various list builders in Property.Value which are completely optional.

Compatible with Devicetree Specification v0.4.

Auto-generated docs

This started as a wrapper around libfdt but is now a fresh implementation.

Installation

Add the dependency to build.zig.zon:

zig fetch --save git+https://github.com/CascadeOS/zig-devicetree

Then add the following to build.zig:

const devicetree_dep = b.dependency("devicetree", .{});
exe.root_module.addImport("DeviceTree", devicetree_dep.module("DeviceTree"));