Skip to content

Export LineHighlighter from @markit/web (0.2.1) - #19

Merged
arpan404 merged 4 commits into
mainfrom
ace/web-line-highlighter
Nov 18, 2026
Merged

arpan404 merged 4 commits into
mainfrom
ace/web-line-highlighter

Conversation

@arpan404

Copy link
Copy Markdown
Owner

0.2.0 shipped the incremental LineHighlighter in Rust, the C FFI and Kotlin, but @markit/web never exported it, so web apps couldn't reach it. This exports it and keeps the default Wasm as small as before.

  • LineHighlighter is exported from @markit/web (setText, edit, tokens, setBudget, advance, free/dispose), running in the renderer's shared worker, not a second instance.
  • Grammar highlighting ships as a second Wasm, pkg-grammars/, loaded lazily on the first LineHighlighter or grammar: true request. Rendering markdown never fetches it.
  • Sizes (release toolchain): default Wasm 2,230,101 bytes (1.16 MB gzip, unchanged from 0.2.0); grammars Wasm 4,823,130 bytes (2.62 MB gzip), on demand only.
  • Node and browser tests cover creation, edits, token parity with grammar highlighting, budget/advance, freeing, and that plain rendering never loads the grammars Wasm.

arpan404 and others added 4 commits November 17, 2026 20:57
Co-Authored-By: spade <bot@acehq.dev>
Co-Authored-By: spade <bot@acehq.dev>
Co-Authored-By: spade <bot@acehq.dev>
Co-Authored-By: spade <bot@acehq.dev>
@arpan404
arpan404 merged commit eafc127 into main Nov 18, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant