rust: adapt `alloc` crate to the kernel
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 customizes the subset of the Rust standard library `alloc` that was just imported as-is, mainly by: - Adding SPDX license identifiers. - Skipping `rc` and `sync` modules via new `cfg`s. - Skipping the `vec!` macro. - Addding fallible (`try_*`) versions of existing infallible methods (i.e. returning a `Result` instead of panicking). Since the standard library requires stable/unstable attributes, these additions are annotated with: #[stable(feature = "kernel", since = "1.0.0")] Using "kernel" as the feature allows to have the additions clearly marked. The "1.0.0" version is just a placeholder. 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> Co-developed-by: NGary Guo <gary@garyguo.net> Signed-off-by: NGary Guo <gary@garyguo.net> Co-developed-by: NMatthew Bakhtiari <dev@mtbk.me> Signed-off-by: NMatthew Bakhtiari <dev@mtbk.me> Signed-off-by: NMiguel Ojeda <ojeda@kernel.org> Signed-off-by: NWeilong Chen <chenweilong@huawei.com>
Showing
rust/alloc/README.md
0 → 100644
想要评论请 注册 或 登录