82 points deyvium 2 hours ago 29 comments

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.

kleinicke 1 hour ago | parent

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?

AIShill101 1 hour ago | parent

Yea same I'd like the OP to answer how it compares to typst.

deyvium 1 hour ago | parent

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 15 minutes ago | parent

I've been using Pandoc to convert my markdown documents to readable PDFs for years now, with Typst as the backend, so I will definitely be checking this out.

Can I ask though, do you have a long term plan for keeping this project maintained? It's gotten way to easy too vibecode something that does everything you want, and then leave it languishing on Github in a couple of months after it loses its shine. I want software I know I can depend on... something I might expect to see in the Debian repos in 4-5 years, for example.

vablings 1 hour ago | parent

There is also Tectonic which is pretty fast and comes as a single binary served that will create your LaTeX documents

deyvium 1 hour ago | parent

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.

deyvium 1 hour ago | parent

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`.

jwr 1 hour ago | parent

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 53 minutes ago | parent

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 47 minutes ago | parent

Pandoc and Weavon do not compete with Typst, they use it.

Both can read and write Typst as one of their formats.

loufe 1 hour ago | parent

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/

seer 1 hour ago | parent

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 54 minutes ago | parent

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 46 minutes ago | parent

Along those lines weavon in Chile may sound like a widely used slang word.

deyvium 44 minutes ago | parent

Between my surname in Bulgaria and Weavon in Chile, my international naming luck is off to a great start. At least in Chile it can mean dude depending on the tone so I will take that as a win.

sheesdev 28 minutes ago | parent

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.

deyvium 26 minutes ago | parent

really cool, I really like yours

gandreani 7 minutes ago | parent

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

up2isomorphism 1 hour ago | parent

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

thangalin 19 minutes ago | parent

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 1 hour ago | parent

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.

genxy 1 hour ago | parent

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.

riedel 59 minutes ago | parent

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 56 minutes ago | parent

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.

paaloeye 28 minutes ago | parent

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).

hmokiguess 27 minutes ago | parent

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!

deyvium 24 minutes ago | parent

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.

paaloeye 16 minutes ago | parent

Looks like the author got the feedback from the thread.

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