Official website

Quick search

Search pages in English or हिंदी. Detailed language reference is in Scarp Docs.

Top 6 website pages

Language prerelease · Published source

Scarp alpha.19: checked host callable handles and execution quotas

Published alpha.19 introduces experimental Rust embedding handles for named Scarp functions, signature-effect checks and cumulative host execution quotas—not source-level function values.

v0.0.6-alpha.19 was published on 23 November 2026 from e534e73a81c9500e3aef9f3d51cafa0bc7bbcf75. This release expands the Rust embedding interface; it does not introduce first-class function values to Scarp source.

Checked callable signatures

Rust's TypeRegistry::accepts_callable checks named function parameter and result types invariantly. A pure implementation may fill an impure callable requirement, but an impure implementation cannot fill a pure requirement. These are host API compatibility rules, not a new function-value syntax or an indirect-call operator in .srp.

Snapshot-bound handles and visibility

Hosts can obtain checked handles to named functions in an immutable compiled snapshot, pass positional or named host arguments, use omitted defaults, and rebind compatible callable slots. Linked modules respect exports: private functions are not accessible through export-only lookup. Handles are tied to the compiled snapshot, not transferable raw pointers or stable identities across rebuilds.

Execution receipts and host-wide limits

ExecutionUsage records deterministic execution events, including failed results and input attempts. HostInvocationLedgerapplies cumulative limits to repeated host calls, covering interpreter work, calls, captured output, payload allocation and input. The limits are not measurements of elapsed time or peak process memory.

Pre-existing Rust arguments are checked for count, UTF-8 string payload size and named labels before evaluation. If a host output writer panics while replaying completed execution, completed work remains charged to the ledger. This does not guarantee recovery from arbitrary input-reader panics, crashes or unsafe host code.

Try the published source

Run these commands from the tagged compiler source tree with the Rust toolchain. The first runs a Rust host embedding example; the second runs an ordinary Scarp source example.

Terminal · Rust host demo and Scarp interpreter
cargo run --locked --example host_callable_invocation
scarp exec examples/callable_effect_boundaries.srp

See the published release notes, the Lifetime design and boundaries, or the release archives and SHA-256 files.

What remains unsupported

Scarp source still cannot pass functions as values, construct closures, capture lexical environments in functions, or indirectly call arbitrary values. Named funcra calls continue to work as in alpha.18. This is an experimental interpreter and Rust hosting milestone—not a stable ABI, cycle-collecting memory manager or general native compiler.

For downloads and their version-specific checksum instructions, visit Downloads. For the earlier project execution and immutable array changes, read the alpha.18 overview.