Crates.io | cargo-ledger |
lib.rs | cargo-ledger |
version | 1.5.1 |
source | src |
created_at | 2023-09-20 09:38:10.675269 |
updated_at | 2024-07-30 15:32:23.588093 |
description | Build and sideload Ledger devices apps |
homepage | |
repository | https://github.com/LedgerHQ/cargo-ledger |
max_upload_size | |
id | 977983 |
size | 44,620 |
Builds a Nano App and outputs a JSON manifest file that can be used by ledgerctl to install an application directly.
In order to build for Nano S, Nano X, and Nano S Plus, custom target files are used. They can be found at the root of the Rust SDK and can be installed automatically with the command setup
.
This program requires:
arm-none-eabi-objcopy
ledgerctl
Install this repo with:
cargo install --git https://github.com/LedgerHQ/ledger-device-rust-sdk cargo-ledger
or download it manually and install with:
cargo install --path cargo-ledger
Note that cargo
's dependency resolver may behave differently when installing, and you may end up with errors.
In order to fix those and force usage of the versions specified in the tagged Cargo.lock
, append --locked
to the above commands.
General usage is displayed when invoking cargo ledger
.
This will install custom target files from the SDK directly into your environment.
cargo ledger setup
cargo ledger build nanos
cargo ledger build nanox
cargo ledger build nanosplus
Loading on device can optionally be performed by appending --load
or -l
to the command.
By default, this program will attempt to build the current program with in release
mode (full command: cargo build --release --target=nanos --message-format=json
)
Arguments can be passed to modify this behaviour after inserting a --
like so:
cargo ledger build nanos --load -- --features one -Z unstable-options --out-dir ./output/