illume 0.0.2

Portable, pure-Rust, wasm-safe text lexer and syntax highlighter: djot structure plus a pluggable inner-language injection registry over a logos pack, and a prose-entity pass (URLs, mentions, tags). Host- and toolkit-agnostic; emits (range, kind) spans, no UI dependency.
Documentation
  • Coverage
  • 98.73%
    78 out of 79 items documented0 out of 26 items with examples
  • Size
  • Source code size: 78.5 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.2 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 15s Average build duration of successful builds.
  • all releases: 12s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • merely-made/genet
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • mark-ik

illume

A portable, pure-Rust, wasm-safe text lexer and syntax highlighter.

Home: mark-ik/serval, at components/illume (adopted 2026-07). The former standalone repository is archived and links here.

illume takes source text and returns (range, kind) spans. It carries three passes:

  • djot structure — headings, emphasis, strong, links, code, blockquotes, and the rest of the djot vocabulary, from jotdown's byte-offset event stream.
  • inner-language injection — a pluggable InjectionLexer registry keyed by fence / language label, with a curated logos pack (JSON, TOML, Rust, JS, Lua, CSS, HTML, and more) as the always-present floor. A host can register precise lexers over its own tokenizers as overrides.
  • prose entities — URLs, @mentions, #tags, and emails, for enriching any text surface (an omnibar, a chat line, a note).

It also folds jotdown's nested events into a container tree, giving section folds, a heading outline, and expand-to-enclosing structural selection.

illume is host- and toolkit-agnostic: it emits spans and knows nothing about colour or rendering. Pair it with a palette (e.g. tinct) for colour and a text surface for rendering. It builds for wasm32-unknown-unknown like any pure-Rust crate — no C, no build apparatus.

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.