skip to content
[readonly]

A host mailbox with one mesh program slot and the host side of its ticket ring, request window and input queue, for testing programs on the CPU simulator

sh
$ sexc add @ajax/mesh-rt-sim-mailbox
  • total 3
  • drwxr-xr-x-../
  • drwxr-xr-x-Oct 27 03:26v/# 1 version
  • drwxr-xr-x-Oct 27 03:26files/# the files of 0.1.0
latest
0.1.0, published Oct 27 03:26 by ajax
owners
ajax
license
MIT
dependencies
@ajax/mesh-abi ^0.1.0, @ajax/mesh-rt-sim ^0.1.0
dependents
@ajax/mesh-prog-blocks, @ajax/mesh-prog-doom, @ajax/mesh-prog-gpt2x, @ajax/mesh-prog-hello, @ajax/mesh-prog-http, @ajax/mesh-prog-infer, @ajax/mesh-prog-pipehash, @ajax/mesh-prog-sha256d, @ajax/mesh-prog-tick, @ajax/mesh-prog-train
keywords
mesh alphaos gpu simulator testing mailbox
homepage
https://github.com/thomasdavis/alpha-c-mesh/tree/main/packages/mesh-rt-sim-mailbox
repository
https://github.com/thomasdavis/alpha-c-mesh
==> README.md <==
1# @ajax/mesh-rt-sim-mailbox
2
3A mailbox in host memory with one mesh program slot, and the host side of the contract for it, for tests
4on @ajax/mesh-rt-sim: the header of a single system, the program table entry (under its seqlock), the
5extension (param, scratch), publishing tickets and waiting for their marks (as meshd's publisher), the
6request window, the input queue, and a halt that rewinds the ring for a relaunch.
7
8```c
9uint8_t *mb = mesh_sim_mailbox();
10mesh_sim_prog p = {.name = "hello", .view_bytes = 0x1000, .nodes = 2};
11uint8_t *view = mesh_sim_install(mb, 3, &p);
12mesh_sim_launch *l = mesh_sim_launch_prog(mb, 3, &p, mesh_main);
13uint32_t r = mesh_sim_call(mb, 3, MESH_OP_TASK, 5);
14mesh_sim_halt(mb, 3, l);
15```
16
17- **Ported from:** the publisher rules of alpha-rust-mesh `crates/mesh-host/src/publish.rs` (ticket t uses
18  ring entry and completion slot t % 64; no ticket 64 or more ahead of the oldest outstanding one) and the
19  halt rewind (`PRing::rewind`). Not a meshd: no policies, blinks or snapshots.
20- **Tests:** every program's simulator test uses it.