Skip to content

d2-rs 0.1.5

Choose a tag to compare

@nelsonjchen nelsonjchen released this 11 Nov 14:44

Matches Go D2 master at 6a7b48378, as 0.1.0 does. Crates, the npm
package and prebuilt binaries.

Added

  • Prebuilt d2-rs binaries on GitHub releases, for the platforms Go D2
    ships: Linux, macOS and Windows on amd64 and arm64. They are packaged like
    D2's archives (d2-rs-<version>-<os>-<arch>.tar.gz, with bin/, license,
    notices, README and a make install Makefile) and listed in SHA256SUMS.
    .github/workflows/release.yml builds them on every v* tag; v0.1.4 got
    them retroactively.
  • Tag pushes no longer rerun the CI test matrix, which already ran on the
    tagged commit's branch push.

Changed

  • The native CLI is 24% smaller: 37.4 MB stripped on Linux arm64, down
    from 49.2 MB (Go's d2 is 40.8 MB), and 43.1 MB on x86-64, down from
    56.6 MB. Release builds use fat LTO, stable sorts and graph lowering
    share code instead of copying it per comparator or text measurer, and
    PNG, PDF and PPTX are rendered from Go's scene path, which drops the
    earlier SVG renderer and the usvg/resvg stack from the binary. Output
    is unchanged; PNG, PDF and PPTX export is up to 25% faster.
  • D2_RS_SVG_RENDERER=legacy no longer selects the earlier native SVG
    renderer; SVG output always uses the d2svg port, as it has by default.

Fixed

  • TALA on x86-64: edges ending on non-rectangular shapes (cloud,
    cylinder, person and others) traced the shape border with fused
    multiply-add, as on arm64; they now follow Go's unfused amd64
    arithmetic.
  • TALA: a panic while routing edges returns Go's "TALA edge routing
    failed due to an internal invariant" error instead of unwinding.

Changed

  • d2-rs --version, d2-rs version and the --help header report d2-rs's
    own release (such as v0.1.5) instead of the Go D2 version it matches
    (v0.9.0). Output metadata (SVG data-d2-version, PNG EXIF) still carries
    v0.9.0, so rendered files stay byte-identical with Go's.

Install: cargo install d2-rs --version 0.1.5, npm install @d2-rs/wasm@0.1.5, or a prebuilt archive below.