11 stable releases

1.5.1 Jul 30, 2024
1.5.0 Jul 29, 2024
1.4.1 Jun 4, 2024
1.4.0 May 27, 2024
1.1.0 Sep 20, 2023

#531 in Cargo plugins

Download history 271/week @ 2024-07-28 28/week @ 2024-08-04 19/week @ 2024-08-11 1/week @ 2024-08-18 2/week @ 2024-09-01 173/week @ 2024-09-08 290/week @ 2024-09-15 380/week @ 2024-09-22 161/week @ 2024-09-29 34/week @ 2024-10-06 53/week @ 2024-10-13 3/week @ 2024-10-20 64/week @ 2024-10-27 34/week @ 2024-11-03 29/week @ 2024-11-10

130 downloads per month

Apache-2.0

24KB
517 lines

Cargo-ledger

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.

Installation

This program requires:

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.

Usage

General usage is displayed when invoking cargo ledger.

Setup

This will install custom target files from the SDK directly into your environment.

cargo ledger setup

Building

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/

Dependencies

~2.8–4MB
~72K SLoC