review r1(p2-1items/fix-then-merge)只要求改文档与注释,门禁逻辑一行未动。 - P2-1(唯一阻塞项):原稿称「字体库缺失 → 合法 PNG + 退出码 0」,这是错的。review 实测两条失效都是 **硬失败**:完全没有字体 → fontique panic(退出码 101,不产生 PNG);非软渲染(默认 femtovg)→ `take_snapshot is not supported by this FemtoVG backend`(退出码 1)。改正口径:`--screenshot` 的 PNG 是进程自己编码写出的,只要走到 `take_snapshot` 就是「合法 PNG + 退出码 0」,像素断言是**纵深防御**, 守的是「进程活着、PNG 合法、但场景几乎没画」这一档;其余情形本机暂无样本,属防御性设计、不宣称已复现。 落点:packaging/ci-runtime-smoke.md §1 与 packaging/check_screenshot.py 模块 docstring。 - P3-1:ci.yml 的 runtime-smoke job 头补一行 —— 本 job 绑死 Slint `Window::take_snapshot`,迁 iced 后必须 提供等价离屏截图通道,否则静默退化成「能起进程」。 - P3-2:阈值余量写明量级(342/64=5.3×、19.45/3.0=6.5×、0.00761/0.001=7.6×,改「5~8 倍」);并写明 闸门下限 ≈「至少画出一条标题栏」(review 实测切片 174/35.10/0.02623 与右下 400×300 切片仍 pass), 即只证明「场景被真实渲染过」,不证明元素齐全、更不证明视觉正确。 - P3-3:README 398/400 已贴红线 —— 借 review 给的逃生口**提前拆**:细节搬进 packaging/ci-runtime-smoke.md (78 行),README §11 收缩为 12 行索引(374 行),并写明「再增长继续往细节文档写,两文件都 ≤400」。 - P3-4:本地复跑示例改 Windows 安全路径 `D:/tmp/ull-smoke`;脚本对 repo_root/out_dir 统一 `cygpath -m` 归一并回显真实路径(Git Bash 下 `/tmp` 会静默落进 Docker VM,宿主什么都收不到 —— review 实测踩到)。 - P3-5:两个 `run:` 里的 `set -o pipefail` 保留但加注释说明「当前无管道,为将来加管道先有失败传播」; `cargo clean -p unlucky-app || true` 加内联注释(N7 兜底,CI 里没有对应行,别误抄进 ci.yml)。 验证:`--selftest` 三组仍全部 fail(判红能力未被改坏);真实截图仍 pass(1180x760 / 342 / 19.45 / 0.00761); 0 字节与非 PNG 路径 exit 1;`yaml.safe_load` 通过(6 job,Linux 槽位无 continue-on-error,artifact 步 `if: always()`);`cargo fmt --all --check` 退出 0;cygpath 修复后重跑 Docker 冒烟,宿主机 D:/tmp/ull-m62-rev2 拿到 PNG,md5 `156c382a…` 与前两次 run 及 review 的 artifact 完全一致。
Unlucky Launcher (ULL)
English · 简体中文
Official project home: https://github.com/AskaEth/Unlucky-Launcher
Unlucky Launcher (ULL) is a free, open-source Minecraft: Java Edition launcher written in Rust (Apache-2.0, non-commercial), with a Slint + Metro UI. It embeds an AI agent client (chat / configuration / crash diagnosis) and integrates with the broader agent tooling ecosystem via MCP. Minimum baseline: Windows 10.
- Runtime: a single native Rust binary — no JVM, no WebView, no external runtime
- UI: Slint (Royalty-Free 2.0; GL preferred, CPU software-rendering fallback so older machines without a usable GPU still get the full UI)
- License: Apache-2.0 © AskaEth (YeiJ)
Compliance statement
Authentication uses only official Microsoft/Mojang endpoints — Microsoft OAuth 2.0 device code flow, Xbox Live, XSTS, and api.minecraftservices.com — so players sign in with their own Microsoft account and launch the game they already own. Account tokens are stored only on the user's local machine and are never sent to any server operated by the project. ULL does not distribute, mirror, proxy or modify any Minecraft game files. Online play always requires a Microsoft account with valid entitlements. Local offline profiles never contact Microsoft or Mojang services and cannot join online-mode servers. Not affiliated with Mojang or Microsoft.
Status
The core engine is complete (workspace: 983+ tests passing):
- Microsoft sign-in: OAuth 2.0 device code flow → Xbox Live → XSTS → Minecraft Services, with entitlement verification
- Account credentials are stored only on the local machine — never uploaded, and inaccessible to the AI features
- Mod loaders: Forge / NeoForge / Fabric / Quilt, verified on real machines
- Java management: Temurin / Oracle / Microsoft / Zulu with a regional fallback chain
- Multi-source download engine; YAML rule-based crash diagnosis
- Usable as an MCP server for external agent tooling (
ull agent serve) - Local offline profiles: for local / isolated-network testing only; they perform no Microsoft authentication and cannot join servers with online-mode enabled
CLI (ull) is fully usable: install / launch / accounts / java / diagnose / agent.
GUI in development: crates/app is currently a Slint + Metro skeleton; the theme system and
the full interface ship with subsequent versions — use the CLI until then.
Module map
Unlucky-Launcher (cargo workspace)
├── crates/core # domain library, zero UI dependencies, eight modules
├── crates/agent # AI agent: ToolSpec registry + built-in client + MCP server (one shared core)
├── crates/app # Slint UI: the only crate allowed to depend on a UI framework
├── crates/cli # CLI (bin `ull`): headless, zero UI, depends on core + agent
└── packaging # single-file artifact matrix and packaging assets (planned)
The eight modules of crates/core:
| Module | Responsibility |
|---|---|
setting |
three data-directory modes, schema-based config, atomic writes, migrations |
download |
multi-source health scoring, mirrors, chunked downloads, hash-while-downloading |
game |
version / instance repository, snapshots and inheritance resolution |
launch |
10-stage launch pipeline, processes, JSONL event stream |
auth |
Microsoft sign-in / local offline profiles |
addon |
mod loader installation, modpacks, CurseForge / Modrinth |
diagnose |
five signal collectors, YAML rule engine, hs_err parsing |
platform |
OS abstraction: paths, processes, file locks, capability probing, runtime OS detection |
Building
Prerequisites:
- Rust stable (
rust-toolchain.tomlselects the toolchain automatically; componentsrustfmt/clippy) - Windows: MSVC toolchain (used by CI) or MinGW-w64 (
x86_64-pc-windows-gnu) - Linux:
libxkbcommon-dev libfontconfig1-dev libgl1-mesa-dev libegl1-mesa-dev libwayland-dev libxcb1-dev(Slint winit backend + femtovg build dependencies)
cargo fmt --all --check # formatting
cargo clippy --workspace --all-targets -- -D warnings # lints (zero-warning gate)
cargo test --workspace # tests
cargo build --release # artifact: target/release/unlucky-launcher[.exe]
Software-rendering switch (machines without a usable GPU / with broken drivers):
unlucky-launcher --software-renderer (equivalent to SLINT_BACKEND=winit-software).
Dependency license check (optional locally, required in CI):
cargo deny check licenses bans sources.
CI gates
| Workflow | Content |
|---|---|
.github/workflows/ci.yml |
fmt + clippy + test + build, Windows / Linux matrix |
.github/workflows/guards.yml |
zero-UI guard for core, 400-line-per-file guard, cargo-deny license guard |
Platform baseline
Minimum baseline: Windows 10. Windows 8.1 / 8 / 7 are not supported:
- Windows 10/11 builds use the standard toolchain (MSVC / GNU) — no custom target specs, no
-Zbuild-std, no import-table allowlists - Other platforms: macOS 12+ first class; Linux x64 with X11 preferred, Wayland as the long-term direction; Android Termux experimental, not committed
- UI fallback: Slint software rendering (fully usable on machines without a GPU or with broken drivers)
- Platform independence is expressed through separate test matrices, not separate artifact pipelines; capability differences use feature gates with runtime probing
License and acknowledgements
- This project: Apache License 2.0, see LICENSE; third-party notices in NOTICE
- The GUI uses Slint (Royalty-Free 2.0 track). Per the RF 2.0 obligations an
AboutSlintwidget will be placed on the about page (P2); until then NOTICE and this section serve the attribution duty.
Thanks to HMCL and PCL2 (both GPL-3.0) — these two launchers have accompanied the vast majority of Minecraft players for many years. ULL learned a great deal about design and implementation from them, and this project is dedicated to those two pioneers.