spec: accept RFC 0007 and integrate I/O and linear resources
- spec 06 §6-§7: feature resources, consumption and verifier rules, io_error - spec 05 §11.1 fallible intrinsic form; spec 07 §8.7 frozen built-in enum variants, §8.9 resource types; spec 07a resources and run record fields; spec 11 §8 execution profiles, blocked outcome, result channel - reference/intrinsics.md: formal catalogue; capabilities.md: io_error and fs prefix narrowing - features: resources published, linear_aggregates reserved
This commit is contained in:
1 parent
c7bcea294e
commit
571cc6e362
9 files changed
+199
-83
No files matched your search
@@ -5,8 +5,8 @@ Normative registry of capability kinds for AIR format 0 (spec 05 §10). A kind n
|
||||
| Kind | Authorizes effects | Scope at instantiation | Narrowing forms |
|
||||
|---|---|---|---|
|
||||
| `clock.read` | `clock.read` | none | — |
|
||||
| `fs.read` | `fs.read` | absolute path prefix | `prefix` (RFC 0007) |
|
||||
| `fs.write` | `fs.write` | absolute path prefix | `prefix` (RFC 0007) |
|
||||
| `fs.read` | `fs.read` | absolute path prefix | `prefix` |
|
||||
| `fs.write` | `fs.write` | absolute path prefix | `prefix` |
|
||||
| `io.read` | `io.read` | none | — |
|
||||
| `io.write` | `io.write` | none | — |
|
||||
| `mem.alloc` | `mem.alloc` | byte budget | `budget` (RFC 0008) |
|
||||
@@ -26,6 +26,15 @@ Narrowing forms marked with an RFC are registered when that RFC is accepted; unt
|
||||
| Enum | Variants |
|
||||
|---|---|
|
||||
| `cap_error` | `invalid_restriction`, `not_subset`, `unsupported_restriction` |
|
||||
| `io_error` | `not_found`, `permission_denied`, `already_exists`, `invalid_input`, `no_space`, `broken_pipe`, `connection_refused`, `connection_reset`, `address_in_use`, `address_unavailable`, `timed_out`, `other` |
|
||||
|
||||
Variant sets of published built-in enums are frozen (spec 07 §8.7).
|
||||
|
||||
## Narrowing forms
|
||||
|
||||
| Kind | Form | Argument | `ok` | `err` (`cap_error`) |
|
||||
|---|---|---|---|---|
|
||||
| `fs.read`, `fs.write` | `prefix` | `path: slice<u8>`, absolute, no empty/`.`/`..` components | same kind scoped to `path` | `invalid_restriction` if malformed; `not_subset` if not inside the current scope |
|
||||
|
||||
## Instantiation
|
||||
|
||||
|
||||
Reference in new issue
Block a user