refactor: separate language engine from CLI and server hosts
Verify Aster engine / verify (push) Failing after 0s

This commit is contained in:
2026-10-20 01:08:51 +08:00
parent 51cd64e688
commit 55475a9d4b
72 changed files with 214 additions and 4466 deletions
+6 -6
View File
@@ -12,13 +12,13 @@
| [literal.endor](literal.endor) | eval;返回“表达式 → 字节码 → VM” |
```sh
cli run crates/compiler/examples/hello.endor
cli run crates/compiler/examples/calls.endor
cli run crates/compiler/examples/shadowing.endor
cli run crates/compiler/examples/number.endor
cli eval crates/compiler/examples/literal.endor
lyra run crates/compiler/examples/hello.endor
lyra run crates/compiler/examples/calls.endor
lyra run crates/compiler/examples/shadowing.endor
lyra run crates/compiler/examples/number.endor
lyra eval crates/compiler/examples/literal.endor
```
run 默认调用无参数 main,可用 --entry name 选择另一个无参数入口;eval 解析一个完整表达式,二者都支持 - 读取 stdin 到 EOF。类型名称暂只保留语法,Callable 不要求预先注册语言类。例子不依赖 print 或其他默认标准库。编译器尚无算术运行语义;前端 basic.endor 含算术,只是解析示例,不能混作可执行示例。规则见 [编译契约](../../../docs/runtime/compiler.md),返回 [compiler](../README.md)。
CI 使用 [endor_examples.py](../../../scripts/endor_examples.py) 再次执行真实 CLI 并保存实际结果,不只显示 Rust 测试名称。对应 Actions run 的 endor-execution-output-<sha> artifact 包含源码、命令、预期/实际 stdout、stderr、退出码和状态;位置与失败规则见 [验证报告](../../../docs/operations/validation.md)。新增 .endor 示例时同步 cases.json,未覆盖文件会让报告步骤失败。
本目录与 cases.json 继续作为引擎测试资料。独立 Lyra CLI 的 CI 使用固定 Aster 子模块中的同一份样例,实际执行 lyra run/eval 并保存 stdout/stderr、退出码及报告 artifact;报告脚本和进程入口检查位于 Lyra 仓库。Aster CI 只验证引擎,不构建 CLI。