ax25sdl
Generated AX.25 v2.2 SDL state-machine tables (the figc4.x figures from the AX.25 v2.2 specification) as no_std-capable Rust data.
This is the Rust backend of packet-net/ax25sdl: the spec's figc4.1–figc4.7 state machines and subroutines, transcribed once with discipline and emitted as &'static data tables. A downstream AX.25 runtime walks these tables — it has no opinion of its own about what AX.25 says. The .g.rs files are generated by the repo's C# codegen pipeline from the YAML transcriptions under spec-sdl/; do not edit them by hand.
Install
[]
= "0.7"
Embedded / bare-metal (no_std) consumers opt out of std:
[]
= { = "0.7", = false }
no_std
The crate is #![no_std] unless the default-on std feature is enabled. The entire data/type core is no_std-clean: every type is Copy, holds only &'static borrows + scalars + the closed-set enums, and touches no allocator. The std feature gates no API surface — it exists only so the host test harness links std. A default-features = false build targets, for example, a Raspberry Pi Pico W (thumbv6m-none-eabi) AX.25 node.
Typed closed sets
Action verbs, guard atoms, and events are typed closed enums — Ax25ActionVerb, Ax25Guard, Ax25Event — so a consumer can match exhaustively. A renamed, removed, or typo'd verb / atom / event upstream becomes a compile error in your match, not a runtime "unknown SDL action" panic. A transition's guard is an &'static [GuardTerm] conjunction, where each GuardTerm carries a typed Ax25Guard atom plus a negate flag. (This mirrors the C# and TypeScript backends; see ADR-0002 in the repo.)
use ;
// Walk a state page's transitions and evaluate a guard.
let t = &DATA_LINK_CONNECTED.transitions;
match t.actions.verb
Layout
Each state page is a pub static (e.g. DATA_LINK_CONNECTED: StatePage); the figc4.7 subroutines are a SubroutinesPage. The runtime types (StatePage, TransitionSpec, ActionStep, GuardTerm, …) live in the types module and are re-exported at the crate root.
License
AGPL-3.0-or-later. Spec text and figures derive from the AX.25 v2.2 specification.