fishinabarrel / linux-kernel-module-rust

Framework for writing Linux kernel modules in safe Rust
GNU General Public License v2.0
1.33k stars 119 forks source link

Unpin bindgen and use `--size_t-is-usize` #235

Closed geofft closed 4 years ago

geofft commented 4 years ago

Add an assertion that doing so is safe. See rust-lang/rust-bindgen#1671

Can't use static_assert from <linux/build_bug.h> because that's 5.1+-only, but the underlying _Static_assert compiler builtin is available widely. See torvalds/linux@6bab69c65013bed5fce9f101a64a84d0385b3946