Build domain languages on shared infrastructure.Turn their semantics into capabilities every tool can use.

Extend the graph with Dialects

A domain specific language earns its vocabulary by making one problem precise. Tetrodotoxin lets its Dialect publish that model directly into the graph. Tools bind the parts they understand from the original provider.

MLIR preserves a Dialect's model through compilation. Tetrodotoxin carries the same principle across provider boundaries, where each Dialect owns its policies and relationships.

Domain semantics

A Dialect interprets source and publishes the contracts another system can observe.

Shared model

Tools and neighboring Dialects navigate the same Abstract graph.

Provider authority

The provider retains its parser and runtime. Consumers receive negotiated capabilities.

Dialect composition

One Dialect can invoke another and retain the resulting Monograph.

Built-in Source Dialect to bootstrap your DSL

Source turns authored text into a retained lexical Stream. It provides stable token identity and exact locations. Source also owns diagnostics and canonical formatting. A consuming Dialect owns executable meaning.

A generated grammar can consume Source through ANTLR. A handwritten parser can consume its Cursor directly. Both can publish the result as a graph-hosted AST.

Parser boundary

Generated and handwritten parsers begin from the same Source Stream.

Graph model

The AST publishes navigable Abstract relationships under its provider.

Shared source

Formatting and diagnostics refer to the token identities used by later Dialects.

Compose Dialects into larger systems

Execution publishes the CPU-visible Type relationships and value flow of a program. A GPU Dialect can follow those relationships and publish a Bridge Abstract that connects each CPU identity to its GPU representation, including transfer direction, marshaling and synchronization policy.

LLVM and SPIR-V Terminals can then lower their respective sides of the same relationship. Neither compiler reconstructs the other language's model, and neither a matching layout nor backend reflection becomes the semantic source of truth.

The graph preserves the relationship between the two representations so editors, compilers, renderers, and runtimes can each consume the part they understand.

Execution Type publishes a CPU representation to LLVM and composes a GPU Dialect whose Bridge Abstract lowers to SPIR-V.

Put the graph to work with Puffer

Puffer is Tetrodotoxin's native front end. It passes each process request to Build. Build loads the selected Dialects, retains their results as one Workspace and invokes the discovered Terminals.

Editor support uses the same composition boundary. A JSON-RPC Dialect supplies transport and language-server entry points around Puffer. Dialects can contribute an entire subsystem.

Tetrodotoxin has used Puffer for native builds and a VS Code extension. Both resolve the same packages and source observations.

VS Code uses a JSON-RPC Dialect and the command line calls Puffer directly. Puffer invokes Build, which composes a Workspace graph for compiler Terminals.

Program model

Hover and completion bind the same program model used by the build.

Authored identity

Definition lookup follows authored identity across package sources and dependencies.

Canonical source

Diagnostics retain exact ranges. The formatter gives equivalent source one canonical shape.

Native execution

Native breakpoints and LLDB summaries carry Tetrodotoxin identities into the debugger.