Go to file
ApsisRS contributors e34cc06ceb validation: add the coverage geometry cross-check
The network layer was the only layer without a Python cross-check, and
validation/python/constellation/ was an empty placeholder that the README
described as existing. Add the dump example and the reference script, which
recomputes the geometry from the spherical triangle relations rather than
from the Rust code, and remove the placeholder.
2026-09-26 23:26:13 +08:00
.github/workflows ci: run the integration checks and add a dependency free benchmark 2026-09-26 23:22:34 +08:00
crates validation: add the coverage geometry cross-check 2026-09-26 23:26:13 +08:00
docs/design docs: record the cross layer unit and coordinate conventions 2026-09-26 23:24:16 +08:00
validation validation: add the coverage geometry cross-check 2026-09-26 23:26:13 +08:00
.gitignore workspace: add geodesy and time cross-check scripts 2026-09-26 13:47:59 +08:00
Cargo.lock orbit: add maneuver models and wire the orbit facade 2026-09-26 23:17:16 +08:00
Cargo.toml orbit: add Keplerian elements and two-body propagation 2026-09-26 14:20:09 +08:00
LICENSE workspace: initialize workspace with all layer crates 2026-09-26 12:53:13 +08:00
README.md ci: run the integration checks and add a dependency free benchmark 2026-09-26 23:22:34 +08:00
rust-toolchain.toml workspace: initialize workspace with all layer crates 2026-09-26 12:53:13 +08:00

README.md

ApsisRS / 拱点

商业航天与卫星互联网领域的 Rust 计算内核。

定位

  • 纯 Rust、std、零第三方 crate 依赖
  • 领域边界清晰,按层单向依赖
  • 对外门面 crate 名为 apsis-rs,库名为 apsis
  • 当前阶段所有 crate 均 publish = false,不执行发布

分层

foundation -> physics -> orbit -> rf -> network -> ops -> sim -> apsis-rs

约束:

  • 依赖只能从左向右,禁止反向依赖
  • 禁止跨层跳跃,例如 orbit 不得直接依赖 network
  • 层内允许依赖该层的基准 crate:foundation 内 apsis-core 为基准,其余 crate 可依赖它;其余层内部以各自的门面 crate(apsis-orbit、apsis-rf、apsis-sim 等)作为整合点

各层内容:

层 职责 crates
foundation 基础类型、单位、数学、宏 apsis-core、apsis-units、apsis-math、apsis-macros
physics 时间、闰秒、坐标、大地基准 apsis-time、apsis-leap、apsis-coord、apsis-geodesy、apsis-frames
orbit TLE、SGP4、二体、星历、机动 apsis-tle、apsis-sgp4、apsis-kepler、apsis-ephemeris、apsis-maneuver、apsis-orbit
rf 射频、天线、链路预算 apsis-rf、apsis-antenna、apsis-doppler、apsis-atmosphere、apsis-noise、apsis-interference、apsis-link
network 星座、覆盖、接入、拓扑、路由 apsis-constellation、apsis-coverage、apsis-access、apsis-topology、apsis-isl、apsis-routing、apsis-handover、apsis-mesh
ops 资源、任务、调度、冲突、计划 apsis-resource、apsis-task、apsis-scheduler、apsis-conflict、apsis-schedule
sim 仿真引擎、场景、事件、输出 apsis-sim-engine、apsis-scenario、apsis-event、apsis-output、apsis-sim
facade 对外门面 apsis-rs

构建

所有 Rust 命令在仓库根目录执行:

cargo check --workspace
cargo test -p apsis-core -p apsis-units -p apsis-math

apsis-rs 门面通过 feature 选择需要的层,例如:

[dependencies]
apsis-rs = { path = "...", features = ["orbit"] }

可选 feature:foundation、physics、orbit、rf、network、ops、sim、full。 每个层 feature 自动启用其下层。full 启用全部层(含 sim);ops 等价于除 sim 以外的所有层,适合不运行仿真的项目。

约定

  • toolchain:stable,edition 2024,rust-version 1.85
  • 默认禁止任何第三方 crate,包括开发依赖与 build.rs
  • 库代码不使用 unwrap() / expect() / panic! / unsafe
  • 公共 API 必须有文档注释,注释自包含

目录

apsis-rs/
├── Cargo.toml
├── crates/          # Rust 工作区成员
│   └── apsis-rs/
│       ├── examples/   # 对拍导出与跨层集成检查
│       └── ...
├── validation/      # Python 对拍验证
└── docs/design/     # 设计文档

测试在各 crate 的 tests/ 目录,为集成测试,只通过公共 API 访问被测 crate。 跨层集成检查与零依赖基准测试是 apsis-rs 的 example:

# 跨层集成检查(CI 会执行)
cargo run -p apsis-rs --features network --example integrate_network
cargo run -p apsis-rs --features ops --example integrate_ops
cargo run -p apsis-rs --features sim --example integrate_sim

# 热点路径基准(release 下运行)
cargo run --release -p apsis-rs --features full --example bench

许可

MIT OR Apache-2.0,见 LICENSE-MIT 与 LICENSE-APACHE。