Config
This document describes the Postcard-based configuration flow used by the current documentation set and related SDK surfaces.
Overview
The repository documents two configuration stories:
- The lightweight CLI config flow built around
cli-config.pc - Broader SDK and core configuration helpers that use serialized configuration data
Configuration model
flowchart TD
INPUT[Config source] --> SERIALIZE[Postcard serialization]
SERIALIZE --> FILE[Binary file on disk]
FILE --> LOAD[Load config]
LOAD --> USE[CLI, SDK, or runtime usage]
Why Postcard
| Property | Benefit |
|---|---|
| Binary format | Smaller and faster than text-heavy config storage |
| Typed serialization | Matches Rust data structures directly |
| Easy export/import | Works well for backup and transfer flows |
Main points
- Configuration is treated as structured data first, not hand-edited prose.
- Export and inspection can still be done through JSON-based helper commands or APIs.
- Secrets should remain outside the binary file when a dedicated secret mechanism is available.
Related documents
CLI.mdfor the current CLI config workflowIMPORT_EXPORT.mdfor backup and restore flowsCACHE.mdfor cache-specific notes