doc: explain how to enable Rust support in the Linux kernel

This commit is contained in:
Julian Stecklina 2023-11-30 17:03:09 +01:00 committed by Alyssa Ross
parent d1f33201ef
commit ec2016dda4
No known key found for this signature in database
GPG Key ID: F9DBED4859B271C0

View File

@ -92,6 +92,24 @@ To use your custom kernel package in your NixOS configuration, set
boot.kernelPackages = pkgs.linuxPackagesFor yourCustomKernel;
```
## Rust
The Linux kernel does not have Rust language support enabled by
default. For kernel versions 6.7 or newer, experimental Rust support
can be enabled. In a NixOS configuration, set:
```nix
boot.kernelPatches = [
{
name = "Rust Support";
patch = null;
features = {
rust = true;
};
}
];
```
## Developing kernel modules {#sec-linux-config-developing-modules}
This section was moved to the [Nixpkgs manual](https://nixos.org/nixpkgs/manual#sec-linux-kernel-developing-modules).