GitHunt
BE

bearcove/arborium

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

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! -->

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 or docs.rs.

Repository Structure

Sponsors

Thanks to all individual sponsors:

GitHub Sponsors Patreon

...along with corporate sponsors:

Zed Depot

Co-developed with LLMs

This project was co-developed with LLMs such as Claude, Codex, etc. Human
maintainers are responsible for their contributions regardless of machine help.

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

Languages

JavaScript40.1%C28.3%Rust13.4%Tree-sitter Query3.6%TypeScript3.2%Shell1.8%C++1.1%HTML1.0%Elixir0.8%Elm0.4%Solidity0.4%Python0.4%Starlark0.3%Haskell0.3%Makefile0.3%Zig0.2%F#0.2%PHP0.2%Batchfile0.2%PowerShell0.2%Ruby0.2%CMake0.2%Awk0.1%Scala0.1%Lean0.1%Objective-C++0.1%D0.1%Vim Script0.1%TLA0.1%Go0.1%Nix0.1%Groovy0.1%CSS0.1%Lua0.1%Meson0.1%Julia0.1%SCSS0.1%Visual Basic .NET0.1%Dockerfile0.1%Gleam0.1%Thrift0.1%Prolog0.1%SystemVerilog0.1%Idris0.1%C#0.1%Erlang0.1%Kotlin0.1%Objective-C0.0%R0.0%Agda0.0%ReScript0.0%Racket0.0%Emacs Lisp0.0%Perl0.0%Common Lisp0.0%Clojure0.0%COBOL0.0%Verilog0.0%OCaml0.0%Java0.0%Swift0.0%jq0.0%Vue0.0%Assembly0.0%Ada0.0%Typst0.0%MATLAB0.0%Dart0.0%Just0.0%HLSL0.0%HCL0.0%VHDL0.0%GLSL0.0%Cap'n Proto0.0%Open Policy Agent0.0%Svelte0.0%Jinja0.0%Wolfram Language0.0%

Contributors

Apache License 2.0
Created November 30, 2025
Updated March 9, 2026