limn

ekesti

A zero-dependency lexical syntax highlighter and language detector with native runtimes for Go, Rust, JS, Zig, and C.

TypeScriptCreated

What is ekesti/limn?

limn is a zero-dependency, synchronous lexical syntax highlighter and language detector with native runtimes for Go, Rust, JavaScript/TypeScript, Zig, and C99, plus a Go CLI. Rather than maintaining separate per-language parsers or FFI wrappers, it defines grammars and themes once in a TypeScript DSL compiled into bytecode tables executed by a UTF-8 scanner VM without regular expressions.

For language detection, limn uses a sparse 89.2 KB int8 linear classifier that runs in a single pass over the first 4 KB with zero heap allocations in Go, Rust, and Zig. Renderers produce inline-styled HTML, class-based HTML with generated CSS variables, 24-bit ANSI terminal colors, or zero-copy token streams.

Because limn is strictly lexical, it does not construct abstract syntax trees or resolve semantic symbols across scopes; users needing semantic highlighting are directed to Tree-sitter or Shiki. The project is MIT licensed.

cgolanguage-detectionrustsyntax-highlightingtypescriptzig

Before you startThe README says

Runs on
Cross-platform (Go, Rust, Node.js, browser, Zig, and C99)
Needs
Native toolchain for your target language; Zig to build the C99 library
How you get it
Install via go get, cargo add limn-hl, npm install limn-hl, zig fetch, or build C library
Not yet
Lexical highlighting only; does not build ASTs or resolve symbols across scopes

Facts from GitHub (updated Dec 1, 2026) and the project's README. License summaries are simplified: check the license file. RepoRanking reviews listings for relevance and spam, and doesn't test or vouch for code.