-
Notifications
You must be signed in to change notification settings - Fork 48
Open
Description
Ran into an issue while trying to build the Rust template.
cartesi build
works fine (because Dockerfile handles RISC-V setup)- But
cargo build
locally fails with:these errors:
error[E0463]: can't find crate for `core`
|
= note: the `riscv64gc-unknown-linux-gnu` target may not be installed
= help: consider downloading the target with `rustup target add riscv64gc-unknown-linux-gnu`
error[E0463]: can't find crate for `std`
Fix
To provide value for developers who want to use their IDE's Rust support
- Add the RISC-V target
rustup target add riscv64gc-unknown-linux-gnu
- Edit the Cargo.toml file
[build]
target = "riscv64gc-unknown-linux-gnu"
or build with(on Apple SIlicon)
cargo build --target aarch64-apple-darwin
Docs
Could we add a small note in here about this? Something like:
If you're building the Rust template, make sure to run
rustup target add riscv64gc-unknown-linux-gnu
first.
Otherwise, you'll get compilation errors about missingcore
andstd
crates.
Metadata
Metadata
Assignees
Labels
No labels