Skip to content

Commit 67fde31

Browse files
committed
Upgrade to Rust 1.85
Summary: This addresses [ENG-10270](https://linear.app/comm/issue/ENG-10270/keyserver-build-failing-with-rust-181). Changes here: 1. Upgrade everything to Rust 1.85. 2. In order to address [ENG-9892](https://linear.app/comm/issue/ENG-9892/cant-upgrade-to-rust-182): - We need to bump our Webpack version (see [here](wasm-bindgen/wasm-bindgen#4211 (comment))). - We also need to use a higher version of binaryen than the one we're getting from `apt-get`, so I introduced a script to download a later version binary. - Finally, we need to pass `--reference-types` to `wasm-pack`. Test Plan: 1. Confirmed CI passes 2. Confirmed I can build the keyserver Docker image locally on my macOS device 3. On my personal server, built the keyserver Docker image and deployed a web app publicly at https://comm.software/, which is connected to my authoritative keyserver on AWS (running the earlier keyserver image 153). Played around with it a bit, including logged out and back in via QR code. Reviewers: bartek, kamil Reviewed By: bartek Subscribers: tomek Differential Revision: https://phab.comm.dev/D14413
1 parent 20e275c commit 67fde31

File tree

13 files changed

+290
-154
lines changed

13 files changed

+290
-154
lines changed

keyserver/Dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,16 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
5858
rsync \
5959
mariadb-client \
6060
cmake \
61-
binaryen \
6261
&& rm -rf /var/lib/apt/lists/*
6362

6463
# Install protobuf manually to ensure that we have the correct version
6564
COPY scripts/install_protobuf.sh scripts/
6665
RUN cd scripts && ./install_protobuf.sh
6766

67+
# Install binaryen manually because we need a later version for reference types
68+
COPY scripts/install_binaryen.sh scripts/
69+
RUN cd scripts && ./install_binaryen.sh
70+
6871
#-------------------------------------------------------------------------------
6972
# STEP 2: DEVOLVE PRIVILEGES
7073
# Create another user to run the rest of the commands
@@ -88,7 +91,7 @@ RUN mkdir /home/comm/backups
8891

8992
# Install Rust and add Cargo's bin directory to the $PATH environment variable
9093
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y \
91-
--default-toolchain 1.81
94+
--default-toolchain 1.85
9295
ENV PATH /home/comm/.cargo/bin:$PATH
9396

9497
#-------------------------------------------------------------------------------

lib/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"react-refresh": "^0.14.0",
3333
"style-loader": "^3.3.1",
3434
"terser-webpack-plugin": "^5.3.6",
35-
"webpack": "^5.76.0"
35+
"webpack": "^5.98.0"
3636
},
3737
"dependencies": {
3838
"@commapp/olm": "0.2.1",

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[toolchain]
2-
channel = "1.81"
2+
channel = "1.85"
33
profile = "default"

scripts/install_binaryen.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env bash
2+
3+
set -euo pipefail
4+
5+
BINARYEN_VERSION=116
6+
7+
wget https://github.com/WebAssembly/binaryen/releases/download/version_${BINARYEN_VERSION}/binaryen-version_${BINARYEN_VERSION}-x86_64-linux.tar.gz
8+
9+
tar -xzf binaryen-version_${BINARYEN_VERSION}-x86_64-linux.tar.gz
10+
11+
cp -r binaryen-version_${BINARYEN_VERSION}/bin/* /usr/local/bin/
12+
13+
rm -rf binaryen-version_${BINARYEN_VERSION} binaryen-version_${BINARYEN_VERSION}-x86_64-linux.tar.gz

services/backup/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM rust:1.81-bullseye as builder
1+
FROM rust:1.85-bullseye as builder
22

33
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
44
build-essential cmake git libgtest-dev libssl-dev zlib1g-dev \

services/blob/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM rust:1.81-bullseye as builder
1+
FROM rust:1.85-bullseye as builder
22

33
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
44
build-essential cmake git libgtest-dev libssl-dev zlib1g-dev \

services/commtest/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM rust:1.81-bullseye
1+
FROM rust:1.85-bullseye
22

33
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
44
build-essential cmake git libgtest-dev libssl-dev zlib1g-dev \

services/feature-flags/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM rust:1.81-bullseye as builder
1+
FROM rust:1.85-bullseye as builder
22

33
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
44
build-essential cmake git libgtest-dev libssl-dev zlib1g-dev \

services/identity/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM rust:1.81-bullseye as builder
1+
FROM rust:1.85-bullseye as builder
22

33
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
44
build-essential cmake git libgtest-dev libssl-dev zlib1g-dev \

services/reports/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM rust:1.81-bullseye as builder
1+
FROM rust:1.85-bullseye as builder
22

33
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
44
build-essential cmake git libgtest-dev libssl-dev zlib1g-dev \

0 commit comments

Comments
 (0)