Decodal

Decodal keeps configuration, constraints, and defaults in one composable value.

Define structured data with constraints, compose it with patches, and materialize the result from Rust, WebAssembly, or the browser playground.

Official packages

What it is

Decodal is a small data language for configuration shapes that need validation, defaults, lazy imports, and predictable composition.

Where it runs

Use the Rust crate for runtime embedding, the WASM package in browsers, CodeMirror/Lezer for the Web editor, and Tree-sitter for general editor integration.

Start here

Open the playground to run examples in your browser, or read the components page to see how the runtime and editor pieces fit together.

View components →

A compact example

Constraints and defaults are values. Compose them with concrete data and materialize when the host knows what output shape it expects.

Port = Int >= 1 & <= 65535 default 8080;

Server = {
    host = String default "localhost";
    port = Port;
};

Production = Server & {
    host = "example.com";
};