Batteries-included tree-sitter grammar collection with HTML rendering and WASM support.
cargo add arboriumBy default, all permissively-licensed grammars are included (~70 languages). To select specific languages:
cargo add arborium --no-default-features --features lang-rust,lang-javascriptcargo install arborium-cli
arborium file.rs # Syntax highlight in your terminal<script src="https://cdn.jsdelivr.net/npm/@arborium/arborium@2/dist/arborium.iife.js"></script>
<!-- Auto-highlights all code blocks! -->fn main() {
miette_arborium::install_global().ok();
// Now all miette errors have syntax-highlighted source code!
}- ~70 language grammars included out of the box
- Permissively licensed (MIT/Apache-2.0/CC0/Unlicense) grammars enabled by default
- WASM support with custom allocator fix
- HTML rendering with 32 built-in themes
- Browser usage via drop-in script tag or ESM module
- CLI tool (
arborium-cli) - syntax highlighting for terminal and HTML - Miette integration (
miette-arborium) - beautiful error diagnostics with syntax highlighting - Feature flags for fine-grained control over included languages
For complete documentation including:
- Full language support list
- Browser usage guide (drop-in script, ESM modules, compile to WASM)
- All 32 built-in themes
- HTML tag reference
- WASM build instructions
- Feature flags reference
See the arborium crate on crates.io or docs.rs.
crates/arborium/- Main umbrella crate (start here!)crates/arborium-cli/- Terminal syntax highlighter CLIcrates/miette-arborium/- Miette diagnostic integrationcrates/arborium-*/- Individual language grammar crates (~100 crates)packages/arborium/- NPM package for browser usextask/- Build automation and code generation
Thanks to all individual sponsors:
...along with corporate sponsors:
This project is dual-licensed under MIT OR Apache-2.0.
The bundled grammar sources retain their original licenses - see LICENSES.md for details.
This project uses cargo xtask for most development and release tasks.
For detailed architecture, workflows, publishing order, and layout, see DEVELOP.md.
For a quick overview of available commands, run:
cargo xtask help