Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ body:
id: scope
attributes:
label: Scope
description: Universal `web3:runtime` change, domain extension (e.g. `shepherd:cow`), runtime-only, or SDK-only?
description: Universal `nexum:host` change, domain extension (e.g. `shepherd:cow`), runtime-only, or SDK-only?
- type: textarea
id: extra
attributes:
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[workspace]
members = [
"crates/nxm-engine",
"crates/nexum-engine",
"modules/example",
]
resolver = "2"
Expand Down
17 changes: 11 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@

Shepherd is the [CoW Protocol](https://cow.fi) distribution of **Nexum**, a WebAssembly Component Model runtime for secure, sandboxed execution of capability-scoped modules.

A module compiled against the universal `web3:runtime/headless-module` world runs on any Nexum-compatible host. A module compiled against `shepherd:cow/shepherd-module` additionally gains access to CoW Protocol APIs and order submission — and requires a Shepherd host.
A module compiled against the universal `nexum:host/event-module` world runs on any Nexum-compatible host. A module compiled against `shepherd:cow/shepherd` additionally gains access to CoW Protocol APIs and order submission — and requires a Shepherd host.

> **Upgrading from 0.1?** See the [Migration Guide](docs/migration/0.1-to-0.2.md) for the full rename table, the new `host-error` model, and the manifest-driven capability negotiation introduced in 0.2.

## Why

Expand All @@ -20,12 +22,14 @@ A module compiled against the universal `web3:runtime/headless-module` world run

| Path | Purpose |
| --- | --- |
| `crates/nxm-engine/` | Host runtime — wasmtime-based component loader and host implementations. |
| `crates/nexum-engine/` | The **engine** — a wasmtime-based host *implementation* of the `nexum:host` contract. The reference server runtime. |
| `wit/nexum-host/` | The **`nexum:host` WIT package** — the host/guest *contract* (interfaces, types, worlds) that every engine implements and every module imports. |
| `wit/shepherd-cow/` | `shepherd:cow` WIT package — CoW Protocol-specific extensions on top of `nexum:host`. |
| `modules/example/` | Reference guest module demonstrating the module ABI. |
| `wit/web3-runtime/` | Universal `web3:runtime` WIT package (csn, identity, local-store, remote-store, msg, logging). |
| `wit/shepherd-cow/` | `shepherd:cow` WIT package — CoW Protocol-specific extensions. |
| `docs/` | Architecture, design notes, and the universal primitive taxonomy. Start with [`docs/00-overview.md`](docs/00-overview.md). |

> **Engine vs. host.** "Engine" is a concrete implementation that runs WASM components (today: `nexum-engine`, a wasmtime-based daemon). The `nexum:host` WIT package is the *contract* — the host-imports surface a guest sees. Other engines (mobile, browser) can implement the same `nexum:host` contract; modules built against the contract run on any compliant engine.

## Building

Shepherd uses [Nix](https://nixos.org/) flakes to pin the toolchain and [just](https://github.com/casey/just) as a task runner.
Expand All @@ -51,14 +55,15 @@ Without Nix, you need: Rust (edition 2024, see `rust-toolchain.toml` if present)
The `docs/` directory contains the design corpus:

- [`00-overview.md`](docs/00-overview.md) — architecture, primitives, WIT worlds
- [`01-runtime-environment.md`](docs/01-runtime-environment.md) — host runtime
- [`01-runtime-environment.md`](docs/01-runtime-environment.md) — engine internals (wasmtime, fuel, epoch, ResourceLimiter)
- [`02-modules-events-packaging.md`](docs/02-modules-events-packaging.md) — module ABI, events, packaging
- [`03-module-discovery.md`](docs/03-module-discovery.md) — static / ENS / on-chain registry
- [`04-state-store.md`](docs/04-state-store.md) — local + remote state
- [`05-sdk-design.md`](docs/05-sdk-design.md) — guest SDK
- [`06-production-hardening.md`](docs/06-production-hardening.md) — operational concerns
- [`07-rpc-namespace-design.md`](docs/07-rpc-namespace-design.md) — `csn` namespace
- [`07-rpc-namespace-design.md`](docs/07-rpc-namespace-design.md) — `chain` namespace
- [`08-platform-generalisation.md`](docs/08-platform-generalisation.md) — beyond CoW
- [`migration/0.1-to-0.2.md`](docs/migration/0.1-to-0.2.md) — upgrading from Nexum 0.1

## Contributing

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "nxm-engine"
version = "0.1.0"
name = "nexum-engine"
version = "0.2.0"
edition.workspace = true
license.workspace = true
repository.workspace = true
Expand All @@ -10,3 +10,6 @@ wasmtime = { version = "45", features = ["component-model"] }
wasmtime-wasi = "45"
anyhow = "1"
tokio = { version = "1", features = ["full"] }
getrandom = "0.4"
serde = { version = "1", features = ["derive"] }
toml = "1"
Loading