Getting Started with noyalib
Welcome to the official noyalib getting started guide. This document provides step-by-step instructions for integrating noyalib into your projects across Rust, terminal command line, WebAssembly runtimes, AI systems (MCP), and IDEs (LSP).
Installation Matrix
| Target Platform | Package Name | Installation Command | Core Feature |
|---|---|---|---|
| Rust Library | noyalib |
cargo add noyalib --features simd,rayon |
SIMD + Rayon Data Engine |
| Terminal CLI | noya-cli |
cargo install noya-cli |
Formatting, Linting & Conversion |
| WebAssembly | noyalib-wasm |
npm install noyalib-wasm |
In-Browser SIMD Parser |
| Model Context Protocol | noyalib-mcp |
cargo install noyalib-mcp |
AI Tool & LLM Integration |
| Language Server Protocol | noyalib-lsp |
cargo install noyalib-lsp |
VS Code & Neovim IDE Server |
1. Rust Integration
Add noyalib to your Cargo.toml:
[dependencies]
noyalib = { version = "0.0.16", features = ["simd", "rayon"] }
Basic Single-Document Parsing
use noyalib::{from_str, Value, Result};
fn main() -> Result<()> {
let yaml = "name: noyalib\nversion: 0.0.16\nsafe: true";
let data: Value = from_str(yaml)?;
println!("Package: {}", data["name"]);
Ok(())
}
Multi-Document Parallel Parsing with Rayon
use noyalib::{parallel, Value, Result};
fn main() -> Result<()> {
let docs_stream = "--- doc: 1 --- doc: 2 --- doc: 3";
let docs: Vec<Value> = parallel::from_str_many(docs_stream)?;
assert_eq!(docs.len(), 3);
Ok(())
}
2. Terminal CLI (noya-cli)
Install the binary executable:
cargo install noya-cli
Format and validate YAML files:
noya-cli fmt config.yaml --check
noya-cli convert config.yaml --to json
3. WebAssembly (noyalib-wasm)
Install the NPM package:
npm install noyalib-wasm
Use in JavaScript / TypeScript:
import { parseYaml, validateSchema } from 'noyalib-wasm';
const yamlText = "name: noyalib\nspeed: 520MB/s";
const jsonObject = parseYaml(yamlText);
console.log(jsonObject);
Next Steps
- Explore the noyalib Suite documentation.
- Review Performance Benchmarks.
- Read the Migration Guide from
serde_yaml.