cordis-include
Config entry trees and YAML/JSON loader files for the cordis-rs plugin framework.
This crate is the data half of porting upstream Cordis' loader: it maps
between config files on disk and an in-memory tree of entries, preserving
object key order for diff-friendly files, expanding ${{ env.NAME }}
templates, and providing the suspend guards that break the
write → watch → write feedback loop.
┌─ cordis-loader assembly: plugin registry + fiber state machine
├─ cordis-group group plugin (nesting marker)
├─ cordis-include ← this crate: entry trees + config files
└─ cordis-rs core runtime (zero dependencies)
Example
use ;
#
Files round-trip through LoaderFile with atomic .tmp + rename writes,
readonly detection, unknown top-level keys preserved, and coalesced
deferred writes (write_deferred) for bursty callers:
entries:
- id: srv
name: group
group:
- name: adapter-http
config:
port: 8080
host: ${{ env.HOST }}
Feature flags
watch— debounced file watching throughnotify. Events observed while the file is suspended (our own writes, or reloads in progress) do not fire the callback.
Scope
This crate deliberately knows nothing about where plugins come from and
never starts or stops fibers: cordis-loader
implements the PluginResolver contract defined here and drives the
lifecycle.