Skip to content

Generating code

When a model is ready, hit Generate in Designer. You pick a target language, and Designer produces a buildable project.

A generated project contains:

  • Typed schemas for every command, event, and state view on the canvas — see Defining schemas.
  • decide function stubs, one per command. Each has the correct input/output signature and a TODO for the business-logic body.
  • evolve function stubs, one per state view. Each has the correct event-handling signature, wired to the events the view subscribes to on the canvas.
  • Unit test scaffolding — runnable from day one. As you fill in decide and evolve bodies, the tests validate the logic without a running EvidentSource.
  • Build and deploy scripts — single-command to compile to WASM and deploy (see Deploying to Sandbox).

Designer can generate a buildable project in any of the EvidentSource SDK languages:

  • Rust (reference implementation, most polished)
  • Go (TinyGo 0.40.1+ for WASM)
  • TypeScript (jco for WASM compilation)
  • Python (componentize-py)
  • .NET 10+ (WASM compilation is Windows-only at time of writing)

Pick the one your team already works in. The programming model is the same everywhere — only the syntax of the decide body changes.

When the model changes, regenerate. Designer’s generator produces new schema types and stub signatures; your existing decide/evolve bodies stay where they are. Merge conflicts are almost always in schema files — your business logic is preserved.