feat(pbs): add Set and reusable identity hashing

This commit is contained in:
2026-10-25 12:15:13 +00:00
parent 632ba6d0d6
commit 8105604f92
59 changed files with 4190 additions and 34 deletions
+8 -2
View File
@@ -28,7 +28,7 @@ For an external coding agent:
### Small Game Project
The installed example has three separately indexed files:
The installed example has separately indexed files. Its basic game entry consists of:
- `pbs:example:game:1:prometeu.json`: a Game manifest with `language: pbs`,
`stdlib: 1` (serialized as a string), and no external dependencies;
@@ -36,6 +36,11 @@ The installed example has three separately indexed files:
moving rectangle through `Gfx` and constructing colors through `Color`;
- `pbs:example:game:1:src/mod.barrel`: the module's public declarations.
Additional runnable examples include `src/collections.pbs` for List/Cursor,
`src/linked.pbs` for Linked, `src/sets.pbs` for Set and `src/hashing.pbs` for
scalar hashing and typed instance queries. Read the corresponding SDK/spec
references; Set's order is unspecified and custom equality is explicit.
Copy these reference texts to the corresponding paths only when creating that
example in your editable project. The example is compiled in the test suite;
it is not a complete game or a claim that every requested gameplay abstraction
@@ -54,7 +59,8 @@ for exact rules rather than inferring compatibility with another language.
`pbs:sdk:game:1:sdk/gfx/main.pbs` exposes the actual installed Gfx source,
including documentation comments and signatures. Its `mod.barrel` reference
defines exports. Equivalent references exist for `sdk/asset`, `sdk/composer`,
`sdk/input`, `sdk/log`, `sdk/math`, `sdk/mathf`, `sdk/random`, and `core/color`. Read those interfaces before calling
`sdk/input`, `sdk/log`, `sdk/math`, `sdk/mathf`, `sdk/random`, `sdk/hash`,
`sdk/collections`, and `core/color`. Read those interfaces before calling
them. Game SDK 1 does not currently ship `audio` or `core/math` modules.
Ordinary game source uses public services such as `Gfx`; it must not manufacture