Keyboard shortcuts

Press ← or β†’ to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

no_std Pipelines

pondrs is a #![no_std] crate at its core. The std feature adds filesystem I/O, threading, logging, CLI parsing, and additional dataset types β€” but the fundamental pipeline model works without any of it.

What’s available without std

Componentno_stdstd
Node, Pipeline, Steps, StepInfoyesyes
PipelineInfo, RunnableStepyesyes
check() validationyesyes
Param<T>yesyes
CellDataset<T>yesyes
RegisterDataset<T>yesyes
GpioDatasetyesyes
SequentialRunneryesyes
Hook / Hooks traitsyesyes
App::new()yesyes
PondError (limited variants)yesyes
MemoryDataset<T>β€”yes
ParallelRunnerβ€”yes
LoggingHookβ€”yes
CLI parsing / YAML loadingβ€”yes
Catalog indexer (dataset names)β€”yes
File-backed datasetsβ€”yes

Building for no_std

cargo build --no-default-features --lib

No allocator is required. All dataset tracking in check() uses fixed-size stack arrays.

Typical embedded pattern

use pondrs::datasets::{CellDataset, Param, RegisterDataset, GpioDataset};
use pondrs::error::PondError;
use pondrs::{App, Node, Steps};

static SENSOR: RegisterDataset<u16> = unsafe { RegisterDataset::new(0x4000_0000) };
static LED: GpioDataset = unsafe { GpioDataset::new(0x4002_0000, 5, "LED") };

fn pipeline<'a>(
    cat: &'a Catalog,
    params: &'a Params,
) -> impl Steps<PondError> + 'a {
    (
        Node {
            name: "read_sensor",
            func: |raw: u16| (raw,),
            input: (&cat.sensor,),
            output: (&cat.reading,),
        },
        Node {
            name: "check_threshold",
            func: |value: u16, threshold: u16| (value > threshold,),
            input: (&cat.reading, &params.threshold),
            output: (&cat.led,),
        },
    )
}

See Datasets for details on the no_std dataset types and App & Debugging for the no_std App pattern.