Files and versions
REDWOOD_HOME selects the base data directory. It defaults to ~/.redwood. Redwood appends the installed package’s full version number.
$REDWOOD_HOME/
<installed-version>/
kernels/
<backend>/
backends/
cpu/
bench/
native.so
compiled/
<model-name>/
The package version comes from installation metadata, which follows pyproject.toml during packaging. Redwood uses that version’s directory.
Kernels
Each backend’s kernel store can contain shipped kernels.so and index.json, plus custom_kernels.so, custom_index.json and custom object files. redwood kernels FILE.c manages custom compilation and indexing. From a source checkout, uv run task kernels builds or replaces the built-in kernels.so and index.json.
These filenames are managed by Redwood even on platforms with a different usual shared-library suffix. Do not rename them or edit the indexes by hand.
A compiled model carries its selected kernel libraries. Recompile it to use kernels from an updated store.
CPU worker
The CPU worker lives under <version>/backends/cpu/, named worker or worker.exe. Wheels supply it on the first CLI command. From a source checkout, build it with uv run task build-cpu.
The compiler uses <version>/bench/native.so for kernel benchmarking. Wheels supply this helper too.
Compiled models
The compiler defaults to <version>/compiled/<model-name>/. Use --output to write elsewhere, then pass that directory directly to Model, Runtime or redwood run.
Keep the compiled directory together: its manifest refers to weights, libraries and processing assets within the bundle.
RDL and checkpoints
RDL files and source checkpoints can live anywhere. You can keep a local authoring collection in ~/.redwood/RDL/.
The compiler reads checkpoints and copies supported processing assets into the compiled directory. Standard processors load those bundled assets at runtime. Custom callbacks may have their own asset dependencies.
Version changes
Package versions, executable/weight schemas and the kernel ABI are distinct. The current artifact schemas and kernel ABI use version 1.
When upgrading, build or install native components for the active package version. Recompile models when their formats or selected kernels are incompatible.