V8-based TypeScript execution engine for Tana smart contracts.
tana-runtime executes smart contract code in an isolated V8 sandbox. it provides the trusted execution environment where contract logic runs during block production, with access to Tana-specific modules for storage, context, and blockchain state.
when the ledger service needs to execute a contract, it invokes tana-runtime with the contract code and execution context. the runtime creates a fresh V8 isolate, loads the Tana module system, executes the contract function, and returns the results.
contract code (TypeScript)
|
v
tana-runtime
|
+----+----+
| |
V8 isolate Tana modules
| (kv, context, block, tx)
| |
+----+----+
|
v
execution result
(state changes, return value)
contracts can import from the Tana module system:
each contract execution runs in a fresh isolate with:
built with Rust using deno_core for V8 integration. the runtime compiles to a standalone binary that the ledger service invokes as a subprocess.
before execution, the runtime validates contracts using AST analysis:
validation errors include precise source locations and helpful suggestions, styled after Rust/Gleam compiler output.
tana-runtime is bundled with the Tana CLI distribution as a platform-specific binary. the ledger service manages runtime invocation during block production.
V8-based TypeScript execution engine for Tana smart contracts.
tana-runtime executes smart contract code in an isolated V8 sandbox. it provides the trusted execution environment where contract logic runs during block production, with access to Tana-specific modules for storage, context, and blockchain state.
when the ledger service needs to execute a contract, it invokes tana-runtime with the contract code and execution context. the runtime creates a fresh V8 isolate, loads the Tana module system, executes the contract function, and returns the results.
contract code (TypeScript)
|
v
tana-runtime
|
+----+----+
| |
V8 isolate Tana modules
| (kv, context, block, tx)
| |
+----+----+
|
v
execution result
(state changes, return value)
contracts can import from the Tana module system:
each contract execution runs in a fresh isolate with:
built with Rust using deno_core for V8 integration. the runtime compiles to a standalone binary that the ledger service invokes as a subprocess.
before execution, the runtime validates contracts using AST analysis:
validation errors include precise source locations and helpful suggestions, styled after Rust/Gleam compiler output.
tana-runtime is bundled with the Tana CLI distribution as a platform-specific binary. the ledger service manages runtime invocation during block production.