Compare · Expressions and rules
Stof vs CEL.
CEL evaluates a single expression against variables your app declares, safely and fast. Stof is a whole document: data, functions, types, and state, in the same kind of sandbox, sent as one payload.
Google's Common Expression Language: one expression, fast and safe, not Turing complete.
Just-in-time software: data and logic together, in one document that runs anywhere, sandboxed, in Rust, JavaScript, and Python.
What happens when…
Checked December 3, 2026. Sources: cel-go · CEL spec · CEL codelab · cel-go package docs. Something out of date? Tell us.
What you'd still build.
- Functions and helpers beyond one expression
- A place for the data and state
- Tests next to the rules
- Functions, types, units, and tests in the same doc
- Data, logic, and state in one document you can send anywhere
- Tests (#[test]) in the doc, run with stof test
Choose CEL for a single condition or filter that must be fast and can't ever loop, like an authorization check.
Stof vs CEL, answered.
CEL is safe because it's small. Is Stof as safe?
Safe a different way. CEL can't loop; Stof can, so every call has a time and memory limit, and a document sees only itself and what you hand it.
Also compared.
Try it in a minute.
npm i @formata/stof
pip install stof
cargo add stof