Pandoc 3.13 rewritten in Rust

Weavon is a clean-room Pandoc 3.13 converter in Rust that matches 65,891 of 65,937 test units (99.93%) and runs 15.3 to 49.7 times faster.

One Rust binary with no Haskell runtime

  • 15.3x to 49.7xFaster than Pandoc 3.13 on 1 MB inputs
  • 9.26 MBStripped ARM64 binary, 1 macOS dylib
  • 99.93%65,891 of 65,937 conformance units equal
  • 47 of 50Workspace crates forbid unsafe code

Weavon compiles 52 readers, 77 writers, Lua 5.4.8, LPeg 1.1.0, CSL 1.0.2, and all 194 syntax definitions into one 9.26 MB binary.

Built clean-room for memory safety and speed

  • Clean-room MIT or Apache-2.0 codebase with zero GPL Pandoc code
  • 47 of 50 crates enforce #![forbid(unsafe_code)]
  • Links only /usr/lib/libSystem.B.dylib on macOS ARM64
  • Bounded parser limits stop runaway memory on untrusted input
  • Embedded PDF engine, MCP, LSP, and WASM filters in native mode
  • Drop-in --compat=pandoc-3.13 mode keeps existing Makefiles working

When to keep Haskell Pandoc

  • You require exact GPL Pandoc data files such as default.csl or Pandoc office reference styles without passing --csl or --reference-doc.
  • You depend on the 46 deliberate conformance differences or the 2 partial input formats (json, mdoc).
  • You compile custom Haskell filters directly against the upstream Pandoc library.

Try Pandoc in Rust on your own files

  1. Install Weavon

    Install the stripped Rust binary with one shell command.

    curl -fsSL https://weavon.org/install.sh | sh
  2. Verify byte equality

    Run both converters on your own Markdown file and compare with cmp.

    cmp <(pandoc README.md -t html) <(weavon --compat=pandoc-3.13 README.md -t html) && echo same

Common questions

Is Weavon a port of Pandoc's Haskell source code?

No. Weavon is a clean-room Rust implementation written from the Pandoc manual and black-box output testing, licensed under MIT or Apache-2.0.

How compatible is Weavon with Pandoc 3.13?

65,891 of 65,937 conformance units match Pandoc 3.13 output, warnings, and exit codes (99.93%). 46 units differ on purpose because of GPL data files or oracle crashes.

How much smaller is the Rust binary than Pandoc?

The stripped ARM64 Weavon 0.2.0 binary is 9.26 MB (8.83 MiB), which is 21.1 times smaller than the 195.35 MB Pandoc 3.13 release binary.

Does Weavon use unsafe Rust?

47 of 50 workspace crates set #![forbid(unsafe_code)]. Only the three FFI and WebAssembly boundary crates (weavon-c, weavon-lua, weavon-wasm) use audited unsafe blocks.