Handle Panics When Crossing FFI Boundaries

id: ffi-04 original_id: P.UNS.FFI.04 level: P impact: CRITICAL clippy: panic_in_result_fn Handle Panics When Crossing FFI Boundaries Summary Panics must not unwind across FFI boundaries. Use catch_unw
阅读全文

Do Not Blindly Use Unsafe for Performance

id: general-02 original_id: P.UNS.02 level: P impact: CRITICAL Do Not Blindly Use Unsafe for Performance Summary Do not assume that using unsafe will automatically improve performance. Always measure
阅读全文

Use Third-Party Crates for Bitfields

id: mem-05 original_id: P.UNS.MEM.05 level: P impact: MEDIUM Use Third-Party Crates for Bitfields Summary Use crates like bitflags, bitvec, or modular-bitfield instead of manual bit manipulation for c
阅读全文

Use Portable Type Aliases from std or libc

id: ffi-05 original_id: P.UNS.FFI.05 level: P impact: HIGH Use Portable Type Aliases from std or libc Summary Use type aliases from std::os::raw or the libc crate for C-compatible types. Don't assume
阅读全文