Show HN: Weavon, 99.93% Pandoc in 9.3 MB of Rust, 15-50x faster, PDF without TeX (github.com)
215 points by deyvium 9 hours ago
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.
loufe 8 hours ago
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.
seer 7 hours ago
Thank you for sharing this, I think in this world of achievements and goals we often neglect these little bits of personal expression, how many devs have millions of tokens at their disposal every day, but chose to use them on building tooling or just working for the man, where something like this is technically easy to do, but requires artistic creativity and just taste and vision.
Dev if you are reading this thank you I now have one more reason to do a similar personal project!
And if you ever encounter bulgarians in the wild - sorry your surname does sound like a swear word in bulgarian :)
deyvium 7 hours ago
Reading this made my day, thank you. If it pushes you to build your own personal project, that is even better than the Show HN itself. And thanks for the warning about Bulgaria, I will keep that in mind if I ever visit :)
lukethorham 7 hours ago
sheesdev 7 hours ago
Wow it really is amazing. It's very clean. I'm a big fan of portfolios and I spent a little over 2 years myself on mine. (https://shees.dev) (I even consider mine, albeit egotistically, one of the better ones).
I stay alert for other really cool ones and this has got to be one of the best. It oozes personality.
gandreani 6 hours ago
Has anyone contacted you for work or opportunities through it?
I've always wondered if they are a good marketing avenue for clients/job prospects or if they just end up being fun personal projects
deyvium 6 hours ago
LoganDark 5 hours ago
First thing I tried was making the "click on objects to interact" sign roll over by spam clicking it... Did not work :(
deyvium 5 hours ago
deyvium 7 hours ago
really cool, I really like yours
stronglikedan 2 hours ago
I think my impostor syndrome just got worse after perusing that site, lol. Well done, whoever that is!
deyvium 8 hours ago
THANKSSSS
topspin 5 hours ago
> but the implementation is clean and performant
A web game with a volume control!
Astounding.
deyvium 5 hours ago
Thanks, glad you liked it :)
zmmmmm 4 hours ago
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.
manoDev 2 hours ago
As the effort and cost of coding and testing goes to zero, the value of everything else will get relatively more valuable.
There will be a mountain of vibe coded repositories, but only a few will have an active steward, conceptual integrity, constant updates, and a community around. Network effects will still apply.
And maybe, we should start paying more attention to documenting and copyrighting/copylefting higher-level concepts, not particular implementations.
hmokiguess 7 hours ago
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!
sgt 4 hours ago
Agreed, it's not about whether a new project popping up is technically superior e.g. faster, more efficient, safer. It's also about the community behind it, the history of the project, the cumulative knowledge and spirit. Something a vibe coded clone will rarely get.
deyvium 7 hours ago
Totally fair, and I have huge respect for John MacFarlane. Pandoc and its companion libraries are an incredible piece of work, and sticking with the original when it already works for you makes sense.
Weavon is mainly for cases where someone needs a small binary, faster batch runs, in process embedding in Rust, Python, Node, or Wasm, or zero-dependency PDF output.
coldpie 6 hours ago
Given that your pandoc clone was built with LLMs which were trained on pandoc, your work is by any ethical definition a derivative of pandoc. You really ought to respect pandoc's license terms.
dofm 6 hours ago
Is it not ethically dubious to you that you've automatically rewritten a GPL app based inevitably on someone's extraordinary efforts and you're going to distribute it in ways that disrespect those efforts?
IMO, two things you should do here:
1) preserve Pandoc's licence choice
2) preserve the Pandoc authors' credits in some meaningful form
Otherwise, ehhh. It's not a show of huge respect for John McFarlane, and I don't think people should have any respect for this at all. To me it's at the very least a kind of piracy of the moral right of authorship.
haberman 5 hours ago
smartmic 5 hours ago
otterley 6 hours ago
deyvium 6 hours ago
q4y2u35uk 6 hours ago
I would too. 8 years, 600 contributers, 20k commit history, versus... a 3 day old minimal-effort slop project by a github acct less than a year old.
juuuuuuu 2 hours ago
hmm, but with how expensive storage has become now, 10MB vs 200MB sounds... alluring
riedel 7 hours ago
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.
deyvium 7 hours ago
For standalone CLI use, you are right that GPL rarely gets in the way. I chose MIT or Apache 2.0 because I built much of Weavon for in process embedding where shelling out to a subprocess is slow or impossible, including Rust crates, native Python and Node bindings, a C ABI, and WebAssembly in browser apps. That also matches the Rust ecosystem and the BSD and MIT licences on Pandoc's own companion libraries like pandoc-types, doclayout, doctemplates, commonmark-hs, and citeproc.
I did not pick MIT or Apache 2.0 to make a point against GPL or free software. I hear the ethical concern around AI assisted permissive rewrites of GPL projects, and as I mentioned elsewhere in the thread, I will replace the clean room wording in the README so it describes how I built it.
kleinicke 8 hours ago
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?
jwr 7 hours ago
FWIW, I've been using a pipeline where pandoc is used to convert markdown and typst is the rendering engine. Very happy with this solution so far. I get beautifully formatted PDFs for all my work (mostly software design files).
In other words, they are different things.
deyvium 7 hours ago
Markdown to Typst setup is hard to beat for design docs. If you ever try swapping Pandoc for Weavon in that pipeline with --pdf-engine=typst, open an issue if anything breaks.
itishappy 7 hours ago
Pandoc and Weavon do not compete with Typst, they use it.
Both can read and write Typst as one of their formats.
vablings 8 hours ago
There is also Tectonic which is pretty fast and comes as a single binary served that will create your LaTeX documents
deyvium 8 hours ago
Tectonic is a nice middle ground when you need full LaTeX packages without installing all of TeX Live, and Weavon supports `--pdf-engine=tectonic` out of the box.
The main difference with `--pdf-engine=embedded` is that it runs offline with no TeX bundle downloads and no subprocesses. That lets the same 9.3 MB binary write PDFs inside air-gapped CI, `--sandbox` mode, Python and Node bindings, and WebAssembly in the browser. If a document relies on raw LaTeX packages or custom TeX macros, `--pdf-engine=tectonic` or `lualatex` is still the right choice.
AIShill101 8 hours ago
Yea same I'd like the OP to answer how it compares to typst.
deyvium 8 hours ago
Just answered in more detail above. The short version is that Typst is a full typesetting language while Weavon is a 52 format Pandoc replacement with a built in zero dependency PDF writer. There is Typst support available in Weavon. They work very well together because Weavon reads and writes Typst and supports `--pdf-engine=typst`.
bscphil 7 hours ago
deyvium 8 hours ago
Typst and Weavon solve different problems, and they pair very well together. And there is Typst support in Weavon.
Typst is a typesetting language and layout engine. If you are writing a paper or book with custom page layout from scratch, Typst gives you far more typographic control than Weavon's embedded PDF writer.
Weavon is a drop in Pandoc 3.13 replacement for converting all the input and output formats that Pandoc supports like Markdown, DOCX, HTML, EPUB, LaTeX, and Typst. I added `--pdf-engine=embedded` so Markdown and Pandoc pipelines can write PDFs from one 9.3 MB binary with no external tools, including inside containers, sandboxes, Python, Node, or WebAssembly in the browser.
I have not benchmarked `--pdf-engine=embedded` against Typst yet. But the difference would be the scope and the setup. Use Typst when you want a full modern typesetter, use `--pdf-engine=embedded` when you want zero dependency PDF output from Markdown or Pandoc, or combine them because Weavon reads and writes Typst and supports `--pdf-engine=typst`.
kccqzy 6 hours ago
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.
deyvium 6 hours ago
The short answer is that --pdf-engine=embedded does not try to reimplement TeX Live or arbitrary TeX macros. If a Markdown document depends on arbitrary LaTeX packages like TikZ or custom macro packages, you still pass --pdf-engine=lualatex, pdflatex, xelatex, typst, or any of the other 15 external engines, just like Pandoc.
When you opt into --pdf-engine=embedded, Weavon skips generating .tex completely and lays out the Pandoc AST directly into PDF 1.7 in pure Rust inside crates/weavon-pdf/src/embedded/. The layout pass paginates headings, paragraphs, tables, footnotes, callouts, and two column layouts straight into zlib-compressed content streams. It embeds TrueType subsets as CID fonts with Unicode maps, using bundled Croscore Arimo and Cousine by default alongside optional font packs or custom fonts. It also converts SVGs directly into PDF vector form XObjects and writes structure trees and metadata for PDF/UA-1 and PDF/A-2u.
For TeX math, weavon-math parses each formula and lays it out against the actual glyph metrics of the embedded fonts, then draws positioned glyphs, rules, and vector paths in crates/weavon-pdf/src/embedded/math.rs.
For embedded raw LaTeX inside Markdown, crates/weavon-pdf/src/embedded/latex_boundary.rs acts as an explicit boundary scanner. It handles the common commands people put in Pandoc Markdown natively, including \newpage, \clearpage, \pagebreak, \vspace, \bigskip, \noindent, \hfill, line breaks, \textbf, \emph, \textit, \texttt, geometry options, and bounded \newcommand expansion inside math.
When it hits raw LaTeX outside that subset, --pdf-fallback controls what happens. The default mode, --pdf-fallback=off, skips the unsupported block and emits a W_PDF_UNSUPPORTED_RAW_LATEX warning. With --pdf-fallback=fragment, Weavon compiles just that raw block as a standalone fragment using lualatex, xelatex, or pdflatex and imports the resulting page as a vector form XObject via page_import.rs. With --pdf-fallback=document, it returns E_PDF_FALLBACK_DOCUMENT so a caller or build script can route the whole file to an external TeX engine instead.
AnonymousPlanet 2 hours ago
> When you opt into --pdf-engine=embedded, Weavon skips generating .tex completely and lays out the Pandoc AST directly into PDF 1.7 in pure Rust inside crates/weavon-pdf/src/embedded/.
Wouldn't it have been easier to implement this for Pandoc? Without having to clone Pandoc around it?
kccqzy 3 hours ago
Appreciate the honesty here. But then again if I’m using LaTeX I’m almost always relying on its superior typography (line-breaking algorithms, microtype etc). I won’t use your project for PDF output but I would try your project next time I need to convert markdown to HTML.
deyvium 3 hours ago
paaloeye 7 hours ago
Looks like the author got the feedback from the thread.
Ref: https://github.com/weavon/weavon/commit/689cfccdf0b4a84f1318...
starkparker 5 hours ago
A README nod to John MacFarlane, too: https://github.com/weavon/weavon/commit/11ee896a01971821fc5c...
689cfcc adds:
> In practice, the repository contains no Pandoc Haskell source code and no Pandoc test files, and project rules forbid reading Pandoc's Haskell source. Behavior is developed against the Pandoc manual, documented interfaces, and Pandoc 3.13 run as a black-box test oracle. ... GPL-licensed Pandoc assets, such as reference Office documents and shell completion scripts, are excluded.
I'm curious how a lawyer would view the licensing for the Pandoc manual and API docs. There's no separate docs license mentioned in the repo but the end of the manual explicitly cites GPLv2. The API docs appear to be generated from code and therefore could arguably be a derivative work. Both contain code snippets and examples that are as relevant as any of the reference Office docs or scripts.
It feels like an edge case, and I'm not a lawyer, but using a derivative work to generate a derivative work feels like a trap. Not a Pandoc-specific concern, a lot of vibecoded reproductions are in a similar boat, but it feels like someone will figure this out the hard way sooner than later.
paaloeye 5 hours ago
Yeah, this is repo GPL de-facto
AnonymousPlanet 27 minutes ago
> In practice, the repository contains no Pandoc Haskell source code and no Pandoc test files, and project rules forbid reading Pandoc's Haskell source
How to prove Claude never read the Pandoc code? Or do these rules only count for the wielder of the harness?
tmoertel an hour ago
For direct PDF generation, does Weavon use Knuth-Plass paragraph layout, like TeX does?
ferd 5 hours ago
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.mkl 4 hours ago
Looks useful! Clickable link: https://github.com/dobladez/clview
ferd 5 hours ago
actually, I might add pandoc support based on weavon if there's interest
deyvium 4 hours ago
This looks really handy, and I would love to see Weavon wired into clview. Whether you call the single binary or embed it as a library, open an issue on GitHub if you run into any rough edges, or let me know if you want a hand with a PR.
dang 4 hours ago
flumpcakes 4 hours ago
How much did this cost in tokens? The author appears to be 18 so I can't reasonably see how they can afford to spend ~$10,000 on a project like this.
deyvium 3 hours ago
I used subscriptions, so I didn't pay 1000s in API costs. I didn't document the token usage for this project but I did run the numbers for a similar rewrite that I did for CMake. Here is the full thing: https://dvgyl.com/logbook/making-wefti
Edit: you might have to navigate the site because I think that it is redirecting to the home page. Try to go to Full Site>Logbook>Making Wefti
paaloeye 7 hours ago
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).
deyvium 7 hours ago
Yes, Windows x86_64 is supported and tested in CI on windows-latest.
You can install it in PowerShell with irm https://weavon.org/install.ps1 | iex, grab the prebuilt x86_64-pc-windows-msvc zip from https://github.com/weavon/weavon/releases/tag/v0.2.0, or build from source with Cargo. PowerShell completions are built in too.
And fair point on the clean room wording. Based on feedback in this thread, I just updated the README to drop that label and describe the AI assisted process.
vatsachak 5 hours ago
Will this be maintained like pandoc? No shade, just curious
deyvium 5 hours ago
Fair question, and the honest answer is that nobody can match Pandoc's two decade track record on launch day and I get why you would be skeptical.
My plan is to keep maintaining it, fix real issues people hit, and track new Pandoc releases. In the meantime, trying it is low risk because it is a drop in Pandoc 3.13 CLI with no format lock in, and every change runs through a 65,937 unit differential test suite against Pandoc so keeping it working is repeatable rather than guesswork.
spapas82 6 hours ago
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!
cozzyd 5 hours ago
I never even considered this a pain point because why would you not have tex on your computer?
deyvium 6 hours ago
Thank you. Skipping a multi gigabyte TeX Live install just to get a clean PDF from Markdown was one of my main reasons for building --pdf-engine=embedded. Open an issue on GitHub if you hit any edge cases when you try it.
mdaniel 4 hours ago
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
minimaxir 3 hours ago
dang commented about it: https://news.ycombinator.com/item?id=50766978.
You can vouch for those comments by clicking the vouch button (I did for the latter).
The OP doesn't have a strong history on HN, which any algo will treat with suspicion.
sergiotapia 42 minutes ago
Unrelated but funny, this reads like huevon in Spanish lol
up2isomorphism 7 hours ago
I would rather using a software that understood by the community instead of an AI slop that might be faster in some cases.
thangalin 7 hours ago
I've been developing https://keenwrite.com/ for about 15 years. I used AI to fix several bugs that annoyed me for a few years. And AI added a citations feature that would have been arduous to implement. By and large, KeenWrite aims to be compatible with pandoc Markdown and can do most of what Weavon can do plus interpolated variables. My application invokes ConTeXt instead of LaTeX to typeset.
https://repo.autonoma.ca/repo/keenwrite
https://keenwrite.com/docs/user-manual.pdf
Funny enough, I've been thinking about porting to rust to get a native Windows binary, and other speed improvements.
cobbal 7 hours ago
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.
deyvium 7 hours ago
That is fair. I used AI coding tools heavily to build this, so questioning whether LLM assisted work counts as clean room when models train on GPL repos makes sense. I will reword that section of the README to describe the actual process instead of calling it "clean room".
What I enforced in practice was keeping Pandoc's Haskell source and test suite out of the repo and testing against the Pandoc 3.13 binary as a black box oracle. Everything reused from Pandoc's ecosystem comes from packages already under BSD or MIT, including pandoc-types, doclayout, doctemplates, commonmark-hs, citeproc, tagsoup, hslua, and Pandoc's BSD-3-Clause default templates. I listed every item in https://github.com/weavon/weavon/blob/main/THIRD_PARTY_NOTIC... and left out GPL assets like Pandoc's reference Office files and shell completions.
All the source and notices are public, so anyone can inspect the code and judge it for themselves.
drnick1 5 hours ago
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.
AnonymousPlanet 3 hours ago
Why are you emphasising "safe rust"?! Pandoc is written in Haskell not C. There's nothing to make safer here. For all we know you might have made it less safe.
cozzyd 6 hours ago
Does it support Lua filters?
And, should be licensed GPL. Asking your LLM to not peek at pandoc code is ineffective.
deyvium 6 hours ago
Yes, it embeds Lua 5.4 and LPeg 1.1.0, so `--lua-filter`, custom Lua readers (`-f FILE.lua`), custom Lua writers (`-t FILE.lua`), and `weavon lua` all work, along with JSON filters via `--filter`.
On the licensing point, I already updated the README to drop the clean room wording and explained the MIT and Apache-2.0 choice elsewhere in the thread.
generalizations 6 hours ago
Beautiful work.
But man, the entire "How Weavon is built, and where it stops" section is such a Claude thing.
deyvium 5 hours ago
Thanks and fair catch on the prose. I will do a proper editing pass on the website copy this weekend.
088agas 6 hours ago
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?
dj_gitmo 5 hours ago
What makes you think the OP knows Rust, or has any association with the Rust community?
Surac 5 hours ago
Rewrite in rust. A meme by now
minimaxir 3 hours ago
Rewriting in Rust for the sake of rewriting in Rust is a meme.
Rewriting in Rust and getting a 15-50x speedup is just pragmatic engineering.
Ampersander 5 hours ago
Posting such slop is immoral and disrespectful.
genxy 7 hours ago
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.
dofm 6 hours ago
100% agree.
deyvium 7 hours ago
I answered the AI and clean room point in more detail elsewhere in this thread. I kept Pandoc's source and tests out of the repo, tested against the binary as a black box oracle, and reused only BSD and MIT libraries from the ecosystem, listed in https://github.com/weavon/weavon/blob/main/THIRD_PARTY_NOTIC... I chose MIT or Apache-2.0 because embedding Weavon as a Rust, Python, Node, and Wasm library was a main goal, though I understand why you disagree with that choice.
088agas 6 hours ago
A couple of lawsuits need to happen in this laundering era.