Skip to main content

Module vm

Module vm 

Source
Expand description

The v3 Vm driver.

Composes:

  • The call stack (crate::callstack::CallStack).
  • The kernel-assist hook (crate::kernel_assist::KernelAssist).
  • The image bytecode cache (crate::image_cache::ImageCache).

Top-level verbs:

  • Vm::invoke_cached — resolve an Instance hash from a caller- supplied CacheDirectory, push a working InstanceEntry, drive javm_exec::Interpreter::run to completion, return a CallResult. The cache holds the Cap::Instance + Cap::Image content; the Vm holds only the call-stack-side working copy and ephemeral kernel state.
  • Vm::call_resume — resume a Paused stack after a yield.

The CacheDirectory is borrowed per invocation (not owned by the Vm) so the same cache can serve both pre-publish (the caller publishes caps into it) and in-flight resolution (host calls read referenced caps by their CapHashOrRef target).

Structs§

Vm
The v3 VM driver. Parameterized over a KernelAssist impl so the integration crate can be tested with the in-process default while jar-kernel-v3 swaps in a σ-aware implementation.

Enums§

CallResult
Result of a top-level invoke_cached / call_resume.