rust: import upstream `alloc` crate
maillist inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I5J75G CVE: NA Reference: https://lore.kernel.org/rust-for-linux/CANiq72nDcJLSB3pLhkdqGdLitfmqqCUVVfkY5EjP9AcwVv9B4A@mail.gmail.com/T/#t -------------------------------- This is a subset of the Rust standard library `alloc` crate, version 1.60.0, licensed under "Apache-2.0 OR MIT", from: https://github.com/rust-lang/rust/tree/1.60.0/library/alloc/src The files are copied as-is, with no modifications whatsoever (not even adding the SPDX identifiers). For copyright details, please see: https://github.com/rust-lang/rust/blob/1.60.0/COPYRIGHT The next patch modifies these files as needed for use within the kernel. This patch split allows reviewers to double-check the import and to clearly see the differences introduced. Vendoring `alloc`, at least for the moment, allows us to have fallible allocations support (i.e. the `try_*` versions of methods which return a `Result` instead of panicking) early on. It also gives a bit more freedom to experiment with new interfaces and to iterate quickly. Eventually, the goal is to have everything the kernel needs in upstream `alloc` and drop it from the kernel tree. For a summary of work on `alloc` happening upstream, please see: https://github.com/Rust-for-Linux/linux/issues/408Reviewed-by: NKees Cook <keescook@chromium.org> Co-developed-by: NAlex Gaynor <alex.gaynor@gmail.com> Signed-off-by: NAlex Gaynor <alex.gaynor@gmail.com> Co-developed-by: NWedson Almeida Filho <wedsonaf@google.com> Signed-off-by: NWedson Almeida Filho <wedsonaf@google.com> Signed-off-by: NMiguel Ojeda <ojeda@kernel.org> Signed-off-by: NWeilong Chen <chenweilong@huawei.com>
Showing
rust/alloc/alloc.rs
0 → 100644
rust/alloc/borrow.rs
0 → 100644
rust/alloc/boxed.rs
0 → 100644
此差异已折叠。
rust/alloc/collections/mod.rs
0 → 100644
rust/alloc/fmt.rs
0 → 100644
此差异已折叠。
rust/alloc/lib.rs
0 → 100644
rust/alloc/macros.rs
0 → 100644
rust/alloc/raw_vec.rs
0 → 100644
此差异已折叠。
rust/alloc/slice.rs
0 → 100644
此差异已折叠。
rust/alloc/str.rs
0 → 100644
此差异已折叠。
rust/alloc/string.rs
0 → 100644
此差异已折叠。
rust/alloc/vec/drain.rs
0 → 100644
rust/alloc/vec/drain_filter.rs
0 → 100644
rust/alloc/vec/into_iter.rs
0 → 100644
此差异已折叠。
rust/alloc/vec/is_zero.rs
0 → 100644
rust/alloc/vec/mod.rs
0 → 100644
此差异已折叠。
rust/alloc/vec/partial_eq.rs
0 → 100644
此差异已折叠。
rust/alloc/vec/set_len_on_drop.rs
0 → 100644
此差异已折叠。
rust/alloc/vec/spec_extend.rs
0 → 100644
此差异已折叠。
想要评论请 注册 或 登录