build: make mesh-llm opt-in for dev/staging to speed up iteration (#1183)

Signed-off-by: Wes <wesbillman@users.noreply.github.com>
Co-authored-by: npub1yxv5wk0u0fh6dwt925wntn7h397jvteyj4r87ttcd9xae7n2t3lqqj9jmm <21994759fc7a6fa6b965551d35cfd7897d262f2495467f2d78694ddcfa6a5c7e@sprout-oss.stage.blox.sqprod.co>
This commit is contained in:
Wes
2026-06-22 22:11:50 +00:00
committed by GitHub
co-authored by npub1yxv5wk0u0fh6dwt925wntn7h397jvteyj4r87ttcd9xae7n2t3lqqj9jmm
parent 4b518fc4b3
commit ce5261067d
3 changed files with 23 additions and 5 deletions
+13 -3
View File
@@ -6,6 +6,11 @@ desktop_dir := "desktop"
desktop_tauri_manifest := "desktop/src-tauri/Cargo.toml"
web_dir := "web"
# Opt-in mesh-llm. Off by default so `just dev`/`just staging` skip ~420 extra
# crates + the llama.cpp native runtime build and stay fast to iterate on.
# Turn on to test mesh compute features: `just mesh=1 dev` / `just mesh=1 staging`.
mesh := ""
# List all available tasks
default:
@just --list
@@ -306,7 +311,8 @@ dev *ARGS: bootstrap _ensure-sidecar-stubs _ensure-migrations
source ../scripts/instance-env.sh
INSTANCE_ID=$(node -e "console.log(JSON.parse(process.env.BUZZ_TAURI_CONFIG).identifier)")
echo "Starting on Vite port ${BUZZ_VITE_PORT}, relay ${BUZZ_RELAY_URL}"
pnpm exec tauri dev --features mesh-llm --config "$BUZZ_TAURI_CONFIG" {{ARGS}}
FEATURES=(); [[ -n "{{mesh}}" ]] && FEATURES=(--features mesh-llm)
pnpm exec tauri dev ${FEATURES[@]+"${FEATURES[@]}"} --config "$BUZZ_TAURI_CONFIG" {{ARGS}}
# Run the desktop app against the internal staging relay (installs deps + builds agent tools automatically)
staging *ARGS: bootstrap _ensure-sidecar-stubs
@@ -315,7 +321,11 @@ staging *ARGS: bootstrap _ensure-sidecar-stubs
export PATH="{{justfile_directory()}}/bin:$PATH"
pnpm install # unconditional: staging must always start with a clean dep tree
cargo build --release -p buzz-acp -p buzz-agent -p buzz-dev-mcp -p buzz-cli -p git-credential-nostr
export MESH_LLM_NATIVE_RUNTIME_CACHE_DIR="$(./scripts/ensure-mesh-native-runtime.sh)"
FEATURES=()
if [[ -n "{{mesh}}" ]]; then
FEATURES=(--features mesh-llm)
export MESH_LLM_NATIVE_RUNTIME_CACHE_DIR="$(./scripts/ensure-mesh-native-runtime.sh)"
fi
# Replace the 0-byte sidecar stub with the real CLI binary so tauri dev picks it up.
TARGET=$(rustc -vV | sed -n 's|host: ||p')
cp target/release/buzz "desktop/src-tauri/binaries/buzz-${TARGET}"
@@ -328,7 +338,7 @@ staging *ARGS: bootstrap _ensure-sidecar-stubs
INSTANCE_ID=$(node -e "console.log(JSON.parse(process.env.BUZZ_TAURI_CONFIG).identifier)")
trap '../scripts/cleanup-instance-agents.sh "$INSTANCE_ID" || true' EXIT
echo "Starting staging on Vite port ${BUZZ_VITE_PORT}, relay ${BUZZ_RELAY_URL}"
pnpm exec tauri dev --features mesh-llm --config "$BUZZ_TAURI_CONFIG" {{ARGS}}
pnpm exec tauri dev ${FEATURES[@]+"${FEATURES[@]}"} --config "$BUZZ_TAURI_CONFIG" {{ARGS}}
# Run the desktop frontend dev server (port derived from worktree)
desktop-dev:
+2 -2
View File
@@ -212,12 +212,12 @@ fn initialize_mesh_native_runtime() -> anyhow::Result<()> {
.any(|runtime| runtime.mesh_version == current)
{
anyhow::bail!(
"mesh native runtime for MeshLLM {current} is not installed; run `just staging` or `just mesh-e2e-hardware` to prepare it"
"mesh native runtime for MeshLLM {current} is not installed; run `just mesh=1 staging` or `just mesh-e2e-hardware` to prepare it"
);
}
mesh_llm_host_runtime::initialize_host_runtime().map_err(|error| {
anyhow::anyhow!(
"mesh native runtime failed to load; run `just staging` or `just mesh-e2e-hardware` to repair it: {error}"
"mesh native runtime failed to load; run `just mesh=1 staging` or `just mesh-e2e-hardware` to repair it: {error}"
)
})
}
+8
View File
@@ -24,6 +24,14 @@ cargo build -p buzz-relay --bin buzz-relay
cargo check --manifest-path desktop/src-tauri/Cargo.toml
```
To run the desktop app with mesh enabled, use the opt-in recipes — plain
`just dev` / `just staging` are mesh-off for fast iteration:
```bash
just mesh=1 dev # local relay, mesh-llm on
just mesh=1 staging # staging relay, mesh-llm on + native runtime prep
```
Expect the first build to take several minutes while mesh-llm prepares and builds
patched llama.cpp. This is intentional for the local demo: there is no external
binary artifact to fetch and no separate dylib path to configure.