rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Chris Suter <chris@sutes.me>
Cc: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>,
	Geert Stappers <stappers@stappers.nl>,
	rust-for-linux <rust-for-linux@vger.kernel.org>
Subject: Re: Fwd: Adding crates
Date: Wed, 30 Mar 2022 06:31:28 +0200	[thread overview]
Message-ID: <YkPdIMowqBsJORiK@kroah.com> (raw)
In-Reply-To: <CAKfU0DJ1AqR4cy4=706qRGESozHii9dPL5BYQV047cZkyn3RzA@mail.gmail.com>

On Wed, Mar 30, 2022 at 11:03:50AM +1100, Chris Suter wrote:
> Hi Miguel,
> 
> On Wed, Mar 30, 2022 at 2:47 AM Miguel Ojeda
> <miguel.ojeda.sandonis@gmail.com> wrote:
> >
> > On Tue, Mar 29, 2022 at 9:49 AM Chris Suter <chris@sutes.me> wrote:
> > >
> > > I'm interested in quite a few crates but the first and perhaps most
> > > significant would be futures. I'm not necessarily looking for a
> > > "generic" solution at this point, any solution would do — just enough
> > > to help me make a little progress and then maybe I could contribute
> > > back later. I can probably figure it out myself, but I was hoping to
> > > save some time.
> >
> > If you are just looking to experiment with some third-party crates,
> > then as mentioned in the other thread, what you could do is copy and
> > adapt the code. For instance, if the crates you need do not use Cargo
> > build scripts, this may be as simple as copying the sources of the
> > Rust modules into your kernel module (which is a crate), so that you
> > do not need to deal with build systems.
> 
> I'm working with an existing code base and there are quite a few
> crates I need to bring in or find replacements for. I'm hoping to
> minimise or isolate the changes I need to make to the existing code
> base. Obviously, some changes are going to be unavoidable.

What type of existing Rust codebase should be ported to be inside the
kernel?

> > But if you are looking to do something else, then please note there is
> > no plan to add support for building/linking against third-party
> > crates. This is why we ask what crates would be useful and why -- so
> > that we can consider adding similar facilities to the kernel (possibly
> > importing those third-party crates).
> 
> Like I said, I'm interested in futures. Why it's useful: async Rust is
> arguably more common and easier to use than other forms of
> multi-threaded processing. Other crates that I'd like: anyhow,
> bincode, byteorder, log, once_cell, pin-project, rand, serde, slab,
> static_assertions, uuid plus some more esoteric ones.

Almost none of those make sense when you are writing kernel code.  Are
you sure you want all of this within the kernel itself?

What does this codebase do?  Have a link to it anywhere?

thanks,

greg k-h

  reply	other threads:[~2022-03-30  4:31 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAKfU0DKvQYjhgiKN83+DZW3CQOkSEdQcy9nXUfFLVn1Uju6GkQ@mail.gmail.com>
2022-03-28  0:41 ` Fwd: Adding crates Chris Suter
2022-03-28  5:41   ` Geert Stappers
2022-03-28 21:38     ` Chris Suter
2022-03-29  5:23       ` Greg KH
2022-03-29  6:02         ` Chris Suter
2022-03-29 15:47           ` Miguel Ojeda
2022-03-30  0:03             ` Chris Suter
2022-03-30  4:31               ` Greg KH [this message]
2022-03-30 20:43                 ` Kent Overstreet
2022-04-15 13:31                   ` James Bottomley
2022-04-15 20:39                     ` Kent Overstreet
2022-04-16  3:27                       ` James Bottomley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YkPdIMowqBsJORiK@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=chris@sutes.me \
    --cc=miguel.ojeda.sandonis@gmail.com \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=stappers@stappers.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).