I’m trying to take Embassy for a spin on a NixOS machine. Embassy requires probe-rs, which is available in nixpkgs.
The getting started instructions for Embassy suggest that one install
rustup(For the purposes of installing the Rust toolchain. I don’t haverustupas such, but I am doing this in a flake that supplies the Rust toolchain via the oxalica Rust overlay).probe-rs(My flake gets this fromnixpkgs.)
and then
- clone the Embassy repo
cdintoexamples/<my-board>cargo build --bin blinky --release
This fails, spewing many screenfuls of Rust compiler errors, starting with
error[E0463]: can't find crate for `core`
The Embassy Getting Started docs have an “It didn’t work” section, which includes
If you’re getting an extremely long error message containing something like the following:
error[E0463]: can't find crate for `std`Make sure that you didn’t accidentally run
cargo add probe-rs(which adds it as a dependency) instead of correctly installing probe-rs.
Given that core and std are strongly related, the error message I observe and the error message that the docs anticipate may be equivalent.
The “correctly installing probe-rs” instructions amount to
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/probe-rs/probe-rs/releases/latest/download/probe-rs-installer.sh | shcargo install probe-rs --features cli
If I remove probe-rs from the flake and follow these installation instructions, unsurprisingly, they produce an executable which fails to run on NixOS. The flake-provided probe-rs at least managed to give me a sensible response to probe-rs -h.
Have you any suggestions on how to get around this hurdle?