https://github.com/bearcove/arborium
An opinionated tree-sitter + tree-sitter-highlight + grammars bundle
https://github.com/bearcove/arborium
highlighting rust syntax tree-sitter
Last synced: about 1 month ago
JSON representation
An opinionated tree-sitter + tree-sitter-highlight + grammars bundle
- Host: GitHub
- URL: https://github.com/bearcove/arborium
- Owner: bearcove
- License: apache-2.0
- Created: 2025-11-30T14:14:01.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2026-01-10T09:26:27.000Z (about 2 months ago)
- Last Synced: 2026-01-11T02:54:30.754Z (about 2 months ago)
- Topics: highlighting, rust, syntax, tree-sitter
- Language: JavaScript
- Homepage: https://arborium.bearcove.eu/
- Size: 21.1 MB
- Stars: 321
- Watchers: 1
- Forks: 13
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# arborium
Batteries-included [tree-sitter](https://tree-sitter.github.io/tree-sitter/) grammar collection with HTML rendering and WASM support.
[](https://crates.io/crates/arborium)
[](https://docs.rs/arborium)
[](LICENSE-MIT)
## Quick Start
### As a Rust library
```bash
cargo add arborium
```
By default, all permissively-licensed grammars are included (~70 languages). To select specific languages:
```bash
cargo add arborium --no-default-features --features lang-rust,lang-javascript
```
### As a CLI tool
```bash
cargo install arborium-cli
arborium file.rs # Syntax highlight in your terminal
```
### In the browser
```html
```
## Features
- **~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
- **Feature flags** for fine-grained control over included languages
## Documentation
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](https://crates.io/crates/arborium)** or **[docs.rs](https://docs.rs/arborium)**.
## Repository Structure
- **[`crates/arborium/`](crates/arborium/)** - Main umbrella crate (start here!)
- **[`crates/arborium-cli/`](crates/arborium-cli/)** - Terminal syntax highlighter CLI
- **[`crates/arborium-*/`](crates/)** - Individual language grammar crates (~100 crates)
- **[`packages/arborium/`](packages/arborium/)** - NPM package for browser use
- **[`xtask/`](xtask/)** - Build automation and code generation
## Sponsors
Thanks to all individual sponsors:


...along with corporate sponsors:


## License
This project is dual-licensed under [MIT](LICENSE-MIT) OR [Apache-2.0](LICENSE-APACHE).
The bundled grammar sources retain their original licenses - see [LICENSES.md](LICENSES.md) for details.
## Development
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:
```bash
cargo xtask help
```