Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

Linux is still primarily a C codebase, but Rust can be used for selected kernel components when the kernel version, configuration, toolchain, and available Rust abstractions support them. Rust is an addition to the kernel—not a rewrite of it—and it does not mean every driver or subsystem can be written in Rust.

Is Linux written in Rust?

No. The Linux kernel documentation describes the kernel as written in C, typically compiled as GNU C11. Rust support is an optional part of the build, enabled through CONFIG_RUST when the necessary requirements are met. The support was merged into mainline in Linux v6.1 to assess whether Rust was suitable for kernel use, not to replace C.

The practical boundary is between the existing C-based kernel and selected Rust code that can use the kernel’s Rust abstractions and interfaces. That makes Rust a choice for supported work, not a universal language option across the kernel.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What does CONFIG_RUST do?

CONFIG_RUST controls whether Rust support is enabled in a kernel build. The option becomes available only when the build environment has a suitable Rust toolchain and satisfies the other requirements described by the target kernel tree.

Kernel Rust is not simply ordinary application Rust compiled against a kernel. It relies on kernel-specific abstractions and build integration to let Rust components interact with kernel facilities. Most kernel Rust use is intended to go through abstractions in the kernel crate; only a minimal set of features is permitted elsewhere, such as in drivers.

Can you write Linux kernel drivers in Rust?

Yes, for components where the kernel provides the needed support. Rust for Linux lists in-tree examples such as the Android Binder driver, the Nova GPU driver, and the Null Block driver. These examples show that Rust code is present in mainline; they do not establish that every driver, subsystem, or hardware configuration supports Rust.

Before choosing Rust for a component, check whether its subsystem APIs and abstractions are available to Rust in the kernel version you intend to target. If they are not, the language alone does not provide a path around that integration work.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What are the build and language limits?

Toolchains and configuration

The kernel’s Rust quick-start describes a complete LLVM toolchain as the best-supported setup. GCC can build some configurations, but the documentation characterizes that support as experimental. Exact requirements can change between kernel versions, so consult the quick-start for the tree you plan to build rather than relying on a version number copied from another release.

Edition 2021 and unstable features

The kernel compiles Rust code as Edition 2021, but that does not mean it uses only stable Rust language features. The project also uses some unstable features, for which Rust does not promise compatibility. That status does not by itself mean a feature is broken; it does mean kernel developers must account for changes and maintain compatibility as the toolchain evolves.

The Rust for Linux project says removing the need for unstable features is a priority. Until that work is complete, building and maintaining kernel Rust requires attention to the specific compiler and kernel tree in use.

Is Rust in the Linux kernel production ready?

That depends on what “production ready” means for the particular kernel, configuration, and component. The v6.17 kernel Rust overview says the support is primarily intended for kernel developers and maintainers working on abstractions, drivers, infrastructure, and tools. It also cautions end users about production readiness and notes that some configurations remain experimental.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Selected Rust components being in mainline is not the same as every Rust-enabled configuration being suitable for every production deployment. For an end-user system, follow the support and release guidance for the specific kernel distribution or device rather than assuming that the presence of Rust support guarantees a supported setup.

Why does the Linux kernel still use C?

The kernel already has extensive C code, infrastructure, and interfaces. Rust support is being added selectively, where maintainers can provide the necessary abstractions and support the language boundary. Whether a new component should use C or Rust therefore depends on subsystem integration, build support, maintenance capacity, and project fit—not on a blanket claim that one language should replace the other.

The Rust Project’s 2026 roadmap includes the goal of building Linux kernel releases using stable language features and supporting Linux targets. That is an active direction, not evidence that all current kernel Rust code already uses only stable features or that C is being phased out.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

How to get started with kernel Rust

  1. Choose the kernel source tree and version you want to build against; Rust support and requirements can differ by version and configuration.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  2. Read that tree’s Rust quick-start guide and confirm that your Rust and LLVM toolchains meet its requirements.

  3. Configure the kernel and check whether CONFIG_RUST is available. If it is missing, review the documented requirements rather than assuming the option is supported by your current setup.

  4. For development, consult the kernel’s v6.17 Rust overview, the kernel programming-language documentation, and the Rust for Linux project for the current scope and examples.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.