Thanks to visit codestin.com
Credit goes to github.com

Skip to content

0lxb/linux-kernel-module-rust

 
 

Repository files navigation

Linux kernel modules in safe Rust

  1. Install cargo-xbuild and the rust-src rustup component:
cargo install cargo-xbuild
rustup component add --toolchain=nightly rust-src
  1. cd to one of the examples
cd hello-world
  1. Build the static object with cargo xbuild, pointing it at our custom target
cargo xbuild --target $(pwd)/../x86_64-linux-kernel-module.json
  1. Build the kernel module using the Linux kernel build system (kbuild)
make
  1. Load and unload the module!
sudo insmod helloworld.ko
sudo rmmod helloworld
dmesg | tail

About

Framework for writing Linux kernel modules in safe Rust

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Rust 94.6%
  • Makefile 2.1%
  • Python 2.1%
  • C 1.2%