LedgerHQ/ledger-device-rust-sdk

Rust SDK for Ledger device applications

Rust

66

1,337 commits

updated Aug 26, 2026

See the code

README

Ledger Device Rust SDK

DEV SUPPORT

Rust SDK for developing applications on Ledger hardware wallets. This workspace provides safe, idiomatic Rust abstractions over the Ledger C SDK for building embedded applications on Nano X, Nano S Plus, Stax, Flex, and Apex P devices.

Supported Devices

Nano XNano S PlusStaxFlexApex P

Crates

CrateDescriptionDocumentationLatest ReleaseChangelog
ledger_device_sdkHigh-level Rust SDK with safe abstractionsLinkDynamic TOML BadgeLink
ledger_secure_sdk_sysLow-level FFI bindings to C SDKDynamic TOML BadgeLink
include_gifProc macro for embedding images (GIF/PNG → NBGL/BAGL)Dynamic TOML Badge
testmacroTest harness for #![no_std] environmentsDynamic TOML Badge

Docker builder

Docker images are available and shall be used to build and test Rust applications for Ledger devices.

fulldev-tools
Rust nightly-2025-12-05 toolchain:white_check_mark::white_check_mark:
cargo-ledger :white_check_mark::white_check_mark:
Rust Ledger devices custom targets :white_check_mark::white_check_mark:
ARM & LLVM toolchains :white_check_mark::white_check_mark:
Speculos :x::white_check_mark:
Ragger  :x::white_check_mark:

Please check here for more details.

Quick Start with Docker

# Pull the Docker image
docker pull ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:latest

# Build your app (from your project directory) using cargo-ledger
docker run --rm -v "$(pwd):/app" \
  ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:latest \
  cargo ledger build stax

# Run examples with Speculos (dev-tools image)
docker run --rm -v "$(pwd):/app" \
  ghcr.io/ledgerhq/ledger-app-builder/ledger-app-dev-tools:latest \
  cargo run --example nbgl_home_and_settings --target stax --release

Getting Started

For detailed setup instructions, see the ledger_device_sdk README.

To start building your own app:

  1. Use the boilerplate: Clone app-boilerplate-rust for a complete working example
  2. Explore examples: Check the examples/ directory for UI patterns, APDU handling, and more
  3. Read the docs: See developers.ledger.com for comprehensive guides

Key Requirements

  • Rust nightly toolchain (see rust-toolchain.toml)
  • cargo-ledger - CLI tool for building Ledger apps (cargo install --git https://github.com/LedgerHQ/cargo-ledger)
  • arm-none-eabi-gcc (ARM toolchain)
  • Clang
  • For testing: Speculos emulator

Resources

Contributing

Contributions are welcome! Please ensure your PR:

  • Builds successfully with cargo ledger build <device> (or cargo build --release --target <device>)
  • Passes cargo clippy without warnings
  • Is formatted with cargo fmt
  • Includes tests where applicable

See individual crate READMEs for specific contribution guidelines.

Contributors

(top 30 of 35)

yogh333

893 commits

yhql

97 commits

agrojean-ledger

87 commits

bigspider

52 commits

LedgerHQ/ledger-device-rust-sdk

Rust SDK for Ledger device applications

Rust

66

1,337 commits

updated Aug 26, 2026

See the code

README

Ledger Device Rust SDK

DEV SUPPORT

Rust SDK for developing applications on Ledger hardware wallets. This workspace provides safe, idiomatic Rust abstractions over the Ledger C SDK for building embedded applications on Nano X, Nano S Plus, Stax, Flex, and Apex P devices.

Supported Devices

Nano XNano S PlusStaxFlexApex P

Crates

CrateDescriptionDocumentationLatest ReleaseChangelog
ledger_device_sdkHigh-level Rust SDK with safe abstractionsLinkDynamic TOML BadgeLink
ledger_secure_sdk_sysLow-level FFI bindings to C SDKDynamic TOML BadgeLink
include_gifProc macro for embedding images (GIF/PNG → NBGL/BAGL)Dynamic TOML Badge
testmacroTest harness for #![no_std] environmentsDynamic TOML Badge

Docker builder

Docker images are available and shall be used to build and test Rust applications for Ledger devices.

fulldev-tools
Rust nightly-2025-12-05 toolchain:white_check_mark::white_check_mark:
cargo-ledger :white_check_mark::white_check_mark:
Rust Ledger devices custom targets :white_check_mark::white_check_mark:
ARM & LLVM toolchains :white_check_mark::white_check_mark:
Speculos :x::white_check_mark:
Ragger  :x::white_check_mark:

Please check here for more details.

Quick Start with Docker

# Pull the Docker image
docker pull ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:latest

# Build your app (from your project directory) using cargo-ledger
docker run --rm -v "$(pwd):/app" \
  ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:latest \
  cargo ledger build stax

# Run examples with Speculos (dev-tools image)
docker run --rm -v "$(pwd):/app" \
  ghcr.io/ledgerhq/ledger-app-builder/ledger-app-dev-tools:latest \
  cargo run --example nbgl_home_and_settings --target stax --release

Getting Started

For detailed setup instructions, see the ledger_device_sdk README.

To start building your own app:

  1. Use the boilerplate: Clone app-boilerplate-rust for a complete working example
  2. Explore examples: Check the examples/ directory for UI patterns, APDU handling, and more
  3. Read the docs: See developers.ledger.com for comprehensive guides

Key Requirements

  • Rust nightly toolchain (see rust-toolchain.toml)
  • cargo-ledger - CLI tool for building Ledger apps (cargo install --git https://github.com/LedgerHQ/cargo-ledger)
  • arm-none-eabi-gcc (ARM toolchain)
  • Clang
  • For testing: Speculos emulator

Resources

Contributing

Contributions are welcome! Please ensure your PR:

  • Builds successfully with cargo ledger build <device> (or cargo build --release --target <device>)
  • Passes cargo clippy without warnings
  • Is formatted with cargo fmt
  • Includes tests where applicable

See individual crate READMEs for specific contribution guidelines.

Contributors

(top 30 of 35)

yogh333

893 commits

yhql

97 commits

agrojean-ledger

87 commits

bigspider

52 commits

Languages

Rust

97.4%

C

1.5%