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.
| Nano X | Nano S Plus | Stax | Flex | Apex P |
|---|---|---|---|---|
| ✅ | ✅ | ✅ | ✅ | ✅ |
| Crate | Description | Documentation | Latest Release | Changelog |
|---|---|---|---|---|
| ledger_device_sdk | High-level Rust SDK with safe abstractions | Link | Link | |
| ledger_secure_sdk_sys | Low-level FFI bindings to C SDK | Link | ||
| include_gif | Proc macro for embedding images (GIF/PNG → NBGL/BAGL) | |||
| testmacro | Test harness for #![no_std] environments |
Docker images are available and shall be used to build and test Rust applications for Ledger devices.
full |
dev-tools |
|
|---|---|---|
| Rust nightly-2025-12-05 toolchain | ✅ | ✅ |
| cargo-ledger | ✅ | ✅ |
| Rust Ledger devices custom targets | ✅ | ✅ |
| ARM & LLVM toolchains | ✅ | ✅ |
| Speculos | ❌ | ✅ |
| Ragger | ❌ | ✅ |
Please check here for more details.
# 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 --releaseFor detailed setup instructions, see the ledger_device_sdk README.
To start building your own app:
- Use the boilerplate: Clone app-boilerplate-rust for a complete working example
- Explore examples: Check the examples/ directory for UI patterns, APDU handling, and more
- Read the docs: See developers.ledger.com for comprehensive guides
- 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
- 📚 Developer Documentation - Complete guides for building and publishing apps
- 📦 Rust Boilerplate App - Full reference implementation
- 🔧 API Documentation - Generated SDK docs
- 🗣️ Discord Support - Community and developer support
- 🐳 Docker Builder - Build environment images
Contributions are welcome! Please ensure your PR:
- Builds successfully with
cargo ledger build <device>(orcargo build --release --target <device>) - Passes
cargo clippywithout warnings - Is formatted with
cargo fmt - Includes tests where applicable
See individual crate READMEs for specific contribution guidelines.