fuel.nix
fuel.nix copied to clipboard
Re-enable `forc-node` packaging (`fuel-core-upgradable-executor` needs offline-friendly build)
Summary
While adding the forc-node plugin we discovered that the build consistently fails in both CI and local Nix builds. The problematic derivation is fuel-core-upgradable-executor; its build.rs shells out to cargo install fuel-core-wasm-executor, which tries to talk to index.crates.io. Inside the Nix sandbox that network access is blocked, so the build dies after several retries Could not resolve host: index.crates.io. We’ve removed the plugin for now to unblock releases, but we should revisit and ship it properly.
Reproduction
- Check out this repo at the state just before forc-node was reverted (see PR #194 for reference).
- Run nix build .#forc-node (or just build the vendored fuel-core-upgradable-executor crate).
- Observe the failure when the build script reaches the cargo install call; the stderr shows the repeated DNS/SSL errors for index.crates.io.
What currently happens
- build.rs executes cargo install fuel-core-wasm-executor…
- Cargo tries to update the crates.io index and download config.json.
- Without outbound networking the command fails, and the build panics with:
error: download of config.json failed
Caused by: [6] Could not resolve hostname (Could not resolve host: index.crates.io)
What we need
Packaging must succeed without reaching out to crates.io. Open questions and potential approaches:
- Ship a patch (or upstream PR) that makes the build script detect a vendored wasm-executor and bypass crates.io entirely. It already prefers a local wasm-executor/ directory; we need to ensure the vendored fuel-core tarball includes it (or that we symlink it correctly before build.rs runs).
- Alternatively, prebuild and vendor the resulting fuel-core-wasm-executor binary so the script can simply copy it.
- If neither is feasible, we may need a Nix build wrapper that sets up a temporary cargo registry/cache with the wasm executor crate preloaded.
- Once the build script is offline-friendly, bring back the forc-node manifests, filters, and DevShell references (everything removed in PR #195).