skip to content
[readonly]

The executor interface meshd's driver runs programs on: images, streams, compilers and backends (CUDA, native, wasm)

sh
$ sexc add @ajax/mesh-backend
  • total 3
  • drwxr-xr-x-../
  • drwxr-xr-x-Oct 27 02:56v/# 1 version
  • drwxr-xr-x-Oct 27 02:56files/# the files of 0.1.0
latest
0.1.0, published Oct 27 02:56 by ajax
owners
ajax
license
MIT
dependencies
@ajax/mesh-text ^0.1.0, @ajax/mesh-manifest ^0.1.0, @ajax/mesh-loader ^0.1.0, @ajax/mesh-abi-backend ^0.1.0, @ajax/mesh-abi-base ^0.1.0, @ajax/mesh-abi-control-protocol ^0.1.0, @ajax/mesh-abi-program-table ^0.1.0, @ajax/mesh-check ^0.1.0
dependents
@ajax/mesh-args, @ajax/mesh-control, @ajax/mesh-driver, @ajax/mesh-exec-wasm, @ajax/mesh-inproc, @ajax/mesh-mps, @ajax/mesh-native, @ajax/meshd
keywords
mesh alphaos backend executor gpu interface
homepage
https://github.com/thomasdavis/alpha-c-mesh/tree/main/packages/mesh-backend
repository
https://github.com/thomasdavis/alpha-c-mesh
==> README.md <==
1# @ajax/mesh-backend
2
3The executor interface meshd's driver sees: `mesh_backend`, `mesh_compiler`, `mesh_kernel` (a loaded image), `mesh_stream` (where a slot's work runs) and `mesh_prepared` (an image compiled off the driver thread). The Rust's traits are tables of functions (`ops` + `self`); the trait's default methods apply when an op is NULL. Also the free functions of backend.rs: `mesh_pick_exec`, `mesh_runs_here`, `mesh_prepare_any`, `mesh_check_manifest`, the backend label, the exit cleanups (native first, then MPS), and a native program's binary path for this target.
4
5Implemented by @ajax/mesh-mps (CUDA, blink and MPS), @ajax/mesh-native (worker processes) and the wasm executor.
6
7## Differences
8
9- Errors are `char **err` (the Rust's `Result<_, String>` messages).
10- `Kernel` and `Stream` are open (an executor provides its ops) instead of a closed enum.
11- Exit cleanups are registered by the executors (`mesh_backend_on_cleanup`) instead of being called by name.
12
13## Ported from
14
15[alpha-rust-mesh](https://github.com/rsafier/alpha-rust-mesh) (Richard Safier, MIT): crates/mesh-host/src/backend.rs.
16
17## Tests
18
19`tests/backend.c`: labels, `pick_exec` and `check_manifest` refusals with the Rust's messages, `prepare_any` over fake compilers, and the cleanup order.
20
21## Licence
22
23MIT. See the repository's LICENSE.