Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 4 additions & 3 deletions pkgs/id/book/design/first-apps.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ The did-it data model has its own investigation: `2026-10-29T13-04-50Z_investiga
- Early surfaces. `2026-03-20T05-30-00Z_feature_collaborative_cursor_enhancements` (2026-03-20) and `2026-03-23T00:00:00Z_feature_file_list_ui` (2026-03-23) are the earliest records in this theme — collaborative cursors and the file list UI of the pre-worlds editor generation. `2026-04-01T00-00-00Z_feature_multi_instance` covers multi-instance support for `id`. `2026-10-17T09-00-00Z_feature_world_fixtures` designs session recording to replayable fixtures, the testing base the app designs rely on.
- Games and assets. `2026-11-08T09-14-46Z_research_id5988_prior_art_bot_games_programmable_worlds` is the prior-art research on scripted-bot battle games and user-programmable worlds. `2026-11-06T00-50-21Z_design_dynamic_world_tick_cost` designs the dynamic-world per-tick cost model and the bot-battle benchmark. `2026-11-08T00-57-08Z_design_shader_asset_format` designs the shader asset format v1. `2026-10-16T15-00-00Z_feature_roc_grid` is the RocGrid record — a bounds-checked grid library for world programs, the library the grid guest app demonstrates.

## The shipped first apps: the 10 Roc guest apps
## The shipped first apps: the 11 Roc guest apps

The platform's working first apps are the 10 deployable Roc guest apps in `pkgs/id/examples/`, plus the one packaged app. They run on the shared Plaza platform (`examples/roc-world/`), whose guest shape is fixed: every app provides `init`, `update`, `view`, `layout`, `records`, `wants`, `snapshot` and `restore`; guests are compiled to import-free Wasm modules with no WASI, no filesystem, network, clock or randomness imports; all effects go through the capability protocol, with requests answered as participant-0 events and refusals returned as events with stable error codes (`cap_denied`, `unknown_cap`, `bad_args`, `failed`, `actor_denied`, `outside_ceiling`, `result_too_large`). The full platform treatment is in [Design: worlds and the guest runtime](worlds-runtime.md).
The platform's working first apps are the 11 deployable Roc guest apps in `pkgs/id/examples/`, plus the one packaged app. They run on the shared Plaza platform (`examples/roc-world/`), whose guest shape is fixed: every app provides `init`, `update`, `view`, `layout`, `records`, `wants`, `snapshot` and `restore`; guests are compiled to import-free Wasm modules with no WASI, no filesystem, network, clock or randomness imports; all effects go through the capability protocol, with requests answered as participant-0 events and refusals returned as events with stable error codes (`cap_denied`, `unknown_cap`, `bad_args`, `failed`, `actor_denied`, `outside_ceiling`, `result_too_large`). The full platform treatment is in [Design: worlds and the guest runtime](worlds-runtime.md).

| App | Location | What it is |
| ---------------- | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
Expand All @@ -31,6 +31,7 @@ The platform's working first apps are the 10 deployable Roc guest apps in `pkgs/
| roc-chat | `examples/roc-chat/` | Minimal chat client on `RocCap` with `chat.say` and `chat.history`; typing `hist` shows the newest 8 lines. |
| roc-grid | `examples/roc-grid/` | RocGrid demo: a 4×3 byte grid, `set` claims the centre cell, bounds-checked reads with fallback. |
| roc-mind-map | `examples/roc-mind-map/` | Mind map for `mind-map/same-label-distinct-nodes` (#13609): stable node IDs, a typed `related` cross-link that survives reparent and rename, refused single-history cycles, preserved positions. |
| roc-burrow | `examples/roc-burrow/` | Burrow for `burrow/detour-to-exit` (#13603): a three-cell excavation and exit loop — dig clears adjacent soil once, the rock is impassable, the exit opens only after three clears; `records` and `snapshot` publish the same domain document. |
| roc-screen | `examples/roc-screen/` | Screen and Key demo: a bordered-box counter screen document; presenters render the structured grid. |
| territory | `examples/territory/` | Multiplayer territory game: at most 8 seated players on a 16×8 grid, adjacency-only claiming, seats persist across leave, rejoin and restart. |
| roc-cap-demo | `examples/roc-cap-demo/` | Library-import worked example (#5957): a capability-dependent Roc library over `records.read`, with two compile-must-fail negative tests. |
Expand Down Expand Up @@ -63,7 +64,7 @@ An example with invented data, following the v1 design: a creator exports the pr

Grounding, from the library survey for this book (checkout `1ccb4a19457`, 2026-11-23):

- Shipped: the 10 Roc guest apps and the packaged tic-tac-toe app listed in the table above, with checked-in Wasm artifacts beside most apps so host conformance suites run without a Roc toolchain. These are the first apps in the literal sense: working guest programs on the shipped Plaza platform.
- Shipped: the 11 Roc guest apps and the packaged tic-tac-toe app listed in the table above, with checked-in Wasm artifacts beside most apps so host conformance suites run without a Roc toolchain. These are the first apps in the literal sense: working guest programs on the shipped Plaza platform.
- Shipped: the program-side machinery the ecosystem designs build on — the program registry and gallery surface named in the CLI (`gallery`, `publish`, `unpublish`, `publications` command families exist in the shipped CLI table), and the bundle record path the #10662 listing design distinguishes itself from: author-signed bundle records with author, name, version and payload hash, fetched by content hash and verified on the bundle path.
- Shipped as a proof of concept only: the first app of #2031 — sticky notes plus did-it — exists as the integration test `tests/first_app_poc.rs` and a README in `examples/first-app-poc/`. It is not a packaged application.
- Still design: the ecosystem ladder as designed — signed bundle export/import/fork as the v1 user flow (#6291 is a design record; the record states no implementation code is in it), the gallery as a registry with update channels (#6293, design only), the hosted public gallery as an operated instance (#6294, design only), and creator tooling (#6308, design only). The chat v1, boards and match-attestation designs are likewise design records; the shipped chat and boards functionality in the `id` program is the earlier application surface documented in the reference chapters, not an implementation of these v1 designs — the records themselves make no completion claim, and this chapter makes none for them.
1 change: 1 addition & 0 deletions pkgs/id/book/development/add-a-guest.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Worked examples live in `pkgs/id/examples/`. Each app is a directory holding its
| `examples/roc-chat/` | Chat over the capability protocol: `chat.say` and `chat.history` through `RocCap`. |
| `examples/roc-grid/` | The `RocGrid` library: a 4×3 byte grid with bounds-checked reads. |
| `examples/roc-mind-map/` | Stable IDs with duplicate labels, a typed cross-link, refused cycles, preserved positions. |
| `examples/roc-burrow/` | An excavation game on a semantic text grid: dig/walk commands, a clear quota gating the exit, literal-vector host replay. |
| `examples/roc-screen/` | The `Screen` and `Key` libraries: a structured screen document instead of text. |
| `examples/lounge/` | The capability system end to end: subscriptions, arrival greetings through `chat.say`, and refusal counting. |
| `examples/territory/` | A complete multiplayer game: at most 8 seated players on a 16×8 grid, adjacency-only claiming, seats that persist across leave, rejoin and restart. |
Expand Down
5 changes: 3 additions & 2 deletions pkgs/id/book/library/guests-and-shells.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ The runtime provider set named in `ABI.md` is `time.now`, `time.tick` (subscribe

The Roc client library is `RocCap`: a session issuing request ids `r0`, `r1`, and so on, with `issue`, `attach`, `requests`, and `route`, and builders `chat_request`, `now_request`, `players_request`, `world_request`, `history_request`, `records_request`, `schedule_at_request`, and `schedule_cancel_request`.

## The ten Roc guest apps
## The eleven Roc guest apps

Checked-in `.wasm` artefacts sit beside most apps, so the host conformance suites run without a Roc toolchain. `pkgs/id/apps/tic-tac-toe/` is the sole packaged app; the other nine live in `pkgs/id/examples/`.
Checked-in `.wasm` artefacts sit beside most apps, so the host conformance suites run without a Roc toolchain. `pkgs/id/apps/tic-tac-toe/` is the sole packaged app; the other ten live in `pkgs/id/examples/`.

| App | Location | What it does |
| ---------------- | ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
Expand All @@ -50,6 +50,7 @@ Checked-in `.wasm` artefacts sit beside most apps, so the host conformance suite
| roc-chat | `examples/roc-chat/` | Minimal chat client on `RocCap` with `chat.say` and `chat.history`; typing `hist` shows the newest 8 lines. |
| roc-grid | `examples/roc-grid/` | `RocGrid` demo: a 4×3 byte grid where `set` claims the centre cell; bounds-checked reads with a fallback. |
| roc-mind-map | `examples/roc-mind-map/` | Mind map for `mind-map/same-label-distinct-nodes` (#13609): nodes distinguished by stable ID with duplicate `Archive` labels, a typed `related` cross-link through reparent and rename, refused single-history cycles, preserved positions; `records` and `snapshot` publish the same domain document. |
| roc-burrow | `examples/roc-burrow/` | Burrow for `burrow/detour-to-exit` (#13603): a three-cell excavation and exit loop on a semantic text grid — dig clears adjacent soil exactly once, the rock is impassable, the exit accepts entry only once three clears are banked; `records` and `snapshot` publish the same domain document. |
| roc-screen | `examples/roc-screen/` | `Screen` and `Key` demo: a bordered-box counter screen document, `+` increments; presenters (SSH ANSI, browser DOM) render the structured grid. |
| territory | `examples/territory/` | Multiplayer territory game: at most 8 seated players on a 16×8 grid, adjacency-only claiming, seats persist across leave, rejoin, and restart. |
| roc-cap-demo | `examples/roc-cap-demo/` | Library-import worked example (#5957): a capability-dependent Roc library (`lib/Greeter.roc` over `records.read`) plus its app, with two compile-must-fail negative tests — a missing capability on `platform-no-caps.roc`, and a wrong `RocCap` signature. |
Expand Down
Loading