Getting started with noyalib
A focused walkthrough for someone who just landed on the repo and wants to use the library. The full reference is the root README; this page is the on-ramp.
Install
As a Rust library
[dependencies]
noyalib = "0.0.58"
no_std (alloc-only) and lean profiles are documented in the
per-crate README.
As a CLI tool
The noyafmt and noyavalidate binaries ship through every
mainstream package channel:
cargo install noya-cli --locked # crates.io (noyafmt + noyavalidate)
brew tap sebastienrousseau/tap && brew install noyalib # macOS
yay -S noyalib-bin # Arch / AUR
The library crate is noyalib; the binary crate that produces
noyafmt / noyavalidate is noya-cli. See the
Install section of the root README for the
full per-channel matrix.
Full per-channel install matrix lives in
pkg/PUBLISH.md.
First parse
use noyalib::{from_str, to_string};
#[derive(Debug, serde::Serialize, serde::Deserialize, PartialEq)]
struct Config {
name: String,
port: u16,
features: Vec<String>,
}
fn main() -> Result<(), noyalib::Error> {
let yaml = "
name: noyalib
port: 8080
features:
- parse
- emit
";
let cfg: Config = from_str(yaml)?;
assert_eq!(cfg.port, 8080);
let back = to_string(&cfg)?;
assert!(back.contains("name: noyalib"));
Ok(())
}
What you probably want next
| If you want to… | Read |
|---|---|
Migrate from serde_yaml 0.9 | docs/MIGRATION-FROM-SERDE-YAML.md |
| Understand the architecture | docs/ARCHITECTURE.md |
| Edit YAML lossy-free (preserving comments and layout) | crates/noyalib/README.md § CST and noyalib::cst::Document |
| Validate YAML against a JSON Schema | noyavalidate --schema schema.yaml input.yaml |
| Format YAML | noyafmt --write file.yaml |
| Use the LSP server in your editor | crates/noyalib-lsp/README.md |
| Drive noyalib from an AI agent (MCP) | crates/noyalib-mcp/README.md |
| Run noyalib in the browser | crates/noyalib-wasm/README.md |
| Look up a domain term | GLOSSARY.md |
| Contribute code | CONTRIBUTING.md |
Building from source
The full developer guide (toolchain, task map, reproducing every CI
gate locally) is DEVELOPMENT.md.
git clone https://github.com/sebastienrousseau/noyalib.git
cd noyalib
make # cargo check + clippy + test
make fmt # rustfmt --check
make deny # cargo-deny supply-chain audit
Prerequisites: Rust 1.89.0+ (edition 2024) for the core library and
the CLI / LSP satellite crates alike. make orchestrates the full local
check suite.
Running examples
The crates/noyalib/examples/ directory contains 76 runnable
examples covering every public surface — schema validation,
borrowed-path parsing, CST editing, no_std, robotics newtypes,
figment integration, and more. Each compiles independently:
cargo run --example hello
cargo run --example schema_validation --features validate-schema
cargo run --example figment --features figment
Where to ask for help
- Bug reports / feature requests: GitHub Issues
- Security issues: see SECURITY.md for the disclosure process — do not file public issues for vulnerabilities
- Migration questions: docs/MIGRATION-FROM-SERDE-YAML.md covers the common gotchas