Skip to main content

Module runtime

Module runtime 

Source
Expand description

Boot-time helpers shared by the framework binary and downstream domain binaries (e.g. kglite-mcp-server).

Each helper is small enough to inline; collecting them here keeps the duplication out of every shim’s main.rs and gives a single place to change boot-time behaviour.

Functions§

init_tracing
Initialise stderr-only tracing with RUST_LOG=info default.
load_env_for_mode
Load environment variables from a .env file before any tool that reads GITHUB_TOKEN / API credentials runs.
maybe_watch
Spawn the framework’s debounced filesystem watcher when the mode requires one. Returns the handle (drop to stop watching) or None if dir is None — useful for let _watch = …; bindings in downstream main fns.
resolve_source_roots
Resolve a manifest’s source_root(s) declarations to canonical absolute path strings. Each entry must canonicalise to an existing directory; failures bubble as a ManifestError.