arborium 1.2.2

Tree-sitter syntax highlighting with HTML rendering and WASM support
Documentation

Arborium - Batteries-included tree-sitter grammar collection

This crate provides:

  • Re-exports of individual grammar crates via feature flags
  • HTML rendering for syntax highlighting
  • WASM support with custom allocator (automatically enabled on WASM targets)

Usage

Enable the languages you need via feature flags:

[dependencies]
arborium = { version = "0.1", features = ["lang-rust", "lang-python"] }

Or enable all languages:

[dependencies]
arborium = { version = "0.1", features = ["all-languages"] }

Example

use arborium::Highlighter;

let mut highlighter = Highlighter::new();
let html = highlighter.highlight_to_html("rust", "fn main() {}")?;