feat(rfc-cm): baseline P0-P3 compute machine, stdlib and resource slices

Implements the first vertical slices of RFC-CM-0001/0002 on top of a113d89:

- P1: opaque Memory regions (64 KiB pages, budgets, grow-only), byte
  read/write, Memory-index place assignment, wire/host-boundary rejection.
- CM-A04/A05: value-semantics List/Map/Text/Table primitives and the
  recoverable Result map convention.
- CM-A06: opaque Resource handles, resource.open/read/write/close, stdout
  write, granted project-file read and buffered write, strict fail-closed.
- CM-A07 Compat-A: explicit .mq.md format/utf8/io chain matching builtin
  print for the covered value types; builtin remains default.
- P2 fixtures: allocators, list/tree/graph/hash, integer codecs, UTF-8
  encode/decode, CSV/JSON subsets, table filter/sort/join, bytecode VM.
- ADRs 0022-0027, spec updates, evidence reports and 68 semantic goldens.

Gate: cargo fmt --check, clippy -D warnings, 407 tests passed.
This commit is contained in:
cflmy committed 2026-11-20 21:16:54 +08:00
1 parent a113d89496
commit 92bfbf2568
127 files changed
+11351 -141

No files matched your search

@@ -0,0 +1,7 @@
{
"function": "main",
"args": {},
"codes": [
"runtime.index"
]
}
@@ -0,0 +1,5 @@
## main
**内存 = memory.new(1, 1)**
*内存[65536]*
@@ -0,0 +1,7 @@
{
"function": "main",
"args": {},
"codes": [
"runtime.type"
]
}
@@ -0,0 +1,5 @@
## main
**内存 = memory.new(1, 1)**
**`内存[0] = 256`**
@@ -0,0 +1,7 @@
{
"function": "main",
"args": {},
"codes": [
"runtime.type"
]
}
@@ -0,0 +1,8 @@
## main
List values keep their v1 value semantics: index assignment is not defined
for them and must not silently turn a list into shared mutable memory.
**列表 = [1, 2]**
**`列表[0] = 9`**
@@ -0,0 +1,7 @@
{
"function": "main",
"args": {},
"codes": [
"runtime.index"
]
}
@@ -0,0 +1,5 @@
## main
**内存 = memory.new(1, 1)**
*内存[999999999999999999999999999999999999999]*
@@ -0,0 +1,7 @@
{
"function": "main",
"args": {},
"codes": [
"resource.exhausted"
]
}
@@ -0,0 +1,5 @@
## main
**内存 = memory.new(1, 1)**
*memory.grow(内存, 1)*
@@ -0,0 +1,7 @@
{
"function": "main",
"args": {},
"codes": [
"runtime.memory"
]
}
@@ -0,0 +1,3 @@
## main
*[memory.new(0 - 1, 1)]*
@@ -0,0 +1,7 @@
{
"function": "main",
"args": {},
"codes": [
"runtime.type"
]
}
@@ -0,0 +1,3 @@
## main
*list.append({a: 1}, 2)*
@@ -0,0 +1,7 @@
{
"function": "main",
"args": {},
"codes": [
"runtime.index"
]
}
@@ -0,0 +1,5 @@
## main
**数据 = 表(["a"], [[1]])**
*table.cell(数据, 1, 0)*
@@ -0,0 +1,7 @@
{
"function": "main",
"args": {},
"codes": [
"runtime.type"
]
}
@@ -0,0 +1,5 @@
## main
**数据 = {a: 1}**
*map.get(数据, 1)*