Expand description
Configuration for ma-core-based daemons.
Provides Config, a configuration model that supports:
- native daemon bootstrapping from CLI/env/YAML/defaults via
Config::from_args - storage-agnostic serialization workflows (including wasm) via
Config::from_yaml_strandConfig::to_yaml_string
Native from_args resolves fields from (in decreasing priority):
- Explicit CLI arguments (via
MaArgs) MA_<MA_DEFAULT_SLUG>_*environment variables (slug-prefixed, set per binary)MA_*environment variables (static fallback, shared across binaries)- YAML config file (
XDG_CONFIG_HOME/ma/<slug>.yaml) - Built-in defaults
§Native compile-time constant requirement
Binaries using Config::from_args must declare a compile-time
constant:
const MA_DEFAULT_SLUG: &str = "panteia";This constant serves a dual purpose:
- Default slug — used for file naming when
--slugis not set. - Env-var prefix — uppercased to
MA_PANTEIA_*for env-var lookup. This prefix is fixed at compile time and cannot be changed at runtime. Only file-naming can be overridden via--slug.
Re-exports§
pub use cli::MaArgs;pub use secrets::SecretBundle;
Modules§
- cli
- Command-line argument struct for ma-core-based binaries.
- secrets
- Secret bundle: four standard 32-byte keys plus optional user-defined keys, all stored encrypted on disk in a single file.
Structs§
- Browser
Identity Export - Browser-friendly identity export payload.
- Config
- Runtime configuration for a ma daemon.
Functions§
- default_
config_ path - Default YAML config path:
XDG_CONFIG_HOME/ma/<slug>.yaml. - default_
log_ file_ path - Default log file path:
XDG_DATA_HOME/ma/<slug>.log. - default_
secret_ bundle_ path - Default secret bundle path:
XDG_CONFIG_HOME/ma/<slug>.bin.