Skip to content

Commit

Permalink
fix(rust): Update to 1.78, remove unused verify-adapter tool, start u…
Browse files Browse the repository at this point in the history
…sing the wasm32-wasip1 target
  • Loading branch information
stevenj committed May 6, 2024
1 parent a18e9c9 commit f8faab6
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 13 deletions.
13 changes: 8 additions & 5 deletions earthly/rust/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,15 @@ rust-base:
# The ACTUAL version of rust that will be used, and available targets
# is controlled by a `rust-toolchain.toml` file when the `SETUP` FUNCTION is run.
# HOWEVER, It is enforced that the rust version in `rust-toolchain.toml` MUST match this version.
FROM rust:1.77.2-alpine3.19
FROM rust:1.78-alpine3.19

WORKDIR /root

# Install necessary packages
# Expand this list as needed, rather than adding more tools in later containers.
#
# Note: openssl-dev and openssl-libs-static are added to support the cargo-component crate.
# if that crate is removed, these dependencies can also be removed.
RUN apk add --no-cache \
musl-dev \
mold \
Expand All @@ -52,7 +55,8 @@ rust-base:
ttf-liberation \
findutils \
pkgconfig \
openssl-dev
openssl-dev \
openssl-libs-static

# Fix up font cache
RUN fc-cache -f
Expand All @@ -68,10 +72,10 @@ rust-base:

# Ensure we have all the necessary targets
RUN rustup target add wasm32-unknown-unknown
RUN rustup target add wasm32-wasi
RUN rustup target add wasm32-wasip1 # wasm32-wasip2 not yet available

RUN rustup target add wasm32-unknown-unknown --toolchain nightly
RUN rustup target add wasm32-wasi --toolchain nightly
RUN rustup target add wasm32-wasip1 --toolchain nightly # wasm32-wasip2 not yet available

# Preset CARGO_HOME and the application search path.
ENV CARGO_HOME="$HOME/.cargo"
Expand All @@ -98,7 +102,6 @@ rust-base-plus-tools:
DO +COPY_TOOL --tool="wasm-tools"
DO +COPY_TOOL --tool="cargo-expand"
DO +COPY_TOOL --tool="wit-bindgen"
DO +COPY_TOOL --tool="verify-component-adapter"
DO +COPY_TOOL --tool="cargo-sweep"
DO +COPY_TOOL --tool="cargo-component"

Expand Down
2 changes: 1 addition & 1 deletion earthly/rust/stdcfgs/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "1.77.2"
channel = "1.78"
profile = "default"
5 changes: 0 additions & 5 deletions earthly/rust/tools/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,6 @@ tool-wit-bindgen:
RUN cargo install wit-bindgen-cli --version=0.24.0 --locked
SAVE ARTIFACT $CARGO_HOME/bin/wit-bindgen

tool-verify-component-adapter:
FROM rust-ci+rust-base
RUN cargo install --git https://github.com/bytecodealliance/wasmtime --tag v20.0.0 verify-component-adapter --locked
SAVE ARTIFACT $CARGO_HOME/bin/verify-component-adapter

# We build cargo-sweep tooling for the rust library so that its not rebuilt for every target.
tool-cargo-sweep:
FROM rust-ci+rust-base
Expand Down
2 changes: 1 addition & 1 deletion examples/rust/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "1.77.2"
channel = "1.78"
profile = "default"
2 changes: 1 addition & 1 deletion utilities/dbviz/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "1.77.2"
channel = "1.78"
profile = "default"

0 comments on commit f8faab6

Please sign in to comment.