Generating code
When a model is ready, hit Generate in Designer. You pick a target language, and Designer produces a buildable project.
What’s in the output
Section titled “What’s in the output”A generated project contains:
- Typed schemas for every command, event, and state view on the canvas — see Defining schemas.
decidefunction stubs, one per command. Each has the correct input/output signature and aTODOfor the business-logic body.evolvefunction 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
decideandevolvebodies, 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).
Supported languages
Section titled “Supported languages”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.
Regenerating
Section titled “Regenerating”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.
- Deploying to Sandbox — ship the generated components to a live EvidentSource.
- Designer → Sandbox — full walkthrough.