Skip to content

Conversation

@mgmeier
Copy link
Contributor

@mgmeier mgmeier commented Jan 26, 2026

Description

This PR introduces a new pipeline for generating benchmarking report PDFs via typst.

The existing one utilizes a custom-modded Emacs bundle em and relies on Org mode to pull in source data, and Org mode formulae to calculate deltas - meaning that actual application logic is implemented in a spreadsheet document. These calculations have now moved to locli proper.

Currently, the only report type supported by typst is the comparison report - which is also the only hard dependency for em. In the future, other report types like single-run PDFs or variance analyses can also be built using the new pipeline. typst comparison source documents will be automatically generated alongside Org mode reports for now; in the future, the latter will be removed entirely.

Furthermore:

  • EDE templates for typst reports are added to locli.
  • Some report fields' unit and metric descriptions are changed to be more concise.
  • The selection of charts plotted for a report is adjusted, excluding some less meaningful ones.
  • CDF plots are now a bit more standard (for typst) by flipping x- and y-axes.
  • Linebreak / hyphenation issues when rendering the data dictionary are resolved (for typst).
  • The wb a pdf command now uses the typst pipeline by default.

Last but not least, the flake input (and output) for em is removed. This should improve workbench builds both for CI and locally, and de-risk future nixpkgs bumps, where some legacy items pulled in by em might present as blockers.

While this PR leaves the Org mode pipeline fully functional, it will require a manual install of https://github.com/mgmeier/em/ from now on.

Why typst :

  • The typst CLI is a modern typesetting document compiler; for our case it eliminates the need for much larger dependencies like LaTeX and the universe that comes with it.
  • typst source documents have a syntax as clear and concise as Markdown, while being fully scriptable and styleable. This allows e.g. for plotting to be done inline, by the compiler.
  • It eliminates the indirection of Org mode export -> LaTeX -> PDF; compiling a report PDF is both much faster, and results in ~3x smaller PDF files, which on top have better accesibility features.
  • It's distributed as part of nixpkgs, with a much lower dependency footprint that em + LaTeX.

nixpkgs vs. individual flake

To successfully remove the em flake input without waiting for a global lockfile update (our current lock is stuck on typst 0.13), I temporarily sourced typst 0.14.2 from a pinned nixos-25.11 revision.

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated. These may include:
    • golden tests
    • property tests
    • roundtrip tests
    • integration tests
      See Runnings tests for more details
  • Any changes are noted in the CHANGELOG.md for affected package
  • The version bounds in .cabal files are updated
  • CI passes. See note on CI. The following CI checks are required:
    • Code is linted with hlint. See .github/workflows/check-hlint.yml to get the hlint version
    • Code is formatted with stylish-haskell. See .github/workflows/stylish-haskell.yml to get the stylish-haskell version
    • Code builds on Linux, MacOS and Windows for ghc-9.6 and ghc-9.12
  • Self-reviewed the diff

@mgmeier mgmeier marked this pull request as ready for review January 26, 2026 18:10
@mgmeier mgmeier requested review from a team as code owners January 26, 2026 18:10
Copy link
Contributor

@fmaste fmaste left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, added a pragmatic compromise solution for the typst version problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants