Skip to content

An opinionated tree-sitter + tree-sitter-highlight + grammars bundle

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

bearcove/arborium

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

arborium

Batteries-included tree-sitter grammar collection with HTML rendering and WASM support.

Crates.io Documentation License

Quick Start

As a Rust library

cargo add arborium

By default, all permissively-licensed grammars are included (~70 languages). To select specific languages:

cargo add arborium --no-default-features --features lang-rust,lang-javascript

As a CLI tool

cargo install arborium-cli
arborium file.rs  # Syntax highlight in your terminal

In the browser

<script src="https://cdn.jsdelivr.net/npm/@arborium/arborium@2/dist/arborium.iife.js"></script>
<!-- Auto-highlights all code blocks! -->

With Miette error diagnostics

fn main() {
    miette_arborium::install_global().ok();
    // Now all miette errors have syntax-highlighted source code!
}

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
  • Miette integration (miette-arborium) - beautiful error diagnostics with syntax highlighting
  • 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 or docs.rs.

Repository Structure

Sponsors

Thanks to all individual sponsors:

GitHub Sponsors Patreon

...along with corporate sponsors:

Zed Depot

License

This project is dual-licensed under MIT OR Apache-2.0.

The bundled grammar sources retain their original licenses - see 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:

cargo xtask help

About

An opinionated tree-sitter + tree-sitter-highlight + grammars bundle

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Sponsor this project

  •  

Packages

 
 
 

Contributors 3

  •  
  •  
  •