Files
endorphin-aster-vm/crates/core/README.md
T
codex-bot aa3257bfe6
Verify databases and deploy Aster VM / verify-and-deploy (push) Successful in 7m56s
feat: connect source compilation and VM execution
2026-10-19 14:50:37 +08:00

16 lines
1.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# core
Endor VM 包,仅负责 Vm、执行帧、调用协议和 wordcode 求值循环。依赖本地 [objects](../objects/README.md) 管理对象与堆,没有第三方依赖。Cargo 包名为 core,Rust 引用名为 endor_core,避免与标准库 core 重名。
| 内容 | 入口 |
| --- | --- |
| Cargo.toml | endor_core 库目标、本地 objects 依赖和工作区 lint |
| [src](src/README.md) | VM、内部执行帧、求值循环和对象操作委托 |
| [tests](tests/README.md) | 原有对象入口的兼容行为、调用/执行语义与生命周期 |
Vm::new 创建独立 ObjectStore 和空执行状态;代码对象、全局字典和函数仍按宿主需要显式创建,再 execute/call。EndorObject、Number、ObjectRef、内置载荷、代码对象/指令定义与 VmError 在 objects 中实现;endor_core 保留这些类型的兼容重导出,既有 Vm 对象方法委托到 ObjectStore。
没有 Python type/元类或语言根类。网络、数据库和进程环境属于宿主,源码阅读器与 lexer/parser 属于 [frontend](../frontend/README.md),AST 名称分析与字节码生成属于独立 [compiler](../compiler/README.md),见 [执行与版本模型](../../docs/architecture/execution-and-versions.md)。
返回值所有权见 [生命周期](../../docs/runtime/lifecycle.md),执行契约见 [字节码 VM](../../docs/runtime/bytecode.md)。本地不构建或测试,见 [验证](../../docs/operations/validation.md)。返回 [工作区](../README.md)。