libraryfrontendai
Streaming Markdown renderer from The Pierre Computer Co., written in WebAssembly Text and built for rendering LLM responses as they stream in.
@pierre/words renders Markdown straight to HTML or React and updates incrementally as text streams in, which is what a chat UI needs while a model is still answering. It supports GitHub Flavored Markdown, takes HTML render hooks, can fade in new tokens, and pairs with @pierre/highlights for syntax highlighting in code blocks.
On a 5.4 KiB AI code review document, Pierre's own benchmarks put it at about 449 MiB/s of HTML throughput, against 235 MiB/s for md4x and 26 MiB/s for markdown-it. In a streamed React render it does the work in 11.6 ms where Streamdown takes 70.2 ms, keeps 0.5 MB of memory instead of 11 MB, and its base React renderer is 65% smaller gzipped. These are vendor numbers on an Apple M4 Pro, with the method published on the page.
#react#performance#llm