Dialect Reference
This page documents the current public .wistdialect format used by the Wist runtime path.
The source of truth for public Wist dialect execution is the manifest-backed runtime workflow:
dialect source -> dialect compilation -> build plan -> manifest-backed runtime selection -> host creation -> executionThe compiler used by that path is DialectDslCompiler through the Wist dialect execution workflow. The shipped dialect profiles under UniversalToolchain/Dialects/examples/wist use this format and should be treated as executable references.
Document shape
A dialect file starts with a required header:
dialect <Name>Directives then follow one per line. Most selection directives accept comma-separated identifier lists.
Minimal runtime dialect
The shipped minimal arithmetic dialect uses this shape:
dialect MinimalArithmetic
use Arithmetic,Numbers,Scopes,Whitespaces
backend interpreterThis selects only the modules required for basic arithmetic and exposes only the interpreter backend.
Full profile example
A broader Wist profile can select many modules and both built-in backend ids:
dialect FullDefault
use Arithmetic,BooleanConditions,Comments,ComparisonConditions,Conditions,CSharpInterop,Equality,Identifier,Labels,Loops,Numbers,Scopes,SemicolonAsNewLine,Variables,Whitespaces
backend cil,interpreter
enable BooleanOptimization
enable ComparisonIntrinsicOptimization
security trusted
capability unsafe-interopThe user-facing CLI alias compiler selects the cil backend when the active dialect exposes it. Dialect files should still declare the backend id cil.
Directive reference
dialect
Declares the dialect name:
dialect PricingRestrictedThe name is used in diagnostics, composition output and execution configuration.
use
Selects one or more module aliases:
use Arithmetic,Numbers,Scopes,WhitespacesYou may also split module selection across several use lines when that is clearer:
use Arithmetic,Numbers
use Scopes,WhitespacesA module must be selected for the syntax and runtime behavior it owns to exist.
exclude
Excludes one or more module aliases from the composition:
exclude CSharpInteropUse this when building from a broader base/profile and intentionally removing a runtime surface.
requires, before, after
Declares ordering constraints over a comma-separated module chain:
requires Variables,Scopes
before Conditions,Labels
after Loops,LabelsThe runtime frontend lowers adjacent items in the list into pairwise order directives. Use these directives sparingly; prefer coherent module selections and deterministic module metadata when possible.
backend
Selects one or more backend ids:
backend interpreter
backend cil,interpreterCurrently shipped Wist backends include:
| Dialect backend id | User-facing mode |
|---|---|
interpreter | interpreter |
cil | compiler |
Backend identifiers are not a closed conceptual model. A backend is usable only when the runtime catalog contains a matching backend manifest entry and registrar.
enable / disable
Enables or disables one optimizer alias:
enable ArithmeticOptimization
disable EGraphOptimizationOptimizer directives target all applicable backends in the current runtime dialect frontend. Do not use an optimizer to hide missing base semantics.
allow / forbid
Allows or forbids one intrinsic name:
allow add_i32
forbid reflect-callIntrinsic policy should match backend capability expectations. Backend-specific intrinsics must not leak into backend-agnostic runtime surfaces without an explicit capability story.
security
Declares the intended security profile:
security restrictedor:
security trustedA restricted dialect is a composition constraint, not a process isolation guarantee.
capability
Declares one or more enabled capability markers:
capability unsafe-interop
capability pricing-formula,user-authoredCapabilities explain selected composition. They must not be treated as hidden runtime activation mechanisms.
Current syntax boundary
The repository also contains DialectDefinitionParser, which accepts a stricter parser-specific shape such as:
backend interpreter enable
capability supports-floats = trueThat parser is not the current public runtime .wistdialect contract used by shipped Wist profiles. Do not document its syntax as canonical for Wist runtime execution unless the runtime path is intentionally migrated to it.
Compatibility rule
Public documentation, shipped examples and CLI onboarding must use the same dialect shape as the manifest-backed Wist runtime path. If the runtime parser changes in the future, update shipped .wistdialect files and this reference together.