
Test Rust Kernel Code With KUnit and Rust Doctests
Run the Rust doctests of the kernel crate and write your own kunit_tests suite on Linux 6.18, with kunit.py, KTAP output and the limits of each test kind.
Everything you need to level up your coding skills.

Run the Rust doctests of the kernel crate and write your own kunit_tests suite on Linux 6.18, with kunit.py, KTAP output and the limits of each test kind.

Stop passing raw i32 descriptors around. Use OwnedFd to close on drop and BorrowedFd to lend a descriptor safely, with the AsFd trait, since Rust 1.63.

Compare one Linux 6.18 module in C and Rust for safety, error handling, build cost and API coverage, then pick the language for your next kernel module.

Call arm_fir_q15 and arm_biquad_cascade_df1_q31 from CMSIS-DSP to filter fixed-point samples on a Cortex-M, with correct state sizes, scaling and block layout.

Write, build and load a first Rust kernel module in a Linux 6.18 tree: the module! macro, init and Drop, KVec, Kconfig and Makefile entries and dmesg output.

Use the nix crate to call POSIX functions like pipe, fork, waitpid and kill from Rust with typed arguments, Result errors and no raw unsafe libc calls.

Install the Rust toolchain, bindgen and libclang, check them with make rustavailable, enable CONFIG_RUST in a Linux 6.18 tree and build the Rust samples.

Widen before you multiply, shift with rounding, pre-scale before you divide, and saturate the result. Q15 and Q16.16 routines in portable C that never overflow.

What changes when you write Rust for the Linux 6.18 kernel: no std, fallible allocation, errno Results, panics that act like BUG, and no main function.

Match on io::ErrorKind to handle NotFound, PermissionDenied and read-only filesystems from Rust std::fs, and use File::try_lock to detect a locked file.

What Rust for Linux is, what the 6.18 kernel actually contains, why the project adopted it as an experiment, and how abstractions keep unsafe code in one place.

Use nrfx drivers directly on an nRF52 in the nRF Connect SDK: enable the nrfx timer, connect its interrupt and run a periodic callback without Zephyr drivers.
We send one email when a new post is published. No spam.