diff --git a/.cargo/config.toml b/.cargo/config.toml index 791fa36685c..4916f376553 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,4 +1,4 @@ [env] # tree-sitter build fails with newer version of clang unless implicit-function-declaration is ignored -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 } +CC_wasm32_wasi = { value = ".cargo/wasi-sdk-24.0/bin/clang -Wno-error=implicit-function-declaration", relative = true } +AR_wasm32_wasi = { value = ".cargo/wasi-sdk-24.0/bin/ar", relative = true } diff --git a/packages/@winglang/wingc/scripts/postcompile.sh b/packages/@winglang/wingc/scripts/postcompile.sh index 1ede2f6a7d7..c2a7408fc7b 100755 --- a/packages/@winglang/wingc/scripts/postcompile.sh +++ b/packages/@winglang/wingc/scripts/postcompile.sh @@ -12,7 +12,7 @@ wingc=$(cd $(dirname $0)/.. && pwd) # Currently we only do release wasm builds target="release" -wasm_opt="$wingc/../../../.cargo/binaryen-version_117/bin/wasm-opt" +wasm_opt="$wingc/../../../.cargo/binaryen-version_119/bin/wasm-opt" input_wasm="$wingc/../../../target/wasm32-wasi/$target/wingc.wasm" output_wasm="$wingc/wingc.wasm" diff --git a/packages/@winglang/wingc/src/lsp/completions.rs b/packages/@winglang/wingc/src/lsp/completions.rs index 4c84a4fb977..9a34f530c35 100644 --- a/packages/@winglang/wingc/src/lsp/completions.rs +++ b/packages/@winglang/wingc/src/lsp/completions.rs @@ -485,7 +485,8 @@ pub fn on_completion(params: lsp_types::CompletionParams) -> CompletionResponse .pos_args .iter() .filter(|a| !types.get_expr_type(a).is_unresolved()) - .count() == func.parameters.len() - 1 + .count() + == func.parameters.len() - 1 { completions.extend(get_inner_struct_completions(structy, arg_list_strings)); } diff --git a/rust-toolchain.toml b/rust-toolchain.toml index c95f6616b11..887cae0b5cf 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] profile = "default" -channel = "1.77.2" +channel = "1.82.0" targets = ["wasm32-wasi"] \ No newline at end of file diff --git a/scripts/setup_wasi.sh b/scripts/setup_wasi.sh index 90ebaa908fc..571c4b47e35 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_117" -WASI_SDK_VERSION="21" +BINARYEN_VERSION="version_119" +WASI_SDK_VERSION="24" WASI_SDK_VERSION_FULL="$WASI_SDK_VERSION.0" SYS_OS=$OSTYPE @@ -54,7 +54,7 @@ fi # Download wasi-sdk WASI_SDK_INSTALL_DIR="$TOOL_INSTALL_DIR/wasi-sdk-$WASI_SDK_VERSION_FULL" if [ ! -d $WASI_SDK_INSTALL_DIR ]; then - WASI_SDK_TARBALL="wasi-sdk-$WASI_SDK_VERSION_FULL-$SYS_OS.tar.gz" + WASI_SDK_TARBALL="wasi-sdk-$WASI_SDK_VERSION_FULL-$SYS_ARCH-$SYS_OS.tar.gz" WASI_SDK_INSTALL_URL="https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-$WASI_SDK_VERSION/$WASI_SDK_TARBALL" OUTFILE="/tmp/$WASI_SDK_TARBALL" @@ -67,4 +67,13 @@ if [ ! -d $WASI_SDK_INSTALL_DIR ]; then echo "Extracting to $WASI_SDK_INSTALL_DIR..." tar zxf $OUTFILE -C $TOOL_INSTALL_DIR + + # Rename the architecture-specific directory to a generic name + EXTRACTED_DIR="$TOOL_INSTALL_DIR/wasi-sdk-$WASI_SDK_VERSION_FULL-$SYS_ARCH-$SYS_OS" + GENERIC_DIR="$TOOL_INSTALL_DIR/wasi-sdk-$WASI_SDK_VERSION_FULL" + + if [ -d "$EXTRACTED_DIR" ]; then + echo "Renaming $EXTRACTED_DIR to $GENERIC_DIR..." + mv "$EXTRACTED_DIR" "$GENERIC_DIR" + fi fi