Skip to content

Commit 6027745

Browse files
committed
Add "Out-of-tree modules" page
In a recent discussion around a networking submission, it seemed that some extra clarifications about out-of-tree modules could be useful for developers looking to develop Rust code for the kernel [1]. Thus add an "Out-of-tree modules" page to clarify the focus of the Rust for Linux project, what is intended to be supported around out-of-tree code and what kinds of patches make sense to submit to the kernel mailing list. Importantly, add links to other pages from the mainline kernel documentation. Link: https://rust-for-linux.zulipchat.com/#narrow/stream/396592-Networking/topic/NAPI.20Abstractions/near/385885376 [1] Signed-off-by: Miguel Ojeda <[email protected]>
1 parent d291fd7 commit 6027745

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
- [Unstable features](Unstable-features.md)
1010
- [Backporting and stable/LTS releases](Backporting-and-stable-LTS-releases.md)
1111
- [Third-party crates](Third-party-crates.md)
12+
- [Out-of-tree modules](Out-of-tree-modules.md)
1213
- [Industry and academia support](Industry-and-academia-support.md)
1314
- [Sponsors](Sponsors.md)
1415

src/Out-of-tree-modules.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Out-of-tree modules
2+
3+
The Linux kernel supports [building out-of-tree modules](https://docs.kernel.org/kbuild/modules.html). Both C and Rust modules can be developed as out-of-tree ones, and we provide a [basic template](https://github.com/Rust-for-Linux/rust-out-of-tree-module) for an out-of-tree Linux kernel module written in Rust.
4+
5+
However, please note that the Rust for Linux project is part of the kernel and has always focused its efforts towards getting code into the mainline kernel.
6+
7+
In particular, this means that Rust [internal APIs can be changed at any time](https://docs.kernel.org/process/4.Coding.html#internal-api-changes), just like C ones, when the need arises. Similarly, code present at any point in our different [branches](Branches.md) is not intended to form a stable base for out-of-tree development.
8+
9+
In addition, patches submitted to the mailing list should generally focus on in-tree development efforts. In particular, Rust abstractions submitted upstream require in-tree users. Abstractions intended for out-of-tree users cannot be merged. Even if those abstractions may be obviously useful for future in-tree users, there needs to be an agreed upon in-tree user.
10+
11+
For these reasons and others, please consider [submitting](Contributing.md) your use cases upstream — see [the importance of getting code into the mainline](https://docs.kernel.org/process/1.Intro.html#the-importance-of-getting-code-into-the-mainline).
12+
13+
Having said that, we understand that some module development is done out-of-tree and may not be possible to upstream. Even in those cases, if your company, organization or team has a use case for Rust, please [contact us](Contact.md), since it is important to highlight those use cases early on in order to showcase the [interest from industry and academia](Industry-and-academia-support.md) in Rust.

0 commit comments

Comments
 (0)