lkml.org 
[lkml]   [2022]   [Mar]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v5 06/20] rust: add `alloc` crate
    On Thu, Mar 17, 2022 at 07:09:54PM +0100, Miguel Ojeda wrote:
    > This crate is a subset of the Rust standard library `alloc`, with some
    > additions on top.
    >
    > This is needed because upstream support for fallible allocations
    > is a work in progress (i.e. the `try_*` versions of methods which
    > return a `Result` instead of panicking).
    >
    > Having the library in-tree also gives us a bit more freedom to
    > experiment with new interfaces and allows us to iterate quickly.
    >
    > Eventually, the goal is to have everything the kernel needs in
    > upstream `alloc` and drop it from the kernel tree.
    >
    > Co-developed-by: Alex Gaynor <alex.gaynor@gmail.com>
    > Signed-off-by: Alex Gaynor <alex.gaynor@gmail.com>
    > Co-developed-by: Wedson Almeida Filho <wedsonaf@google.com>
    > Signed-off-by: Wedson Almeida Filho <wedsonaf@google.com>
    > Co-developed-by: Gary Guo <gary@garyguo.net>
    > Signed-off-by: Gary Guo <gary@garyguo.net>
    > Co-developed-by: Matthew Bakhtiari <dev@mtbk.me>
    > Signed-off-by: Matthew Bakhtiari <dev@mtbk.me>
    > Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
    > ---
    > rust/alloc/README.md | 32 +
    > rust/alloc/alloc.rs | 440 ++++
    > rust/alloc/borrow.rs | 498 +++++
    > rust/alloc/boxed.rs | 2008 +++++++++++++++++
    > rust/alloc/collections/mod.rs | 156 ++
    > rust/alloc/fmt.rs | 601 ++++++
    > rust/alloc/lib.rs | 231 ++
    > rust/alloc/macros.rs | 126 ++
    > rust/alloc/raw_vec.rs | 561 +++++
    > rust/alloc/slice.rs | 1279 +++++++++++
    > rust/alloc/str.rs | 632 ++++++
    > rust/alloc/string.rs | 2862 ++++++++++++++++++++++++
    > rust/alloc/vec/drain.rs | 186 ++
    > rust/alloc/vec/drain_filter.rs | 145 ++
    > rust/alloc/vec/into_iter.rs | 356 +++
    > rust/alloc/vec/is_zero.rs | 106 +
    > rust/alloc/vec/mod.rs | 3353 +++++++++++++++++++++++++++++
    > rust/alloc/vec/partial_eq.rs | 49 +
    > rust/alloc/vec/set_len_on_drop.rs | 30 +
    > rust/alloc/vec/spec_extend.rs | 174 ++
    > 20 files changed, 13825 insertions(+)


    This is a huge patch. Why not break it into 2, one that adds what is
    upstream, and then the second adds the "stuff on top" that you need for
    the kernel. Otherwise it's hard to know what is, and is not, upstream
    for us to be able to review from a kernel point of view.

    I think you are trying to do this with the "kernel" keyword, but if so,
    why are you picking a "since" of 1.0? None of that is described in the
    changelog :(

    thanks,

    greg k-h

    \
     
     \ /
      Last update: 2022-03-31 14:43    [W:3.864 / U:0.104 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site