Wang says Terrastruct is shutting down and open-sources its proprietary layout engine
The MPL-2.0 release folds Terrastruct's architecture-focused layout engine into D2 v0.9.0, where developers can select it with --layout=tala.
By RuntimeWire Staff · Published
Primary source: D2
Why it matters
Terrastruct's proprietary layout engine is becoming open-source infrastructure inside D2, giving developers direct access to TALA as Wang moves the diagramming project to nonprofit stewardship.

Terrastruct founder Alexander Wang said on September 7th that he had open-sourced Terrastruct's TALA diagram layout engine and bundled it into D2, a language that turns text into diagrams, starting with v0.9.0. The release follows his announcement that Terrastruct was shutting down and that D2 would continue under nonprofit stewardship.
The release makes TALA available under MPL-2.0 and bundles it with D2 v0.9.0, where users can select it with --layout=tala. Its source now lives inside the D2 repository alongside the project's other layout engines.
That technical migration carries the remains of Terrastruct's business model with it. Wang said in the September 7th announcement that proprietary TALA and the paid D2 Studio editor had funded development of D2. The day before, he said Terrastruct would close and D2 would move to independent nonprofit stewardship through Hack Club.
Before building Terrastruct, Wang held engineering roles at Pandora, Stripe and Google, according to his career profile. At Stripe, he worked on the first backend for Stripe Terminal; at Google, he worked on payments infrastructure. Wang plans to remain a D2 maintainer with a limited time commitment.
The proprietary layout engine becomes part of D2
TALA, short for Terrastruct's AutoLayout Algorithm, addresses a problem that usually becomes visible only after a diagram has enough boxes and connecting lines to become unreadable: where everything should go.
TALA is designed for software architecture diagrams, with an orthogonal layout style, coordinate controls and hybrid positioning that lets users fix some nodes while the engine routes the rest. It can cluster related nodes and evaluates possible layouts using criteria that include symmetry, median distance and flow.
TALA arranges nodes and right-angled connections in layouts closer to what an engineer might draw on a whiteboard. It also lets users fix the coordinates and dimensions of selected nodes while leaving edge routing to the engine. A hybrid mode locks part of a diagram in place and automatically arranges the rest.
Wang argues that this division of labor fits AI-generated diagrams because models can propose positions in two-dimensional space while the layout engine handles precise routing. He wants D2 to become a stronger harness for agents while keeping a text file as the source of record. Models are already "really good at making almost-perfect diagrams," he wrote in the nonprofit announcement, but their output remains too imprecise and unpredictable for many technical uses.
The open-source release credits Gavin Nishizawa with broad contributions to TALA and Julio Cesar Batista with work on its hierarchy algorithms. The code now sits directly beside D2's Dagre and ELK implementations instead of remaining in the archived proprietary TALA repository.
At the layout infrastructure layer, D2 competes for developer attention with text-driven tools such as Mermaid and PlantUML. TALA's architecture-specific routing and coordinate controls distinguish it from D2's other engines, although its tradeoffs become apparent when diagrams are large or strongly directional.
TALA's tradeoffs survived the license change
Wang's announcement is unusually direct about where TALA loses. Its search process uses randomness, evaluating three seeds by default and choosing the highest-scoring result. A fixed input and fixed seeds produce the same output, but adding one node can reorganize much of a diagram. Dagre and ELK tend to preserve more of the prior layout after a small edit.
TALA is also a weaker fit for long, directional graphs, where Wang said he often prefers Dagre or ELK. Runtime can grow nonlinearly as diagrams become larger.
D2's benchmark repository measures the complete command-line process, including rendering and writing the output file, rather than layout time alone. The repository says its results came from one desktop session with uncontrolled background activity, so they should be treated as reproducible project benchmarks rather than a controlled independent performance study.
D2's maintainers reported in the v0.9.0 release notes that SVG rendering was approximately 10 times faster across the project's end-to-end corpus and that real-world diagrams compiled, laid out and rendered approximately three times faster at the median. Those release-wide figures cover broader rendering work; they do not compare TALA with Dagre.
The visual comparisons in Wang's announcement carry a similar qualification. He used public D2 files found on GitHub instead of selecting examples designed for TALA, and he explicitly acknowledged that readers may prefer the Dagre or ELK results in some cases.
Wang's handoff preserves the useful part
The open-source release is a founder's decision about which parts of Terrastruct should survive its announced shutdown. Terrastruct's proprietary differentiator has become shared infrastructure, and the existing D2 community can maintain, fork and modify it under MPL-2.0.
An archived Terrastruct enterprise pricing sheet shows how Terrastruct once tried to monetize that tooling. It listed organization subscriptions at $25 per seat per month for 10 to 49 seats, declining to $15 per seat per month for organizations with more than 100 seats.
D2's repository had approximately 24,800 stars when indexed in 2026 on GitHub, giving Wang an established developer base for the handoff. The language supports local command-line use, editor integrations, multiple layout engines and exports including SVG, PNG and PDF. In his nonprofit announcement, Wang said the project would focus on client-side, offline software without servers, APIs, accounts, server rendering or multiplayer features.
That narrower scope fits the economics of the next phase. Wang can continue maintaining D2 without rebuilding Terrastruct's server and sales operations around it. TALA no longer has to carry the revenue burden that once justified keeping its code closed.
Wang wrote that he is looking forward to the improvements an open-source TALA may attract. As he winds down Terrastruct, the release transfers Terrastruct's core layout engine to the community and places it directly inside D2.