feat(shell): initialize Rust workspace scaffold#1
Open
Count-I wants to merge 4 commits into
Open
Conversation
Creates the Cargo workspace with three initial members: minecrarch-shared, minecrarch-shell, and minecrarch-modpack-manager. All members are stub crates that compile cleanly. Real implementations follow in D4 and D5. shared/ (minecrarch-shared): - dbus_types: D-Bus constants — bus names, object paths, field key strings per docs/ipc.md; avoids complex zbus type derivation at scaffold stage - error: MinecrarchError enum with thiserror (IPC, Launch, Install, IO) shell/ (minecrarch-shell, stub): - Cargo.toml with all deps: gtk4 0.9 + libadwaita 0.7 + zbus + tokio + async-channel + tracing + minecrarch-shared - main.rs placeholder (replaced in D4 with full GTK4 application) services/modpack-manager/ (minecrarch-modpack-manager, stub): - Cargo.toml with zbus + tokio + tracing + minecrarch-shared - main.rs placeholder (replaced in D5 with full D-Bus service) CI: - Activate build-rust job: cargo fmt + clippy + build + test with GTK4/libadwaita apt deps (libgtk-4-dev, libadwaita-1-dev) - Activate cargo-deny job: checks licenses, bans, and sources fix(.gitignore): scope src/ ignore to packaging/**/src/ to not shadow Rust source directories — was incorrectly ignoring all src/ dirs ADR-0011 (Rust), ADR-0013 (GTK4 + libadwaita), ADR-0009 (layer boundaries)
Build Rust workspace — 'empty line after doc comment': shared/src/dbus_types.rs used outer doc comments (///) with a blank line after them before the next item, which Rust treats as a misplaced doc comment. Fixed by converting to inner module doc comments (//!) at file level and // for item descriptions. Dependency boundary check — false positive on own package name: tools/check-deps.sh was doing a global grep for the crate name string, which matched 'name = "minecrarch-modpack-manager"' in the [package] section of that service's own Cargo.toml. Fixed grep pattern to only match lines where the crate name appears at the start (dependency declaration syntax), not in a value position. Cargo deny — 'edition 2024' unsupported by action's bundled Cargo: EmbarkStudios/cargo-deny-action@v1 ships a Docker container with Cargo older than 1.85 which does not support edition = "2024" used by toml_datetime v1.1.1. Fixed by switching to v2 of the action and installing dtolnay/rust-toolchain@stable first. Also cleaned up deprecated [advisories] keys (vulnerability, unmaintained, notice) that cargo-deny v2 no longer accepts; replaced with version = 2 + yanked = "deny" only. Lint docs — MD040/MD031 in AGENTS.md Phase 1 Kickoff section: Code blocks in the kickoff section were missing language specifiers (text, bash, toml, rust) and blank lines before opening fences. Fixed all 7 errors.
unlicensed = "deny" and copyleft = "warn" were removed in cargo-deny v2 (see EmbarkStudios/cargo-deny#611). With version = 2 and an explicit allow list, any crate with a license not in the list — including unlicensed crates and copyleft crates — is already denied implicitly. The separate keys are redundant and now invalid.
license errors (unlicensed): All three workspace crates (shared, shell, modpack-manager) were missing the 'license' field. Added 'license = "MIT OR Apache-2.0"' as placeholder matching the project's candidate licenses. bans error (gtk4 explicitly banned): deny.toml banned gtk4 with a 'wrappers' list that excluded minecrarch-shell, but the shell legitimately depends on gtk4 (ADR-0013). cargo-deny cannot scope bans per workspace member, so the ban was incorrect. Removed the gtk4 ban; architectural enforcement that services must not use gtk4 is already handled by tools/check-deps.sh in CI. wildcard errors (path deps without version): cargo-deny treats path dependencies without an explicit version as wildcard deps. Added 'version = "0.1"' to minecrarch-shared path deps in shell/Cargo.toml and services/modpack-manager/Cargo.toml. Changed 'wildcards = "deny"' to 'wildcards = "warn"' since internal workspace path deps are intentionally version-free. licenses error (Unicode-3.0 not in allow list): unicode-ident uses '(MIT OR Apache-2.0) AND Unicode-3.0'. Added 'Unicode-3.0' to the allow list.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
minecrarch-shared,minecrarch-shell,minecrarch-modpack-managerbuild-rust(cargo fmt + clippy + build + test con GTK4/libadwaita) ycargo-deny(licencias, bans, sources).gitignore:src/global ignoraba todos los dirs Rust; corregido apackaging/**/src/ADR references
ADR-0011 (Rust), ADR-0013 (GTK4 + libadwaita), ADR-0009 (layer boundaries —
tools/check-deps.shen CI valida queshell/no importe crates de servicios)Changes
shared/ (
minecrarch-shared): constantes D-Bus (bus names, object paths, field keys perdocs/ipc.md),MinecrarchErrorcon thiserrorshell/ (
minecrarch-shell):Cargo.tomlcon gtk4 0.9 + libadwaita 0.7 + zbus + tokio + async-channel + tracing; stubmain.rsservices/modpack-manager/:
Cargo.tomlcon zbus + tokio + tracing; stubmain.rsImplementaciones reales en D4 (shell) y D5 (modpack-manager).