Use it in your language
The same seven steps in every runtime, from install to caching, with real code and the output it printed.
This track takes one ruleset through seven steps in every runtime: install, load, evaluate, handle errors, enforce, custom operators, and caching. Every step page has the same tabs in the same order, so you can read one language from start to end, or compare two languages side by side.
How to read a step
- Pick your language in the switcher at the top of a step. The choice is remembered on every step page.
- Each tab has the same four parts: what to do, the code, run it (the exact command), and the output that command printed.
- Read the output. It is never typed by hand: it was captured by running the code when this site was built.
Every tab uses the same payments ruleset and the same transfer, so the decisions and findings match from tab to tab. That is the point of Rule Cascade: one contract, one answer, in every runtime.
Where the code and the output come from
- Code is an excerpt of a real file, read when the site is built. When the file changes, the page changes.
- Libraries (TypeScript, Java, Go, Python) and the rule server each have a short tour program that does all seven steps. CI runs every tour and fails when its output differs from what these pages show.
- Spring Boot, React and the other languages use the example applications that CI builds and tests. The other languages print exactly the output that CI checks for each of them.
- Where code can run in your browser (the TypeScript engine), a Try it Yourself button opens it in the playground.
Which runtime does what
| Runtime | Install | Load | Evaluate | Errors | Enforce | Custom operators | Caching |
|---|---|---|---|---|---|---|---|
| TypeScript (browser) | source | client manifest | useRuleEvaluation | yes | UI gating | yes | createManifestClient |
| TypeScript (Node.js) | source | bundle or YAML | yes | yes | API endpoint | yes | createManifestClient |
| Java | source | bundle or sources | yes | yes | API endpoint | yes | RuleSetHolder |
| Spring Boot | source | bundle or YAML | yes | yes | API endpoint | yes | ETag on the manifest |
| Go | source | bundle or sources | yes | yes | API endpoint | yes | Holder |
| Python | source | bundle or sources | yes | yes | API endpoint | yes | RuleSetHolder |
| Command | signed download | bundle or YAML | yes | yes | batch | test operators only | a long-lived engine |
| WebAssembly | signed download | bundle or YAML | yes | yes | batch | no | a long-lived engine |
| Rule server | source | sources and bundles | over HTTP | yes | API endpoint | when embedded | ETag, scheduled reload |
| C#, Ruby, PHP, Rust, PowerShell, shell, and Java, Node.js or Python over the engine | signed download | bundle | yes | yes | batch | no | the engine keeps what it loaded |
"Source" means a checkout of the Rule Cascade source: the libraries are not published to a package registry yet. The command and the WebAssembly module are signed downloads.