functions as data · 4 runtimes · open source
// a function runtime you can store, diff and ship as JSON.
Logic as data.
Run anywhere.
KIRun keeps a program as data. Write a function as readable text or draw it as a graph; it is stored as one JSON definition and runs on four runtimes. The window on this page is live: it runs in your browser.
ways to run
$ npm i @fincity/kirun-js
browser and Node
$ cargo add kirun
Rust
$ pip install kirun-py
Python
$ com.fincity.nocode:kirun-java
JVM
~/examples/hello.kirun · name = "you"
165
built-in functions in 9 namespaces
4
runtimes: JS, Java, Rust, Python
0
servers: this page runs it all in your tab
1
definition: text, graph and JSON
46x
Rust vs JS on the Fibonacci benchmark
01 /text
Write it as text.
Store it as JSON.
The KIRun language compiles to the JSON definition the runtimes execute, and the JSON turns back into the same text. Edit either one: they are the same function.
add-numbers.kirun ⇄ definition.json
02 /graph
Every function is a graph.
Independent steps run together.
Each step names what it waits for. Steps that wait on nothing run at the same time: these two 300 ms waits finish in about 300 ms.
parallel.kirun
03 /trace
See every step.
Arguments, results, timings.
With the trace on, every step records what it received, what it returned and how long it took, through loops and nested calls. This is a real run of Fibonacci(10), made when the page loaded.
fibonacci.kirun · trace
04 /expressions
Expressions you can read.
Type one and see how it parses.
Paths into Arguments, Steps and Context, arithmetic, comparison with =, and / or / not, the ternary, ?? and ranges like a[1..3].
Arguments = {"a": 4, "b": 20, "items": ["x", "y", "z"]}
05 /runtimes
Same definition.
Four runtimes.
The browser uses kirun-js. Servers run kirun-java or kirun-rust, and kirun-py drives the tooling. On the Fibonacci benchmark kirun-rust is 46.2x faster than kirun-js (kirun-rust/README.md). A few edge cases still differ between runtimes; they are listed in the parity notes.
runtimes
kirun-js
browser, Node
this playground, Modlix pages
kirun-java
JVM
server functions, suspend and resume
kirun-rust
native
server functions, the fastest
kirun-py
Python
DSL tooling and AI agents
Built for logic you can keep.
f.01
Events
A function ends in named outcomes: output, error, or your own.
f.02
Branches
If raises true or false; a branch is the steps that wait for it.
f.03
Loops
Range, count and for-each loops, and Break.
f.04
Parallel graph
Steps that do not depend on each other run together.
f.05
Schemas
Every argument is checked against its schema before a step runs.
f.06
Expressions
Paths, arithmetic, logic, ternaries and ranges.
f.07
Context
Function-wide values for totals, flags and accumulators.
f.08
Dates
49 date functions: add, difference, start of, from now, time zones.
f.09
Text language
A readable DSL that round-trips to JSON.
f.10
Visual editor
The same function as a graph you can edit.
f.11
Trace
Per-step arguments, results and timings.
f.12
Your functions
Add your own functions and repositories beside the built-ins.
Questions
What is KIRun?
A runtime for functions written as data: steps, parameters and events in one JSON definition that runs in JavaScript, Java, Rust and Python.
Where does this page run my code?
In this browser tab, on kirun-js. Only the built-in System functions are there, so nothing run here can reach the network or any storage.
How is it different from writing JavaScript?
The definition is data: it can be stored, diffed, generated, validated, drawn as a graph and run on a server in another language, with no build step.
Is it open source?
Yes, under the MIT licence, at github.com/modlix-india/nocode-kirun.
Try it in your browser.
$ npm i @fincity/kirun-js
KIRun · MIT licence · made by Modlix