• Home
Name Date Size #Lines LOC

..--

collections/08-May-2024-157122

vec/08-May-2024-4,0121,635

README.mdD08-May-20241.4 KiB3425

alloc.rsD08-May-202415.6 KiB441245

borrow.rsD08-May-202413.6 KiB499260

boxed.rsD08-May-202464.2 KiB2,029829

lib.rsD08-May-20247.8 KiB245154

raw_vec.rsD08-May-202420.4 KiB528273

slice.rsD08-May-202442.6 KiB1,205597

README.md

1# `alloc`
2
3These source files come from the Rust standard library, hosted in
4the <https://github.com/rust-lang/rust> repository, licensed under
5"Apache-2.0 OR MIT" and adapted for kernel use. For copyright details,
6see <https://github.com/rust-lang/rust/blob/master/COPYRIGHT>.
7
8Please note that these files should be kept as close as possible to
9upstream. In general, only additions should be performed (e.g. new
10methods). Eventually, changes should make it into upstream so that,
11at some point, this fork can be dropped from the kernel tree.
12
13
14## Rationale
15
16On one hand, kernel folks wanted to keep `alloc` in-tree to have more
17freedom in both workflow and actual features if actually needed
18(e.g. receiver types if we ended up using them), which is reasonable.
19
20On the other hand, Rust folks wanted to keep `alloc` as close as
21upstream as possible and avoid as much divergence as possible, which
22is also reasonable.
23
24We agreed on a middle-ground: we would keep a subset of `alloc`
25in-tree that would be as small and as close as possible to upstream.
26Then, upstream can start adding the functions that we add to `alloc`
27etc., until we reach a point where the kernel already knows exactly
28what it needs in `alloc` and all the new methods are merged into
29upstream, so that we can drop `alloc` from the kernel tree and go back
30to using the upstream one.
31
32By doing this, the kernel can go a bit faster now, and Rust can
33slowly incorporate and discuss the changes as needed.
34