Repository navigation
Running Programs
Curlee’s execution model is:
-
curlee check(static pipeline + verification) -
curlee run(only if check passes)
Bundle workflow (v1):
-
curlee bundle build ... <entry.curlee> <out.bundle>produces a proof-carrying bundle artifact. -
curlee bundle verify <out.bundle>validates integrity. -
curlee run --bundle <out.bundle> <entry.curlee>executes bundled bytecode deterministically.
Curlee’s VM is designed to be deterministic (see Glossary): given the same bytecode and inputs, it produces the same results.
Execution is resource-bounded via a fuel budget (see Glossary). When fuel is exhausted, the VM halts deterministically.
By default, the CLI uses a fixed deterministic fuel budget (10000) when running bytecode.
You can override it:
curlee run --fuel <n> <file.curlee>
If fuel is exhausted, curlee run fails with a runtime error message that includes out of fuel.
Runtime failures include an error message and (when available) a source span (see Glossary) derived from opcode span mapping.
Python interop is considered unsafe and is treated as an effect boundary.
-
Source-level unsafe: calls like
python_ffi.call(...)must appear inside anunsafe { ... }block. -
Runtime capability gate: execution requires the
python.fficapability (e.g.curlee run --cap python.ffi ...). -
Optional Linux sandboxing: if the
python.sandboxcapability is granted, Curlee will attempt to execute the python runner inside a Linux sandbox wrapper (currently bubblewrap /bwrap).- If sandboxing is requested but the wrapper cannot be executed, Curlee fails deterministically (no silent fallback to unsandboxed execution).
Details of the python runner wire protocol live in Python Runner Protocol.
- Verification is separate from execution: a program that cannot be proven within the supported fragment is rejected.
- Capabilities (see Glossary) are part of the long-term model; see Stdlib and Capabilities.