Skip to content

Commit 9be1845

Browse files
committed
fix(ci): standardize publish rust toolchain
1 parent 5c45e9b commit 9be1845

23 files changed

Lines changed: 119 additions & 145 deletions

File tree

.github/workflows/rust.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,10 @@ jobs:
9090
run: rivetkit-rust/packages/rivetkit-core/scripts/check-event-driven-drains.sh
9191

9292
- name: Check
93-
run: cargo check --all-targets --all-features
93+
run: cargo check --workspace --exclude rivetkit-wasm
9494
env:
9595
# Deny warnings
96-
RUSTFLAGS: --cfg tokio_unstable -D warnings
96+
RUSTFLAGS: --cfg tokio_unstable -D warnings -A unsafe-op-in-unsafe-fn
9797

9898
# test:
9999
# name: Test

docker/build/darwin-arm64.Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ ARG BUILD_MODE=release
1010
ARG BUILD_FRONTEND=false
1111
ARG VITE_APP_API_URL=__SAME__
1212
ARG VITE_FEATURE_FLAGS=
13+
ARG RUST_TOOLCHAIN=1.91.1
1314

1415
ENV BINDGEN_EXTRA_CLANG_ARGS_aarch64_apple_darwin="--sysroot=/root/osxcross/target/SDK/MacOSX11.3.sdk -isystem /root/osxcross/target/SDK/MacOSX11.3.sdk/usr/include" \
1516
CFLAGS_aarch64_apple_darwin="-B/root/osxcross/target/bin" \
@@ -32,6 +33,10 @@ ENV RUSTC_WRAPPER=sccache \
3233
WORKDIR /build
3334
COPY . .
3435

36+
RUN rustup toolchain install "${RUST_TOOLCHAIN}" --profile minimal && \
37+
rustup default "${RUST_TOOLCHAIN}" && \
38+
rustup target add aarch64-apple-darwin
39+
3540
RUN if [ "$BUILD_TARGET" = "engine" ] && [ "$BUILD_FRONTEND" = "true" ]; then \
3641
export NODE_OPTIONS="--max-old-space-size=8192" && \
3742
export SKIP_NAPI_BUILD=1 && \

docker/build/darwin-x64.Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ ARG BUILD_MODE=release
1010
ARG BUILD_FRONTEND=false
1111
ARG VITE_APP_API_URL=__SAME__
1212
ARG VITE_FEATURE_FLAGS=
13+
ARG RUST_TOOLCHAIN=1.91.1
1314

1415
ENV BINDGEN_EXTRA_CLANG_ARGS_x86_64_apple_darwin="--sysroot=/root/osxcross/target/SDK/MacOSX11.3.sdk -isystem /root/osxcross/target/SDK/MacOSX11.3.sdk/usr/include" \
1516
CFLAGS_x86_64_apple_darwin="-B/root/osxcross/target/bin" \
@@ -32,6 +33,10 @@ ENV RUSTC_WRAPPER=sccache \
3233
WORKDIR /build
3334
COPY . .
3435

36+
RUN rustup toolchain install "${RUST_TOOLCHAIN}" --profile minimal && \
37+
rustup default "${RUST_TOOLCHAIN}" && \
38+
rustup target add x86_64-apple-darwin
39+
3540
RUN if [ "$BUILD_TARGET" = "engine" ] && [ "$BUILD_FRONTEND" = "true" ]; then \
3641
export NODE_OPTIONS="--max-old-space-size=8192" && \
3742
export SKIP_NAPI_BUILD=1 && \

docker/build/linux-arm64-gnu.Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ ARG BUILD_MODE=release
1010
ARG BUILD_FRONTEND=false
1111
ARG VITE_APP_API_URL=__SAME__
1212
ARG VITE_FEATURE_FLAGS=
13+
ARG RUST_TOOLCHAIN=1.91.1
1314

1415
ENV RUSTFLAGS="--cfg tokio_unstable"
1516
ENV RUSTC_WRAPPER=sccache \
@@ -19,6 +20,10 @@ ENV RUSTC_WRAPPER=sccache \
1920
WORKDIR /build
2021
COPY . .
2122

23+
RUN rustup toolchain install "${RUST_TOOLCHAIN}" --profile minimal && \
24+
rustup default "${RUST_TOOLCHAIN}" && \
25+
rustup target add aarch64-unknown-linux-gnu
26+
2227
RUN if [ "$BUILD_TARGET" = "engine" ] && [ "$BUILD_FRONTEND" = "true" ]; then \
2328
export NODE_OPTIONS="--max-old-space-size=8192" && \
2429
export SKIP_NAPI_BUILD=1 && \

docker/build/linux-arm64-musl.Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ ARG BUILD_MODE=release
1010
ARG BUILD_FRONTEND=false
1111
ARG VITE_APP_API_URL=__SAME__
1212
ARG VITE_FEATURE_FLAGS=
13+
ARG RUST_TOOLCHAIN=1.91.1
1314

1415
ENV OPENSSL_DIR=/musl-aarch64 \
1516
OPENSSL_INCLUDE_DIR=/musl-aarch64/include \
@@ -25,6 +26,10 @@ ENV RUSTC_WRAPPER=sccache \
2526
WORKDIR /build
2627
COPY . .
2728

29+
RUN rustup toolchain install "${RUST_TOOLCHAIN}" --profile minimal && \
30+
rustup default "${RUST_TOOLCHAIN}" && \
31+
rustup target add aarch64-unknown-linux-musl
32+
2833
RUN if [ "$BUILD_TARGET" = "engine" ] && [ "$BUILD_FRONTEND" = "true" ]; then \
2934
export NODE_OPTIONS="--max-old-space-size=8192" && \
3035
export SKIP_NAPI_BUILD=1 && \

docker/build/linux-x64-gnu.Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ ARG BUILD_MODE=release
1717
ARG BUILD_FRONTEND=false
1818
ARG VITE_APP_API_URL=__SAME__
1919
ARG VITE_FEATURE_FLAGS=
20+
ARG RUST_TOOLCHAIN=1.91.1
2021

2122
ENV RUSTFLAGS="--cfg tokio_unstable"
2223

@@ -27,6 +28,10 @@ ENV RUSTC_WRAPPER=sccache \
2728
WORKDIR /build
2829
COPY . .
2930

31+
RUN rustup toolchain install "${RUST_TOOLCHAIN}" --profile minimal && \
32+
rustup default "${RUST_TOOLCHAIN}" && \
33+
rustup target add x86_64-unknown-linux-gnu
34+
3035
# Build frontend if building engine with frontend enabled.
3136
RUN if [ "$BUILD_TARGET" = "engine" ] && [ "$BUILD_FRONTEND" = "true" ]; then \
3237
export NODE_OPTIONS="--max-old-space-size=8192" && \

docker/build/linux-x64-musl.Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ ARG BUILD_MODE=release
1010
ARG BUILD_FRONTEND=false
1111
ARG VITE_APP_API_URL=__SAME__
1212
ARG VITE_FEATURE_FLAGS=
13+
ARG RUST_TOOLCHAIN=1.91.1
1314

1415
ENV OPENSSL_DIR=/musl-x86_64 \
1516
OPENSSL_INCLUDE_DIR=/musl-x86_64/include \
@@ -24,6 +25,10 @@ ENV RUSTC_WRAPPER=sccache \
2425
WORKDIR /build
2526
COPY . .
2627

28+
RUN rustup toolchain install "${RUST_TOOLCHAIN}" --profile minimal && \
29+
rustup default "${RUST_TOOLCHAIN}" && \
30+
rustup target add x86_64-unknown-linux-musl
31+
2732
RUN if [ "$BUILD_TARGET" = "engine" ] && [ "$BUILD_FRONTEND" = "true" ]; then \
2833
export NODE_OPTIONS="--max-old-space-size=8192" && \
2934
export SKIP_NAPI_BUILD=1 && \

docker/build/windows-x64.Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ ARG BUILD_MODE=release
1616
ARG BUILD_FRONTEND=false
1717
ARG VITE_APP_API_URL=__SAME__
1818
ARG VITE_FEATURE_FLAGS=
19+
ARG RUST_TOOLCHAIN=1.91.1
1920

2021
# Windows-specific build flags:
2122
# - lld linker is ~5x faster than MinGW's default ld for big Rust binaries.
@@ -32,6 +33,10 @@ ENV RUSTC_WRAPPER=sccache \
3233
WORKDIR /build
3334
COPY . .
3435

36+
RUN rustup toolchain install "${RUST_TOOLCHAIN}" --profile minimal && \
37+
rustup default "${RUST_TOOLCHAIN}" && \
38+
rustup target add x86_64-pc-windows-gnu
39+
3540
RUN if [ "$BUILD_TARGET" = "engine" ] && [ "$BUILD_FRONTEND" = "true" ]; then \
3641
export NODE_OPTIONS="--max-old-space-size=8192" && \
3742
export SKIP_NAPI_BUILD=1 && \

docker/builder-base/engine-builder.Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ RUN apt-get update -y && \
2424
openssl \
2525
pkg-config \
2626
wget && \
27-
rustup toolchain install 1.91.0 && \
28-
rustup default 1.91.0 && \
27+
rustup toolchain install 1.91.1 && \
28+
rustup default 1.91.1 && \
2929
curl -fsSL https://deb.nodesource.com/setup_22.x | bash - && \
3030
apt-get install -y --no-install-recommends nodejs && \
3131
corepack enable && \

docker/builder-base/linux-gnu.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# and the aarch64 cross-compiler.
88
#
99
# Build & push: scripts/docker-builder-base/build-push.sh linux-gnu
10-
FROM rust:1.89.0-bullseye
10+
FROM rust:1.91.1-bullseye
1111

1212
# Install base packages. Bullseye ships clang 11; we pull clang 14 from the
1313
# official LLVM apt repo (https://apt.llvm.org) for modern bindgen support

0 commit comments

Comments
 (0)