File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,13 @@ nano_nbgl = [ "ledger_secure_sdk_sys/nano_nbgl" ]
3030debug_csdk = [ " ledger_secure_sdk_sys/debug_csdk" ]
3131io_new = [] # switch to new 'io' module
3232
33+ # When enabled, this feature re-exports the `ledger_secure_sdk_sys` crate containing the
34+ # Ledger C SDK bindings through the `sys` module. Use it to access low-level (unsafe) FFI
35+ # functions, types, and constants directly from the underlying C SDK.
36+ # It is preferred to not enable this feature if possible, using instead the safe
37+ # abstractions in `ledger_device_sdk`, but it is provided for advanced use cases.
38+ sys = []
39+
3340default = [ " heap" ]
3441
3542[lints .rust .unexpected_cfgs ]
Original file line number Diff line number Diff line change @@ -59,13 +59,19 @@ pub fn exiting_panic(_info: &PanicInfo) -> ! {
5959 ledger_secure_sdk_sys:: exit_app ( 0 ) ;
6060}
6161
62- // re -export exit_app
62+ // Re -export exit_app
6363pub use ledger_secure_sdk_sys:: buttons;
6464pub use ledger_secure_sdk_sys:: exit_app;
6565
66- // re -export include_gif macro
66+ // Re -export include_gif macro
6767pub use include_gif:: include_gif;
6868
69+ // Re-export the underlying Ledger C SDK bindings when the `sys` feature is enabled.
70+ // This provides direct (unsafe) FFI access. Prefer the safe abstractions in this crate
71+ // when possible.
72+ #[ cfg( feature = "sys" ) ]
73+ pub use ledger_secure_sdk_sys as sys;
74+
6975use ledger_secure_sdk_sys:: { pic_rs, pic_rs_mut} ;
7076
7177/// Helper macro that sets an external panic handler
You can’t perform that action at this time.
0 commit comments