Skip to content

d2-rs 0.1.0

Choose a tag to compare

@nelsonjchen nelsonjchen released this 09 Nov 16:13

Added

  • First release: a Rust port of the D2 toolchain, matching Go D2 master at
    6a7b48378 (2026-10-11), including its bundled TALA layout engine.
    • The compiler, formatter and editor helpers (d2oracle, d2lsp).
    • The Dagre, ELK and TALA layout engines, grids, sequence diagrams and
      near placement.
    • SVG, sketch and isometric rendering; PNG, PDF, PPTX, GIF and ASCII
      export; Markdown, code highlighting in every Chroma language, and LaTeX.
    • The d2-rs command line (cargo install d2-rs) and the @d2-rs/wasm
      WebAssembly package for Node and browsers.
  • Byte-identical output with the pinned Go D2 on all 944 upstream e2e golden
    boards, upstream's e2etests-cli suite, the oracle test tier on arm64 and
    x86-64, and the Go-vs-Rust differential harnesses.
  • Faster than Go D2 with lower peak memory on every upstream e2e case in
    every output format (benchmarks).

Known issues

  • Gaps found beyond upstream's test corpus, all listed in
    STATUS.md: right-to-left
    text, combining marks and short cylinder, callout and c4-person
    shapes in PNG; --scale=0.05 in PNG; a few error-message details; four
    LaTeX inputs and one Markdown case; TALA's time and memory on large
    boards.
  • The native CLI binary is about 1.2× the size of Go's.
  • Windows builds but is not qualified against Go: imports across drives,
    path separators in diagnostics and one TALA layout differ in tests.

Install: cargo install d2-rs --version 0.1.0 or npm install @d2-rs/wasm@0.1.0.