Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add CODEOWNERS
Only LEDGER_SDK_PATH and the two LEDGER_SDK_EXTRA_* env vars were tracked. Changes to HEAP_SIZE, the per-device .defines/.cflags/.ld files, link.ld, and the local src/c/ sources silently produced stale build artifacts. Move the directives to the top of main() so they fire even if a later phase panics, and add the missing entries. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The five match arms in device() were ~50 lines each of near-identical boilerplate: looking up a per-device env var, reading the matching .defines and .cflags files, computing the linker-script path, etc. Add DeviceSpec/SPECS describing only what actually differs between devices (target_os, target_triple, env_fallback, arch_lib_dir, NBGL glyph subfolders), and rewrite device() and the duplicate match in generate_bindings() to look up the spec. Add Device::spec() so callers can reach the static config from a Device value. No behavior change. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The "is this an NBGL build?" decision lived inline in four call sites (device(), build_c_sdk(), generate_bindings(), generate_glyphs()) and C_SDK_GRAPHICS was emitted from two of them. Add Device::is_nbgl() and emit C_SDK_GRAPHICS once after device(). SDKBuildError carried 7 variants that were all .unwrap()'d in main(), so the typed enum added no value over a panic. Switch each SDKBuilder method (and the retrieve_* helpers) to return () or its plain payload, and panic with a message describing what went wrong. Also drop 7 cargo:warning= prints that just echoed values already exported via cargo:rustc-env= (API_LEVEL, TARGET_ID, etc., recoverable from the generated ELF metadata sections), and gate the build-timing print behind LEDGER_SDK_BUILD_TIMING=1. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Refactor sys crate
Tracking next nightly bump
Bump versions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.