Skip to content

Commit

Permalink
chore: update rust and wasi toolchain (#6222)
Browse files Browse the repository at this point in the history
*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)*.
  • Loading branch information
MarkMcCulloh authored Apr 12, 2024
1 parent 60bc255 commit 6a66400
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 13 deletions.
6 changes: 3 additions & 3 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -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 }
2 changes: 1 addition & 1 deletion libs/wingc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
7 changes: 1 addition & 6 deletions libs/wingc/src/type_check/lifts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,7 @@ impl Lifts {

/// Adds a lift for an expression.
pub fn lift(&mut self, method: Symbol, qualification: Option<String>, 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.
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[toolchain]
profile = "default"
channel = "1.76.0"
channel = "1.77.2"
targets = ["wasm32-wasi"]
4 changes: 2 additions & 2 deletions scripts/setup_wasi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6a66400

Please sign in to comment.