My gift to the rustdoc team
Arborium is a new open-source project that brings tree-sitter-based syntax highlighting to Rust documentation. It bundles 96 language grammars into Rust crates that compile to both native and WebAssembly targets. The project offers three integration approaches: a JavaScript/WASM script for immediate use on docs.rs, a rustdoc PR to add native highlighting support, and a post-processor that adds highlighting to existing HTML documentation with minimal size overhead. The solution addresses long-standing limitations in docs.rs by providing accurate, comprehensive syntax highlighting without requiring full documentation rebuilds.