Matter 1.6 · Rust · no_std

The Matter stack, sized at compile time.

Matter is the CSA smart-home standard behind Apple Home, Google Home, Alexa and SmartThings. matter-kit implements specification 1.6 in a single Rust crate that links into 88 KiB of flash and 39 KiB of RAM on an nRF52840 and brings no runtime of its own.

cargo add matter-kit

Under construction and pre-1.0. The CHIP SDK's own chip-tool commissions the example device end to end with attestation verified, and eleven of the CSA Test Harness's certification cases pass against it. A device can be commissioned over IPv6, Bluetooth LE, Wi-Fi PAF or NFC, answer Reads, Writes and Invokes, hold subscriptions, take part in groupcast, and move a firmware image over TCP. Most of the application clusters' behaviour is what is left.

Four decisions that are hard to retrofit

One crate

Not a family to keep in version step. Everything optional is a Cargo feature, and the code generator is repository tooling rather than a dependency.

A capacity is checked against the specification

Every table is a fixed-capacity array, and each one asserts at compile time that it can keep the per-fabric promises the node advertises. A node that could not pass certification does not compile, and the build error names the rule it breaks.

No runtime is chosen for you

async over core::future, reaching the outside world through small traits: sockets, timers, randomness, storage. No executor crate appears anywhere in the tree — the examples run on a block_on of their own.

Nothing panics on network input

unwrap, expect, panic!, slice indexing, unchecked arithmetic and truncating casts are denied crate-wide. Resource exhaustion is a value, so a device that runs out of exchanges answers BUSY rather than aborting.

Sizing is a type, not a build flag

Every table in the stack — fabrics, sessions, exchanges, subscriptions, access-control entries — is a fixed-capacity array whose length comes from a trait. The specification's minima are const assertions, so a node that could not pass certification does not compile.

use matter_kit::{DefaultConfig, acl::Acl};

// Four entries for each of five fabrics is §2.11.1.1's minimum, and the default.
let acl: Acl<DefaultConfig> = Acl::new();

// error: Acl: Core §2.11.1.1 promises ACL_ENTRIES_PER_FABRIC to every fabric,
//        so the list must hold FABRICS × that many
let too_small: Acl<DefaultConfig, 4, 4, 3> = Acl::new();

Cargo features cannot do this. They are global and additive, so two crates in one binary that ask for different sizes silently get the union, and nothing checks the result against the specification.

Where to go next