32 stable releases

Uses new Rust 2024

2.12.4 Jan 18, 2026
2.12.3 Jan 17, 2026
2.4.7 Dec 30, 2025
1.3.0 Dec 13, 2025
0.1.3 Dec 4, 2025

#1172 in WebAssembly

Download history 708/week @ 2025-12-06 1296/week @ 2025-12-13 438/week @ 2025-12-20 805/week @ 2025-12-27 1407/week @ 2026-01-03 1475/week @ 2026-01-10 1523/week @ 2026-01-17 992/week @ 2026-01-24 857/week @ 2026-01-31

4,978 downloads per month
Used in 9 crates (5 directly)

MIT/Apache and maybe GPL-3.0

181MB
5.5M SLoC

C 5.5M SLoC // 0.0% comments Rust 10K SLoC // 0.0% comments Scheme 3K SLoC // 0.1% comments jq 722 SLoC // 0.1% comments Elixir 450 SLoC // 0.0% comments C++ 370 SLoC // 0.0% comments Solidity 116 SLoC // 0.3% comments AWK 111 SLoC Elm 109 SLoC // 0.6% comments Batch 99 SLoC // 0.1% comments Zig 96 SLoC // 0.1% comments Zsh 89 SLoC // 0.1% comments Haskell 89 SLoC // 0.3% comments Vim Script 88 SLoC // 0.0% comments Shell 78 SLoC // 0.2% comments F# 74 SLoC // 0.2% comments Go 73 SLoC // 0.1% comments Groovy 72 SLoC // 0.1% comments Bazel 72 SLoC // 0.5% comments PowerShell 69 SLoC Objective-C++ 68 SLoC // 0.1% comments Scala 63 SLoC // 0.1% comments Lua 52 SLoC // 0.1% comments PHP 50 SLoC // 0.6% comments D 50 SLoC // 0.3% comments Julia 49 SLoC // 0.0% comments Perl 48 SLoC JavaScript 43 SLoC // 0.2% comments Rusty Object Notation 39 SLoC TSX 36 SLoC R 34 SLoC Ruby 34 SLoC // 0.6% comments Idris 33 SLoC TypeScript 32 SLoC C# 29 SLoC Gleam 28 SLoC // 0.4% comments BASH 25 SLoC // 0.1% comments Visual Basic 24 SLoC ReScript 23 SLoC Racket 23 SLoC GraphQL 20 SLoC Clojure 19 SLoC Python 19 SLoC // 0.3% comments Assembly 18 SLoC // 0.1% comments SystemVerilog 18 SLoC // 0.3% comments Common Lisp 17 SLoC COBOL 17 SLoC Erlang 16 SLoC // 0.3% comments Uiua 16 SLoC SQL 15 SLoC // 0.3% comments Agda 15 SLoC // 0.2% comments Ada 14 SLoC Java 13 SLoC // 0.3% comments Swift 12 SLoC // 0.2% comments Emacs Lisp 12 SLoC // 0.3% comments Typst 12 SLoC Kotlin 11 SLoC // 0.6% comments OCaml 10 SLoC // 0.2% comments Objective-C 10 SLoC AsciiDoc 9 SLoC Coq 9 SLoC // 0.6% comments VHDL 8 SLoC Thrift 8 SLoC // 0.8% comments INI 8 SLoC // 0.2% comments Dart 7 SLoC HCL 5 SLoC HLSL 4 SLoC // 0.3% comments GLSL 4 SLoC Jinja2 3 SLoC Vue 3 SLoC Svelte 1 SLoC

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

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

Dependencies

~3–6MB
~112K SLoC