-
Notifications
You must be signed in to change notification settings - Fork 0
Getting Started
EnerOS Bot edited this page Jul 5, 2026
·
1 revision
中文 | English
维护版本:v0.51.2 | 最后更新:2026-07-06
5 分钟跑通 EnerOS:从克隆到第一个 /health 200 OK。
- Rust 1.75+(推荐 rustup 管理)
- Cargo(随 Rust 安装)
- Linux/macOS/Windows 均可(生产部署推荐 Linux)
rustc --version # 需要 1.75.0 以上
cargo --versiongit clone https://github.com/Gawg-AI/EnerOS.git
cd EnerOS
cargo build --release首次编译约 5-10 分钟(依赖较多)。后续增量编译 < 30 秒。
cargo test --workspace预期:~7700+ 测试通过 / 0 失败 / ~78 ignored(ignored 均有归因)。
cargo run --release --bin eneros -- run --host 0.0.0.0 --port 8080预期输出:Listening on 0.0.0.0:8080。
curl http://127.0.0.1:8080/health
# 预期返回:OK(200)cargo run --release --bin eneros -- power-flow --case ieee14预期:输出 IEEE 14-bus 系统潮流解(电压幅值/相角、支路功率)。
- 跑通端到端 MVP 闭环演示 → First Demo
- 了解整体架构 → Architecture Overview
- 完整安装选项(Docker / OS 镜像)→ Installation
- 阅读 README §快速开始 → README.md
| 问题 | 解决 |
|---|---|
cargo build 报 libseccomp 缺失 |
Linux:sudo apt install -y libseccomp-dev libssl-dev;非 Linux 跳过 eneros-os 的 HAL 部分 |
| 编译警告 | 不应出现。若出现请执行 cargo clippy --workspace --all-targets -- -D warnings 定位 |
| 端口被占用 | 改用 --port 8090 等其他端口 |
Windows 上 deploy/scripts/*.sh 无法运行 |
使用 Git Bash 或 WSL;或直接 cargo run 替代 |
更多问题见 FAQ。
EnerOS Wiki | v0.51.2