Runtimes
Eight Lumis runtimes, including community-maintained Java and Python packages.
Lumis supports 8 runtimes. Six are maintained in this repository; the community maintains the Java and Python packages.
First-party runtimes
| Runtime | Package | Reference |
|---|---|---|
| CLI | @lumis-sh/cli (lumis binary), lumis-cli on crates.io | npm |
| Rust | lumis | docs.rs |
| Elixir | lumis | HexDocs |
| JavaScript / TypeScript | @lumis-sh/lumis | npm |
| Browsers / CDN | @lumis-sh/lumis | npm |
| Edge / Workers | @lumis-sh/lumis | Guide |
@lumis-sh/lumis has one JavaScript and TypeScript API with bundled declarations.
It covers Node.js, Bun, Deno, browsers, and edge and worker hosts. The
Edge / Workers guide covers Supabase Edge Functions, Cloudflare
Workers and Vercel, and what another host needs. Node, the CLI and
Elixir all run the same Wasmtime highlighting from lumis-wasm-runtime, so
identical input produces identical output; browsers and edge runtimes use web-tree-sitter.
Every dynamic runtime loads exact parser WASM per language rather than shipping an all-language binary. It loads what a document turns out to need, and keeps its caches across process restarts. A host application can preload the languages it needs at startup without blocking it, and the standalone CLI can prepare the directory ahead of time.
Community-maintained runtimes
These packages use Lumis's highlighting engine and have their own APIs and releases. Check their documentation for supported features and installation instructions.
| Runtime | Package | Maintainer | Guide |
|---|---|---|---|
| Java | Lumis4J | roastedroot | Java |
| Python | fastpylight | Answer.AI | Python |
Themes
| Runtime | Package | Reference |
|---|---|---|
| JavaScript / TypeScript | @lumis-sh/themes | npm |
Integrations
| Runtime | Integration | Package | Reference |
|---|---|---|---|
| JavaScript / TypeScript | React | @lumis-sh/react | npm |
| JavaScript / TypeScript | Vite HTML | @lumis-sh/vite | npm |
| JavaScript / TypeScript | markdown-it | @lumis-sh/markdown-it-lumis | npm |
| JavaScript / TypeScript | rehype | @lumis-sh/rehype-lumis | npm |
WASM language packages
Dynamic parser grammars are published as self-contained language packages such
as @lumis-sh/wasm-rust, @lumis-sh/wasm-javascript, and
@lumis-sh/wasm-elixir. Each package keeps its parser, queries, aliases, and
integrity metadata at one version so the npm package, CLI, and Elixir load the same
language definition.
Preset bundle packages are also available, such as @lumis-sh/wasm-bundle-web, @lumis-sh/wasm-bundle-web-extra, @lumis-sh/wasm-bundle-system, and @lumis-sh/wasm-bundle-backend.
- package list: Languages
- each package's default export is its language, so
import rust from "@lumis-sh/wasm-rust"is all a highlighter needs; a parser that serves more than one language exports each by name - a bundle package's default export registers its languages lazily
- loading: Languages
- parser sources and resolvers: JavaScript / TypeScript
- JavaScript / TypeScript usage: JavaScript / TypeScript