Skip to content

Commit 9511921

Browse files
committed
Update various tools
This commit includes updates of various tools used for building and testing StarlingMonkey: - Binaryen - Corrosion CMake Cargo integration - wasm-tools - Wasmtime - Wizer No changes in behavior should occur as a result of these updates.
1 parent cc0b178 commit 9511921

5 files changed

Lines changed: 22 additions & 11 deletions

File tree

cmake/binaryen.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
set(BINARYEN_VERSION 117)
1+
set(BINARYEN_VERSION 118)
22

33
set(BINARYEN_ARCH ${HOST_ARCH})
44
if(HOST_OS STREQUAL "macos" AND HOST_ARCH STREQUAL "aarch64")

cmake/init-corrosion.cmake

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,25 @@
22
# NOTE: This file must not be called `corrosion.cmake`, because otherwise it'll be called recursively instead of the
33
# same-named one coming with Corrosion.
44

5-
set(Rust_CARGO_TARGET wasm32-wasi)
65
# Necessary to make cross-compiling to wasm32-wasi work for crates with -sys dependencies.
76
set(Rust_CARGO_TARGET_LINK_NATIVE_LIBS "")
87

9-
file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/rust-toolchain.toml" Rust_TOOLCHAIN REGEX "^channel ?=")
10-
string(REGEX MATCH "[0-9.]+" Rust_TOOLCHAIN "${Rust_TOOLCHAIN}")
11-
execute_process(COMMAND rustup toolchain install ${Rust_TOOLCHAIN})
12-
execute_process(COMMAND rustup target add --toolchain ${Rust_TOOLCHAIN} wasm32-wasi)
8+
# Parse Rust version and target from rust-toolchain.toml.
9+
file(READ "${CMAKE_CURRENT_SOURCE_DIR}/rust-toolchain.toml" RUST_TOOLCHAIN_FILE)
10+
if (NOT ${RUST_TOOLCHAIN_FILE} MATCHES [[channel *= *"([^\"]+)\"]])
11+
message(FATAL_ERROR "Couldn't parse Rust toolchain version from file ${CMAKE_CURRENT_SOURCE_DIR}/rust-toolchain.toml")
12+
endif()
13+
set(Rust_TOOLCHAIN ${CMAKE_MATCH_1})
1314

14-
CPMAddPackage("gh:corrosion-rs/corrosion#be76480232216a64f65e3b1d9794d68cbac6c690")
15+
if (NOT ${RUST_TOOLCHAIN_FILE} MATCHES [[targets = *\[ *"([^\"]+)]])
16+
message(FATAL_ERROR "Couldn't parse Rust target from file ${CMAKE_CURRENT_SOURCE_DIR}/rust-toolchain.toml")
17+
endif()
18+
set(Rust_CARGO_TARGET ${CMAKE_MATCH_1})
19+
20+
if (NOT Rust_VERSION VERSION_EQUAL ${Rust_TOOLCHAIN})
21+
execute_process(COMMAND rustup toolchain install ${Rust_TOOLCHAIN})
22+
endif()
23+
execute_process(COMMAND rustup target add --toolchain ${Rust_TOOLCHAIN} ${Rust_CARGO_TARGET})
24+
25+
CPMAddPackage("gh:corrosion-rs/corrosion#b45275c8b5ee16118008a6a140ce842557b3e47a")
1526
string(TOLOWER ${Rust_CARGO_HOST_ARCH} HOST_ARCH)

cmake/wasm-tools.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
set(WASM_TOOLS_VERSION 1.0.54)
1+
set(WASM_TOOLS_VERSION 1.215.0)
22

3-
set(WASM_TOOLS_URL https://github.com/bytecodealliance/wasm-tools/releases/download/wasm-tools-${WASM_TOOLS_VERSION}/wasm-tools-${WASM_TOOLS_VERSION}-${HOST_ARCH}-${HOST_OS}.tar.gz)
3+
set(WASM_TOOLS_URL https://github.com/bytecodealliance/wasm-tools/releases/download/v${WASM_TOOLS_VERSION}/wasm-tools-${WASM_TOOLS_VERSION}-${HOST_ARCH}-${HOST_OS}.tar.gz)
44
CPMAddPackage(NAME wasm-tools URL ${WASM_TOOLS_URL} DOWNLOAD_ONLY TRUE)
55
set(WASM_TOOLS_DIR ${CPM_PACKAGE_wasm-tools_SOURCE_DIR})
66
set(WASM_TOOLS_BIN ${WASM_TOOLS_DIR}/wasm-tools)

cmake/wasmtime.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
set(WASMTIME_VERSION v19.0.2)
1+
set(WASMTIME_VERSION v23.0.1)
22
set(WASMTIME_URL https://github.com/bytecodealliance/wasmtime/releases/download/${WASMTIME_VERSION}/wasmtime-${WASMTIME_VERSION}-${HOST_ARCH}-${HOST_OS}.tar.xz)
33
CPMAddPackage(NAME wasmtime URL ${WASMTIME_URL} DOWNLOAD_ONLY TRUE)
44
set(WASMTIME_DIR ${CPM_PACKAGE_wasmtime_SOURCE_DIR})

cmake/wizer.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
set(WIZER_VERSION v3.0.1 CACHE STRING "Version of wizer to use")
1+
set(WIZER_VERSION v6.0.0 CACHE STRING "Version of wizer to use")
22

33
set(WIZER_URL https://github.com/bytecodealliance/wizer/releases/download/${WIZER_VERSION}/wizer-${WIZER_VERSION}-${HOST_ARCH}-${HOST_OS}.tar.xz)
44
CPMAddPackage(NAME wizer URL ${WIZER_URL} DOWNLOAD_ONLY TRUE)

0 commit comments

Comments
 (0)