skip to content
[readonly]

A bounds-checked byte window of the mailbox for mesh programs, and the program fault record

sh
$ sexc add @ajax/mesh-rt-view
  • 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-control-block ^0.1.0, @ajax/mesh-abi-fault ^0.1.0, @ajax/mesh-rt-prim ^0.1.0
dependents
@ajax/mesh-rt, @ajax/mesh-rt-block, @ajax/mesh-rt-ctx
keywords
mesh alphaos gpu runtime view
homepage
https://github.com/thomasdavis/alpha-c-mesh/tree/main/packages/mesh-rt-view
repository
https://github.com/thomasdavis/alpha-c-mesh
==> README.md <==
1# @ajax/mesh-rt-view
2
3`mesh_view`: a bounds-checked byte window of the mailbox (a program's view or a part of it), and
4`mesh_rt_fault`, the first-fault record in the program's control block. An out-of-range access reads 0 or
5drops the write and records `FAULT_VIEW_BOUNDS | off << 8` in `P_FAULT`.
6
7| Rust (`View`) | C |
8|---|---|
9| `u32`, `f32`, `u64`, `u8` | `mesh_view_u32` ... `mesh_view_u8` |
10| `set_u32` ... `set_u8` | `mesh_view_set_u32` ... `mesh_view_set_u8` |
11| `sub(off, len) -> Option<View>` | `bool mesh_view_sub(v, off, len, &out)` |
12| `len`, `is_empty`, `ptr` | `mesh_view_len`, `mesh_view_is_empty`, `mesh_view_ptr` |
13
14- **Ported from:** alpha-rust-mesh `crates/mesh-rt/src/ctx.rs` (`View`, `fault`).
15- **Tests:** through the programs' simulator tests (hello checks `P_FAULT` stays 0).