Skip to main content

Module global

Module global 

Source
Expand description

Port of internal/config/config.go: global configuration management.

The Go original propagates *GlobalConfig via context.Context. Rust has no direct equivalent of Go’s context.Context value-bag; with_context and from_context are ported here as free functions operating on an explicit Context newtype, deferring the real async/task-local design decision (tokio task_local!? an explicit parameter everywhere?) to Phase 4. See PORT_NOTES.md.

Structs§

Context
An explicit stand-in for Go’s context.Context carrying a GlobalConfig. See the module doc comment.
GlobalConfig

Functions§

find_config_file
Searches for a xianyun.yaml (or, as a compatibility alias, caproni.yaml) file starting from the current directory and walking up the directory tree until it reaches either the root directory or the user’s home directory.
from_context
with_context