Skip to content

Ffi practice problems in Rust

Difficulty:
Category:
Tag:

Showing 12 of 12

Status Title Difficulty
A macro-generated FFI binding layer Hard
Calling C from Rust: libc is already linked Medium
C strings, ownership across the boundary, and FFI-safe types Medium
Designing safe wrappers around unsafe FFI Hard
Discriminants, #[repr(u8)], as casts and mem::discriminant Medium
Edition 2024: unsafe extern blocks and safe declarations Medium
Edition 2024: #[unsafe(no_mangle)] and calling Rust from C in one file Hard
Nullable pointer optimization, callbacks and qsort Hard
Opaque pointers, variadics, and the FFI hazard catalogue Hard
repr(C): computing struct layout by hand Medium
repr(Rust) reorders your fields — and that's the point Medium
The other reprs: transparent, packed, align, integer enums Hard