skip to content
[readonly]

The guest runtime of wasm CPU mesh programs: Ctx, View, Exchange and MESH_PROGRAM over the mesh::* imports (wasm32)

sh
$ sexc add @ajax/mesh-rt-wasm
  • 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/mesh-abi-wasm ^0.1.0, @ajax/mesh-abi-base ^0.1.0, @ajax/mesh-abi-exchange ^0.1.0, @ajax/mesh-abi-fault ^0.1.0, @ajax/mesh-abi-pipe ^0.1.0, @ajax/mesh-abi-ops ^0.1.0, @ajax/mesh-ftz ^0.1.0
dependents
@ajax/mesh-prog-hashjob-wasm, @ajax/mesh-prog-hello-wasm, @ajax/mesh-prog-infer-wasm, @ajax/mesh-prog-pathtrace-wasm, @ajax/mesh-prog-pipesink-w-wasm, @ajax/mesh-prog-pipesrc-wasm, @ajax/mesh-prog-sha-verify-wasm, @ajax/mesh-prog-sha256d-wasm, @ajax/mesh-prog-tick-wasm, @ajax/mesh-prog-train-wasm
keywords
mesh alphaos wasm runtime guest
homepage
https://github.com/thomasdavis/alpha-c-mesh/tree/main/packages/mesh-rt-wasm
repository
https://github.com/thomasdavis/alpha-c-mesh
==> README.md <==
1# @ajax/mesh-rt-wasm
2
3The guest runtime of wasm CPU mesh programs, ported from alpha-rust-mesh's `crates/mesh-rt-wasm`: mesh-rt's
4surface (`mesh_ctx`, `mesh_view`, `mesh_exchange`, `MESH_PROGRAM(init, task)`) over the `mesh::*`
5imports of meshd's wasm executor. wasm32 only (`"targets": ["wasm32"]`).
6
7A program includes `mesh/rt_wasm.h`, writes `init` and `task`, and `MESH_PROGRAM(init, task)` exports
8`mesh_init`, `mesh_task` and `mesh_rt_abi`. A node is one CPU thread: `lane()` is 0 and `leader()` true.
9Views are windows reached through bounds-checked imports (use the bulk `read`/`write` in hot loops);
10linear memory is scratch. f32 in the cluster float mode is `@ajax/mesh-ftz`, whose operations on wasm32
11are the exported `mesh_ftz_*` helpers meshd's float guard allows.
12
13It also gives freestanding wasm32 code `memcpy`, `memmove`, `memset` and compiler-rt's `__multi3`.
14
15## Differences
16
17C has no OnceCell or slices: `mesh_ctx_get()` builds the context on first use, views are passed by value,
18and Option results are `bool` plus an out parameter.
19
20Tests: every guest in `programs/*-wasm`, through `@ajax/mesh-wasm-programs-check`.