LedgerHQ / cargo-ledger

(Moved in the ledger device rust SDK --> https://github.com/LedgerHQ/ledger-device-rust-sdk). Load code on a Ledger device with a `cargo` subcommand
Apache License 2.0
15 stars 12 forks source link

Cargo targets are not installed? #22

Open hhanh00 opened 1 year ago

hhanh00 commented 1 year ago

After running the setup, cargo ledger cannot find the custom targets. Not sure what I'm missing here...

[hanh@archlinux rust-app]$ cargo ledger setup
[ ] Checking for installed custom targets...
* nanos already installed
* nanox already installed
* nanosplus already installed

[hanh@archlinux rust-app]$ cargo ledger build nanos
   Compiling num-traits v0.2.15
   Compiling rand_core v0.6.4
   Compiling quote v1.0.21
   Compiling rust-app v0.2.1 (/home/hanh/ledger/rust-app)
   Compiling nanos_sdk v0.2.0 (https://github.com/LedgerHQ/ledger-nanos-sdk.git#4e3a0138)
error[E0463]: can't find crate for `core`
  |
  = note: the `nanos` target may not be installed
  = help: consider downloading the target with `rustup target add nanos`

error[E0463]: can't find crate for `compiler_builtins`e, nanos_sdk(build), num-traits(build), rand_core                                                                                                               
yhql commented 1 year ago

I guess cargo ledger setup is run as cargo +stable, but then cargo ledger build nanos invokes the nightly, so it can't find the appropriate toolchain. Try cargo +nightly ledger setup to install the target files at the right place