Crate kernel

source ·
Expand description

The kernel crate.

This crate contains the kernel APIs that have been ported or wrapped for usage by Rust code in the kernel and is shared by all of them.

In other words, all the rest of the Rust code in the kernel (e.g. kernel modules written in Rust) depends on core, alloc and this crate.

If you need a kernel C API that is not ported or wrapped yet here, then do so first instead of bypassing this crate.

Re-exports§

Modules§

  • Extensions to the alloc crate.
  • Types for working with the block layer.
  • Generic devices that are part of the kernel’s driver model.
  • Kernel errors.
  • Firmware abstraction
  • API to safely and fallibly initialize pinned structs using in-place constructors.
  • ioctl() number definitions.
  • KUnit-based macros for Rust unit tests.
  • A linked list implementation.
  • Networking.
  • Kernel page allocation and management.
  • The kernel prelude.
  • Printing facilities.
  • Red-black trees.
  • Commonly used sizes.
  • String representations.
  • Synchronisation primitives.
  • Tasks (threads and processes).
  • Time related primitives.
  • Kernel types.
  • Slices to user space memory regions.
  • Work queues.

Macros§

Structs§

Traits§

  • The top level entrypoint to implementing a kernel module.