| Crates.io | arborium-highlight |
| lib.rs | arborium-highlight |
| version | 2.12.4 |
| created_at | 2025-12-08 20:31:42.300789+00 |
| updated_at | 2026-01-18 11:08:44.804621+00 |
| description | Unified syntax highlighting for arborium - works with both static Rust grammars and WASM plugins |
| homepage | https://github.com/bearcove/arborium |
| repository | https://github.com/bearcove/arborium |
| max_upload_size | |
| id | 1974356 |
| size | 110,505 |
Core syntax highlighting engine for arborium.
This crate provides the unified highlighting engine that works with both:
The parsing is synchronous (tree-sitter fundamentally is), but getting a grammar
can be async in browser contexts where plugins are loaded from a CDN via dynamic
import(). The async trait supports both use cases with the same API.
use arborium_highlight::{Span, spans_to_html, HtmlFormat};
// After getting spans from a grammar...
let html = spans_to_html(source, spans, &HtmlFormat::CustomElements);
Part of the arborium project. See arborium.dev for more information.