Code in progress: https://github.com/n8henrie/attiny85-relay/tree/nix
I'm trying to use oxalica / nix to build a project for the attiny85 microcontroller, similar to how I've done for the ESP32C3: https://github.com/n8henrie/esp32c3-rust-mqtt
When building for these targets (and having to build-std = "core"), I'm accustomed to having to add a number of dependencies to dev-dependencies (#207 (comment)).
Unfortunately, I'm running into an issue where I have conflicting requirements for std (specifically wasi = "0.14.4" and wasi = "0.11.0"), and I'm not sure how to resolve this.
When I included the 0.11 I get:
Updating git repository `https://github.com/rahix/avr-hal`
Updating crates.io index
Locking 0 packages to latest Rust 1.94.0-nightly compatible versions
note: pass `--verbose` to see 4 unchanged dependencies behind latest
error: Cannot build '/nix/store/9w9bp987vnmp1s1arbshrqrc6kp2kff4-relay.drv'.
Reason: builder failed with exit code 101.
Output paths:
/nix/store/w97374kix38gyq24a7bdfacjmmm6jpgn-relay
Last 21 log lines:
> Running phase: unpackPhase
> unpacking source archive /nix/store/cjw902bg09ypcvc3rqnarf9q43qym2hd-wann6hajsj1rs1v80jp6kkaak614y9p4-source
> source root is wann6hajsj1rs1v80jp6kkaak614y9p4-source
> Executing cargoSetupPostUnpackHook
> Finished cargoSetupPostUnpackHook
> Running phase: patchPhase
> Executing cargoSetupPostPatchHook
> Validating consistency between /nix/var/nix/builds/nix-9507-3977508729/wann6hajsj1rs1v80jp6kkaak614y9p4-source/Cargo.lock and /nix/var/nix/builds/nix-9507-3977508729/cargo-vendor-dir/Cargo.lock
> Finished cargoSetupPostPatchHook
> Running phase: updateAutotoolsGnuConfigScriptsPhase
> Running phase: configurePhase
> Running phase: buildPhase
> Executing cargoBuildHook
> cargoBuildHook flags: -j 16 --target aarch64-apple-darwin --offline --profile release
> error: failed to select a version for the requirement `wasi = "^0.14.4"` (locked to 0.14.4+wasi-0.2.4)
> candidate versions found which didn't match: 0.11.1+wasi-snapshot-preview1
> location searched: directory source `/nix/var/nix/builds/nix-9507-3977508729/cargo-vendor-dir` (which is replacing registry `crates-io`)
> required by package `std v0.0.0 (/nix/store/wsl045mk0a06fhczxkq6w6azjyr1zvxy-rust-minimal-1.94.0-nightly-2025-12-13/lib/rustlib/src/rust/library/std)`
> ... which satisfies path dependency `std` (locked to 0.0.0) of package `sysroot v0.0.0 (/nix/store/wsl045mk0a06fhczxkq6w6azjyr1zvxy-rust-minimal-1.94.0-nightly-2025-12-13/lib/rustlib/src/rust/library/sysroot)`
> perhaps a crate was updated and forgotten to be re-vendored?
> As a reminder, you're using offline mode (--offline) which can sometimes cause surprising resolution failures, if this error is too confusing you may wish to retry without `--offline`.
For full logs, run:
nix log /nix/store/9w9bp987vnmp1s1arbshrqrc6kp2kff4-relay.drv
error: Cannot build '/nix/store/ib1kz798x60q7xvhh8fy3n07l0rxxy5n-flash.drv'.
Reason: 1 dependency failed.
Output paths:
/nix/store/jh994a8z8ns7sxv0qm4xaw61b29r8mwd-flash
[Command exited with 1]
When I include the 0.14 I get:
Updating git repository `https://github.com/rahix/avr-hal`
Updating crates.io index
Locking 4 packages to latest Rust 1.94.0-nightly compatible versions
Adding bitflags v2.10.0
Updating wasi v0.11.1+wasi-snapshot-preview1 -> v0.14.7+wasi-0.2.4
Adding wasip2 v1.0.1+wasi-0.2.4
Adding wit-bindgen v0.46.0
note: pass `--verbose` to see 3 unchanged dependencies behind latest
error: Cannot build '/nix/store/5n6d7gbldfjfmix892vq60rl5x059zh3-relay.drv'.
Reason: builder failed with exit code 101.
Output paths:
/nix/store/m166q2icr2k4a99svvml806y58h69lf0-relay
Last 21 log lines:
> Running phase: unpackPhase
> unpacking source archive /nix/store/k7fqfpz6rkzivaapzjkcsdhbr3k8wv6m-zxdpkp55c59n25ffi106y3gwk4jwnlv2-source
> source root is zxdpkp55c59n25ffi106y3gwk4jwnlv2-source
> Executing cargoSetupPostUnpackHook
> Finished cargoSetupPostUnpackHook
> Running phase: patchPhase
> Executing cargoSetupPostPatchHook
> Validating consistency between /nix/var/nix/builds/nix-9668-1238770459/zxdpkp55c59n25ffi106y3gwk4jwnlv2-source/Cargo.lock and /nix/var/nix/builds/nix-9668-1238770459/cargo-vendor-dir/Cargo.lock
> Finished cargoSetupPostPatchHook
> Running phase: updateAutotoolsGnuConfigScriptsPhase
> Running phase: configurePhase
> Running phase: buildPhase
> Executing cargoBuildHook
> cargoBuildHook flags: -j 16 --target aarch64-apple-darwin --offline --profile release
> error: failed to select a version for the requirement `wasi = "^0.11.0"` (locked to 0.11.1+wasi-snapshot-preview1)
> candidate versions found which didn't match: 0.14.7+wasi-0.2.4
> location searched: directory source `/nix/var/nix/builds/nix-9668-1238770459/cargo-vendor-dir` (which is replacing registry `crates-io`)
> required by package `std v0.0.0 (/nix/store/wsl045mk0a06fhczxkq6w6azjyr1zvxy-rust-minimal-1.94.0-nightly-2025-12-13/lib/rustlib/src/rust/library/std)`
> ... which satisfies path dependency `std` (locked to 0.0.0) of package `sysroot v0.0.0 (/nix/store/wsl045mk0a06fhczxkq6w6azjyr1zvxy-rust-minimal-1.94.0-nightly-2025-12-13/lib/rustlib/src/rust/library/sysroot)`
> perhaps a crate was updated and forgotten to be re-vendored?
> As a reminder, you're using offline mode (--offline) which can sometimes cause surprising resolution failures, if this error is too confusing you may wish to retry without `--offline`.
For full logs, run:
nix log /nix/store/5n6d7gbldfjfmix892vq60rl5x059zh3-relay.drv
error: Cannot build '/nix/store/5m126cw7ckw1bm82wgbcrciwr15q09cm-flash.drv'.
Reason: 1 dependency failed.
Output paths:
/nix/store/hvanmywcibwmy93axj8xlcdkvdrfw3wr-flash
Is there a way for me to successfully build std in this situation?
Code in progress: https://github.com/n8henrie/attiny85-relay/tree/nix
I'm trying to use oxalica / nix to build a project for the attiny85 microcontroller, similar to how I've done for the ESP32C3: https://github.com/n8henrie/esp32c3-rust-mqtt
When building for these targets (and having to
build-std = "core"), I'm accustomed to having to add a number of dependencies to dev-dependencies (#207 (comment)).Unfortunately, I'm running into an issue where I have conflicting requirements for
std(specificallywasi = "0.14.4"andwasi = "0.11.0"), and I'm not sure how to resolve this.When I included the
0.11I get:When I include the
0.14I get:Is there a way for me to successfully build std in this situation?