Skip to content

d2-rs 0.1.1

Choose a tag to compare

@nelsonjchen nelsonjchen released this 09 Nov 16:13

Matches Go D2 master at 6a7b48378, as 0.1.0 does.

Fixed

  • Windows: the default test tier passes and all 944 e2e boards match Go on
    native MSVC and under Wine. Imports across drives, path spelling in
    diagnostics and Windows file errors follow Go, and Go-matching math
    replaces C library results that differ on Windows. Files with CRLF line
    endings render as in Go.
  • TALA: boards with many edges ran up to 1.7x slower than Go because seeds
    waited for each other to route; every seed now routes at once, as in Go.
    Parallel edges, nested boards and class diagrams use less CPU or memory,
    and the 200-node nested work-limit error matches Go.
  • PNG: right-to-left override text, short cylinder, callout and
    c4-person shapes, --scale=0.05, and malformed PNG icons (now rejected
    as Go does) match Go.
  • Layout and error cases found by fuzzing: glob-applied circle containers,
    near on the root board, repeated grid dimensions, inline HTML in
    Markdown, TALA containers with explicit widths, nested sequence diagrams,
    four LaTeX line-break cases and several error messages.
  • Faster PNG export of shadows, double borders, gradients and long Markdown.

Known issues

  • TALA: a 200-node fan-out peaks at about 1.05× Go's memory now that every
    seed routes at once; long labels at 100 nodes run about 1.22× Go wall; a
    400-node fan-out takes 0.36 s to reach the same error Go reports in 0.04 s.
  • The native CLI binary is about 1.2× the size of Go's.

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