Skip to content

Commit

Permalink
Fix lock screen for NBGL based apps. Update version. Update README.
Browse files Browse the repository at this point in the history
  • Loading branch information
agrojean-ledger committed May 30, 2024
1 parent 2b6f441 commit 2c4925a
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 11 deletions.
2 changes: 1 addition & 1 deletion ledger_device_sdk/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ledger_device_sdk"
version = "1.9.1"
version = "1.9.2"
authors = ["yhql", "yogh333", "agrojean-ledger"]
edition = "2021"
license.workspace = true
Expand Down
34 changes: 25 additions & 9 deletions ledger_device_sdk/README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,28 @@
# Ledger wallets SDK for Rust Applications

Crate that allows developing Ledger Nano apps in Rust with a default configuration.
Crate that allows developing Ledger device apps in Rust with a default configuration.

Contains:

- some safe wrappers over common syscalls
- IO abstractions
- signature abstractions
- UI libraries (the `ui` module for Nano (S/SP/X) apps, `nbgl` module for Stax and Flex apps)

This SDK is incomplete in the sense that wrappers are currently missing, and not all wrappers have a nice Rust abstraction on top, but two apps were made using it:
## Links

- [A demo application with a signature UI workflow](https://github.com/LedgerHQ/rust-app)
- [A Password Manager](https://github.com/LedgerHQ/rust-app-password-manager)
To learn more about using the SDK and what is required to publish an app on the Ledger Live app store, please don't hesitate to check the following resources :

You can submit an issue or even a pull request if you wish to contribute, we will check what we can do.
- 📚 [Developer's documentation](https://developers.ledger.com/)
- 🗣️ [Ledger's Discord server](https://discord.gg/Ledger)
- 📦 [Fully featured boilerplate app](https://github.com/LedgerHQ/app-boilerplate-rust)
- 📦 [A Password Manager app](https://github.com/LedgerHQ/rust-app-password-manager)

## Supported devices

| Nano S | Nano X | Nano S Plus |
| ------------------ | ------------------ | ------------------ |
| :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
| Nano S | Nano X | Nano S Plus | Stax | Flex |
| ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
| :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |

## Usage

Expand All @@ -46,7 +49,7 @@ sudo dnf install clang arm-none-eabi-gcc arm-none-eabi-newlib
sudo pacman -S clang arm-none-eabi-gcc arm-none-eabi-newlib
```

This SDK provides three [custom target](https://doc.rust-lang.org/rustc/targets/custom.html) files for Nano S, Nano X and Nano S+.
This SDK provides [custom target](https://doc.rust-lang.org/rustc/targets/custom.html) files. One for each supported device.

### Building for Nano S

Expand All @@ -66,6 +69,17 @@ cargo build --release -Z build-std=core --target=./nanox.json
cargo build --release -Z build-std=core --target=./nanosplus.json
```

### Building for Stax

```
cargo build --release -Z build-std=core --target=./stax.json
```

### Building for Flex

```
cargo build --release -Z build-std=core --target=./flex.json
```

## Building with rustc < 1.54

Expand All @@ -75,6 +89,8 @@ This is solved by activating a specific feature: `cargo build --features pre1_54

## Contributing

You can submit an issue or even a pull request if you wish to contribute, we will check what we can do.

Make sure you've followed the installation steps above. In order for your PR to be accepted, it will have to pass the CI, which performs the following checks:

- Check if the code builds on nightly
Expand Down
7 changes: 6 additions & 1 deletion ledger_device_sdk/src/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,12 @@ impl Comm {
return Some(Event::TouchEvent);
},

_ => (),
_ => {
#[cfg(any(target_os = "stax", target_os = "flex"))]
unsafe {
ux_process_default_event();
}
}
}
None
}
Expand Down

0 comments on commit 2c4925a

Please sign in to comment.