| Crates.io | nyl |
| lib.rs | nyl |
| version | 0.1.0 |
| created_at | 2026-01-25 23:01:46.274068+00 |
| updated_at | 2026-01-25 23:20:01.846038+00 |
| description | Kubernetes manifest generator with Helm integration |
| homepage | |
| repository | https://github.com/NiklasRosenstein/nyl |
| max_upload_size | |
| id | 2069765 |
| size | 658,332 |
Kubernetes manifest generator with Helm integration - Rust edition
Fast, efficient Kubernetes manifest generation written in Rust. A complete rewrite of the Python version with 10x performance improvements and 70-90% memory reduction.
# Download latest release for your platform
# Linux (x86_64)
curl -LO https://github.com/NiklasRosenstein/nyl/releases/latest/download/nyl-x86_64-unknown-linux-gnu.tar.gz
tar xzf nyl-x86_64-unknown-linux-gnu.tar.gz
sudo mv nyl /usr/local/bin/
# macOS (Apple Silicon)
curl -LO https://github.com/NiklasRosenstein/nyl/releases/latest/download/nyl-aarch64-apple-darwin.tar.gz
tar xzf nyl-aarch64-apple-darwin.tar.gz
sudo mv nyl /usr/local/bin/
# macOS (Intel)
curl -LO https://github.com/NiklasRosenstein/nyl/releases/latest/download/nyl-x86_64-apple-darwin.tar.gz
tar xzf nyl-x86_64-apple-darwin.tar.gz
sudo mv nyl /usr/local/bin/
# Clone repository
git clone https://github.com/NiklasRosenstein/nyl.git
cd nyl/nyl-rs
# Build and install
cargo install --path .
# Or just build
cargo build --release
# Binary will be at target/release/nyl
cargo install --git https://github.com/NiklasRosenstein/nyl nyl
# Create a new project
nyl new project my-app
cd my-app
# Validate configuration
nyl validate
# Render manifests for development
nyl render --environment dev
# See diff against cluster
nyl diff --environment dev
# Apply to cluster
nyl apply --environment dev
| Command | Description |
|---|---|
nyl new project <name> |
Create new project with scaffolding |
nyl new component <api-version> <kind> |
Create component definition |
nyl validate [--strict] |
Validate project configuration |
nyl render [--environment ENV] |
Render manifests to stdout |
nyl diff [--environment ENV] |
Show kubectl diff against cluster |
nyl apply [--environment ENV] |
Apply manifests to cluster |
nyl generate argocd |
Generate ArgoCD Applications |
nyl cluster-info |
Display cluster version information |
Comprehensive documentation is available in mdbook format:
# Serve documentation locally
cd nyl-rs && mdbook serve book --open
# Or view online
# https://niklasrosenstein.github.io/nyl/
Documentation includes:
Check out the examples/ directory for practical usage:
src/
โโโ cli/ # Command-line interface with clap
โ โโโ commands/ # Command implementations (render, diff, apply, etc.)
โ โโโ output/ # Output formatting with colored diffs
โโโ config/ # Project configuration loading
โโโ template/ # MiniJinja templating engine
โโโ generator/ # Manifest generation pipeline
โโโ kubernetes/ # Kubernetes client integration (kube-rs)
โโโ resources/ # HelmChart, Component resources
โโโ git/ # Git repository management with authentication
โโโ helm/ # Helm chart processing
โโโ components/ # Component discovery and registry
โโโ profiles/ # Profile management
โโโ secrets/ # Secrets provider framework
โโโ util/ # Utilities (fs, hashing, etc.)
# Development build
cargo build
# Release build (optimized)
cargo build --release
# Run tests
cargo test
# Run benchmarks
cargo bench
# Format and lint
cargo fmt
cargo clippy -- -D warnings
The project includes a .mise.toml for tool management:
# Install tools
mise install
# Run tasks
mise run fmt # Format code
mise run lint # Run clippy
mise run test # Run tests
mise run bench # Run benchmarks
mise run docs-serve # Serve documentation
| Metric | Rust | Python | Improvement |
|---|---|---|---|
| Startup Time | <50ms | ~500ms | 10x faster |
| Memory Usage | <50MB | ~200MB | 75% reduction |
| 100 Helm Charts | <1s | ~10s | 10x faster |
| Binary Size | 8.5MB | ~100MB+ | 92% smaller |
Run benchmarks yourself:
cargo bench
# Results saved to target/criterion/
See BENCHMARKS.md for detailed performance analysis.
# Run all tests
cargo test
# Run with coverage
cargo tarpaulin --out Html
# Test specific module
cargo test --lib config::tests
# Integration tests
cargo test --test integration_test
Test Coverage:
The Rust version is a drop-in replacement:
โ
Existing nyl-project.yaml files work without modification
โ
Same CLI command structure
โ
Compatible YAML output
โ
Same Helm chart handling
See the Migration Guide for details.
MIT License - see LICENSE for details
Contributions are welcome! Please read CONTRIBUTING.md for guidelines.
See CHANGELOG.md for a detailed history of changes.
Made with โค๏ธ in Rust