build: make mesh-llm opt-in for dev/staging to speed up iteration - #1183
Merged
Conversation
`just dev` and `just staging` hardcoded `tauri dev --features mesh-llm`, forcing ~420 extra crates plus the llama.cpp native runtime build on every iteration. Default these recipes to no mesh and add a `mesh=1` toggle for testing mesh compute features. CI, release artifacts, and mesh-e2e paths are unchanged. Co-authored-by: npub1yxv5wk0u0fh6dwt925wntn7h397jvteyj4r87ttcd9xae7n2t3lqqj9jmm <21994759fc7a6fa6b965551d35cfd7897d262f2495467f2d78694ddcfa6a5c7e@sprout-oss.stage.blox.sqprod.co> Signed-off-by: Wes <wesbillman@users.noreply.github.com>
wpfleger96
approved these changes
Jun 22, 2026
The mesh native-runtime failure messages told users to run plain `just staging`, which no longer prepares the runtime after mesh became opt-in. Point them at `just mesh=1 staging` (and keep `just mesh-e2e-hardware`). Add a note to the local-build doc covering the opt-in recipes. Co-authored-by: npub1yxv5wk0u0fh6dwt925wntn7h397jvteyj4r87ttcd9xae7n2t3lqqj9jmm <21994759fc7a6fa6b965551d35cfd7897d262f2495467f2d78694ddcfa6a5c7e@sprout-oss.stage.blox.sqprod.co> Signed-off-by: Wes <wesbillman@users.noreply.github.com>
wesbillman
enabled auto-merge (squash)
June 22, 2026 22:08
3 tasks
tlongwell-block
added a commit
that referenced
this pull request
Aug 3, 2026
…#4524) ## Summary Official Linux desktop packages (`.deb` / AppImage) are built without `--features mesh-llm`, so they ship the `mesh_llm_stubs` backend and Settings → Compute always fails with `mesh-llm feature not enabled`. This PR adds the feature flag to the two Linux build commands: - `release.yml` → `release-linux` job - `linux-canary.yml` → canary build That's the whole diff — 2 lines. Fixes #3788 (Linux); see also #3841 (dup with UI-gating PR #3914) and the Windows twin #2836/#3223. ## Why no native prebuild step (unlike the macOS job) The macOS job carries Metal llama prebuild/cache steps from #798. Linux doesn't need an equivalent: - `mesh-llm-host-runtime` is compiled with `dynamic-native-runtime` and installs the recommended runtime on first use (verified by sha256 checksum over HTTPS; upstream's signature verification path is not yet implemented — default policy is `RequireChecksum`, per `mesh-llm-runtime-install/src/lib.rs`) (`desktop/src-tauri/src/mesh_llm/mod.rs` — `initialize_mesh_native_runtime`), so release builds work on clean machines without bundling llama.cpp. - Upstream publishes Linux x86_64/aarch64 runtime bundles for the pinned `v0.74.0` line, and `scripts/ensure-mesh-native-runtime.sh` already maps `meshllm-native-runtime-linux-x86_64-cpu` / `linux-aarch64-cpu` for local/e2e use. - The unmerged branch `micn/mesh-node-download` (`96f29417a`) treats even the macOS prebuild steps as removable dead weight for the same reason. ## Background The omission is historical drift, not a decision: Linux packaging predates the mesh feature flag (#693), mesh became opt-in for build-cost/reliability reasons (#823, #1183), and #1221 re-enabled it for releases by editing only the macOS build line. `release-linux` and the later `linux-canary` copy were never revisited. The mesh shutdown hard-exit/relaunch path is gated `all(mesh-llm, target_os = "macos")` because ggml/Metal destructors abort on macOS; ordinary mesh shutdown (`shutdown_mesh_runtime`) is cross-platform, so Linux falls through to the generic path. ## Validation - [x] `./bin/cargo check --manifest-path desktop/src-tauri/Cargo.toml --features mesh-llm` green at base `2c0ac2467` (feature graph compiles at the pinned v0.74.0 line) - [ ] Linux canary run with this change: AppImage/.deb build succeeds and binary contains real `mesh_llm` symbols (not `mesh_llm_stubs`) - [ ] Installed package: cold-start → Settings → Compute → runtime download → serve → clean shutdown The last two need a Linux run/host. **Note (from review):** `linux-canary.yml` is `workflow_dispatch`-only and its `Require main` step rejects non-main refs, so the canary cannot run on this branch pre-merge — and `.github/workflows/**` matches no ci.yml paths-filter, so this PR's own CI does not exercise the changed lines. Validation sequencing is therefore merge → dispatch linux-canary on main → live-package pass, with a trivial 2-line revert as the escape hatch. Signed-off-by: npub1qyvc0c5kl4gqv2fd97fsk46tu378sqgy35vc83rvgfwne90sel7s0ed67d <011987e296fd5006292d2f930b574be47c7801048d1983c46c425d3c95f0cffd@buzz.block.builderlab.xyz> Co-authored-by: npub1qyvc0c5kl4gqv2fd97fsk46tu378sqgy35vc83rvgfwne90sel7s0ed67d <011987e296fd5006292d2f930b574be47c7801048d1983c46c425d3c95f0cffd@buzz.block.builderlab.xyz>
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.
Problem
just devandjust staginghardcodedtauri dev --features mesh-llm, andstagingalso ranensure-mesh-native-runtime.sh(builds llama.cpp via cmake on cache miss). That forced the heavy mesh path on every iteration build — the two commands humans and agents run most.Measured cost: desktop tauri deps without mesh-llm = 594 crates; with = 1014. That's +420 crates (~71%) plus a C/C++ native runtime build on every
dev/stagingrun. (Pinky's run on a slightly different graph measured 720 → 1051, +331 — exact number varies by environment, the savings are real either way.)Change
Add a
mesh := ""toggle, off by default:just dev/just staging— fast, no mesh-llm, no native-runtime prep.just mesh=1 dev/just mesh=1 staging— full mesh build for testing compute-sharing features.mesh-llm is fully optional in code (
default = []indesktop/src-tauri/Cargo.toml; every mesh Tauri command has a#[cfg(not(feature = "mesh-llm"))]stub returning"mesh-llm feature not enabled"), so the default build is a complete, working app minus the mesh compute UI.How this lines up with CI / release
This brings
dev/stagingin line with what CI and release already do:ci.yml) runs barepnpm tauri build(no--features mesh-llm); it only prebuilds/caches the llama native libs separately, keyed by mesh rev.release.yml:175-187) also buildspnpm tauri buildwith no--features mesh-llm— it sets the LLAMA_STAGE env + caches native libs but does not pass the cargo feature. So the shipped desktop DMG today compiles mesh-llm OFF (mesh commands are stubs in production).--features mesh-llm— that's wrong. It doesn't. Credit to Pinky for catching it. This doesn't change the iteration-speed fix (default dev/staging matching CI/release is the right call), but it surfaces a separate product question for @wes: if shipped Buzz desktop is supposed to include Mesh by default, the release build is missing the feature flag — that's its own bug/decision, out of scope here.Full mesh build still available via
just mesh=1 dev/just mesh=1 stagingjust mesh-e2e-hardware(unchanged)Follow-ups (not in this PR, intentionally scoped out)
mesh=1path, not plainjust staging(per Pinky).CMAKE_POLICY_VERSION_MINIMUM=3.5in dev/staging recipes to unbreak local desktop builds on newer CMake.Validation
just --listparses; recipes intact.set -ufootgun handled with${FEATURES[@]+"${FEATURES[@]}"}; verified under macOSbash 3.2.57for both mesh on and off.cargo checkof the desktop tauri crate without mesh-llm compiles green — stubs are complete.