Unofficial Hacker News companion — get notified on comment replies, and more.

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

158 points by deyvium 5 hours ago github.com 74 comments (opens Hacker News) Vote (opens Hacker News)

View full thread · View on Hacker News

Comment thread (12)

  1. 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?
    Replies (5)
    1. Yea same I'd like the OP to answer how it compares to typst.
      Replies (1)
      1. 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`.
        Replies (1)
        1. 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.

          Replies (1)
          1. That is a fair question to ask, and honestly no solo developer can prove 4 to 5 year longevity on launch day. Anyone promising Debian stability on day one is just guessing.

            Two things make trying it lower risk than a typical one off project. First, because Weavon implements Pandoc 3.13's CLI, formats, and Typst backend, it does not lock you into a proprietary format. If it ever stopped fitting your workflow, switching back to Pandoc is a single binary swap.

            Second, I tried to build it so it can actually be maintained long term instead of being a throwaway prototype. The codebase is split into modular format crates with architecture docs and ADRs explaining the design, and every change runs through scripts/gate.sh against a 65,937-unit differential test harness comparing output to Pandoc 3.13. That makes fixing bugs and tracking future Pandoc releases repeatable rather than guesswork, and lowers the bar for outside contributors or packagers too.

            My plan is to keep maintaining it, fix real-world issues people hit, track new Pandoc releases, and work toward a 1.0. Steady commits and releases over the next year are the only real proof of that, so watching from the sidelines until you see it stick is completely fair.

            Replies (1)
            1. Did you have Claude write this comment lol?
    2. There is also Tectonic which is pretty fast and comes as a single binary served that will create your LaTeX documents
      Replies (1)
      1. 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.

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

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

      Replies (1)
      1. 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.
    5. Pandoc and Weavon do not compete with Typst, they use it.

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