Skip to main content

Compare · Config and schemas

Stof vs CUE.

CUE validates and generates configuration by unifying types and values. Stof validates too, with #[schema], and its documents also run: functions, state, and a sandbox, in your app.

CUE

A data validation language and inference engine that merges types and values.

Stof

Just-in-time software: data and logic together, in one document that runs anywhere, sandboxed, in Rust, JavaScript, and Python.

What happens when…

When…CUEStof
You need to check the dataIts strength: types and values are one concept, so constraints and data unify.#[schema] rules on a type check any object, in the same doc as the data and the logic.
Running logicNot a general-purpose language: it computes values from constraints.Functions your app calls, with limits, that can call your app's functions too.
The logic has to run somewhere elseExport the result (Ex. JSON or OpenAPI) and ship that.Send the doc as text or compact binary: its data, its functions, and its current state, in one payload. The other side gives the same answer, in Rust, JavaScript, or Python.
Your app is TypeScript, Python, or RustA Go implementation and command line.One runtime, with packages for Rust, JavaScript and TypeScript (WebAssembly), and Python. The same doc runs in each.

Checked December 3, 2026. Sources: CUE introduction · CUE on GitHub. Something out of date? Tell us.

What you'd still build.

On top of CUE
  • A runtime for logic that runs
  • A sandbox for logic from elsewhere
  • Packages for every language you run
Already in Stof
  • Functions that run when your app calls them
  • A sandbox that is on by default, with seals for code from elsewhere
  • The same doc in Rust, JavaScript, and Python

Choose CUE when the job is validating and generating configuration from constraints.

Stof vs CUE, answered.

Is Stof a configuration language?

It can be one (it reads and writes JSON, YAML, and TOML, and checks itself with #[schema]), but its documents also run, so it fits logic that lives with data, not only config.

Also compared.

Every comparison →

Try it in a minute.

npm i @formata/stof
pip install stof
cargo add stof