skip to content
[readonly]

The mesh::* imports of meshd's wasm executor: a lane's windows onto the mailbox, bounds-checked as mesh-rt's View

sh
$ sexc add @ajax/mesh-exec-wasm-imports
  • total 3
  • drwxr-xr-x-../
  • drwxr-xr-x-Oct 27 04:27v/# 1 version
  • drwxr-xr-x-Oct 27 04:27files/# the files of 0.1.0
latest
0.1.0, published Oct 27 04:27 by ajax
owners
ajax
license
MIT
dependencies
@ajax/wasm-interp ^0.1.0, @ajax/mesh-lease ^0.1.0, @ajax/mesh-mailbox ^0.1.0, @ajax/mesh-abi-wasm ^0.1.0, @ajax/mesh-abi-base ^0.1.0, @ajax/mesh-abi-header ^0.1.0, @ajax/mesh-abi-program-table ^0.1.0, @ajax/mesh-abi-control-block ^0.1.0, @ajax/mesh-abi-ext ^0.1.0, @ajax/mesh-abi-exchange ^0.1.0, @ajax/mesh-abi-fault ^0.1.0, @ajax/mesh-abi-input-queue ^0.1.0, @ajax/mesh-abi-pipe ^0.1.0, @ajax/mesh-check ^0.1.0, @ajax/wasm-builder ^0.1.0
dependents
@ajax/mesh-exec-wasm
keywords
mesh alphaos wasm imports sandbox
homepage
https://github.com/thomasdavis/alpha-c-mesh/tree/main/packages/mesh-exec-wasm-imports
repository
https://github.com/thomasdavis/alpha-c-mesh
==> README.md <==
1# @ajax/mesh-exec-wasm-imports
2
3The `mesh::*` imports of meshd's wasm executor (the contract is mesh-abi v2::wasm,
4`@ajax/mesh-abi-wasm`), ported from alpha-rust-mesh's `mesh-host/src/wasm.rs` (`LaneData`, `linker`,
5`copy_out`, `copy_in`): `info`, `ld8/32/64`, `st8/32/64`, `cas32`, `add32/64`, `read`, `write`, `peer`,
6`find`, `prog_state`, `count`, `counter`, `input_pending`, `input_pop`, `respond`, `exchange`,
7`pipe_push`, `pipe_pop`, `pipe_len`, `host_ns`, `fault`.
8
9A guest has no pointer into the mailbox: every access names a window (its view, the exchange page for the
10lockstep program, a peer view resolved for this task under the PT_GEN seqlock and gated by `reads`) and is
11bounds-checked exactly as mesh-rt's View is: out of range reads 0, drops writes and records
12`FAULT_VIEW_BOUNDS | off << 8` (the first fault kept). Loads acquire, stores release, read-modify-writes
13acq_rel. `exchange` runs the lockstep round (`@ajax/mesh-lease`) and re-arms the task's deadline.
14
15Tests: `@ajax/mesh-wasm-programs-check` (`tests/imports.c` drives every import through a guest, with each
16fault; the program checks use the rest).