Skip to content

Commit a5fd123

Browse files
committed
fix(wasm_backend): remove buggy local .cargo/config.toml shadowing root
The local config at src/sdk/python/wasm_backend/.cargo/config.toml has been present since the initial commit (b0c7399). It set: [env] WIT_WORLD = { value = "../../../../wasm_sandbox/wit/sandbox-world.wasm", relative = true } Cargo resolves `relative = true` against the directory containing the `.cargo/` directory (the workspace member root, not the `.cargo/` dir itself). Counting four `..` from src/sdk/python/wasm_backend/ lands at the *parent* of the repo root, then `wasm_sandbox/...` -> a path that does not exist. The real artifact lives at src/wasm_sandbox/... so the correct prefix would have been `../../../` (three `..`), not four. Because cargo merges configs deepest-first and this local file shadowed the root .cargo/config.toml (which is correctly written), every cargo invocation made from within src/sdk/python/wasm_backend/ -- including `maturin build` invoked by `pip install` -- saw WIT_WORLD pointing at a non-existent path. The hyperlight_wasm_macro::wasm_guest_bindgen proc macro in hyperlight-wasm-runtime then panicked with: proc macro panicked: called `Result::unwrap()` on an `Err` value: Os { code: 3, kind: NotFound, message: "The system cannot find the path specified." } This was masked everywhere it should have surfaced because every `just` recipe that exercises this code path exports WIT_WORLD as an absolute path before invoking cargo, bypassing the buggy resolution. The repo-root .cargo/config.toml (added previously) already covers every cargo invocation that walks up from inside the workspace, so the local config is redundant. Remove it to eliminate the shadow and let the correctly-resolved root config take effect. Verified empirically: in a fresh clone of feat/scoped-credentials at a853591, `cargo build --lib --release` from src/sdk/python/wasm_backend/ with no env vars set previously panicked at the proc-macro; after removing this file (the only change), the same command finishes the release build in ~1m18s. Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com>
1 parent a853591 commit a5fd123

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

src/sdk/python/wasm_backend/.cargo/config.toml

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)