mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-07-08 07:38:11 +00:00

core: Remove dangling module decls
core: Use new Cargo feature resolver, use external MacOS debug info
core: Rust docs improvements
core: Upgrade bindgen
core: Add test target to Rust
ci: build rust sources
build(core): .ARM.exidx.text.__aeabi_ui2f in t1 firmware size
It's an unwind table for softfloat function inserted by rustc, probably
can be removed to save 8 bytes:
599c58db70/link.x.in (L175-L182)
scons: Remove dead code
core: Move Rust target to build/rust
core: Replace extern with a FFI version
core: Add some explanatory Rust comments
core: Use correct path for the Rust lib
core: Remove Buffer::as_mut()
Mutable buffer access needs MP_BUFFER_WRITE flag. TBD in the Protobuf PR.
core: Improve docs for micropython::Buffer
core: Minor Rust docs changes
core: Rewrite trezor_obj_get_ll_checked
core: Fix incorrect doc comment
core: Remove cc from deps
fixup! core: Rewrite trezor_obj_get_ll_checked
core: update safety comments
25 lines
520 B
Rust
25 lines
520 B
Rust
use cstr_core::CStr;
|
|
|
|
extern "C" {
|
|
// trezorhal/common.c
|
|
fn __fatal_error(
|
|
expr: *const cty::c_char,
|
|
msg: *const cty::c_char,
|
|
file: *const cty::c_char,
|
|
line: i32,
|
|
func: *const cty::c_char,
|
|
) -> !;
|
|
}
|
|
|
|
pub fn fatal_error(expr: &CStr, msg: &CStr, file: &CStr, line: i32, func: &CStr) -> ! {
|
|
unsafe {
|
|
__fatal_error(
|
|
expr.as_ptr(),
|
|
msg.as_ptr(),
|
|
file.as_ptr(),
|
|
line,
|
|
func.as_ptr(),
|
|
);
|
|
}
|
|
}
|