]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
rust: add num module and Integer trait
authorAlexandre Courbot <acourbot@nvidia.com>
Sat, 8 Nov 2025 02:23:47 +0000 (11:23 +0900)
committerMiguel Ojeda <ojeda@kernel.org>
Mon, 17 Nov 2025 21:56:23 +0000 (22:56 +0100)
commit90f3df4fdfb682e2394ee3f97dfe91a402d5c46a
tree6a04624bc5304c6661990eea1dfa8ae79e36ffa0
parente5d330e13f67d574f683c052c9a342814fd8fa39
rust: add num module and Integer trait

Introduce the `num` module, which will provide numerical extensions and
utilities for the kernel.

For now, introduce the `Integer` trait, which is implemented for all
primitive integer types to provides their core properties to generic
code.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Link: https://patch.msgid.link/20251108-bounded_ints-v4-1-c9342ac7ebd1@nvidia.com
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
rust/kernel/lib.rs
rust/kernel/num.rs [new file with mode: 0644]