All of lore.kernel.org
 help / color / mirror / Atom feed
* Considering first class integration for Cargo
@ 2023-11-06  9:55 Steve Fan
  2023-11-06 10:02 ` Greg KH
  2023-11-06 10:05 ` Miguel Ojeda
  0 siblings, 2 replies; 4+ messages in thread
From: Steve Fan @ 2023-11-06  9:55 UTC (permalink / raw)
  To: rust-for-linux

Hello all,

Please consider supporting Cargo for pulling in external crates, as I
got some no-std based data structure crates on crates.io.

The idea is that we can separate the kernel part with the core
algorithm/data structure part such as declaring filesystem structure
and use nom for binary parsers to virtualize the read source (for
example read from block device).

Someone has a WIP integration for this:
https://github.com/Rust-for-Linux/linux/issues/865#issuecomment-1214148291

I tried upgrading it to the latest kernel but failed. Linker issues
are nasty and b*tchy.

It is such a PITA to copy all the needed crates and mark them as
`extern crate`...

In the future we can also use Cargo.toml to check for GPL compliance.
There's a license field in Cargo.toml so that we don't have to add a
huge GPL header every time.

Stefan

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Considering first class integration for Cargo
  2023-11-06  9:55 Considering first class integration for Cargo Steve Fan
@ 2023-11-06 10:02 ` Greg KH
  2023-11-06 10:05 ` Miguel Ojeda
  1 sibling, 0 replies; 4+ messages in thread
From: Greg KH @ 2023-11-06 10:02 UTC (permalink / raw)
  To: Steve Fan; +Cc: rust-for-linux

On Mon, Nov 06, 2023 at 05:55:50PM +0800, Steve Fan wrote:
> Hello all,
> 
> Please consider supporting Cargo for pulling in external crates, as I
> got some no-std based data structure crates on crates.io.

What data structures do you need in the kernel that are not already
provided?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Considering first class integration for Cargo
  2023-11-06  9:55 Considering first class integration for Cargo Steve Fan
  2023-11-06 10:02 ` Greg KH
@ 2023-11-06 10:05 ` Miguel Ojeda
       [not found]   ` <CAM0aA4Og0NC-OmrKNHcnE5HyVnoMWFXj1qXar+MbW-1F2c1=bQ@mail.gmail.com>
  1 sibling, 1 reply; 4+ messages in thread
From: Miguel Ojeda @ 2023-11-06 10:05 UTC (permalink / raw)
  To: Steve Fan; +Cc: rust-for-linux

Hi Steve,

On Mon, Nov 6, 2023 at 10:56 AM Steve Fan <stevefan1999@gmail.com> wrote:
>
> Please consider supporting Cargo for pulling in external crates, as I
> got some no-std based data structure crates on crates.io.

Please see https://rust-for-linux.com/third-party-crates.

> In the future we can also use Cargo.toml to check for GPL compliance.
> There's a license field in Cargo.toml so that we don't have to add a
> huge GPL header every time.

Which "huge GPL header" are you referring to? We do not have those in
Rust kernel code, unless you are referring to the SPDX License
Identifier.

Cheers,
Miguel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Considering first class integration for Cargo
       [not found]     ` <CAM0aA4Mby7oy1vqgicFvMGvKmfo+Y50NTgBCCAg8eb+ytEmtDQ@mail.gmail.com>
@ 2023-11-06 12:39       ` Miguel Ojeda
  0 siblings, 0 replies; 4+ messages in thread
From: Miguel Ojeda @ 2023-11-06 12:39 UTC (permalink / raw)
  To: Steve Fan; +Cc: rust-for-linux

On Mon, Nov 6, 2023 at 11:33 AM Steve Fan <stevefan1999@gmail.com> wrote:
>
> Oh I think I have to insert the GPL headers in every source file? Just SPDX is fine? I'm just getting started with Rust in Linux so I'm not sure about the license rules here.

Please see https://docs.kernel.org/process/license-rules.html.

> I was thinking if I have a Cargo.toml to mark everything as GPL so the SPDX info is redundant anyway.

It would at least require changing the current tooling and rules ("The
Linux kernel requires the precise SPDX identifier in all source
files."), i.e. it would make those files an exceptional case.

In any case, even if we could do something like that, it is orthogonal to Cargo.

By the way, please take a look at
https://subspace.kernel.org/etiquette.html and
https://rust-for-linux.com/contact. Thanks!

Cheers,
Miguel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-11-06 12:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-06  9:55 Considering first class integration for Cargo Steve Fan
2023-11-06 10:02 ` Greg KH
2023-11-06 10:05 ` Miguel Ojeda
     [not found]   ` <CAM0aA4Og0NC-OmrKNHcnE5HyVnoMWFXj1qXar+MbW-1F2c1=bQ@mail.gmail.com>
     [not found]     ` <CAM0aA4Mby7oy1vqgicFvMGvKmfo+Y50NTgBCCAg8eb+ytEmtDQ@mail.gmail.com>
2023-11-06 12:39       ` Miguel Ojeda

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.