rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
To: "Enrico Weigelt, metux IT consult" <info@metux.net>
Cc: Willy Tarreau <w@1wt.eu>, Hans Verkuil <hverkuil@xs4all.nl>,
	Daniel Almeida <daniel.almeida@collabora.com>,
	wedsonaf@gmail.com, ojeda@kernel.org, mchehab@kernel.org,
	rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-media@vger.kernel.org, kernel@collabora.com
Subject: Re: [PATCH 0/6] Initial Rust V4L2 support
Date: Wed, 26 Apr 2023 18:05:06 +0200	[thread overview]
Message-ID: <CANiq72nnOGLA1bm8n=e9_NDozNUAWvs2ModigR1xu_Qij08Eiw@mail.gmail.com> (raw)
In-Reply-To: <0da49a77-14d8-cb9d-e36d-985699746b6b@metux.net>

On Wed, Apr 26, 2023 at 3:36 PM Enrico Weigelt, metux IT consult
<info@metux.net> wrote:
>
> The tricky question is: how much time will be needed ?

That depends on how fast Rust grows in the kernel itself, so I would
expect it will be a self-regulating feedback loop.

> Personally, I'm too overloaded for diving deeper into Rust anytime soon.

That is fine, one can always wait a bit more to see how things evolve.

Now, if somebody wants to use Rust in a subsystem you maintain, then
you can always consider letting them maintain that part. As I
mentioned above, that can be a quite nice approach to learn Rust on
the side and recruit new future maintainers/reviewers.

> Rust and golang share some common problems (when coming from traditional
> C + friends):
> * entirely different toolchain concept (workflows are very different
>    from what one's used from GCC + friends)

I am not sure what you mean, but `rustc` uses LLVM for codegen, and
`rustc_codegen_gcc` and GCC Rust are coming.

If you mean on the developer UX side, for the kernel at least, you
still call `make` as usual. Of course, some things differ here and
there, and there are still things to improve, but it is fairly usable
even at this stage.

We are also working on introducing some features that the C side does
not have yet. So there can be upsides on this regard, too.

> * fast-moving target (one has to be careful to expect/use the right
>    toolchain version)

This currently applies to the kernel, yes, because we require some
unstable features.

To be clear, this is something that we are working on solving,
precisely because we know it is not ideal. In any case, the decision
made was to go forward meanwhile that got solved, and it is not a
blocker for some users/companies.

> * rarely understood by traditional kernel devs

Not sure what you mean by this, but a few traditional kernel devs have
successfully picked up Rust already and are interested in increasing
their usage of it.

> * distro/build engine integration/support still pretty infant,

Most distros package Rust as explained above, which may be enough for
you depending on the distro you use.

> IMHO, before we can practically use Rust at greater scale in the kernel,
> the problems above need to be resolved first. And that's something that

That depends on the user/company/entity. For instance, some companies
and projects already want to use (or are using) Rust in the kernel,
because they control their toolchains.

> And beware: demanding newer toolchains (thus newer distros), just for
> building the kernel, can easily cause *huge* trouble many organisations,
> especially in embedded field. Linux is used in lots of highly safety
> critical environments that need special verification processes and so
> cannot easily upgrade toolchains. If Linux some day suddenly requires
> another language like Rust, those would be immediately cut-off from
> newer releases.

That is fine -- many companies and projects have different
requirements, and nobody expects everybody to enable Rust in their
kernel nor to make it a hard/unconditional requirement anytime soon
(if it ever happens).

> Ergo: the whole process of adding Rust to the Kernel needs to be done
> very, very carefully.

Indeed -- if you have particular concerns that you think have not been
addressed yet in the last 2+ years, please contact us.

> For the reasons above, the subsystems shouldn't take those decisions
> lightly, even if they happen to be Rust experts - this could have a
> dramatic effect on downstreams.

There is no effect on downstream, unless they drop support for what
they already have. But that is just like any other proposed removal.

> Maybe we should (for certain time) go a different path: move all new
> Rust stuff (except for bugfixes) to a separate downstream tree, that's
> rebased on mainline releases, but still let the patches fload through
> the corresponding subsystems.

That would not accomplish anything except making everything more
opaque, not to mention harder for downstream users who are waiting for
things to land.

Again, if you have particular concerns, please feel free to raise
them, but please note that most of this has been discussed for a long
time and decided upon.

Cheers,
Miguel

  parent reply	other threads:[~2023-04-26 16:05 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-06 21:56 [PATCH 0/6] Initial Rust V4L2 support Daniel Almeida
2023-04-06 21:56 ` [PATCH 1/6] rust: media: add the media module Daniel Almeida
2023-04-06 21:56 ` [PATCH 2/6] rust: media: add initial videodev2.h abstractions Daniel Almeida
2023-04-06 21:56 ` [PATCH 3/6] rust: sync: introduce FfiMutex Daniel Almeida
2023-04-06 21:56 ` [PATCH 4/6] rust: media: videobuf2: add a videobuf2 abstraction Daniel Almeida
2023-04-06 21:56 ` [PATCH 5/6] rust: media: add {video|v4l2}_device_register support Daniel Almeida
2023-04-06 21:56 ` [PATCH 6/6] rust: media: add v4l2 rust sample Daniel Almeida
2023-04-08 19:06 ` [PATCH 0/6] Initial Rust V4L2 support Daniel Almeida
2023-04-08 19:43 ` Hans Petter Selasky
2023-04-09 14:10   ` Daniel Almeida
2023-04-10 18:59     ` Hans Petter Selasky
2023-04-10 23:41       ` Miguel Ojeda
2023-04-11  9:52         ` Hans Petter Selasky
2023-04-11 12:36           ` Miguel Ojeda
2023-04-11 13:15             ` Hans Petter Selasky
2023-04-11 14:19               ` Miguel Ojeda
2023-04-11 15:33                 ` Hans Petter Selasky
2023-04-11 19:22                   ` Miguel Ojeda
2023-04-12 10:00                     ` Hans Petter Selasky
2023-04-12 10:13                       ` Greg KH
2023-04-12 10:23                         ` Hans Petter Selasky
2023-04-10 23:40     ` Miguel Ojeda
2023-04-26 14:31   ` Enrico Weigelt, metux IT consult
2023-04-10 22:46 ` Deborah Brouwer
2023-04-11 14:22   ` Miguel Ojeda
2023-04-12  2:58     ` Theodore Ts'o
2023-04-12 12:21       ` Miguel Ojeda
2023-04-12 12:38       ` Morten Linderud
2023-04-12 18:44       ` Nicolas Dufresne
     [not found]       ` <aae753d6-6874-4f91-e7ba-bd6c77f07b62@metux.net>
2023-04-26 15:33         ` Miguel Ojeda
2023-04-11  7:51 ` Hans Verkuil
2023-04-11 12:02   ` Miguel Ojeda
2023-04-11 12:49     ` Willy Tarreau
2023-04-11 14:01       ` Daniel Almeida
2023-04-11 14:13       ` Miguel Ojeda
2023-04-11 16:52         ` Willy Tarreau
2023-04-11 19:27           ` Miguel Ojeda
2023-04-11 20:26             ` Willy Tarreau
2023-04-11 22:14               ` Miguel Ojeda
     [not found]                 ` <0da49a77-14d8-cb9d-e36d-985699746b6b@metux.net>
2023-04-26 16:05                   ` Miguel Ojeda [this message]
2023-04-26  0:32     ` Laurent Pinchart
     [not found]       ` <57ec90ad-8535-fa7d-d6de-d5c1d06f37d3@metux.net>
2023-04-26 13:29         ` Laurent Pinchart
2023-04-26 16:18       ` Miguel Ojeda
2023-04-26 16:35         ` Laurent Pinchart
2023-04-26 17:14           ` Daniel Almeida
2023-04-26 17:25             ` Laurent Pinchart
2023-05-01 20:10               ` Nicolas Dufresne
2023-05-01 20:17                 ` Asahi Lina
2023-05-01 20:19                   ` Nicolas Dufresne
2023-05-02 19:13                   ` Miguel Ojeda
2023-05-03 11:00                     ` Daniel Almeida
2023-04-26 19:58           ` Sakari Ailus
2023-07-05  6:40 ` Hans Verkuil

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='CANiq72nnOGLA1bm8n=e9_NDozNUAWvs2ModigR1xu_Qij08Eiw@mail.gmail.com' \
    --to=miguel.ojeda.sandonis@gmail.com \
    --cc=daniel.almeida@collabora.com \
    --cc=hverkuil@xs4all.nl \
    --cc=info@metux.net \
    --cc=kernel@collabora.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=w@1wt.eu \
    --cc=wedsonaf@gmail.com \
    /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).