https://github.com/forkwright/koinon
Fleet-common Rust scaffolding: tracing init, typed errors, config loading, clap prelude
https://github.com/forkwright/koinon
Last synced: 3 days ago
JSON representation
Fleet-common Rust scaffolding: tracing init, typed errors, config loading, clap prelude
- Host: GitHub
- URL: https://github.com/forkwright/koinon
- Owner: forkwright
- License: apache-2.0
- Created: 2026-05-26T21:21:27.000Z (18 days ago)
- Default Branch: main
- Last Pushed: 2026-05-26T21:30:15.000Z (18 days ago)
- Last Synced: 2026-05-26T23:16:47.108Z (17 days ago)
- Language: Rust
- Size: 95.6 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# koinon
κοινόν — fleet-common Rust scaffolding for forkwright crates.
Eliminates the boilerplate that every forkwright binary and library repeats:
tracing subscriber setup, typed error bases, `figment`-backed config loading,
and a `clap` prelude for global flags.
## Modules
| Module | Purpose |
|--------|---------|
| `telemetry` | `tracing` subscriber init with `RUST_LOG` / `EnvFilter` fallback |
| `error` | `AppError`, `ConfigError`, and `snafu` re-exports |
| `config` | `figment` loader: TOML file → env-var override → typed struct |
| `cli` | `GlobalArgs` (`--verbose`, `--log-json`) for `clap` CLI binaries |
## Quick start
```toml
[dependencies]
koinon = { git = "https://github.com/forkwright/koinon", tag = "v0.1.0" }
```
```rust
use clap::Parser;
use koinon::cli::GlobalArgs;
#[derive(Parser)]
struct Cli {
#[command(flatten)]
global: GlobalArgs,
}
fn main() {
let cli = Cli::parse();
cli.global.init_tracing("my_crate=info");
tracing::info!("started");
}
```
## Adoption guide
See [`ADOPTION.md`](ADOPTION.md) for the step-by-step migration from
hand-rolled tracing init and config loading to `koinon`.
## License
Apache-2.0 — see [`LICENSE`](LICENSE).