Third-party Rust in Chromium

1,038 views
Skip to first unread message

dan...@chromium.org

unread,
Nov 29, 2022, 3:19:23 PM11/29/22
to chromium-dev
Hi all,

I am happy to announce that Chromium is working toward stabilizing support for third-party Rust libraries in the Chromium project. We will be providing a Rust toolchain for all platforms supported by Chrome, in order to enable compiling Rust code into Chromium.

We will not be using Rust as a development language for Chromium at this time, nor accepting contributions to Chromium that are in Rust.

We have identified a need to include access to the Rust third-party ecosystem in the future, and we are working to enable that. We have published guidelines in our third-party documentation for what third-party libraries we will consider for inclusion in Chromium, with the high-level point being that it will need to demonstrate value for us that existing code in C++ does not.

For the near future, we will be working on stabilizing the toolchain and our tools to generate C++ headers from Rust so that these can be reliable and available across platforms, and enable it on our bots and developer machines. You will see us moving carefully to bring Rust toward our stable channel, but this will take us some time, so I would advise not planning to rely on any Rust within the next year.

We have a rust...@chromium.org mailing list available for any questions, in addition to chromi...@chromium.org.

Cheers,
Dana

Peter Kasting

unread,
Nov 29, 2022, 3:47:15 PM11/29/22
to dan...@chromium.org, chromium-dev
\o/ Thanks for the hard work to get this far!

On Tue, Nov 29, 2022 at 12:17 PM <dan...@chromium.org> wrote:
We will not be using Rust as a development language for Chromium at this time,

(For those not in the know, this IS being considered by The Right People, so no need to say that You Really Want It)

PK

Shezan Baig

unread,
Jun 20, 2023, 1:53:03 PM6/20/23
to dan...@chromium.org, chromium-dev
Hi, I noticed a new "third_party/rust-toolchain/" directory being created when syncing to m116.  This directory takes about 2G on disk.  Is there a timeline for when this toolchain will be needed to build `chrome`, or is it used mainly for tests right now?



--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAHtyhaQntFzhVTHa2U8Ynsp%3D-ZC5vX0Mxc0ZrUfOE-RSvbqn-g%40mail.gmail.com.

dan...@chromium.org

unread,
Jun 20, 2023, 2:56:54 PM6/20/23
to Shezan Baig, chromium-dev
It is used for Chrome on Linux and Android in Dev, and other platforms are coming soon.

Scott Violet

unread,
Jul 25, 2023, 5:38:46 PM7/25/23
to dan...@chromium.org, Shezan Baig, chromium-dev
I've noticed gclient sync taking a long time lately. This seems to be related to the rust toolchain being updated fairly regularly and being quite large. Are there switches (gn flags, env variables) that disable rust? No doubt at some point rust will be required, but wondering if it's possible to disable it in the short term and still build chrome?

Thanks,
 
 -Scott

David Bienvenu

unread,
Jul 25, 2023, 5:43:58 PM7/25/23
to s...@chromium.org, dan...@chromium.org, Shezan Baig, chromium-dev
I think there's a gn arg enable_rust = false, but I don't think that will help the gclient sync slowness.

Joe Mason

unread,
Jul 25, 2023, 6:48:53 PM7/25/23
to davidb...@chromium.org, s...@chromium.org, dan...@chromium.org, Shezan Baig, chromium-dev
There's also checkout_rust = false in .gclient. Not sure if that also sets enable_rust = false automatically.

Scott Violet

unread,
Jul 25, 2023, 6:49:28 PM7/25/23
to Joe Mason, davidb...@chromium.org, dan...@chromium.org, Shezan Baig, chromium-dev
Thanks, let me try those two.

  -Scott

Dana Jansens

unread,
Jul 26, 2023, 9:41:14 AM7/26/23
to Scott Violet, Joe Mason, davidb...@chromium.org, Shezan Baig, chromium-dev
Yep, those together would disable it. Sorry for the many updates recently, it will slow down to the same cadence as clang rolls soon.
Reply all
Reply to author
Forward
0 new messages