Skip to content

Commit 51f16d4

Browse files
authored
chore: complete updates to build-images from msrv bump (#12320)
The rust MSRV got bumped in #12298 but we didn't catch that we're still using a stale devbox image due to the check in `bootstrap.sh` not being updated properly. CI's passing due to cargo automatically installing the proper toolchain at runtime. I've completed the relevant changes to fix the build image / `./bootstrap.sh check` in this PR but I'm not up to date on how pushing an update to devbox should be done (or if CI still automatically pushes to dockerhub anymore). @charlielye @ludamad Could one of you help me with fixing this?
1 parent ff506f4 commit 51f16d4

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

bootstrap.sh

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,20 @@ function check_toolchains {
4747
echo "Installation: sudo apt install clang-16"
4848
exit 1
4949
fi
50-
# Check rust version.
51-
if ! rustup show | grep "1.75" > /dev/null; then
50+
# Check rustup installed.
51+
local rust_version=$(yq '.toolchain.channel' ./noir/noir-repo/rust-toolchain.toml)
52+
if ! command -v rustup > /dev/null; then
5253
encourage_dev_container
53-
echo "Rust version 1.75 not installed."
54+
echo "Rustup not installed."
5455
echo "Installation:"
55-
echo " curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain 1.85.0"
56+
echo " curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain $rust_version"
5657
exit 1
5758
fi
59+
if ! rustup show | grep $rust_version > /dev/null; then
60+
# Cargo will download necessary version of rust at runtime but warn to alert that an update to the build-image
61+
# is desirable.
62+
echo -e "${bold}${yellow}WARN: Rust ${rust_version} is not installed. Performance will be degraded.${reset}"
63+
fi
5864
# Check wasi-sdk version.
5965
if ! cat /opt/wasi-sdk/VERSION 2> /dev/null | grep 22.0 > /dev/null; then
6066
encourage_dev_container

build-images/src/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ ENV RUSTUP_HOME=/opt/rust/rustup
150150
ENV CARGO_HOME=/opt/rust/cargo
151151
ENV PATH="/opt/rust/cargo/bin:$PATH"
152152
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain 1.85.0 && \
153-
rustup target add wasm32-unknown-unknown wasm32-wasi aarch64-apple-darwin && \
153+
rustup target add wasm32-unknown-unknown wasm32-wasip1 aarch64-apple-darwin && \
154154
chmod -R a+w /opt/rust
155155

156156
# Install corepack and yarn.

0 commit comments

Comments
 (0)