Skip to content

Commit

Permalink
Merge pull request #462 from CosmWasm/update-rust
Browse files Browse the repository at this point in the history
Update builders to version 0017 (Rust 1.73.0)
  • Loading branch information
webmaster128 authored Oct 12, 2023
2 parents 2907c7d + cf6d57f commit b953ebc
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 15 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,11 @@ test-alpine: release-build-alpine

@# Run the demo binary on Alpine machines
@# See https://de.wikipedia.org/wiki/Alpine_Linux#Versionen for supported versions
docker run --rm --read-only -v $(shell pwd):/mnt/testrun -w /mnt/testrun alpine:3.18 ./demo ./testdata/hackatom.wasm
docker run --rm --read-only -v $(shell pwd):/mnt/testrun -w /mnt/testrun alpine:3.17 ./demo ./testdata/hackatom.wasm
docker run --rm --read-only -v $(shell pwd):/mnt/testrun -w /mnt/testrun alpine:3.16 ./demo ./testdata/hackatom.wasm
docker run --rm --read-only -v $(shell pwd):/mnt/testrun -w /mnt/testrun alpine:3.15 ./demo ./testdata/hackatom.wasm
docker run --rm --read-only -v $(shell pwd):/mnt/testrun -w /mnt/testrun alpine:3.14 ./demo ./testdata/hackatom.wasm
docker run --rm --read-only -v $(shell pwd):/mnt/testrun -w /mnt/testrun alpine:3.13 ./demo ./testdata/hackatom.wasm
docker run --rm --read-only -v $(shell pwd):/mnt/testrun -w /mnt/testrun alpine:3.12 ./demo ./testdata/hackatom.wasm

@# Run binary locally if you are on Linux
@# ./demo ./testdata/hackatom.wasm
Expand Down
10 changes: 5 additions & 5 deletions builders/Dockerfile.alpine
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@
# For 2. we define the Go image here. For 1. we install Rust below.
#
# See also docs/COMPILER_VERSIONS.md
FROM golang:1.19.7-alpine
FROM golang:1.20.10-alpine

ENV RUSTUP_HOME=/usr/local/rustup \
CARGO_HOME=/usr/local/cargo \
PATH=/usr/local/cargo/bin:$PATH
CARGO_HOME=/usr/local/cargo \
PATH=/usr/local/cargo/bin:$PATH

# this comes from standard alpine nightly file
# https://github.com/rust-lang/docker-rust-nightly/blob/master/alpine3.12/Dockerfile
# with some changes to support our toolchain, etc
RUN set -eux \
&& apk add --no-cache ca-certificates build-base
&& apk add --no-cache ca-certificates build-base

RUN wget "https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-musl/rustup-init" \
&& chmod +x rustup-init \
&& ./rustup-init -y --no-modify-path --profile minimal --default-toolchain 1.69.0 \
&& ./rustup-init -y --no-modify-path --profile minimal --default-toolchain 1.73.0 \
&& rm rustup-init \
&& chmod -R a+w $RUSTUP_HOME $CARGO_HOME

Expand Down
6 changes: 3 additions & 3 deletions builders/Dockerfile.centos7
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ RUN yum -y update \

# GET FROM https://github.com/rust-lang/docker-rust-nightly
ENV RUSTUP_HOME=/usr/local/rustup \
CARGO_HOME=/usr/local/cargo \
PATH=/usr/local/cargo/bin:$PATH
CARGO_HOME=/usr/local/cargo \
PATH=/usr/local/cargo/bin:$PATH

RUN wget "https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-gnu/rustup-init" \
&& chmod +x rustup-init \
&& ./rustup-init -y --no-modify-path --profile minimal --default-toolchain 1.69.0 \
&& ./rustup-init -y --no-modify-path --profile minimal --default-toolchain 1.73.0 \
&& rm rustup-init \
&& chmod -R a+w $RUSTUP_HOME $CARGO_HOME \
&& rustup --version \
Expand Down
6 changes: 3 additions & 3 deletions builders/Dockerfile.cross
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM rust:1.69.0-bullseye
FROM rust:1.73.0-bullseye

# Install build dependencies
RUN apt-get update \
&& apt install -y clang gcc g++ zlib1g-dev libmpc-dev libmpfr-dev libgmp-dev build-essential cmake \
# Support for Windows cross-compile
mingw-w64
# Support for Windows cross-compile
mingw-w64

## ADD MACOS SUPPORT

Expand Down
2 changes: 1 addition & 1 deletion builders/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Versioned by a simple counter that is not bound to a specific CosmWasm version
# See builders/README.md
BUILDERS_PREFIX := cosmwasm/go-ext-builder:0016
BUILDERS_PREFIX := cosmwasm/go-ext-builder:0017

.PHONY: docker-image-centos7
docker-image-centos7:
Expand Down
10 changes: 10 additions & 0 deletions builders/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,18 @@ tricky. This folder contains build scripts and a Docker image to create all
dynamic libraries from one host. In general this is set up for a Linux host, but
any machine that can run Docker can do the cross-compilation.

## Docker Hub images

See https://hub.docker.com/r/cosmwasm/go-ext-builder/tags for all available
versions of the builder images.

## Changelog

**Version 0017:**

- Update Rust to 1.73.0.
- Update Go to 1.20.10 (for testing only).

**Version 0016:**

- Update Rust to 1.69.0.
Expand Down
2 changes: 1 addition & 1 deletion docs/COMPILER_VERSIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,6 @@ We currently use the following version:

| Type | Rust version | Note |
| ------------------------ | ------------ | --------------------------------- |
| Production Rust compiler | 1.69.0 | Builders version 0016 |
| Production Rust compiler | 1.73.0 | Builders version 0017 |
| Min Rust compiler | 1.67.0 | Supports builder versions >= 0015 |
| Tooling Rust compiler | 1.69.0 | |

0 comments on commit b953ebc

Please sign in to comment.