From 3233e29c57ed00df13a30d139a5ba3876bbed86f Mon Sep 17 00:00:00 2001 From: UebelAndre Date: Thu, 28 Nov 2024 14:02:58 -0800 Subject: [PATCH] nix --- examples/nix_cross_compiling/WORKSPACE.bazel | 6 +++--- .../bazel/cargo/cargo-bazel-lock.json | 12 ++++++------ .../nix_cross_compiling/bazel/nix_repositories.bzl | 12 ++++++------ .../nix_cross_compiling/bazel/platforms/BUILD.bazel | 2 +- .../toolchain_rules/llvm_cc_toolchain_config.bzl | 2 +- .../cc/{wasm32-wasi => wasm32-wasip1}/BUILD.bazel | 6 +++--- .../rust/{wasm32-wasi => wasm32-wasip1}/BUILD.bazel | 4 ++-- examples/nix_cross_compiling/cc_binary/BUILD.bazel | 2 +- examples/nix_cross_compiling/nix/flake.nix | 2 +- examples/nix_cross_compiling/rust_binary/BUILD.bazel | 2 +- 10 files changed, 25 insertions(+), 25 deletions(-) rename examples/nix_cross_compiling/bazel/toolchains/cc/{wasm32-wasi => wasm32-wasip1}/BUILD.bazel (92%) rename examples/nix_cross_compiling/bazel/toolchains/rust/{wasm32-wasi => wasm32-wasip1}/BUILD.bazel (91%) diff --git a/examples/nix_cross_compiling/WORKSPACE.bazel b/examples/nix_cross_compiling/WORKSPACE.bazel index bde11548ee..61df1567b3 100644 --- a/examples/nix_cross_compiling/WORKSPACE.bazel +++ b/examples/nix_cross_compiling/WORKSPACE.bazel @@ -23,7 +23,7 @@ register_toolchains( "//bazel/toolchains/cc/aarch64-linux-android:toolchain", "//bazel/toolchains/cc/aarch64-unknown-linux-gnu:toolchain", "//bazel/toolchains/cc/wasm32-unknown-unknown:toolchain", - "//bazel/toolchains/cc/wasm32-wasi:toolchain", + "//bazel/toolchains/cc/wasm32-wasip1:toolchain", "//bazel/toolchains/cc/x86_64-apple-darwin:toolchain", "//bazel/toolchains/cc/x86_64-pc-windows-msvc:toolchain", "//bazel/toolchains/cc/x86_64-unknown-linux-gnu:toolchain", @@ -33,7 +33,7 @@ register_toolchains( "//bazel/toolchains/rust/aarch64-linux-android:toolchain", "//bazel/toolchains/rust/aarch64-unknown-linux-gnu:toolchain", "//bazel/toolchains/rust/wasm32-unknown-unknown:toolchain", - "//bazel/toolchains/rust/wasm32-wasi:toolchain", + "//bazel/toolchains/rust/wasm32-wasip1:toolchain", "//bazel/toolchains/rust/x86_64-apple-darwin:toolchain", "//bazel/toolchains/rust/x86_64-pc-windows-msvc:toolchain", "//bazel/toolchains/rust/x86_64-unknown-linux-gnu:toolchain", @@ -81,7 +81,7 @@ crates_repository( "aarch64-linux-android", "aarch64-unknown-linux-gnu", "wasm32-unknown-unknown", - "wasm32-wasi", + "wasm32-wasip1", "x86_64-apple-darwin", "x86_64-pc-windows-msvc", "x86_64-unknown-linux-gnu", diff --git a/examples/nix_cross_compiling/bazel/cargo/cargo-bazel-lock.json b/examples/nix_cross_compiling/bazel/cargo/cargo-bazel-lock.json index 2637fb0dab..75c34e3faa 100644 --- a/examples/nix_cross_compiling/bazel/cargo/cargo-bazel-lock.json +++ b/examples/nix_cross_compiling/bazel/cargo/cargo-bazel-lock.json @@ -1,5 +1,5 @@ { - "checksum": "481fd0b233da84d05be76eab0348aed71d77a697b3b5601bb66c73021dc3486d", + "checksum": "0463d554fa79618afcc05ee52f2009b9eb4e7db5474282c8e5d0f1fb37da4764", "crates": { "addr2line 0.21.0": { "name": "addr2line", @@ -2383,7 +2383,7 @@ "aarch64-linux-android", "aarch64-unknown-linux-gnu", "wasm32-unknown-unknown", - "wasm32-wasi", + "wasm32-wasip1", "x86_64-apple-darwin", "x86_64-unknown-linux-gnu", "x86_64-unknown-nixos-gnu" @@ -2394,7 +2394,7 @@ "aarch64-linux-android", "aarch64-unknown-linux-gnu", "wasm32-unknown-unknown", - "wasm32-wasi", + "wasm32-wasip1", "x86_64-apple-darwin", "x86_64-unknown-linux-gnu", "x86_64-unknown-nixos-gnu" @@ -2402,7 +2402,7 @@ "cfg(target_os = \"hermit\")": [], "cfg(target_os = \"redox\")": [], "cfg(target_os = \"wasi\")": [ - "wasm32-wasi" + "wasm32-wasip1" ], "cfg(tokio_taskdump)": [], "cfg(unix)": [ @@ -2420,8 +2420,8 @@ "wasm32-unknown-unknown": [ "wasm32-unknown-unknown" ], - "wasm32-wasi": [ - "wasm32-wasi" + "wasm32-wasip1": [ + "wasm32-wasip1" ], "x86_64-apple-darwin": [ "x86_64-apple-darwin" diff --git a/examples/nix_cross_compiling/bazel/nix_repositories.bzl b/examples/nix_cross_compiling/bazel/nix_repositories.bzl index 378eed7d6c..ce0c386255 100644 --- a/examples/nix_cross_compiling/bazel/nix_repositories.bzl +++ b/examples/nix_cross_compiling/bazel/nix_repositories.bzl @@ -141,14 +141,14 @@ rust_stdlib_filegroup( ) rust_stdlib_filegroup( - name = "rust_std-wasm32-wasi", + name = "rust_std-wasm32-wasip1", srcs = glob( [ - "lib/rustlib/wasm32-wasi/lib/*.rlib", - "lib/rustlib/wasm32-wasi/lib/*.so", - "lib/rustlib/wasm32-wasi/lib/*.dylib", - "lib/rustlib/wasm32-wasi/lib/*.a", - "lib/rustlib/wasm32-wasi/lib/self-contained/**", + "lib/rustlib/wasm32-wasip1/lib/*.rlib", + "lib/rustlib/wasm32-wasip1/lib/*.so", + "lib/rustlib/wasm32-wasip1/lib/*.dylib", + "lib/rustlib/wasm32-wasip1/lib/*.a", + "lib/rustlib/wasm32-wasip1/lib/self-contained/**", ], # Some patterns (e.g. `lib/*.a`) don't match anything, see https://github.com/bazelbuild/rules_rust/pull/245 allow_empty = True, diff --git a/examples/nix_cross_compiling/bazel/platforms/BUILD.bazel b/examples/nix_cross_compiling/bazel/platforms/BUILD.bazel index 55f7faca12..bed7e836e1 100644 --- a/examples/nix_cross_compiling/bazel/platforms/BUILD.bazel +++ b/examples/nix_cross_compiling/bazel/platforms/BUILD.bazel @@ -49,7 +49,7 @@ platform( ) platform( - name = "wasm32-wasi", + name = "wasm32-wasip1", constraint_values = [ "@platforms//cpu:wasm32", "@platforms//os:wasi", diff --git a/examples/nix_cross_compiling/bazel/toolchain_rules/llvm_cc_toolchain_config.bzl b/examples/nix_cross_compiling/bazel/toolchain_rules/llvm_cc_toolchain_config.bzl index 726b18b2d4..92692c58ee 100644 --- a/examples/nix_cross_compiling/bazel/toolchain_rules/llvm_cc_toolchain_config.bzl +++ b/examples/nix_cross_compiling/bazel/toolchain_rules/llvm_cc_toolchain_config.bzl @@ -104,7 +104,7 @@ TARGET_CONFIG = { link_action_configs = wasm_ld_link_action_configs, strip_action_configs = llvm_strip_strip_action_configs, ), - "wasm32-wasi": struct( + "wasm32-wasip1": struct( artifact_name_patterns = WASM_ARTIFACT_NAME_PATTERNS, compile_action_configs = clang_compile_action_configs, archive_action_configs = llvm_ar_archive_action_configs, diff --git a/examples/nix_cross_compiling/bazel/toolchains/cc/wasm32-wasi/BUILD.bazel b/examples/nix_cross_compiling/bazel/toolchains/cc/wasm32-wasip1/BUILD.bazel similarity index 92% rename from examples/nix_cross_compiling/bazel/toolchains/cc/wasm32-wasi/BUILD.bazel rename to examples/nix_cross_compiling/bazel/toolchains/cc/wasm32-wasip1/BUILD.bazel index 3af385af28..cbb27841b9 100644 --- a/examples/nix_cross_compiling/bazel/toolchains/cc/wasm32-wasi/BUILD.bazel +++ b/examples/nix_cross_compiling/bazel/toolchains/cc/wasm32-wasip1/BUILD.bazel @@ -26,7 +26,7 @@ llvm_cc_toolchain_config( "m", ], builtin_library_directories = [ - "{}/wasi-sysroot/lib/wasm32-wasi".format(SDK_WASM32_WASI), + "{}/wasi-sysroot/lib/wasm32-wasip1".format(SDK_WASM32_WASI), ], clang = CLANG, compile_flags = [ @@ -44,7 +44,7 @@ llvm_cc_toolchain_config( "--fatal-warnings", # `wasm-ld` doesn't respect the verbatim `-l:` syntax. "{}/lib/wasi/libclang_rt.builtins-wasm32.a".format(LIBCLANG_RT_WASM32), - "{}/wasi-sysroot/lib/wasm32-wasi/crt1.o".format(SDK_WASM32_WASI), + "{}/wasi-sysroot/lib/wasm32-wasip1/crt1.o".format(SDK_WASM32_WASI), ], llvm = LLVM, opt_compile_flags = [], @@ -53,7 +53,7 @@ llvm_cc_toolchain_config( ], supports_start_end_lib = False, tags = ["manual"], - target = "wasm32-wasi", + target = "wasm32-wasip1", ) cc_toolchain( diff --git a/examples/nix_cross_compiling/bazel/toolchains/rust/wasm32-wasi/BUILD.bazel b/examples/nix_cross_compiling/bazel/toolchains/rust/wasm32-wasip1/BUILD.bazel similarity index 91% rename from examples/nix_cross_compiling/bazel/toolchains/rust/wasm32-wasi/BUILD.bazel rename to examples/nix_cross_compiling/bazel/toolchains/rust/wasm32-wasip1/BUILD.bazel index 924b6c2733..19aa94c23e 100644 --- a/examples/nix_cross_compiling/bazel/toolchains/rust/wasm32-wasi/BUILD.bazel +++ b/examples/nix_cross_compiling/bazel/toolchains/rust/wasm32-wasip1/BUILD.bazel @@ -12,13 +12,13 @@ rust_toolchain( extra_exec_rustc_flags = [], extra_rustc_flags = [], rust_doc = "@nix_rust//:rustdoc", - rust_std = "@nix_rust//:rust_std-wasm32-wasi", + rust_std = "@nix_rust//:rust_std-wasm32-wasip1", rustc = "@nix_rust//:rustc", rustc_lib = "@nix_rust//:rustc_lib", staticlib_ext = ".a", stdlib_linkflags = [], tags = ["manual"], - target_triple = "wasm32-wasi", + target_triple = "wasm32-wasip1", ) toolchain( diff --git a/examples/nix_cross_compiling/cc_binary/BUILD.bazel b/examples/nix_cross_compiling/cc_binary/BUILD.bazel index f68b240eea..d7eb651e8c 100644 --- a/examples/nix_cross_compiling/cc_binary/BUILD.bazel +++ b/examples/nix_cross_compiling/cc_binary/BUILD.bazel @@ -38,7 +38,7 @@ platform_transition_binary( platform_transition_binary( name = "cc_binary_wasm32-wasi", binary = ":cc_binary", - target_platform = "//bazel/platforms:wasm32-wasi", + target_platform = "//bazel/platforms:wasm32-wasip1", ) # platform_transition_binary( diff --git a/examples/nix_cross_compiling/nix/flake.nix b/examples/nix_cross_compiling/nix/flake.nix index d329b93dab..cabcca2383 100644 --- a/examples/nix_cross_compiling/nix/flake.nix +++ b/examples/nix_cross_compiling/nix/flake.nix @@ -31,7 +31,7 @@ targets."aarch64-linux-android".latest.rust-std targets."aarch64-unknown-linux-gnu".latest.rust-std targets."wasm32-unknown-unknown".latest.rust-std - targets."wasm32-wasi".latest.rust-std + targets."wasm32-wasip1".latest.rust-std targets."x86_64-apple-darwin".latest.rust-std targets."x86_64-pc-windows-msvc".latest.rust-std targets."x86_64-unknown-linux-gnu".latest.rust-std diff --git a/examples/nix_cross_compiling/rust_binary/BUILD.bazel b/examples/nix_cross_compiling/rust_binary/BUILD.bazel index dcc1b4a6fb..da5db47838 100644 --- a/examples/nix_cross_compiling/rust_binary/BUILD.bazel +++ b/examples/nix_cross_compiling/rust_binary/BUILD.bazel @@ -64,7 +64,7 @@ rust_binary( rust_binary( name = "rust_binary_wasm32-wasi", srcs = ["rust_binary_wasm32-wasi.rs"], # See comments in `rust_binary_wasm32-wasi.rs`. - platform = "//bazel/platforms:wasm32-wasi", + platform = "//bazel/platforms:wasm32-wasip1", deps = [ "//cc_library", "//rust_library",