A little kernel driver example written in rust.
You will need:
rustupto download the latest nightly rust toolchainlinux-headersfor the kernel headersllvm(which should come with rust i think) andclang
just build with
make
and you will get a hellokernel.ko directly on the root of the project.
the insert the module (must have root privileges):
insmod hellokernel.ko
and see the messages with:
dmesg
or, to get the messages in real time:
dmesg -W
Mostly inspired from the linux-kernel-module-rust repo, which gives a lot of informations, but is no longer working.