From d2bd3f20f45bfeafbd9475aff87a7aebfaceafe2 Mon Sep 17 00:00:00 2001 From: klensy Date: Mon, 27 Sep 2021 10:54:24 +0300 Subject: [PATCH] try to fix wasm32-unknown-unknown build --- Cargo.lock | 96 +++++++++++++++++++++++++++++++++++++---- library/test/Cargo.toml | 3 ++ 2 files changed, 90 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 079fd90a3e1cf..f54dadfebfdbe 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -232,6 +232,12 @@ dependencies = [ "toml", ] +[[package]] +name = "bumpalo" +version = "3.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9df67f7bf9ef8498769f994239c45613ef0c5899415fb58e9add412d2c1a538" + [[package]] name = "byte-tools" version = "0.3.1" @@ -1401,18 +1407,20 @@ checksum = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb" dependencies = [ "cfg-if 0.1.10", "libc", - "wasi", + "wasi 0.9.0+wasi-snapshot-preview1", ] [[package]] name = "getrandom" -version = "0.2.0" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee8025cf36f917e6a52cce185b7c7177689b838b7ec138364e50cc2277a56cf4" +checksum = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753" dependencies = [ - "cfg-if 0.1.10", + "cfg-if 1.0.0", + "js-sys", "libc", - "wasi", + "wasi 0.10.2+wasi-snapshot-preview1", + "wasm-bindgen", ] [[package]] @@ -1742,6 +1750,15 @@ dependencies = [ "libc", ] +[[package]] +name = "js-sys" +version = "0.3.49" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc15e39392125075f60c95ba416f5381ff6c3a948ff02ab12464715adf56c821" +dependencies = [ + "wasm-bindgen", +] + [[package]] name = "json" version = "0.12.4" @@ -2251,7 +2268,7 @@ dependencies = [ "colored", "compiletest_rs", "env_logger 0.8.1", - "getrandom 0.2.0", + "getrandom 0.2.3", "hex 0.4.2", "libc", "log", @@ -2897,7 +2914,7 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34cf66eb183df1c5876e2dcf6b13d57340741e8dc255b48e40a26de954d06ae7" dependencies = [ - "getrandom 0.2.0", + "getrandom 0.2.3", ] [[package]] @@ -2985,7 +3002,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "528532f3d801c87aec9def2add9ca802fe569e44a544afe633765267840abe64" dependencies = [ - "getrandom 0.2.0", + "getrandom 0.2.3", "redox_syscall", ] @@ -4958,7 +4975,7 @@ dependencies = [ "rustc-demangle", "std_detect", "unwind", - "wasi", + "wasi 0.9.0+wasi-snapshot-preview1", ] [[package]] @@ -5175,6 +5192,7 @@ dependencies = [ "cfg-if 0.1.10", "core", "getopts", + "getrandom 0.2.3", "libc", "panic_abort", "panic_unwind", @@ -5662,6 +5680,66 @@ dependencies = [ "rustc-std-workspace-core", ] +[[package]] +name = "wasi" +version = "0.10.2+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" + +[[package]] +name = "wasm-bindgen" +version = "0.2.72" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fe8f61dba8e5d645a4d8132dc7a0a66861ed5e1045d2c0ed940fab33bac0fbe" +dependencies = [ + "cfg-if 1.0.0", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.72" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "046ceba58ff062da072c7cb4ba5b22a37f00a302483f7e2a6cdc18fedbdc1fd3" +dependencies = [ + "bumpalo", + "lazy_static", + "log", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.72" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ef9aa01d36cda046f797c57959ff5f3c615c9cc63997a8d545831ec7976819b" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.72" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96eb45c1b2ee33545a813a92dbb53856418bf7eb54ab34f7f7ff1448a5b3735d" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.72" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7148f4696fb4960a346eaa60bbfb42a1ac4ebba21f750f75fc1375b098d5ffa" + [[package]] name = "winapi" version = "0.3.9" diff --git a/library/test/Cargo.toml b/library/test/Cargo.toml index 04dab6b804acc..3cf36342c42c9 100644 --- a/library/test/Cargo.toml +++ b/library/test/Cargo.toml @@ -18,6 +18,9 @@ panic_abort = { path = "../panic_abort" } # not actually used but needed to always have proc_macro in the sysroot proc_macro = { path = "../proc_macro" } +[target.'cfg(all(target_arch = "wasm32", target_os = "unknown"))'.dev-dependencies] +getrandom = { version = "0.2", features = ['js'] } + # Forward features to the `std` crate as necessary [features] default = ["std_detect_file_io", "std_detect_dlsym_getauxval", "panic-unwind"]