Align package and executable names with workspace directories
Verify databases and deploy Aster VM / verify-and-deploy (push) Successful in 15m7s

This commit is contained in:
2026-10-18 21:15:10 +08:00
parent 8bbe78e01e
commit 18cd24a203
33 changed files with 111 additions and 103 deletions
+7 -5
View File
@@ -1,12 +1,14 @@
# Cargo 工作区
本目录包含四个 crate。目录名不用 aster- 前缀,Cargo 包名和二进制名保留现有名称;路径依赖定义在根 Cargo.toml。
本目录包含四个 crate。Cargo 包名与目录一致,均不带项目前缀;路径依赖定义在根 Cargo.toml。
| 目录 | 包名/产物 | 职责 |
| --- | --- | --- |
| [core](core/README.md) | aster-core | 零外部依赖的对象运行时、堆与字节码 VM |
| [storage](storage/README.md) | aster-storage | 宿主元数据与 SQLite/PostgreSQL 适配,不依赖 core |
| [cli](cli/README.md) | aster-cli,二进制 aster | 引导演示和 metadata 命令 |
| [server](server/README.md) | aster-server | 最小常驻 HTTP 宿主 |
| [core](core/README.md) | core | 零外部依赖的对象运行时、堆与字节码 VM |
| [storage](storage/README.md) | storage | 宿主元数据与 SQLite/PostgreSQL 适配,不依赖 core |
| [cli](cli/README.md) | cli,二进制 cli | 引导演示和 metadata 命令 |
| [server](server/README.md) | server | 最小常驻 HTTP 宿主 |
core 的 Rust 库目标明确命名为 endor_core,避免与 Rust 标准库 core 重名;storage 的引用名为 storage,两个二进制分别为 cli、server。Cargo 通过 [lib] 自定义库名,详见 [Cargo 目标说明](https://doc.rust-lang.org/cargo/reference/cargo-targets.html#the-name-field)。
CLI/Server 依赖 Core 和 Storage,Core 与 Storage 互不依赖。网络、数据库、浏览器、进程配置和信号留在宿主。全局说明见 [架构](../docs/architecture/README.md),查功能位置从 [文档索引](../docs/README.md) 进入。返回 [项目入口](../README.md)。
+4 -4
View File
@@ -1,17 +1,17 @@
[package]
name = "aster-cli"
name = "cli"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
[[bin]]
name = "aster"
name = "cli"
path = "src/main.rs"
[dependencies]
aster-core.workspace = true
aster-storage.workspace = true
core.workspace = true
storage.workspace = true
tokio.workspace = true
[lints]
+2 -2
View File
@@ -1,10 +1,10 @@
# aster-cli / aster
# cli
命令行宿主。bootstrap 演示两个运行时对象并释放;metadata put/get 使用独立 Storage,不让数据库配置进入 Core。
| 内容 | 职责 |
| --- | --- |
| Cargo.toml | CLI 包、aster 二进制名称、core/storage/Tokio 依赖 |
| Cargo.toml | CLI 包、cli 二进制名称、core/storage/Tokio 依赖 |
| [src](src/README.md) | 参数路由、命令执行和退出码 |
用法见 [运行指南](../../docs/operations/README.md),文本参数与环境边界见 [配置](../../docs/operations/configuration.md)。此 CLI 当前不是 Endor 源码解释命令。返回 [工作区](../README.md)。
+4 -4
View File
@@ -1,17 +1,17 @@
use std::error::Error;
use std::process::ExitCode;
use aster_core::{Value, Vm};
use aster_storage::{Storage, StorageConfig};
use endor_core::{Value, Vm};
use storage::{Storage, StorageConfig};
const USAGE: &str = "Usage: aster [bootstrap | metadata put <key> <value> | metadata get <key>]";
const USAGE: &str = "Usage: cli [bootstrap | metadata put <key> <value> | metadata get <key>]";
#[tokio::main]
async fn main() -> ExitCode {
match run().await {
Ok(()) => ExitCode::SUCCESS,
Err(error) => {
eprintln!("aster: {error}");
eprintln!("cli: {error}");
ExitCode::FAILURE
}
}
+5 -1
View File
@@ -1,9 +1,13 @@
[package]
name = "aster-core"
name = "core"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
# Keep the library distinct from Rust's built-in core crate.
[lib]
name = "endor_core"
[lints]
workspace = true
+3 -3
View File
@@ -1,10 +1,10 @@
# aster-core
# core
Endor VM 内核,保持零外部依赖。负责 EndorObject、堆、代际句柄、引用计数/循环回收、基本载荷和小型 wordcode 执行器。公共 Rust API 从 src/lib.rs 导出。
Endor VM 内核,保持零外部依赖。负责 EndorObject、堆、代际句柄、引用计数/循环回收、基本载荷和小型 wordcode 执行器。公共 Rust API 从 src/lib.rs 导出。Cargo 包名为 core,Rust 引用名为 endor_core,由 Cargo.toml 的 [lib] 设置,避免与标准库 core 重名。
| 内容 | 入口 |
| --- | --- |
| Cargo.toml | 包元数据和工作区 lint;没有外部依赖 |
| Cargo.toml | 包元数据、endor_core 库目标和工作区 lint;没有外部依赖 |
| [src](src/README.md) | 文件职责、公开接口和常见修改位置 |
| [tests](tests/README.md) | 对象、基本载荷、执行语义与生命周期检查 |
+4 -4
View File
@@ -2,7 +2,7 @@
//! Python language type system; wordcode is not CPython bytecode compatible.
//!
//! ```
//! use aster_core::{Value, Vm};
//! use endor_core::{Value, Vm};
//! let mut vm = Vm::new()?;
//! let object = vm.new_object()?; // One owned external reference.
//! vm.set_attr(object, "x", Value::Number(42_i64.into()))?;
@@ -12,12 +12,12 @@
//! assert_eq!(vm.ref_count(object)?, 1);
//! vm.release(object)?; // The object is destroyed.
//! assert_eq!(vm.object_count(), 0);
//! # Ok::<(), aster_core::VmError>(())
//! # Ok::<(), endor_core::VmError>(())
//! ```
//!
//! Execute validated wordcode without a source parser:
//! ```
//! use aster_core::{CodeLayout, EndorCode, Instruction, Opcode, Value, Vm};
//! use endor_core::{CodeLayout, EndorCode, Instruction, Opcode, Value, Vm};
//! let mut vm = Vm::new()?;
//! let globals = vm.new_dict()?;
//! let code = EndorCode::from_instructions(
@@ -35,7 +35,7 @@
//! vm.release(code)?;
//! vm.release(globals)?;
//! assert_eq!(vm.object_count(), 0);
//! # Ok::<(), aster_core::VmError>(())
//! # Ok::<(), endor_core::VmError>(())
//! ```
mod builtins;
+1 -1
View File
@@ -1,6 +1,6 @@
# Core 公开行为检查
本目录通过 aster_core 公共 API 检查宿主可观察的语义,不为检查开放内部句柄构造器。
本目录通过 endor_core 公共 API 检查宿主可观察的语义,不为检查开放内部句柄构造器。
| 文件 | 覆盖 |
| --- | --- |
+1 -1
View File
@@ -1,4 +1,4 @@
use aster_core::{
use endor_core::{
CodeLayout, CompareOp, EndorBaseExceptionObject, EndorCode, EndorDictObject,
EndorFunctionObject, EndorInteger, EndorNativeFunctionObject, EndorNumber, EndorNumberObject,
EndorReal, EndorStringObject, EndorTracebackEntry, Instruction, Opcode, Value, Vm, VmError,
+1 -1
View File
@@ -2,7 +2,7 @@ use std::any::Any;
use std::sync::Arc;
use std::sync::atomic::{AtomicUsize, Ordering};
use aster_core::{
use endor_core::{
CodeLayout, CompareOp, EndorCode, EndorCodeObject, EndorNativeFunctionObject, ExecutionLimits,
Instruction, ObjectPayload, ObjectRef, Opcode, Value, Vm, VmError,
};
+1 -1
View File
@@ -2,7 +2,7 @@ use std::any::Any;
use std::sync::Arc;
use std::sync::atomic::{AtomicUsize, Ordering};
use aster_core::{CompareOp, NativeFunction, ObjectPayload, ObjectRef, Record, Value, Vm, VmError};
use endor_core::{CompareOp, NativeFunction, ObjectPayload, ObjectRef, Record, Value, Vm, VmError};
#[derive(Debug)]
struct Resource {
+3 -3
View File
@@ -1,13 +1,13 @@
[package]
name = "aster-server"
name = "server"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
[dependencies]
aster-core.workspace = true
aster-storage.workspace = true
core.workspace = true
storage.workspace = true
axum.workspace = true
serde.workspace = true
tokio.workspace = true
+1 -1
View File
@@ -1,4 +1,4 @@
# aster-server
# server
最小常驻 HTTP 宿主,提供数据库健康检查和只读 VM 引导信息。它通过 Arc 共享 Vm,没有语言执行接口或可变 VM 请求上下文。
+4 -4
View File
@@ -3,10 +3,10 @@ use std::future::Future;
use std::process::ExitCode;
use std::sync::Arc;
use aster_core::Vm;
use aster_storage::{Storage, StorageConfig};
use axum::{Json, Router, extract::State, http::StatusCode, routing::get};
use endor_core::Vm;
use serde::Serialize;
use storage::{Storage, StorageConfig};
#[derive(Clone)]
struct AppState {
@@ -32,7 +32,7 @@ async fn main() -> ExitCode {
match run().await {
Ok(()) => ExitCode::SUCCESS,
Err(error) => {
eprintln!("aster-server: {error}");
eprintln!("server: {error}");
ExitCode::FAILURE
}
}
@@ -55,7 +55,7 @@ async fn run() -> Result<(), Box<dyn Error>> {
storage: storage.clone(),
});
println!(
"Aster host listening on {} (storage={})",
"Endor host listening on {} (storage={})",
listener.local_addr()?,
storage.backend_name()
);
+1 -1
View File
@@ -1,5 +1,5 @@
[package]
name = "aster-storage"
name = "storage"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
+1 -1
View File
@@ -1,4 +1,4 @@
# aster-storage
# storage
宿主元数据存储,依赖 SQLx/Tokio,不依赖 VM 内核。一个 Storage 选择 SQLite 或 PostgreSQL;明确配置 PostgreSQL 后失败不回退。
+1 -1
View File
@@ -1,4 +1,4 @@
//! Host metadata storage; deliberately has no dependency on aster-core.
//! Host metadata storage; deliberately has no dependency on core.
use std::fmt;
use std::path::PathBuf;
use std::str::FromStr;
+1 -1
View File
@@ -1,4 +1,4 @@
use aster_storage::{Storage, StorageConfig};
use storage::{Storage, StorageConfig};
/// Run explicitly against a disposable database; never silently skip a missing URL.
#[tokio::test]
+1 -1
View File
@@ -1,4 +1,4 @@
use aster_storage::{Storage, StorageConfig};
use storage::{Storage, StorageConfig};
#[test]
fn configuration_defaults_precedence_and_errors() {