ci(release): rustup target add x86_64-unknown-linux-musl + workspace fmt #17

Merged
mik-tf merged 3 commits from development_mik_home212_lib_rhai_musl_target into development 2026-05-06 18:22:03 +00:00
Owner

Refs lhumina_code/home#212

Fix-forward on PRs #14 / #15. Bundles two CI greens that both need to land before this repo can ship.

Commits

  1. ci(release): explicit rustup target add for x86_64-unknown-linux-musl — v0.1.0-rc2 build-linux failed in 25s on error[E0463]: can't find crate for core. scripts/build_lib.sh::setup_linux_toolchain() (line 1171) explicitly skips rustup target add when target is x86_64-unknown-linux-musl, assuming it's pre-installed on ghcr.io/despiegk/builder:latest. It isn't. Sibling workflows (hero_voice, hero_editor) target *-gnu only, so the latent bug never surfaced; hero_proc inlines its own toolchain step. One extra idempotent line in the workflow's Setup toolchain step does it.

  2. style: cargo fmt across hero_runner_rhai* crateslint-linux has been failing on development for at least 5 runs with cargo fmt --check diff across 16 files in crates/hero_runner_rhai{,_server,_ui}. Pure mechanical drift, no behaviour change. With this in place, the lint workflow's cargo fmt --check returns clean.

Splitting these would leave one CI job red until the second PR merged — bundling avoids the half-red intermediate state. Net diff is small for review purposes (the +219/-150 fmt diff is mechanical, the +2 line workflow change is the substantive bit).

After merge

Tag v0.1.0-rc3 (rc2 already taken at the rev-pin commit; rc3 is the next free rc number). CI should then publish 4 release assets:

hero_do-x86_64-unknown-linux-musl
hero_runner_rhai-x86_64-unknown-linux-musl
hero_runner_rhai_server-x86_64-unknown-linux-musl
hero_runner_rhai_ui-x86_64-unknown-linux-musl

Consumer PR lhumina_code/hero_skills#221 lands once the assets exist.

Signed-off-by: mik-tf

Refs https://forge.ourworld.tf/lhumina_code/home/issues/212 Fix-forward on PRs #14 / #15. Bundles two CI greens that both need to land before this repo can ship. ## Commits 1. **`ci(release): explicit rustup target add for x86_64-unknown-linux-musl`** — v0.1.0-rc2 build-linux failed in 25s on `error[E0463]: can't find crate for core`. `scripts/build_lib.sh::setup_linux_toolchain()` (line 1171) explicitly skips `rustup target add` when target is `x86_64-unknown-linux-musl`, assuming it's pre-installed on `ghcr.io/despiegk/builder:latest`. It isn't. Sibling workflows (hero_voice, hero_editor) target `*-gnu` only, so the latent bug never surfaced; hero_proc inlines its own toolchain step. One extra idempotent line in the workflow's Setup toolchain step does it. 2. **`style: cargo fmt across hero_runner_rhai* crates`** — `lint-linux` has been failing on `development` for at least 5 runs with `cargo fmt --check` diff across 16 files in `crates/hero_runner_rhai{,_server,_ui}`. Pure mechanical drift, no behaviour change. With this in place, the lint workflow's `cargo fmt --check` returns clean. Splitting these would leave one CI job red until the second PR merged — bundling avoids the half-red intermediate state. Net diff is small for review purposes (the +219/-150 fmt diff is mechanical, the +2 line workflow change is the substantive bit). ## After merge Tag `v0.1.0-rc3` (rc2 already taken at the rev-pin commit; rc3 is the next free rc number). CI should then publish 4 release assets: ``` hero_do-x86_64-unknown-linux-musl hero_runner_rhai-x86_64-unknown-linux-musl hero_runner_rhai_server-x86_64-unknown-linux-musl hero_runner_rhai_ui-x86_64-unknown-linux-musl ``` Consumer PR https://forge.ourworld.tf/lhumina_code/hero_skills/pulls/221 lands once the assets exist. Signed-off-by: mik-tf
ci(release): explicit rustup target add for x86_64-unknown-linux-musl
Some checks failed
Lint / lint-linux (pull_request) Failing after 5s
Tests / test-linux (pull_request) Failing after 34s
b6fd2ad8c1
`scripts/build_lib.sh::setup_linux_toolchain()` skips `rustup target
add` when target is `x86_64-unknown-linux-musl`, assuming the musl
target is pre-installed on the runner image (`ghcr.io/despiegk/builder
:latest`). It isn't. v0.1.0-rc2 build failed in 25s on `error[E0463]:
can't find crate for `core``.

Sibling workflows that use the same helper (hero_voice, hero_editor)
both target `*-gnu` arches where the helper's musl-skip branch is a
no-op, so the bug never surfaced there. hero_proc inlines its own
toolchain setup with an explicit `rustup target add`, which is why it
ships musl artifacts cleanly.

Easiest, lowest-blast fix: an extra `rustup target add` line right
after the helper call, run unconditionally. Doesn't touch shared
build_lib.sh (this repo's copy is one of many), doesn't change the
matrix shape, and is a no-op when the target is already installed
(`rustup target add` is idempotent).

Refs lhumina_code/home#212

Signed-off-by: mik-tf
style: cargo fmt across hero_runner_rhai* crates
Some checks failed
Tests / test-linux (pull_request) Failing after 23s
Lint / lint-linux (pull_request) Failing after 1m16s
91efd831a0
`lint-linux` has been failing on `development` with `cargo fmt --check`
diff for at least the last 5 runs (all pre-dating this session). 16
files in `crates/hero_runner_rhai{,_server,_ui}` had unformatted code
— pure mechanical drift, no behaviour change.

Result of `cargo fmt --all`. With this in place, the canonical
fmt-check command from the workflow

    source scripts/build_lib.sh 2>/dev/null && cargo_env && cargo fmt --check

returns clean.

Bundled with the rustup-target fix in this PR because both have to
land before lint-linux + build-linux can both go green; splitting
would just leave one of them red until the second PR merges.

Refs lhumina_code/home#212

Signed-off-by: mik-tf
mik-tf changed title from ci(release): explicit rustup target add for x86_64-unknown-linux-musl to ci(release): rustup target add x86_64-unknown-linux-musl + workspace fmt 2026-05-06 18:09:16 +00:00
fix(lint): clippy clean — #[allow(dead_code)] on fetch_content, while let loop in worker
Some checks failed
Tests / test-linux (pull_request) Failing after 24s
Lint / lint-linux (pull_request) Successful in 1m30s
26af4520f5
`make lint` runs `cargo fmt --check` AND `cargo clippy --workspace
-- -D warnings`. The fmt commit on this branch greens the first; this
commit greens the second.

Two clippy errors:

1. `crates/hero_runner_rhai_server/src/resolver.rs:191` — function
   `fetch_content` is never used. The hero_do crate has its own copy
   that is used; this one is plausibly future-wiring (the comment
   above marks it as a `run()` helper). Adding `#[allow(dead_code)]`
   keeps it for that future use without blocking lint today.

2. `crates/hero_runner_rhai_server/src/worker.rs:37` — `loop { match
   { Ok => …, Err => break } }` rewritten as `while let Ok(req) =
   read_msg::<ScriptRequest>(&stream)`. Mechanically equivalent;
   parent closing the socket still exits the loop. `read_msg` is
   generic over `DeserializeOwned`, so the turbofish keeps the
   `ScriptRequest` type binding the original `let req: ScriptRequest`
   pattern carried.

`cargo clippy --workspace -- -D warnings` now finishes clean.

Refs lhumina_code/home#212

Signed-off-by: mik-tf
mik-tf merged commit 65e3970752 into development 2026-05-06 18:22:03 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_lib_rhai!17
No description provided.