[Concept,02/14] docker: Provide a rust toolchain

Message ID 20250911214425.3687188-3-sjg@u-boot.org
State New
Headers
Series ulib: Add support for Rust main programs |

Commit Message

Simon Glass Sept. 11, 2025, 9:44 p.m. UTC
  From: Simon Glass <sjg@chromium.org>

Install a Rust toolchain in the CI image so that it is possible to build
the Rust examples.

Co-developed-by: Claude <noreply@anthropic.com>
Co-developed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
---

 tools/docker/Dockerfile | 4 ++++
 1 file changed, 4 insertions(+)
  

Patch

diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile
index 38e1f3a941d..ba98a293e4b 100644
--- a/tools/docker/Dockerfile
+++ b/tools/docker/Dockerfile
@@ -313,6 +313,10 @@  RUN echo uboot ALL=NOPASSWD: ALL > /etc/sudoers.d/uboot
 RUN useradd -m -U uboot
 USER uboot:uboot
 
+# Install Rust toolchain for building Rust examples
+RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
+ENV PATH="/home/uboot/.cargo/bin:${PATH}"
+
 # Populate the cache for pip to use. Get these via wget as the
 # COPY / ADD directives don't work as we need them to.
 RUN wget -O /tmp/pytest-requirements.txt https://source.denx.de/u-boot/u-boot/-/raw/master/test/py/requirements.txt