pub struct FabricCpu { /* private fields */ }Expand description
Safe handle to a fabric CPU resource for tasklet dispatch.
Provides the entry point for submitting WASM binaries as CPU tasklets. The underlying TASKLET_SUBMIT op (0x0500) handles WASM loading, fuel-limited execution, and output capture.
Current grafOS tasklet runtimes execute one tasklet thread per submission. Reserving more CPU cores affects available CPU capacity and placement, but does not implicitly make one tasklet invocation multi-threaded.
Implementations§
Source§impl FabricCpu
impl FabricCpu
Sourcepub fn submit<'a>(&'a self, wasm: &'a [u8]) -> TaskletBuilder<'a>
pub fn submit<'a>(&'a self, wasm: &'a [u8]) -> TaskletBuilder<'a>
Begin building a CPU tasklet submission.
Returns a TaskletBuilder that can be configured with fuel limits
and input data before launching.
§Parameters
wasm: The WASM binary to execute as a tasklet.
Source§impl FabricCpu
impl FabricCpu
Begin building a shared-memory tasklet.
This is a distinct entry point from FabricCpu::submit. Reserving
more CPU cores via crate::cpu::CpuBuilder::cores does not by
itself produce a multi-worker tasklet — only this builder does.