feat(runtime): implement shared transactional memcard with async saves
Intrepid/Prometeu/Runtime/pipeline/pr-master This commit looks good
Intrepid/Prometeu/Runtime/pipeline/pr-master This commit looks good
This commit is contained in:
@@ -187,27 +187,15 @@ Return shape must also follow the transversal status-first policy in [`16a-sysca
|
||||
|
||||
### MEMCARD game surface (`mem`, v1)
|
||||
|
||||
The game memcard profile uses module `mem` with status-first return shapes.
|
||||
`mem` is a domain layer backed by runtime `fs` (it is not a separate storage backend).
|
||||
The game surface requires `memcard` capability and an admitted RAM snapshot.
|
||||
Its native host owns disk IO through `MemcardStorage`; guest code only accesses
|
||||
its own logical slots. Payload transport is bounded `Array<Int32>` with checked
|
||||
byte values, never hex strings or retained guest heap references.
|
||||
|
||||
The `mem` module is a game profile surface. It is not the public storage model
|
||||
for `System` profile apps.
|
||||
|
||||
Durable memcard data is keyed by `app_id` according to the save-memory
|
||||
contract. Runtime handles, open file tables, pending lifecycle delivery, and
|
||||
other mutable VM-facing syscall context are scoped to the owning VM session and
|
||||
MUST NOT be used as durable app identity.
|
||||
|
||||
Canonical operations in v1 are:
|
||||
|
||||
- `mem.slot_count() -> (status, count)`
|
||||
- `mem.slot_stat(slot) -> (status, state, used_bytes, generation, checksum)`
|
||||
- `mem.slot_read(slot, offset, max_bytes) -> (status, payload_hex, bytes_read)`
|
||||
- `mem.slot_write(slot, offset, payload_hex) -> (status, bytes_written)`
|
||||
- `mem.slot_commit(slot) -> status`
|
||||
- `mem.slot_clear(slot) -> status`
|
||||
|
||||
Semantics and domain status catalog are defined by [`08-save-memory-and-memcard.md`](08-save-memory-and-memcard.md).
|
||||
`mem.bootstrap()` invokes the Registry MemcardBoot role at the producer's explicit
|
||||
post-initialization gate. Ordinary domain calls use an opaque session context,
|
||||
status-first results and one retained asynchronous request. See the complete
|
||||
[ABI table and storage contract](08-save-memory-and-memcard.md#guest-abi).
|
||||
|
||||
### Asset surface (`asset`, v1)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user