Skip to content

Conversation

Ericson2314
Copy link
Contributor

Instead of hacking in the specific device in the build.rs, which doesn't work for downstream packages, specify it as the "os" in the target json. Also specify "bolos" as a target_family to make a catch-all cfg for any Ledger device easy too.

Instead of hacking in the specific device in the `build.rs`, which
doesn't work for downstream packages, specify it as the "os" in the
target json. Also specify "bolos" as a `target_family` to make a
catch-all `cfg` for any Ledger device easy too.
Ericson2314 added a commit to alamgu/ledger-nanos-sdk that referenced this pull request Aug 25, 2022
The first change is to parse once, and then use an enum for the device.
This is hopefully a straightforward improvement.

The second change is to case on the OS name (leveraging LedgerHQ#38) instead of
the target name. The target "name" isn't so structured, and it is
unclear to what extent it should be anm exposed part of the target. (See
rust-lang/rust#98225 for example, where the
contents rather than json file path were used as a a key.)

With LedgerHQ#38 the device name is used for the OS field instead, and so we are
robust to confusing behavior around names.
@yhql yhql merged commit a534ef4 into LedgerHQ:master Aug 29, 2022
yhql pushed a commit that referenced this pull request Aug 29, 2022
The first change is to parse once, and then use an enum for the device.
This is hopefully a straightforward improvement.

The second change is to case on the OS name (leveraging #38) instead of
the target name. The target "name" isn't so structured, and it is
unclear to what extent it should be anm exposed part of the target. (See
rust-lang/rust#98225 for example, where the
contents rather than json file path were used as a a key.)

With #38 the device name is used for the OS field instead, and so we are
robust to confusing behavior around names.
@Ericson2314 Ericson2314 deleted the use-os-field branch August 29, 2022 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants