logoalt Hacker News

Show HN: Weavon, 99.93% Pandoc in 9.3 MB of Rust, 15-50x faster, PDF without TeX

158 points • by deyvium • today at 4:03 PM • 74 comments • view on HN

Hi HN, I built Weavon, a drop-in Pandoc 3.13 replacement written in safe Rust.

Pandoc ships as a 195 MB binary, and producing PDFs usually requires installing gigabytes of TeX Live. Weavon is a single 9.3 MB stripped binary on macOS ARM64 with no runtime dependencies beyond libSystem. It supports all 52 Pandoc 3.13 input formats and 77 output formats, including Lua 5.4.8, LPeg, citeproc, and 194 syntax highlighting languages. Across 65,937 Pandoc 3.13 baseline tests, Weavon matches 65,891 units, or 99.93%, and the remaining 46 differ on purpose. On 1 MB benchmarks on Apple Silicon, it runs 15.3x to 49.7x faster than Pandoc 3.13 with 5.6x to 19.2x lower peak memory.

Beyond drop-in Pandoc mode, v0.2.0 includes a pure-Rust embedded PDF engine with Unicode font subsetting, TeX math, SVG rendering, and PDF/A and PDF/UA tags so you don't need TeX Live. It also adds lossless DOCX and PPTX round-trips, sandboxed WebAssembly filters, built-in LSP and MCP servers, live preview, a git diff driver for Office and PDF files, and Python and Node bindings.

You can test it locally in your browser at https://weavon.org/playground or install the CLI with `curl -fsSL https://weavon.org/install.sh | sh`. Benchmarks and docs are at https://weavon.org.


Comments

loufe • today at 5:19 PM

Completely besides the point, but, man, the author's personal website is one of the coolest personal website's I've ever seen. This sort of thing can be tacky, but the implementation is clean and performant. Check the "full site" button if curious.

https://dvgyl.com/

➕ show 3 replies
zmmmmm • today at 9:00 PM

It definitely seems like a huge challenge to the GPL that people can do this.

It will raise some significant questions eventually I think. GPL seems to have been successful in an empirical sense in that a lot of GPL projects exist and are highly used. Did that happen because of the GPL? If we believe that, are we losing something valuable by obviating it?

To the extent that all GPL facilitated was protection of the intellectual effort in writing code, you can argue that we aren't losing anything fundamental because LLM's do that now. But was GPL protecting more than just the code effort? If it was, does re-implementation mean we are losing that? Is it the community around it? The actual intellectual ideas that were protected by a shield of code but now are so trivially re-implementable? We've seen significant projects that survived via dual licensing, allowing commercial entities to support commercial users while releasing GPL code into the community. Is this dead now? Does it matter? Does it mean we'll have a world full of unsupported vibe coded projects but no way at all for anybody to make money supporting software?

I am very curious to see how things evolve. I hope as a community software engineers can be kind to each other along the way.

hmokiguess • today at 6:25 PM

Mixed feelings here, I think a faster pandoc in rust is probably a good idea but the pandoc author is such an incredible contributor and pandoc is maybe one of the few really amazing Haskell repos out there.

I feel like I rather stick with the OG, support the maintainer, and enjoy a bit of Haskell in the wild!

➕ show 3 replies
riedel • today at 5:52 PM

While really impressive, useful, and fast, I wonder why you chose to remove GPL. Pandoc works IMHO perfectly in many systems because linking is hardly needed. I personally find "clean-room" rewrites of GPLed software ethically borderline—it basically shows the non-enforceability of software licenses in the age of LLMs. Still, making this point often seems plainly unnecessary to me, at least if one believes a tiny bit in the ideals of free software.

➕ show 1 reply
kleinicke • today at 4:57 PM

I know that latex is super slow and annoying. For a while now there is typst: https://typst.app Which is basically a faster version of latex with an easier syntax. Is your approach faster/more convenient than typst?

➕ show 5 replies
ferd • today at 8:36 PM

cool! For those generating PDFs on the terminal, you might find my clv command (shameless plug) useful:

  https://github.com/dobladez/clview
It's a "Universal" doc viewer for the terminal. View PDFs, images, docx, xlsx, markdown, ebooks, etc.
➕ show 1 reply
kccqzy • today at 7:04 PM

How do you even do it without actual TeXLive? Pandoc’s flavor of markdown allows embedding arbitrary TeX code. Would appreciate that you explain the software implementation a bit more.

EDIT: wait you don’t. Enabling the pandoc compat mode disables PDF output on your website.

➕ show 1 reply
vatsachak • today at 8:25 PM

Will this be maintained like pandoc? No shade, just curious

➕ show 1 reply
paaloeye • today at 6:35 PM

Looks like the author got the feedback from the thread.

Ref: https://github.com/weavon/weavon/commit/689cfccdf0b4a84f1318...

➕ show 1 reply
paaloeye • today at 6:23 PM

Does it support Windows?

Since it's a _clean-room_ rewrite in Rust, I expect Windows support because it's one of the most appealing reasons to use Rust in the first place (looking at your uutils/coreutils).

spapas82 • today at 7:17 PM

Thank you very much for this. The fact that I needed tex for PDFs with Pandoc was major turn off for me.

I'm looking forward to try it, keep up the good work!

➕ show 2 replies
mdaniel • today at 8:54 PM

it seems a lot of the reply comments by OP are [dead] and AIUI that's from them tripping a "posted an AI response" filter, but https://news.ycombinator.com/item?id=50763805 and https://news.ycombinator.com/item?id=50765827 make me wonder if the heuristic, I dunno, like adds up a score on the account or something? Or maybe I just have a failure of imagination for the circumstances where one would "@claude post a reply on HN for me"

I also just realized citing those links won't help if show-dead is off but I felt it helpful to cite specifics

up2isomorphism • today at 5:43 PM

I would rather using a software that understood by the community instead of an AI slop that might be faster in some cases.

devilfileprong • today at 8:25 PM

[dead]

cobbal • today at 5:44 PM

Can you really call something a clean-room implementation if it was written by ( I assume, website looks like something claude would spit out) a model trained on pandoc's source code? Automated GPL-washing leaves a bad taste in my mouth.

➕ show 1 reply
drnick1 • today at 7:41 PM

These Rust rewrites of proven software are getting old. Not only the GPL license is typically abandoned, but these projects tend to be one off LLM efforts that will see little to no maintenance in the future.

cozzyd • today at 7:33 PM

Does it support Lua filters?

And, should be licensed GPL. Asking your LLM to not peek at pandoc code is ineffective.

➕ show 1 reply
generalizations • today at 7:22 PM

Beautiful work.

But man, the entire "How Weavon is built, and where it stops" section is such a Claude thing.

➕ show 1 reply
088agas • today at 7:08 PM

This is further proof that Rust people are only able to steal other people's work. It is such a parasitic community.

How did you "build" this? AI translation, which should be safe Rust because Haskell is functional?

➕ show 1 reply
Surac • today at 8:29 PM

Rewrite in rust. A meme by now

Ampersander • today at 8:28 PM

Posting such slop is immoral and disrespectful.

genxy • today at 5:45 PM

You didn't build Weavon, you built the system that used LLMs to build Weavon.

This is a shitty laundering of GPL code into Apache+MIT. The right thing to do here would be to license Weavon identically to Pandoc.

➕ show 1 reply
5324_1 • today at 7:39 PM

[dead]

minh27ten • today at 4:48 PM

[dead]

freecrow • today at 5:40 PM

[dead]

leoliu_builds • today at 4:05 PM

[dead]

johnnyenn • today at 5:31 PM

[dead]

Lucalmz • today at 4:36 PM

[dead]