From 3d3c6631bee239d6e662d2971d8bc7c149092664 Mon Sep 17 00:00:00 2001 From: Erik Gilling Date: Tue, 14 Jan 2025 11:20:55 -0800 Subject: [PATCH] pw_toolchain: Add cargo to Rust toolchains MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is needed for using `rules_rust`'s `crate_universe` with Pigweed's Rust toolchains. Change-Id: I6f4fdc4bcf717f09dfe501687bd9ab6376e6340b Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/255062 Docs-Not-Needed: Erik Gilling Presubmit-Verified: CQ Bot Account Lint: Lint 🤖 Commit-Queue: Erik Gilling Reviewed-by: Armando Montanez --- MODULE.bazel.lock | 2 +- pw_toolchain/rust/templates.bzl | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/MODULE.bazel.lock b/MODULE.bazel.lock index 014090647..5b6cfc38d 100644 --- a/MODULE.bazel.lock +++ b/MODULE.bazel.lock @@ -273,7 +273,7 @@ }, "//pw_toolchain/rust:extensions.bzl%pw_rust": { "general": { - "bzlTransitiveDigest": "T4HdHZtj2hEBoQHaKEGv74TL5VgYo7Z17SWRKdiogcA=", + "bzlTransitiveDigest": "4l8tJ6rj4REBLfWVzs/9a1cHvgy9jpe5Dsdo7M7vMpQ=", "usagesDigest": "ZCWx/ZUYXarFY7CNN/qL1hd92QBqHLchbkND9INrOeY=", "recordedFileInputs": {}, "recordedDirentsInputs": {}, diff --git a/pw_toolchain/rust/templates.bzl b/pw_toolchain/rust/templates.bzl index bf9239990..a798db4c8 100644 --- a/pw_toolchain/rust/templates.bzl +++ b/pw_toolchain/rust/templates.bzl @@ -17,6 +17,7 @@ _rust_toolchain_template = """\ rust_toolchain( name = "{name}_rust_toolchain", binary_ext = "", + cargo = "{toolchain_repo}//:bin/cargo", clippy_driver = "{toolchain_repo}//:bin/clippy-driver", default_edition = "2021", dylib_ext = "{dylib_ext}",