From 6a66400bde9f4269aceb0dfeb437cee4bf766c25 Mon Sep 17 00:00:00 2001 From: Mark McCulloh Date: Fri, 12 Apr 2024 16:24:10 -0400 Subject: [PATCH] chore: update rust and wasi toolchain (#6222) *By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*. --- .cargo/config.toml | 6 +++--- libs/wingc/package.json | 2 +- libs/wingc/src/type_check/lifts.rs | 7 +------ rust-toolchain.toml | 2 +- scripts/setup_wasi.sh | 4 ++-- 5 files changed, 8 insertions(+), 13 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index 4e6f4107a70..11ecc1fe7d7 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,5 +1,5 @@ [env] -WASI_SDK = { value = ".cargo/wasi-sdk-20.0", relative = true } +WASI_SDK = { value = ".cargo/wasi-sdk-21.0", relative = true } # tree-sitter build fails with newer version of clang unless implicit-function-declaration is ignored -CC_wasm32_wasi = { value = ".cargo/wasi-sdk-20.0/bin/clang -Wno-error=implicit-function-declaration", relative = true } -AR_wasm32_wasi = { value = ".cargo/wasi-sdk-20.0/bin/ar", relative = true } +CC_wasm32_wasi = { value = ".cargo/wasi-sdk-21.0/bin/clang -Wno-error=implicit-function-declaration", relative = true } +AR_wasm32_wasi = { value = ".cargo/wasi-sdk-21.0/bin/ar", relative = true } diff --git a/libs/wingc/package.json b/libs/wingc/package.json index cad6ae5e78a..c451384f799 100644 --- a/libs/wingc/package.json +++ b/libs/wingc/package.json @@ -2,7 +2,7 @@ "name": "@winglang/wingc", "private": true, "scripts": { - "compile": "cargo build --target wasm32-wasi --release && ../../.cargo/binaryen-version_116/bin/wasm-opt --enable-bulk-memory --strip-debug --strip-producers -O3 -o wingc.wasm ../../target/wasm32-wasi/release/wingc.wasm", + "compile": "cargo build --target wasm32-wasi --release && ../../.cargo/binaryen-version_117/bin/wasm-opt --enable-bulk-memory --strip-debug --strip-producers -O3 -o wingc.wasm ../../target/wasm32-wasi/release/wingc.wasm", "dev": "cargo run --example compile --release", "test": "cargo test", "lint": "cargo fmt && cargo clippy --fix --no-deps --allow-dirty --target wasm32-wasi --release" diff --git a/libs/wingc/src/type_check/lifts.rs b/libs/wingc/src/type_check/lifts.rs index 0fb34892c25..21fec97820c 100644 --- a/libs/wingc/src/type_check/lifts.rs +++ b/libs/wingc/src/type_check/lifts.rs @@ -62,12 +62,7 @@ impl Lifts { /// Adds a lift for an expression. pub fn lift(&mut self, method: Symbol, qualification: Option, code: &str, explicit: bool) { - self.add_lift( - method.to_string(), - code, - qualification.as_ref().map(|s| s.clone()), - explicit, - ); + self.add_lift(method.to_string(), code, qualification.clone(), explicit); // Add a lift to the inflight initializer to signify this class requires access to that preflight object. // "this" is a special case since it's already in scope and doesn't need to be lifted. diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 3a72757fff3..c95f6616b11 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] profile = "default" -channel = "1.76.0" +channel = "1.77.2" targets = ["wasm32-wasi"] \ No newline at end of file diff --git a/scripts/setup_wasi.sh b/scripts/setup_wasi.sh index cc1279c8485..1016c8beb7f 100755 --- a/scripts/setup_wasi.sh +++ b/scripts/setup_wasi.sh @@ -3,8 +3,8 @@ set -eo pipefail TOOL_INSTALL_DIR="./.cargo" -BINARYEN_VERSION="version_116" -WASI_SDK_VERSION="20" +BINARYEN_VERSION="version_117" +WASI_SDK_VERSION="21" WASI_SDK_VERSION_FULL="$WASI_SDK_VERSION.0" SYS_OS=$OSTYPE