@calcit/procs 0.12.56 → 0.12.57

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (155) hide show
  1. package/.yarn/install-state.gz +0 -0
  2. package/build.rs +36 -2
  3. package/editing-history/202608011759-issue-routing-in-agent-guide.md +17 -0
  4. package/editing-history/202608011833-schema-type-symbols.md +20 -0
  5. package/editing-history/202608011852-wasm-dynamic-string-tag.md +7 -0
  6. package/editing-history/202608011908-consolidate-history.md +6 -0
  7. package/editing-history/202608012022-consolidate-cli-and-test-duplication.md +28 -0
  8. package/editing-history/202608012123-review-follow-up.md +18 -0
  9. package/editing-history/202608012320-release-0.12.57.md +5 -0
  10. package/editing-history/ARCHIVE.md +15 -0
  11. package/editing-history/README.md +21 -0
  12. package/lib/package.json +1 -1
  13. package/package.json +1 -1
  14. package/editing-history/2026-02-13-1841-trait-origin-structural-eq.md +0 -91
  15. package/editing-history/2026-02-14-2050-js-codegen-recursion-tag-migration.md +0 -39
  16. package/editing-history/2026-02-14-2358-emit-js-modularization-shift-left.md +0 -63
  17. package/editing-history/2026-02-15-0000-diagnostics-consolidated.md +0 -35
  18. package/editing-history/2026-02-15-1941-macro-diagnostics-refinement.md +0 -39
  19. package/editing-history/2026-02-16-2043-core-api-docs-cleanup.md +0 -40
  20. package/editing-history/2026-02-23-0834-migrate-to-defstruct.md +0 -91
  21. package/editing-history/2026-02-23-2321-ns-imports-code-fixes.md +0 -42
  22. package/editing-history/2026-02-25-0002-language-behavior-eval-mode.md +0 -93
  23. package/editing-history/2026-02-25-0111-guidebook-no-check-block-upgrades.md +0 -52
  24. package/editing-history/2026-02-25-0113-runtime-type-validation-and-macro-quoting.md +0 -41
  25. package/editing-history/2026-02-25-1131-check-md-eval-improvements.md +0 -13
  26. package/editing-history/2026-02-26-1324-check-md-inprocess-cache-and-path-labels.md +0 -7
  27. package/editing-history/2026-02-27-1640-unify-markdown-readers.md +0 -16
  28. package/editing-history/2026-02-27-1958-tree-rewrite-command-and-reference-model.md +0 -18
  29. package/editing-history/2026-02-27-2200-split-def-command.md +0 -29
  30. package/editing-history/2026-02-27-2212-tree-raise-wrap.md +0 -33
  31. package/editing-history/2026-02-27-2223-calcit-agent-docs-optimize.md +0 -41
  32. package/editing-history/2026-03-01-0212-query-search-entry-and-ffi-warning.md +0 -53
  33. package/editing-history/2026-03-03-1934-check-types-and-core-annotations.md +0 -17
  34. package/editing-history/2026-03-04-0000-generics-fn-typevar-identity.md +0 -30
  35. package/editing-history/2026-03-04-1331-tag-call-warning-and-dot-access-migration.md +0 -28
  36. package/editing-history/2026-03-04-1548-impl-new-dot-method-input-and-doc-hints.md +0 -33
  37. package/editing-history/2026-03-04-1645-calcit-eq-contract-refactor-and-macro-tests.md +0 -28
  38. package/editing-history/2026-03-04-2200-assert-type-assert-traits-composable-runtime-checks.md +0 -18
  39. package/editing-history/2026-03-05-0042-type-inference-argtypes-and-core-hints.md +0 -54
  40. package/editing-history/2026-03-05-0115-calcit-core-generic-refinements.md +0 -57
  41. package/editing-history/2026-03-05-1930-schema-migration-cr-edit.md +0 -30
  42. package/editing-history/2026-03-05-1939-query-schema-adaptation.md +0 -42
  43. package/editing-history/2026-03-06-0120-schema-hint-migration-batch.md +0 -38
  44. package/editing-history/2026-03-06-1416-core-macro-schema-migration.md +0 -20
  45. package/editing-history/2026-03-06-1552-core-schema-and-hintfn-migration.md +0 -63
  46. package/editing-history/2026-03-06-1936-schema-normalization-and-preprocess-preload.md +0 -12
  47. package/editing-history/2026-03-07-0000-migrate-hint-fn-to-schema.md +0 -29
  48. package/editing-history/2026-03-07-0000-remove-enum-prototype-field.md +0 -43
  49. package/editing-history/2026-03-07-0000-schema-args-type-enforcement.md +0 -66
  50. package/editing-history/2026-03-07-0142-unit-type-and-builtin-schemas.md +0 -82
  51. package/editing-history/2026-03-07-1652-decouple-snapshot-schema-to-calcit-type.md +0 -112
  52. package/editing-history/2026-03-07-1821-snapshot-schema-validation.md +0 -6
  53. package/editing-history/2026-03-07-1959-schema-def-kind-arity-validation.md +0 -96
  54. package/editing-history/2026-03-08-0031-schema-generics-quote-normalization.md +0 -35
  55. package/editing-history/2026-03-08-1905-schema-typeref-and-assert-migration.md +0 -34
  56. package/editing-history/2026-03-08-2033-schema-wrapper-migration.md +0 -45
  57. package/editing-history/2026-03-08-2315-late-schema-cleanup-and-warning-compat.md +0 -27
  58. package/editing-history/2026-03-09-1753-schema-type-fail-tests.md +0 -17
  59. package/editing-history/2026-03-10-1040-edit-schema-primitive-tag-support.md +0 -42
  60. package/editing-history/2026-03-10-1754-ns-entry-snapshot-migration.md +0 -66
  61. package/editing-history/2026-03-13-2216-validate-struct-type-arg-arity.md +0 -24
  62. package/editing-history/2026-03-16-2353-runtime-boundary-cleanup.md +0 -14
  63. package/editing-history/2026-03-17-0150-runtime-boundary-lookup-cleanup.md +0 -28
  64. package/editing-history/2026-03-20-0116-json-builtins-and-runtime-docs.md +0 -48
  65. package/editing-history/2026-03-26-2013-docs-frontmatter-and-module-search.md +0 -58
  66. package/editing-history/2026-04-07-1550-path-format-at-prefix-migration.md +0 -46
  67. package/editing-history/2026-04-12-1524-js-codegen-map-to-record.md +0 -26
  68. package/editing-history/2026-04-12-1549-map-to-record-field-validation.md +0 -29
  69. package/editing-history/2026-04-13-1600-tuple-to-enum-rewrite.md +0 -13
  70. package/editing-history/2026-04-13-2309-typeslot-enum-compile-safety.md +0 -45
  71. package/editing-history/2026-04-14-1500-loose-record-syntax.md +0 -32
  72. package/editing-history/2026-04-14-2259-bidir-type-check-refactor.md +0 -63
  73. package/editing-history/2026-04-15-0120-match-syntax-exhaustiveness.md +0 -20
  74. package/editing-history/2026-04-15-1211-record-nth-optimization.md +0 -44
  75. package/editing-history/2026-04-16-1936-predicate-narrowing-expansion.md +0 -31
  76. package/editing-history/2026-04-17-0132-monomorphize-map-filter.md +0 -50
  77. package/editing-history/2026-04-17-0135-monomorphize-includes-reverse.md +0 -31
  78. package/editing-history/2026-04-17-0140-fold-type-predicates.md +0 -44
  79. package/editing-history/2026-04-17-0154-generic-dispatch-records-tuples.md +0 -52
  80. package/editing-history/2026-04-17-0520-simplify-generic-defns-via-method-dispatch.md +0 -49
  81. package/editing-history/2026-05-21-0055-tree-show-cr-config-and-edit-cleanup.md +0 -81
  82. package/editing-history/2026-05-31-2052-macro-schema-roundtrip-and-weak-types.md +0 -6
  83. package/editing-history/2026-05-31-2105-map-generic-weak-types-followup.md +0 -15
  84. package/editing-history/2026-06-01-0003-update-callback-field-specialization.md +0 -19
  85. package/editing-history/2026-06-01-2317-data-definition-where-bounds.md +0 -6
  86. package/editing-history/2026-06-02-0114-data-definition-where-macro-followup.md +0 -21
  87. package/editing-history/2026-06-03-0000-check-md-edn-errors.md +0 -5
  88. package/editing-history/2026-06-03-1600-check-md-entry-modules.md +0 -6
  89. package/editing-history/2026-06-04-0000-check-md-app-main-init.md +0 -6
  90. package/editing-history/2026-06-04-2218-compiled-executable-runtime-backfill.md +0 -6
  91. package/editing-history/2026-06-09-0000-with-type-slot-scoped-binding.md +0 -83
  92. package/editing-history/2026-06-09-1241-remove-bind-type.md +0 -64
  93. package/editing-history/2026-06-09-1800-core-effect-tags.md +0 -57
  94. package/editing-history/2026-06-10-1200-get-def-doc-schema-builtin.md +0 -7
  95. package/editing-history/2026-06-15-1500-effects-graph-mvp.md +0 -30
  96. package/editing-history/2026-06-16-1700-effects-graph-ste-tree.md +0 -84
  97. package/editing-history/2026-06-27-0052-cli-improvements.md +0 -41
  98. package/editing-history/2026-06-27-0202-docs-indexing-improvements.md +0 -22
  99. package/editing-history/2026-06-27-0315-file-splits.md +0 -17
  100. package/editing-history/2026-06-27-0416-agent-advanced-split.md +0 -15
  101. package/editing-history/archived/2025-04-12-1453-map-to-record-rewrite.md +0 -33
  102. package/editing-history/archived/2025-04-16-0117-wasm-codegen-and-catalog-update.md +0 -40
  103. package/editing-history/archived/2025-07-16-0207-wasm-encoder-migration.md +0 -48
  104. package/editing-history/archived/2025-07-16-1633-wasm-data-structures.md +0 -61
  105. package/editing-history/archived/2026-02-13-1926-docs-tests-followup.md +0 -33
  106. package/editing-history/archived/2026-02-16-2128-docs-smoke-and-trait-errors.md +0 -20
  107. package/editing-history/archived/2026-02-25-1234-watch-mode-default-once.md +0 -5
  108. package/editing-history/archived/2026-03-07-1302-calcit-agent-docs-update.md +0 -32
  109. package/editing-history/archived/2026-03-09-1819-add-test-fail-script.md +0 -5
  110. package/editing-history/archived/2026-03-09-1944-split-type-fail-tests.md +0 -8
  111. package/editing-history/archived/2026-03-16-1449-profiling-tools-reorg.md +0 -13
  112. package/editing-history/archived/2026-03-17-2026-afternoon-runtime-boundary-optimization-summary.md +0 -87
  113. package/editing-history/archived/2026-03-18-1802-tips-level-and-overwrite-schema-preservation.md +0 -26
  114. package/editing-history/archived/2026-03-20-1229-query-window-3-with-parent-preview.md +0 -72
  115. package/editing-history/archived/2026-03-23-1137-command-echo-tool-output-cleanup.md +0 -71
  116. package/editing-history/archived/2026-04-10-0011-snapshot-empty-version-pipe-marker.md +0 -23
  117. package/editing-history/archived/2026-04-16-0131-wasm-math-and-test-integration.md +0 -28
  118. package/editing-history/archived/2026-04-16-1507-wasm-data-structures-and-rfc-rename.md +0 -27
  119. package/editing-history/archived/2026-04-16-1520-wasm-bitwise-and-match.md +0 -21
  120. package/editing-history/archived/2026-04-16-1542-wasm-cross-ns-host-imports.md +0 -38
  121. package/editing-history/archived/2026-04-17-0026-wasm-rest-args.md +0 -62
  122. package/editing-history/archived/2026-04-17-0048-wasm-type-of.md +0 -70
  123. package/editing-history/archived/2026-04-17-0051-wasm-derived-predicates.md +0 -34
  124. package/editing-history/archived/2026-04-17-2316-wasm-do-println-fixes.md +0 -41
  125. package/editing-history/archived/2026-04-18-1208-split-emit-wasm-and-bump-version.md +0 -15
  126. package/editing-history/archived/2026-04-18-1430-wasm-list-match-and-method-dispatch.md +0 -5
  127. package/editing-history/archived/2026-04-18-2041-cr-wasm-split-and-runtime-stability.md +0 -18
  128. package/editing-history/archived/2026-04-18-2045-v0.12.23-ci-wasm-fix.md +0 -13
  129. package/editing-history/archived/2026-04-21-1818-wasm-string-ops-v2.md +0 -57
  130. package/editing-history/archived/2026-04-21-2332-split-emit-wasm.md +0 -45
  131. package/editing-history/archived/2026-04-22-0114-wasm-hof-intercepts-and-set-intersection.md +0 -82
  132. package/editing-history/archived/2026-04-22-0136-wasm-enum-tuple-bool-str-fixes.md +0 -68
  133. package/editing-history/archived/2026-04-22-1340-wasm-map-diff-new-and-let-intercept.md +0 -53
  134. package/editing-history/archived/2026-04-23-1419-v0.12.26-wasm-bisection-fixes.md +0 -7
  135. package/editing-history/archived/2026-04-23-1645-release-conventions.md +0 -14
  136. package/editing-history/archived/2026-04-25-1940-wasm-suite-multi-module-entry.md +0 -53
  137. package/editing-history/archived/2026-04-25-2003-wasm-method-includes-string-and-set-refactor.md +0 -71
  138. package/editing-history/archived/2026-04-25-2010-wasm-suite-add-fn-lens-edn.md +0 -43
  139. package/editing-history/archived/2026-04-25-2051-display-by.md +0 -39
  140. package/editing-history/archived/2026-04-28-1728-fix-gensym-stable.md +0 -31
  141. package/editing-history/archived/2026-04-29-1400-fix-bind-type-precompile.md +0 -38
  142. package/editing-history/archived/2026-05-26-0957-match-docs-check-md.md +0 -24
  143. package/editing-history/archived/2026-05-31-2059-ci-docs-test-and-fn-helper-tightening.md +0 -3
  144. package/editing-history/archived/2026-06-01-0005-release-0.12.36.md +0 -16
  145. package/editing-history/archived/2026-06-01-2230-enum-struct-payload-docs.md +0 -4
  146. package/editing-history/archived/2026-06-03-1620-release-0.12.38.md +0 -6
  147. package/editing-history/archived/2026-06-04-0000-release-0.12.39.md +0 -4
  148. package/editing-history/archived/2026-06-04-2230-release-0.12.40.md +0 -5
  149. package/editing-history/archived/2026-06-12-1525-weak-types-dots-format.md +0 -15
  150. package/editing-history/archived/2026-06-13-1200-primitive_schema_tags.md +0 -9
  151. package/editing-history/archived/2026-06-20-1142-ts-declaration-d-mts.md +0 -5
  152. package/editing-history/archived/2026-06-29-0117-upgrade-doc-snapshot-migration.md +0 -2
  153. package/editing-history/archived/2026-06-29-calcit-cli.md +0 -80
  154. package/editing-history/archived/2026-06-29-typed-calcit-cli-schemas.md +0 -23
  155. package/editing-history/archived/20260630-duplication-analysis.md +0 -116
@@ -1,21 +0,0 @@
1
- ## Summary
2
-
3
- - restored high-level `defstruct` / `defenum` where-map syntax end to end after the Rust/runtime work landed
4
- - aligned JS runtime parsing in `ts-src/calcit.procs.mts` so `defstruct` / `defenum` skip optional generics and where-map entries before parsing fields or variants
5
- - kept the smoke test in `calcit/test-enum.cirru` on the high-level syntax and reran broad validation
6
-
7
- ## Knowledge Points
8
-
9
- - the JS-emitted high-level data-definition forms do not preserve where-map heads as a stable plain symbol; the first item may be a runtime function alias or even an unresolved value shape, so detecting where-map entries by exact head identity is brittle
10
- - a safer JS-side strategy is structural detection: after an optional generics list, treat a list as a where-map form when its head is not a tag/symbol/string and the remaining items are all 2-item pairs
11
- - for current JS codegen, generic parameter lists arrive as a simple list of `CalcitSymbol`s, so the runtime parser can ignore that leading entry without needing full type-variable reconstruction
12
-
13
- ## Validation
14
-
15
- - `cargo fmt`
16
- - `cargo test where_bounds --lib`
17
- - `cargo run --bin cr -- calcit/test-enum.cirru`
18
- - `yarn compile && yarn try-js`
19
- - `yarn try-rs`
20
- - `yarn try-ir`
21
- - `yarn try-wasm`
@@ -1,5 +0,0 @@
1
- # check-md 与 EDN 报错(2026-06-03)
2
-
3
- - `collect_check_md_module_paths`:用 `extract_modules_from_edn` 只读 `configs.modules`,避免对旧格式大快照(如 `demos/calcit.cirru` 的 `%Expr` 代码字段)做全量 `load_snapshot_data`。
4
- - `check-md`:`prepare_program_for_snippet` 以 entry 快照为底、最后写入 `app.main`;no-run 优先编译片段里的 `app.main` defs;片段若全是顶层 `def/defn/defcomp/...` 则拆成多个 `CodeEntry`(`create_file_from_snippet`)。
5
- - `data/edn.rs`:反序列化失败时在 `got:` 里把旧 `%Expr`/`%Leaf` 还原为格式化 Cirru(约 520 字上限),`snapshot`/`call_stack` 错误预览走同一套。
@@ -1,6 +0,0 @@
1
- # 2026-06-03 check-md entry modules 与文档校验改进
2
-
3
- - `cr docs check-md` 现在默认读取 `entry`(如 `demos/calcit.cirru`)里的 `configs.modules`,并与 CLI 的 `--dep` 合并去重,避免每次手动重复传依赖。
4
- - `check-md` 的 `no-run` 模式在找不到默认入口定义时,增加了对 `app.*` 命名空间定义的回退编译检查,提升示例片段可检性。
5
- - 更新 `check-md` 帮助文案,明确 `--dep` 是额外依赖,默认依赖来自 `entry configs.modules`。
6
- - 新增单元测试覆盖 `entry modules + --dep` 合并去重逻辑,并通过 `docs check-md` 实测验证 `respo` 文档在不显式传 `--dep` 时可通过。
@@ -1,6 +0,0 @@
1
- # 2026-06-04 check-md 入口加载与 app.main 注入
2
-
3
- - `prepare_program_for_snippet` 加载 entry snapshot 失败时不再回退空 snapshot,改为直接报错。
4
- - `extract_modules_from_edn` 对畸形 `configs.modules` 返回明确 EDN 预览,不再静默忽略。
5
- - check-md 注入片段固定使用 `app.main/main!`,避免误跑 entry 项目的 `:init-fn`(如 memof 测试套件)。
6
- - `docs/run/cli-options.md` 注明 Run 模式使用 `app.main/main!`。
@@ -1,6 +0,0 @@
1
- # 2026-06-04 compiled executable runtime backfill
2
-
3
- - `resolve_runtime_or_compiled_def` materialized compiled executable defs without seeding runtime, so repeated symbol lookup rebuilt fresh `Fn` values.
4
- - Fresh `Fn` ids broke caches keyed by functions, reproducing in `memof` where `memof1-call` and `memof1-call-by` missed cache hits under `cr calcit.cirru`.
5
- - `materialize_compiled_executable_payload` now writes the resolved executable back into runtime-ready storage, preserving stable function identity across lookups.
6
- - Program tests now assert runtime backfill for compiled executable resolution and `memof` plain `cr` execution passes again with the patched binary.
@@ -1,83 +0,0 @@
1
- # with-type: 局部作用域类型绑定
2
-
3
- 日期:2026-06-09
4
-
5
- ## 功能概要
6
-
7
- 实现 `with-type-slot` 表达式,允许在局部代码块范围内绑定 type-slot,替代全局 `bind-type` 的全局副作用。
8
-
9
- ## 语法
10
-
11
- ```cirru
12
- with-type-slot (:slot-name TypeExpr)
13
- body-expr1
14
- body-expr2
15
- ...
16
- ```
17
-
18
- - 第一个参数必须是二元列表 `(:slot-name TypeExpr)`
19
- - 后续参数是 body 表达式
20
- - 返回最后一个 body 表达式的值
21
-
22
- ## 与 bind-type 的对比
23
-
24
- | 特性 | bind-type | with-type-slot |
25
- |------|-----------|-----------|
26
- | 作用域 | 全局(整个预处理 pass) | 局部(仅 body 范围内) |
27
- | 是否可重叠 | 单次绑定,不可重复 | 可嵌套,栈式覆盖 |
28
- | 使用位置 | 通常在 main! 最顶部 | 任意代码块 |
29
-
30
- ## 实现细节
31
-
32
- ### 修改文件
33
-
34
- 1. **`src/calcit/type_annotation.rs`**
35
- - 新增 `TYPE_SLOT_OVERRIDES` thread-local(HashMap of Vec)
36
- - 新增 `push_type_slot_override(name, ty)`:压栈一个作用域覆盖
37
- - 新增 `pop_type_slot_override(name)`:弹栈,自动清理空栈
38
- - 修改 `resolve_type_slot`:优先检查 override 栈,再回退到基础 `TYPE_SLOTS`
39
- - 修改 `clear_type_slots`:同时清理 override 栈
40
-
41
- 2. **`src/calcit/proc_name.rs`**
42
- - 添加 `WithType` 枚举变体(strum serialize = "with-type")
43
- - `get_type_signature` 返回 `None`(type-checking 在预处理阶段处理)
44
-
45
- 3. **`src/builtins.rs`**
46
- - 添加 `WithType => meta::with_type_runtime(args)` dispatch
47
-
48
- 4. **`src/builtins/meta.rs`**
49
- - 添加 `with_type_runtime()` 运行时 no-op(返回最后一个 body 值)
50
-
51
- 5. **`src/runner/preprocess/mod.rs`**
52
- - 新增 `preprocess_with_type_block()` 函数:
53
- - 解析 binding pair → 解析类型注解
54
- - push override → 预处理 body → pop override(错误时也 pop)
55
- - 在 `preprocess_list_call` 中:在 generic `Calcit::Proc` 分支之前插入 `WithType` 特殊分支
56
-
57
- 6. **`src/calcit.rs`**
58
- - re-export `push_type_slot_override`, `pop_type_slot_override`
59
-
60
- ### 运行时行为
61
-
62
- `with-type-slot` 在运行时是 no-op:类型绑定仅影响预处理阶段的类型检查,不影响运行时值。运行时返回最后一个 body 表达式的值。
63
-
64
- ### 预处理时机
65
-
66
- `with-type-slot` 的 body 在 override 激活期间被预处理。由于 `ensure_ns_def_compiled` 是懒加载的,所有从 body 中引用的 def(包括传递依赖)都会在 override 有效时被编译,从而获得正确的类型检查。
67
-
68
- ## 验证
69
-
70
- 使用 calcium-workflow 项目验证:将 `app.client/main!` 从 `bind-type` 改写为 `with-type-slot`:
71
-
72
- ```cirru
73
- ;; 改写前
74
- defn main! () (bind-type :dispatch-op Op)
75
- ...
76
-
77
- ;; 改写后
78
- defn main! ()
79
- with-type-slot (:dispatch-op Op)
80
- ...
81
- ```
82
-
83
- 运行 `cr calcit.cirru --check-only` 验证通过:`✓ Check passed (59ms)`
@@ -1,64 +0,0 @@
1
- # 2026-0609-1241 移除 bind-type(Breaking Change)
2
-
3
- ## 概要
4
-
5
- 彻底移除 `bind-type` 内置过程,所有类型槽绑定统一使用 `with-type-slot`。
6
-
7
- ## 动机
8
-
9
- `bind-type` 是全局绑定,每个槽只能绑定一次,多入口项目(client/server)会产生冲突或需要分程序加载。`with-type-slot` 提供了基于词法作用域的替代方案,在入口函数体内局部绑定,天然支持多入口并行编译。
10
-
11
- ## 删除范围
12
-
13
- ### Rust 核心
14
-
15
- | 文件 | 改动 |
16
- |------|------|
17
- | `src/calcit/proc_name.rs` | 删除 `BindType` 枚举变体及其 `ProcTypeSignature` |
18
- | `src/calcit/type_annotation.rs` | 删除 `bind_type_slot()` 函数(`TYPE_SLOTS` 仍保留用于 `deftype-slot` 声明) |
19
- | `src/calcit.rs` | 删除 `bind_type_slot` 的 re-export |
20
- | `src/builtins.rs` | 删除 `BindType => meta::bind_type(args)` dispatch arm |
21
- | `src/builtins/meta.rs` | 删除 `bind_type()` 函数及其 `bind_type_slot` 导入 |
22
- | `src/runner/preprocess/mod.rs` | 删除 `BindType` 预处理块(~90 行)及 `precompile_bind_type_defs()` 函数 |
23
- | `src/lib.rs` | 删除 `precompile_bind_type_defs` 调用 |
24
- | `src/program.rs` | 删除 `calcit_contains_bind_type()` 及 snapshot 任务排序中的优先级逻辑 |
25
- | `src/codegen/emit_js.rs` | 从 JS codegen no-op 分支中移除 `BindType` |
26
-
27
- ### 测试与固件
28
-
29
- | 文件 | 改动 |
30
- |------|------|
31
- | `calcit/type-fail/type-slot-bind-duplicate.cirru` | **删除**(测试已无法成立) |
32
- | `calcit/type-fail/type-slot-bind-unknown.cirru` | **删除**(`with-type-slot` 不需要预先声明) |
33
- | `calcit/type-fail/type-slot-enum-invalid-variant.cirru` | `bind-type` → `with-type-slot (:dispatch-op Action)` |
34
- | `calcit/type-fail/type-slot-record-call-arg-type-mismatch.cirru` | `bind-type` → `with-type-slot (:payload ...)` |
35
- | `calcit/type-fail/type-slot-entry-scope.cirru` | `bind-type` → `with-type-slot` |
36
- | `src/bin/cr_tests/type_fail.rs` | 删除 `type_fail_type_slot_fixtures_report_errors` 测试;更新注释 |
37
-
38
- ### 文档
39
-
40
- | 文件 | 改动 |
41
- |------|------|
42
- | `docs/features/static-analysis.md` | "Binding a Type Slot" 章节改用 `with-type-slot` 说明 |
43
-
44
- ### 外部项目
45
-
46
- | 文件 | 改动 |
47
- |------|------|
48
- | `calcium-workflow/calcit.cirru` (`app.server/main!`) | `(bind-type :dispatch-op Op)` → `with-type-slot (:dispatch-op Op)` |
49
-
50
- ## 验证
51
-
52
- - `cargo build --bin cr` — 零警告、零错误
53
- - `cargo clippy -- -D warnings` — 通过
54
- - `cargo test` — 85 个测试全部通过
55
- - `calcium-workflow --check-only`(client + server 入口)— 均通过
56
-
57
- ## 迁移指南
58
-
59
- 将所有 `bind-type :slot-name TypeExpr` 替换为:
60
-
61
- ```cirru
62
- with-type-slot (:slot-name TypeExpr)
63
- ;; 原来在 bind-type 之后的代码全部作为 body
64
- ```
@@ -1,57 +0,0 @@
1
- # calcit-core / RegisteredProcDescriptor effect tags
2
-
3
- ## 概要
4
-
5
- 为 `cr analyze effects-graph` 静态分析补充 effect 标记,数据源分两处、tag 名称统一:
6
-
7
- 1. **`calcit-core.cirru`** — builtin CodeEntry 的 `:tags`
8
- 2. **宿主注入 proc** — `RegisteredProcDescriptor.tags`(`HashSet<EdnTag>`)
9
-
10
- RFC `06-15-effects-graph-rfc.md` §4.2 已同步完整 tag 约定表。
11
-
12
- ## calcit.core Tag 分类
13
-
14
- | Tag | 目标 |
15
- |-----|------|
16
- | `:state` | `defatom`, `atom`, `reset!`, `swap!`, `deref`, `ref?`, `add-watch`, `remove-watch`, `&atom:deref`, `&buf-list:*`, `&buffer`, `deftype-slot`, `with-type-slot` |
17
- | `:io` | `read-file`, `write-file`, `get-env`, `cpu-time`, `&get-os`, `&get-calcit-*`, `generate-id!` |
18
- | `:file` | `read-file`, `write-file`(与 `:io` 叠加) |
19
- | `:env` | `get-env`(与 `:io` 叠加) |
20
- | `:control` | `raise`, `quit!`, `try`;`assert`/`assert=`/`assert-detect`(失败时 `raise` + `eprintln`) |
21
- | `:log` | `&display-stack`, `with-cpu-time`(宿主 `println`/`eprintln`/`echo` 见下节) |
22
- | `:meta` | `&get-def-doc`, `&get-def-schema`, `macroexpand*`, `assert-type`, `deftype-slot`, `with-type-slot`, `&data-to-code`, `&extract-code-into-edn` |
23
- | `:async` | `hint-fn` |
24
- | `:watch` | `add-watch`, `remove-watch`(与 `:state` 叠加) |
25
- | `:effect` | `&doseq` |
26
- | `:interop` | `eval`, `js-object` |
27
-
28
- ## RegisteredProcDescriptor
29
-
30
- `println` / `eprintln` / `echo` **不能**在 core 中用 `&runtime-implementation` 建 stub(会与 `has_def_code` 冲突);改由 descriptor 标记。
31
-
32
- ### API
33
-
34
- - `builtins::proc_tags(["log", "io"])` — 构建 tag 集合
35
- - `registered_proc_descriptor(name)` / `list_registered_procs()` / `registered_proc_has_tag(name, tag)`
36
- - `cr query host-procs [--tag :log]`
37
-
38
- ### 已标记注入 proc
39
-
40
- | Proc | Tags |
41
- |------|------|
42
- | `println` / `eprintln` / `echo` | `:log` `:io` |
43
- | `&call-dylib-edn*` | `:interop` `:io` |
44
- | `async-sleep` | `:io` |
45
- | `on-control-c` | `:control` `:io` |
46
-
47
- ### 其它实现细节
48
-
49
- - `inject_platform_apis()` 幂等;在 `main` 开头调用,保证 `cr query` 可见已注入 proc。
50
-
51
- ## 查询示例
52
-
53
- ```bash
54
- cr src/cirru/calcit-core.cirru query defs calcit.core --tag :state
55
- cr src/cirru/calcit-core.cirru query defs calcit.core --tag :meta
56
- cr calcit/test.cirru query host-procs --tag :log
57
- ```
@@ -1,7 +0,0 @@
1
- # &get-def-doc / &get-def-schema
2
-
3
- - 新增 `&get-def-doc`、`&get-def-schema` 内置函数,参数为 `ns/def` 字符串或 symbol。
4
- - Rust/eval 运行时通过 `program::lookup_def_doc` / `lookup_def_schema` 读取已加载定义的 `:doc` 与 `:schema`。
5
- - `snapshot::schema_annotation_to_edn` 统一 schema 转 EDN。
6
- - calcit-js 标记为 unavailable,不生成 def-meta 注册表,避免 js-out 膨胀。
7
- - 测试:`calcit/test-def-meta.cirru`,仅在 `inside-eval:` 下运行。
@@ -1,30 +0,0 @@
1
- # `cr analyze effects-graph` Phase A MVP
2
-
3
- ## 概要
4
-
5
- 实验性只读分析命令,从入口定义递归分解 State / Transform / Effect 三维信息。
6
-
7
- ## 实现
8
-
9
- - 新模块 `src/effects_graph.rs`:`EffectsGraphAnalyzer` 遍历 `PROGRAM_CODE_DATA`,复用 call-tree 可达性模式。
10
- - Tag 来源:`load_core_snapshot()` 的 `calcit.core` `:tags` + `RegisteredProcDescriptor.tags`。
11
- - CLI:`cr analyze effects-graph [--root ns/def] [--format tree|json] [--detail summary|full|minimal] ...`
12
- - 测试夹具:`calcit/test-effects-graph.cirru`
13
-
14
- ## 路径修正
15
-
16
- RFC 文件名统一为 `RFCs/06-15-effects-graph-rfc.md`(原 `06-10-...` 已手动纠正)。
17
-
18
- ## 已知限制(Phase B)
19
-
20
- - `mermaid` 输出未实现
21
- - `--infer-missing` 未实现
22
- - `detail full|minimal` 暂未差异化输出
23
- - Respo 专用规则(`render!`、`d!`)仅靠 `!` 启发式
24
-
25
- ## 输出格式(2026-06-15 更新)
26
-
27
- - **默认 `--format sketch`**:聚合 birdview 文本(State / Lifecycle / Effects 通道 / Data flow)
28
- - 自动 `--ns-prefix` 推断为 `app.`(从入口 ns 首段)
29
- - 默认 `--max-depth 2`;库代码不展开
30
- - `--format mermaid` / `tree` 仍可用
@@ -1,84 +0,0 @@
1
- # effects-graph STE Tree 格式改进
2
-
3
- 日期: 2026-06-16
4
-
5
- ## 问题
6
-
7
- `cr analyze effects-graph` 默认 `sketch` 格式产出的是项目级鸟瞰图(调用树+聚合 effect/state),而非 RFC 预想的 per-function State/Transform/Effect 分解图。用户无法通过输出快速理解单个函数的功能。
8
-
9
- ## 改动
10
-
11
- ### 1. State 提取:从操作名改为目标名
12
-
13
- `record_state_operator` 原先记录操作名(如 `swap!`),现改为提取目标 atom 名称(如 `*store`)。
14
-
15
- - 新增 `extract_state_target(list, op_name)` 从 AST 列表中提取第一个参数
16
- - `swap!/reset!/deref/set!` → 提取第一个参数名
17
- - `defatom/atom` → 提取第一个参数名
18
- - 修改 `walk_expr` → `inspect_call_head` 传参,传入完整 list
19
-
20
- ### 2. Effect 分类:添加 Respo 约定函数
21
-
22
- `classify_by_name` 新增:
23
- - `render-app!/mount-app!/rerender-app!/clear-cache!/realize-ssr!` → `render`
24
- - `send-to-component!/dispatch!` → `lifecycle`
25
- - `save-store!` → `storage`
26
-
27
- `heuristic_effect_kinds` 优化:
28
- - `unknown/effect!` → `effect`(更简洁)
29
- - 函数名含 `load/init/setup` 时归类为 `io`
30
-
31
- `set!` 加入 `is_state_operator` 和 early-return 列表(之前会被误分类为 effect)
32
-
33
- ### 3. 深度截断节点保留分析
34
-
35
- 原先 `max_depth` 到达时直接返回空壳节点(`empty_shell_node`)。
36
- 现改为:始终执行 `analyze_code` 提取 state/effects/transform,仅在 children 构建时跳过。
37
- 新增 `depth_exceeded` 字段标记截断节点。
38
-
39
- ### 4. STE Tree 格式(`--format tree`)
40
-
41
- 新增 `format_as_ste_tree` 函数,输出每个函数的 State/Transform/Effect 树形分解:
42
-
43
- ```
44
- └── respo.main/main! [program]
45
- ├── State
46
- │ ├── atom *store (write)
47
- │ ├── return unit
48
- │ └── watch *store
49
- ├── Transform (calls: 3)
50
- │ ├── → respo.app.core/render-app!
51
- │ └── → respo.main/save-store!
52
- └── Effects
53
- ├── console println
54
- ├── render render-app!
55
- └── storage save-store!
56
- ```
57
-
58
- - `[program]` = 含 effect 的函数
59
- - `[transform]` = 纯变换函数
60
- - `[depth limit ↑]` = 深度截断(有分析但无子节点)
61
- - `(summary)` = 折叠节点的单行摘要(doc + effects)
62
-
63
- `cr.rs` 中 `format=tree` 调度改为 `format_as_ste_tree`(原为 `format_for_llm` mermaid)。
64
-
65
- ### 5. 其他修复
66
-
67
- - `birdview_state_labels` 匹配逻辑修复(kind 匹配而非 name 匹配)
68
- - `effect_channel_name` 新增 `storage`/`lifecycle` 通道映射
69
- - `ste_state_detail` 对 `return` 类型简化显示(仅类型,不显 "return" 前缀)
70
- - `node_transform_summary` 修复 doc 与 summary 重复问题
71
- - `empty_shell_node` 函数删除(不再使用)
72
-
73
- ## 涉及文件
74
-
75
- - `src/effects_graph.rs` — 主要改动
76
- - `src/bin/cr.rs` — tree 格式调度
77
- - `src/cli_args.rs` — 无改动(格式字符串不变)
78
-
79
- ## 验证
80
-
81
- - `cargo test effects_graph` — 5/5 通过
82
- - `cargo clippy -- -D warnings` — 通过
83
- - `yarn compile` — 通过
84
- - `cr analyze effects-graph --format tree` on respo — 产出可用的 per-function STE 分解
@@ -1,41 +0,0 @@
1
- ## CLI 改进: target-replace → search-replace, 新增 batch-delete, --parent-path
2
-
3
- ### 改动机
4
- 根据 pudica-schedule-viewer 升级过程中暴露的多次 cr 命令使用痛点:
5
-
6
- 1. `target-replace` 命名不直观("目标替换"不如"搜索替换"清晰)
7
- 2. 连续删除多个属性时需要手动从高到低删除,容易出错
8
- 3. 搜索结果的路径是叶子路径,用户需要手动去掉末尾索引得到可编辑父路径
9
- 4. map 属性中用 `$` 编辑的规则未在文档中明确
10
-
11
- ### 改动清单
12
-
13
- **src/cli_args.rs:**
14
- - `TargetReplace(TreeTargetReplaceCommand)` → `SearchReplace(TreeSearchReplaceCommand)`
15
- - `#[argh(subcommand, name = "target-replace")]` → `#[argh(subcommand, name = "search-replace")]`
16
- - 新增 `BatchDelete(TreeBatchDeleteCommand)` 枚举变体
17
- - 新增 `TreeBatchDeleteCommand` 结构体(`-p` 接受多个路径)
18
- - `QuerySearchCommand` 新增 `--parent-path` 开关
19
-
20
- **src/bin/cli_handlers/tree.rs:**
21
- - `handle_target_replace` → `handle_search_replace`
22
- - 新增 `handle_batch_delete`: 按路径降序依次调用 `handle_delete`
23
-
24
- **src/bin/cli_handlers/query.rs:**
25
- - `SearchCommonOpts` 新增 `parent_path: bool` 字段
26
- - 搜索结果中 `--parent-path` 开启时额外打印父路径
27
-
28
- **src/bin/cli_handlers/command_echo.rs:**
29
- - 更新所有 `TargetReplace` → `SearchReplace` 分发
30
- - 新增 `BatchDelete` 的三个 match arm
31
-
32
- **src/bin/cli_handlers/edit.rs:**
33
- - 错误提示 `target-replace` → `search-replace`
34
-
35
- **src/bin/cli_handlers/docs_tests.rs:**
36
- - 测试数据中 `target-replace` → `search-replace`
37
-
38
- **docs/CalcitAgent.md + 其他文档:**
39
- - 所有 `target-replace` 替换为 `search-replace`
40
- - 新增 `batch-delete` 和 `--parent-path` 用法说明
41
- - 新增 `$` 在属性 map 中的编辑指南
@@ -1,22 +0,0 @@
1
- ## 文档索引改进: abstract 字段 + --summary 模式 + Hub 标记
2
-
3
- ### 改动内容
4
-
5
- **P0: abstract/summary 字段**
6
- - `GuideDocFrontmatter` 新增 `summary: Option<String>` 字段
7
- - `parse_doc_frontmatter` 支持解析 `summary:` 键值对
8
- - `score_metadata_hit` 加入 summary 评分(exact 200,contains 130)
9
- - 8 个核心文档已添加 summary 描述
10
-
11
- **P0: `cr docs search --summary` 模式**
12
- - `DocsSearchCommand` 新增 `--summary` 开关
13
- - 搜索时只显示文档标题 + summary,不输出内容片段
14
- - 无 summary 的文档显示 `(no summary)`
15
-
16
- **P0: Hub 标记**
17
- - 搜索结果中 `kind: hub` 的文档显示 `[Hub]` 前缀
18
- - 帮助 LLM 快速识别导航页 vs 详细页
19
-
20
- **文档更新**
21
- - `docs-indexing.md` 新增 `summary` 字段规范说明和 `--summary` 用法
22
- - `docs-validation.md` 新增 `--summary` 和 hub 标记的验证用例
@@ -1,17 +0,0 @@
1
- ## 文档拆分: agent-advanced.md 和 CalcitAgent.md 的部分内容拆成独立文件
2
-
3
- ### 改动内容
4
-
5
- **从 `run/agent-advanced.md` 拆分:**
6
- - `## 快速开始` 节 (原 lines 24-58) → 新建 `run/quick-start.md` (47行)
7
- - 原文替换为交叉链接
8
-
9
- **从 `CalcitAgent.md` 拆分:**
10
- - `calcit.cirru EDN 结构` + `deps.cirru` 两节 (原 lines 156-231) → 新建 `run/project-structure.md` (82行)
11
- - `结构化策略(5 招)` 节 → 新建 `run/structural-strategies.md` (53行)
12
- - 原文替换为交叉链接
13
-
14
- ### 新文件
15
- - `docs/run/quick-start.md` — 新 LLM 快速开始工作流
16
- - `docs/run/project-structure.md` — calcit.cirru EDN 结构 + deps.cirru
17
- - `docs/run/structural-strategies.md` — cp/mv/wrap/raise/rewrite 策略
@@ -1,15 +0,0 @@
1
- ## agent-advanced.md 拆分: CLI 命令和语言基础节替换为交叉链接, 开发调试拆出独立文件
2
-
3
- ### 改动
4
-
5
- **`run/agent-advanced.md` 精简 (1598→807 行, ~49%):**
6
-
7
- - `## Calcit CLI 命令` 节 (~508行): 替换为独立文件链接列表,保留 `LLM 辅助:动态方法提示` 和 `复杂表达式分段组装策略` 两个独特子节
8
- - `## Calcit 语言基础` 节 (~266行): 替换为 cirru-syntax.md / features/tuples.md / features/static-analysis.md 链接,保留 `其他易错点`
9
- - `## 开发调试` 节 (~99行): 拆出为独立 `run/debugging.md`
10
-
11
- **新增文件:**
12
- - `run/debugging.md` — watcher 监听模式、增量更新、编译检查
13
-
14
- ### 删除的重复内容
15
- CLI 命令和语言基础的子节内容在 `run/query.md`、`run/edit-tree.md`、`cirru-syntax.md`、`features/static-analysis.md` 等文件中已有完整覆盖。
@@ -1,33 +0,0 @@
1
- # 202504121453 - Automatic map-to-record rewrite in preprocessing
2
-
3
- ## Summary
4
-
5
- When a function parameter is typed as a struct type in its schema, but the caller passes a hashmap literal `{}`, the preprocessor now automatically rewrites the hashmap to a record construction `%{}` so that runtime gets a proper record with full type checking.
6
-
7
- ## Key implementation details
8
-
9
- ### type_annotation.rs
10
- - Added `CalcitTypeAnnotation::resolve_to_struct()` — resolves `Struct`, `Record`, `TypeRef("ns/def")`, and `Optional(inner)` variants to concrete `CalcitStruct` definitions
11
- - Added `resolve_struct_from_program(ns, def)` helper — looks up struct definitions from the program registry via `lookup_runtime_ready_registered` with fallback to `lookup_def_code_registered`
12
-
13
- ### preprocess.rs
14
- - Added `try_rewrite_map_args_to_records()` — iterates processed args, checks each against `fn_info.arg_types[idx]`, calls `try_rewrite_single_map_to_record()` for potential rewrites
15
- - Added `try_rewrite_single_map_to_record()` — validates arg is `List` with `Proc(NativeMap)` head, resolves expected type to struct, validates all keys are tags, builds `[Proc(NativeRecord), Struct(def), k1, v1, ...]`
16
- - Integration point: `preprocess_list_call()` → `Calcit::Fn` match arm, between arg preprocessing and type checking
17
-
18
- ### AST transformation
19
- - Input (hashmap literal): `[Proc(NativeMap), Tag(:x), 10, Tag(:y), 20]`
20
- - Output (record literal): `[Proc(NativeRecord), Struct(Point2D), Tag(:x), 10, Tag(:y), 20]`
21
-
22
- ### Rewrite conditions
23
- - Function has schema with `:args` referencing a struct type (TypeRef, Struct, or Record)
24
- - Argument is a hashmap literal (`{}`) with tag keys
25
- - Struct definition is resolvable at preprocess time
26
- - If any condition fails, argument is left unchanged (safe fallback)
27
-
28
- ## Test
29
- - Added `Point2D`, `sum-point`, `check-point-type`, `test-map-to-record` to `calcit/test-record.cirru`
30
- - `check-point-type` uses `record?` to verify the rewrite produces actual records, not just maps
31
-
32
- ## Gotcha
33
- - `cr tree insert-after` can create doubly-nested nodes — always verify with `tree show` after insertion
@@ -1,40 +0,0 @@
1
- # 202504160117 — 优化目录更新 + WASM codegen demo
2
-
3
- ## 优化目录更新
4
-
5
- 更新 `drafts/04-15-type-directed-optimization-catalog.md`:
6
-
7
- - 标记 P0、P1、P2、P5、P7 为已完成,附 commit hash
8
- - 标记 P3、P4 为推迟,附推迟原因
9
- - 更新 Scope 行:从 `TernaryTreeList<ScopePair>` 改为 `Vec<ScopePair>`
10
- - P5 描述更新为实际采用的 Vec 方案(而非原规划的 O(1) 方案)
11
- - 新增「执行记录」节替代原「推荐执行顺序」,含基准数据(836ms→718ms,~14%)
12
-
13
- ## WASM codegen 实验性功能
14
-
15
- ### 新增文件
16
-
17
- - `src/codegen/emit_wasm.rs` — ~440 行 WAT 代码生成器
18
- - `demos/wasm-demo.cirru` — 示例程序(fibo、factorial、add-two)
19
- - `docs/wasm-codegen.md` — 使用文档 + 未来改进路线
20
-
21
- ### 修改文件
22
-
23
- - `src/codegen.rs` — 注册 `emit_wasm` 模块
24
- - `src/cli_args.rs` — 新增 `EmitWasmCommand`(`cr <entry> wasm`)
25
- - `src/bin/cr.rs` — 新增 `run_wasm_codegen` 入口
26
-
27
- ### 设计要点
28
-
29
- - **纯 WAT 文本输出** — 零额外依赖,不引入 wasm-encoder 等 crate
30
- - **All-f64 类型策略** — 所有值统一为 f64,Bool 用 1.0/0.0
31
- - **支持子集** — defn、if、let、算术(&+/&-/&\*/&/)、比较(&</&>/&=)、recur、函数调用
32
- - **不支持** — 字符串、Record/Map/Set、method dispatch、IO、可变参数
33
-
34
- ### 验证
35
-
36
- - wasmtime compile 验证 WAT 合法
37
- - wasmtime run 验证 fibo(10)=89、factorial(10)=3628800、add-two(3.5,2.5)=6
38
- - cargo test 246/246 pass
39
- - cargo clippy -- -D warnings clean
40
- - yarn check-all pass
@@ -1,48 +0,0 @@
1
- # wasm-encoder 迁移:WAT 文本 → 二进制 .wasm
2
-
3
- ## 概要
4
-
5
- 将 WASM codegen 从手工拼接 WAT 文本字符串改为使用 `wasm-encoder` crate 直接生成二进制 `.wasm`,
6
- 同时将测试运行时从 wasmtime CLI 替换为 Node.js 内置的 `WebAssembly` API。
7
-
8
- ## 动机
9
-
10
- - wasmtime 是重量级依赖,CI 需要额外安装步骤,且跨版本 CLI 接口不稳定(v14/v25 breaking changes)
11
- - WAT 字符串拼接容易出错且难以调试
12
- - Node.js 自带 WebAssembly 运行时,零额外依赖
13
-
14
- ## 关键知识点
15
-
16
- ### wasm-encoder 用法
17
-
18
- - `wasm-encoder = "0.246.2"`,仅 1 个传递依赖 `leb128fmt`
19
- - TypeSection → FunctionSection → ExportSection → CodeSection → module.finish()
20
- - `F64Const` 接受 `Ieee64` 而非 `f64`,需 `Ieee64::from(val)` 包装
21
- - `Function::new(locals_vec)` + `instruction(&Instruction::...)` + `instruction(&Instruction::End)`
22
-
23
- ### WASM block depth 追踪
24
-
25
- - `br N` 中 N 是相对深度(0 = 当前块)
26
- - `if` 块会增加一层嵌套,所以在 `if` 内部 `br` 到外层 `loop` 需要 depth=1
27
- - 解决方案:`WasmGenCtx` 添加 `block_depth` 字段,`emit_if` 时 +1,`recur` 使用 `Br(ctx.block_depth)`
28
-
29
- ### 两阶段编译
30
-
31
- - 函数互调需要预知 fn_index,所以:
32
- 1. 第一遍:收集函数签名和索引映射 `HashMap<String, u32>`
33
- 2. 第二遍:编译函数体,失败的函数用 stub `[f64_const(0.0)]` 保持索引稳定
34
-
35
- ### 比较运算的 i32→f64 转换
36
-
37
- - WASM 比较指令(f64.lt/gt/eq)返回 i32
38
- - 用 `select(1.0, 0.0, cmp_result)` 转为 f64
39
- - `if` 条件用 `f64.ne(val, 0.0)` 转回 i32
40
-
41
- ## 修改文件
42
-
43
- - `src/codegen/emit_wasm.rs` — 完全重写
44
- - `scripts/test-wasm.mjs` — 新增 Node.js 测试运行器
45
- - `scripts/test-wasm.sh` — 简化为生成 + node 调用
46
- - `.github/workflows/test.yaml` — 移除 wasmtime 安装步骤
47
- - `Cargo.toml` / `Cargo.lock` — 添加 wasm-encoder
48
- - `docs/wasm-codegen.md` — 更新文档