diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9e84fe23f..95a9bff9a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -217,6 +217,11 @@ jobs: rustup override set nightly make build-wasmer-headless-minimal rustup override set stable + - name: Build Wasmer with minimal "sys" features + run: | + cargo build --no-default-features --features="sys" --manifest-path=lib/api/Cargo.toml && + cargo build --manifest-path=lib/cache/Cargo.toml && + cargo build --manifest-path=lib/vbus/Cargo.toml - name: Dist if: matrix.build != 'macos-arm64' run: | diff --git a/CHANGELOG.md b/CHANGELOG.md index e2421d0d7..4f555b361 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,24 +8,67 @@ Looking for changes that affect our C API? See the [C API Changelog](lib/c-api/C ## **Unreleased** +### Added + ### Changed -- [#3047](https://github.com/wasmerio/wasmer/pull/3047) `Store::new` now takes an `impl Into`. -- [#3017](https://github.com/wasmerio/wasmer/pull/3017) Fix typo in README.md -- [#3008](https://github.com/wasmerio/wasmer/pull/3008) Add a new CI check that uses cargo public-api to track changes in the API between master and the last deployed version on crates.io -- [#3003](https://github.com/wasmerio/wasmer/pull/3003) Remove RuntimeError::raise from public API -- [#2999](https://github.com/wasmerio/wasmer/pull/2999) Allow `--invoke` CLI option for Emscripten files without a `main` function -- [#2997](https://github.com/wasmerio/wasmer/pull/2997) Fix "run --invoke [function]" to behave the same as "run" -- [#2946](https://github.com/wasmerio/wasmer/pull/2946) Remove dylib,staticlib engines in favor of a single Universal engine -- [#2949](https://github.com/wasmerio/wasmer/pull/2949) Switch back to using custom LLVM builds on CI -- #2892 Renamed `get_native_function` to `get_typed_function`, marked former as deprecated. -- [#3029](https://github.com/wasmerio/wasmer/pull/3029) Removed Artifact, Engine traits. Renamed UniversalArtifact to Artifact, and UniversalEngine to Engine. ### Fixed + +## 3.0.0-alpha.4 - 2022/07/28 + +### Added +- [#3035](https://github.com/wasmerio/wasmer/pull/3035) Added a simple "divide by zero" wast test, for #1899, as the trap information are correctly tracked on singlepass now +- [#3021](https://github.com/wasmerio/wasmer/pull/3021) Add back missing Aarch64 relocations (needed for llvm compiler) +- [#3008](https://github.com/wasmerio/wasmer/pull/3008) Add a new cargo public-api CI check +- [#2941](https://github.com/wasmerio/wasmer/pull/2941) Implementation of WASIX and a fully networking for Web Assembly +- [#2952](https://github.com/wasmerio/wasmer/pull/2952) CI: add make build-wasmer-wasm test +- [#2982](https://github.com/wasmerio/wasmer/pull/2982) Add a rustfmt.toml file to the repository + +### Changed +- [#3047](https://github.com/wasmerio/wasmer/pull/3047) `Store::new` now takes an `impl Into`. +- [#3046](https://github.com/wasmerio/wasmer/pull/3046) Merge Backend into EngineBuilder and refactor feature flags +- [#3039](https://github.com/wasmerio/wasmer/pull/3039) Improved hashing/ids of function envs +- [#3031](https://github.com/wasmerio/wasmer/pull/3031) Update docs/migration_to_3.0.0.md +- [#3030](https://github.com/wasmerio/wasmer/pull/3030) Remove cranelift dependency from wasmer-wasi +- [#3029](https://github.com/wasmerio/wasmer/pull/3029) Removed Artifact, Engine traits. Renamed UniversalArtifact to Artifact, and UniversalEngine to Engine. +- [#3028](https://github.com/wasmerio/wasmer/pull/3028) Rename old variable names from ctx to env (in case of FunctionEnv usage) and from ctx to store in case of store usage +- [#3023](https://github.com/wasmerio/wasmer/pull/3023) Changed CI "rust install" action to dtolnay one +- [#3013](https://github.com/wasmerio/wasmer/pull/3013) Refactor Context API +- [#3003](https://github.com/wasmerio/wasmer/pull/3003) Remove RuntimeError::raise from public API +- [#3000](https://github.com/wasmerio/wasmer/pull/3001) Allow debugging of EXC_BAD_INSTRUCTION on macOS +- [#2999](https://github.com/wasmerio/wasmer/pull/2999) Allow `--invoke` CLI option for Emscripten files without a `main` function +- [#2996](https://github.com/wasmerio/wasmer/pull/2996) Migrated all examples to new Context API +- [#2946](https://github.com/wasmerio/wasmer/pull/2946) Remove dylib,staticlib engines in favor of a single Universal engine +- [#2949](https://github.com/wasmerio/wasmer/pull/2949) Switch back to using custom LLVM builds on CI +- [#2892](https://github.com/wasmerio/wasmer/pull/2892) Renamed `get_native_function` to `get_typed_function`, marked former as deprecated. +- [#2976](https://github.com/wasmerio/wasmer/pull/2976) Upgrade enumset minimum version to one that compiles +- [#2974](https://github.com/wasmerio/wasmer/pull/2974) Context api tests +- [#2973](https://github.com/wasmerio/wasmer/pull/2973) Port C API to new Context API +- [#2969](https://github.com/wasmerio/wasmer/pull/2969) Port JS API to new Context API +- [#2966](https://github.com/wasmerio/wasmer/pull/2966) Singlepass nopanic #2966 +- [#2957](https://github.com/wasmerio/wasmer/pull/2957) Enable multi-value handling in Singlepass compiler +- [#2954](https://github.com/wasmerio/wasmer/pull/2954) Some fixes to x86_64 Singlepass compiler, when using atomics +- [#2953](https://github.com/wasmerio/wasmer/pull/2953) Makefile: add check target +- [#2950](https://github.com/wasmerio/wasmer/pull/2950) compiler-cranelift: Fix typo in enum variant +- [#2947](https://github.com/wasmerio/wasmer/pull/2947) Converted the WASI js test into a generic stdio test that works for both sys and js versions of wasmer +- [#2940](https://github.com/wasmerio/wasmer/pull/2940) Merge wasmer3 back to master branch +- [#2939](https://github.com/wasmerio/wasmer/pull/2939) Rename NativeFunc to TypedFunction + +### Fixed +- [#3045](https://github.com/wasmerio/wasmer/pull/3045) Fixed WASI fd_read syscall when reading multiple iovs and read is partial (for #2904) +- [#3027](https://github.com/wasmerio/wasmer/pull/3027) Fixed some residual doc issues that prevented make package-docs to build +- [#3026](https://github.com/wasmerio/wasmer/pull/3026) test-js.yaml: fix typo +- [#3017](https://github.com/wasmerio/wasmer/pull/3017) Fix typo in README.md +- [#3001](https://github.com/wasmerio/wasmer/pull/3001) Fix context capi ci errors +- [#2997](https://github.com/wasmerio/wasmer/pull/2997) Fix "run --invoke [function]" to behave the same as "run" - [#2963](https://github.com/wasmerio/wasmer/pull/2963) Remove accidental dependency on libwayland and libxcb in ClI - [#2942](https://github.com/wasmerio/wasmer/pull/2942) Fix clippy lints. - [#2943](https://github.com/wasmerio/wasmer/pull/2943) Fix build error on some archs by using c_char instead of i8 - [2976](https://github.com/wasmerio/wasmer/pull/2976) Upgrade minimum enumset to one that compiles - [2988](https://github.com/wasmerio/wasmer/pull/2988) Have make targets install-capi-lib,install-pkgconfig work without building the wasmer binary +- [#2967](https://github.com/wasmerio/wasmer/pull/2967) Fix singlepass on arm64 that was trying to emit a sub opcode with a constant as destination (for #2959) +- [#2948](https://github.com/wasmerio/wasmer/pull/2948) Fix regression on gen_import_call_trampoline_arm64() +- [#2944](https://github.com/wasmerio/wasmer/pull/2944) Fix duplicate entries in the CHANGELOG ## 2.3.0 - 2022/06/06 diff --git a/Cargo.lock b/Cargo.lock index 58489ba67..eac55091c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -48,15 +48,15 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.57" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f9b8508dccb7687a1d6c4ce66b2b0ecef467c94667de27d8d7fe1f8d2a9cdc" +checksum = "bb07d2053ccdbe10e2af2995a2f116c1330396493dc1269f6a91d0ae82e19704" [[package]] name = "arbitrary" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25e0a02cf12f1b1f48b14cb7f8217b876d09992b39c816ffb3b1ba64dd979a87" +checksum = "5a7924531f38b1970ff630f03eb20a2fde69db5c590c93b0f3482e95dcc5fd60" dependencies = [ "derive_arbitrary", ] @@ -106,24 +106,24 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" -version = "0.3.65" +version = "0.3.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11a17d453482a265fd5f8479f2a3f405566e6ca627837aaddb85af8b1ab8ef61" +checksum = "cab84319d616cfb654d03394f38ab7e6f0919e181b1b57e1fd15e7fb4077d9a7" dependencies = [ "addr2line", "cc", "cfg-if 1.0.0", "libc", "miniz_oxide", - "object", + "object 0.29.0", "rustc-demangle", ] [[package]] name = "base-x" -version = "0.2.10" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc19a4937b4fbd3fe3379793130e42060d10627a360f2127802b10b87e7baf74" +checksum = "4cbbc9d0964165b47557570cce6c952866c2678457aca742aafc9fb771d30270" [[package]] name = "bincode" @@ -215,9 +215,9 @@ checksum = "37ccbd214614c6783386c1af30caf03192f17891059cecc394b4fb119e363de3" [[package]] name = "bytecheck" -version = "0.6.8" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a31f923c2db9513e4298b72df143e6e655a759b3d6a0966df18f81223fff54f" +checksum = "d11cac2c12b5adc6570dad2ee1b87eff4955dac476fe12d81e5fdd352e52406f" dependencies = [ "bytecheck_derive", "ptr_meta", @@ -225,9 +225,9 @@ dependencies = [ [[package]] name = "bytecheck_derive" -version = "0.6.8" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edb17c862a905d912174daa27ae002326fff56dc8b8ada50a0a5f0976cb174f0" +checksum = "13e576ebe98e605500b3c8041bb888e966653577172df6dd97398714eb30b9bf" dependencies = [ "proc-macro2", "quote", @@ -242,9 +242,9 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "bytes" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" +checksum = "f0b3de4a0c5e67e16066a0715723abd91edc2f9001d09c46e1dca929351e130e" [[package]] name = "bytesize" @@ -254,12 +254,9 @@ checksum = "6c58ec36aac5066d5ca17df51b3e70279f5670a72102f5752cb7e7c856adfc70" [[package]] name = "cast" -version = "0.2.7" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c24dab4283a142afa2fdca129b80ad2c6284e073930f964c3a1293c225ee39a" -dependencies = [ - "rustc_version 0.4.0", -] +checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cbindgen" @@ -267,7 +264,7 @@ version = "0.24.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a6358dedf60f4d9b8db43ad187391afe959746101346fe51bb978126bec61dfb" dependencies = [ - "clap 3.2.6", + "clap 3.2.15", "heck 0.4.0", "indexmap", "log", @@ -349,9 +346,9 @@ dependencies = [ [[package]] name = "clap" -version = "3.2.6" +version = "3.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f1fe12880bae935d142c8702d500c63a4e8634b6c3c57ad72bf978fc7b6249a" +checksum = "44bbe24bbd31a185bc2c4f7c2abe80bea13a20d57ee4e55be70ac512bdc76417" dependencies = [ "atty", "bitflags", @@ -364,9 +361,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87eba3c8c7f42ef17f6c659fc7416d0f4758cd3e58861ee63c5fa4a4dde649e4" +checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" dependencies = [ "os_str_bytes", ] @@ -459,15 +456,15 @@ checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" [[package]] name = "corosensei" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab4b310cff9117ec16d05970743c20df3eaddafd461829f2758e76a8de2863a9" +checksum = "9847f90f32a50b0dcbd68bc23ff242798b13080b97b0569f6ed96a45ce4cf2cd" dependencies = [ "autocfg", "cfg-if 1.0.0", "libc", "scopeguard", - "windows-sys", + "windows-sys 0.33.0", ] [[package]] @@ -549,9 +546,9 @@ dependencies = [ [[package]] name = "criterion" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1604dafd25fba2fe2d5895a9da139f8dc9b319a5fe5354ca137cbbce4e178d10" +checksum = "b01d6de93b2b6c65e17c634a26653a29d107b3c98c607c765bf38d041531cd8f" dependencies = [ "atty", "cast", @@ -575,9 +572,9 @@ dependencies = [ [[package]] name = "criterion-plot" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d00996de9f2f7559f7f4dc286073197f83e92256a59ed395f9aac01fe717da57" +checksum = "2673cc8207403546f45f5fd319a974b1e6983ad1a3ee7e6041650013be041876" dependencies = [ "cast", "itertools", @@ -585,9 +582,9 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.5" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c02a4d71819009c192cf4872265391563fd6a84c81ff2c0f2a7026ca4c1d85c" +checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" dependencies = [ "cfg-if 1.0.0", "crossbeam-utils", @@ -595,9 +592,9 @@ dependencies = [ [[package]] name = "crossbeam-deque" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" +checksum = "715e8152b692bba2d374b53d4875445368fdf21a94751410af607a5ac677d1fc" dependencies = [ "cfg-if 1.0.0", "crossbeam-epoch", @@ -606,9 +603,9 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.9" +version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07db9d94cbd326813772c968ccd25999e5f8ae22f4f8d1b11effa37ef6ce281d" +checksum = "045ebe27666471bb549370b4b0b3e51b07f56325befa4284db65fc89c02511b1" dependencies = [ "autocfg", "cfg-if 1.0.0", @@ -620,9 +617,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.9" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ff1f980957787286a554052d03c7aee98d99cc32e09f6d45f0a814133c87978" +checksum = "51887d4adc7b564537b15adcfb307936f8075dfcd5f00dde9a9f1d29383682bc" dependencies = [ "cfg-if 1.0.0", "once_cell", @@ -630,9 +627,9 @@ dependencies = [ [[package]] name = "crypto-common" -version = "0.1.3" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57952ca27b5e3606ff4dd79b0020231aaf9d6aa76dc05fd30137538c50bd3ce8" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ "generic-array", "typenum", @@ -662,9 +659,9 @@ dependencies = [ [[package]] name = "ctor" -version = "0.1.22" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f877be4f7c9f246b183111634f75baa039715e3f46ce860677d3b19a69fb229c" +checksum = "cdffe87e1d521a10f9696f833fe502293ea446d7f256c06128293a4119bdf4cb" dependencies = [ "quote", "syn", @@ -723,9 +720,9 @@ dependencies = [ [[package]] name = "derive_arbitrary" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8728db27dd9033a7456655aaeb35fde74425d0f130b4cb18a19171ef38a1b454" +checksum = "c9a577516173adb681466d517d39bd468293bc2c2a16439375ef0f35bba45f3d" dependencies = [ "proc-macro2", "quote", @@ -734,9 +731,9 @@ dependencies = [ [[package]] name = "diff" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e25ea47919b1560c4e3b7fe0aaab9becf5b84a10325ddf7db0f0ba5e1026499" +checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" [[package]] name = "difference" @@ -834,9 +831,9 @@ dependencies = [ [[package]] name = "either" -version = "1.6.1" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" +checksum = "3f107b87b6afc2a64fd13cac55fe06d6c8859f12d4b14cbcdd2c67d0976781be" [[package]] name = "enum-iterator" @@ -894,9 +891,9 @@ dependencies = [ [[package]] name = "erased-serde" -version = "0.3.20" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad132dd8d0d0b546348d7d86cb3191aad14b34e5f979781fc005c80d4ac67ffd" +checksum = "81d013529d5574a60caeda29e179e695125448e5de52e3874f7b4c1d7360e18e" dependencies = [ "serde", ] @@ -909,9 +906,9 @@ checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" [[package]] name = "fastrand" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3fcf0cee53519c866c09b5de1f6c56ff9d647101f81c1964fa632e148896cdf" +checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" dependencies = [ "instant", ] @@ -938,14 +935,14 @@ dependencies = [ [[package]] name = "filetime" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0408e2626025178a6a7f7ffc05a25bc47103229f19c113755de7bf63816290c" +checksum = "e94a7bbaa59354bc20dd75b67f23e2797b4490e9d6928203fb105c79e448c86c" dependencies = [ "cfg-if 1.0.0", "libc", "redox_syscall", - "winapi", + "windows-sys 0.36.1", ] [[package]] @@ -1016,9 +1013,9 @@ dependencies = [ [[package]] name = "ghost" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76c813ffb63e8fd3df6f1ac3cc1ea392c7612ac2de4d0b44dcbfe03e5c4bf94a" +checksum = "b93490550b1782c589a350f2211fff2e34682e25fed17ef53fc4fa8fe184975e" dependencies = [ "proc-macro2", "quote", @@ -1027,9 +1024,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.26.1" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78cc372d058dcf6d5ecd98510e7fbc9e5aec4d21de70f65fea8fecebcd881bd4" +checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d" dependencies = [ "fallible-iterator", "indexmap", @@ -1079,9 +1076,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.12.1" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db0d4cf898abf0081f964436dc980e96670a0f36863e4b83aaacdb65c9d7ccc3" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ "ahash", ] @@ -1130,12 +1127,12 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "indexmap" -version = "1.9.0" +version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c6392766afd7964e2531940894cffe4bd8d7d17dbc3c1c4857040fd4b33bdb3" +checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e" dependencies = [ "autocfg", - "hashbrown 0.12.1", + "hashbrown 0.12.3", "serde", ] @@ -1235,9 +1232,9 @@ checksum = "112c678d4050afce233f4f2852bb2eb519230b3cf12f33585275537d7e41578d" [[package]] name = "js-sys" -version = "0.3.58" +version = "0.3.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3fac17f7123a73ca62df411b1bf727ccc805daa070338fda671c86dac1bdc27" +checksum = "258451ab10b34f8af53416d1fdab72c22e805f0c92a1136d59470ec0b11138b2" dependencies = [ "wasm-bindgen", ] @@ -1345,9 +1342,9 @@ checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "memmap2" -version = "0.5.4" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5172b50c23043ff43dd53e51392f36519d9b35a8f3a410d30ece5d1aedd58ae" +checksum = "3a79b39c93a7a5a27eeaf9a23b5ff43f1b9e0ad6b1cdd441140ae53c35613fc7" dependencies = [ "libc", ] @@ -1491,10 +1488,19 @@ dependencies = [ ] [[package]] -name = "once_cell" -version = "1.12.0" +name = "object" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7709cef83f0c1f58f666e746a08b21e0085f7440fa6a29cc194d68aac97a4225" +checksum = "21158b2c33aa6d4561f1c0a6ea283ca92bc54802a93b263e910746d679a7eb53" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18a6dbe30758c9f83eb00cbea4ac95966305f5a7772f3f42ebfc7fc7eddbd8e1" [[package]] name = "oorandom" @@ -1519,9 +1525,9 @@ dependencies = [ [[package]] name = "os_str_bytes" -version = "6.1.0" +version = "6.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21326818e99cfe6ce1e524c2a805c189a99b5ae555a35d19f9a284b427d86afa" +checksum = "648001efe5d5c0102d8cea768e348da85d90af8ba91f0bea908f157951493cd4" [[package]] name = "output_vt100" @@ -1592,9 +1598,9 @@ checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae" [[package]] name = "plotters" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a3fd9ec30b9749ce28cd91f255d569591cdf937fe280c312143e3c4bad6f2a" +checksum = "9428003b84df1496fb9d6eeee9c5f8145cb41ca375eb0dad204328888832811f" dependencies = [ "num-traits", "plotters-backend", @@ -1605,15 +1611,15 @@ dependencies = [ [[package]] name = "plotters-backend" -version = "0.3.2" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d88417318da0eaf0fdcdb51a0ee6c3bed624333bff8f946733049380be67ac1c" +checksum = "193228616381fecdc1224c62e96946dfbc73ff4384fba576e052ff8c1bea8142" [[package]] name = "plotters-svg" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "521fa9638fa597e1dc53e9412a4f9cefb01187ee1f7413076f9e6749e2885ba9" +checksum = "e0918736323d1baff32ee0eade54984f6f201ad7e97d5cfb5d6ab4a358529615" dependencies = [ "plotters-backend", ] @@ -1708,9 +1714,9 @@ checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" [[package]] name = "proc-macro2" -version = "1.0.39" +version = "1.0.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c54b25569025b7fc9651de43004ae593a75ad88543b17178aa5e1b9c4f15f56f" +checksum = "c278e965f1d8cf32d6e0e96de3d3e79712178ae67986d9cf9151f51e95aac89b" dependencies = [ "unicode-ident", ] @@ -1737,9 +1743,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.18" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1feb54ed693b93a84e14094943b84b7c4eae204c512b7ccb95ab0c66d278ad1" +checksum = "3bcdf212e9776fbcb2d23ab029360416bb1706b1aea2d1a5ba002727cbcab804" dependencies = [ "proc-macro2", ] @@ -1819,9 +1825,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.2.13" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62f25bc4c7e55e0b0b7a1d43fb893f4fa1361d0abe38b9ce4f323c2adfe6ef42" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ "bitflags", ] @@ -1857,9 +1863,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.5.6" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d83f127d94bdbcda4c8cc2e50f6f84f4b611f69c902699ca385a39c3a75f9ff1" +checksum = "4c4eb3267174b8c6c2f654116623910a0fef09c4753f8dd83db29c48a0df988b" dependencies = [ "aho-corasick", "memchr", @@ -1877,9 +1883,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.26" +version = "0.6.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49b3de9ec5dc0a3417da371aab17d729997c15010e7fd24ff707773a33bddb64" +checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244" [[package]] name = "region" @@ -1918,7 +1924,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cec2b3485b07d96ddfd3134767b8a447b45ea4eb91448d0a35180ec0ffd5ed15" dependencies = [ "bytecheck", - "hashbrown 0.12.1", + "hashbrown 0.12.3", "indexmap", "ptr_meta", "rend", @@ -1973,7 +1979,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.10", + "semver 1.0.12", ] [[package]] @@ -1990,9 +1996,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.6" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2cc38e8fa666e2de3c4aba7edeb5ffc5246c1c2ed0e3d17e560aeeba736b23f" +checksum = "24c8ad4f0c00e1eb5bc7614d236a7f1300e3dbd76b68cac8e06fb00b015ad8d8" [[package]] name = "ryu" @@ -2072,9 +2078,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.10" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a41d061efea015927ac527063765e73601444cdc344ba855bc7bd44578b25e1c" +checksum = "a2333e6df6d6598f2b1974829f853c2b4c5f4a6e503c10af918081aa6f8564e1" [[package]] name = "semver-parser" @@ -2093,9 +2099,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.137" +version = "1.0.140" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61ea8d54c77f8315140a05f4c7237403bf38b72704d031543aa1d16abbf517d1" +checksum = "fc855a42c7967b7c369eb5860f7164ef1f6f81c20c7cc1141f2a604e18723b03" dependencies = [ "serde_derive", ] @@ -2121,9 +2127,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.137" +version = "1.0.140" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f26faba0c3959972377d3b2d306ee9f71faee9714294e41bb777f83f88578be" +checksum = "6f2122636b9fe3b81f1cb25099fcf2d3f542cdb1d45940d56c713158884a05da" dependencies = [ "proc-macro2", "quote", @@ -2132,9 +2138,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.81" +version = "1.0.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b7ce2b32a1aed03c558dc61a5cd328f15aff2dbc17daad8fb8af04d2100e15c" +checksum = "82c2c1fdcd807d1098552c5b9a36e425e42e9fbd7c6a37a8425f390f781f7fa7" dependencies = [ "itoa 1.0.2", "ryu", @@ -2195,9 +2201,12 @@ checksum = "7fdf1b9db47230893d76faad238fd6097fd6d6a9245cd7a4d90dbd639536bbd2" [[package]] name = "slab" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb703cfe953bccee95685111adeedb76fabe4e97549a58d16f03ea7b9367bb32" +checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef" +dependencies = [ + "autocfg", +] [[package]] name = "slice-group-by" @@ -2207,9 +2216,9 @@ checksum = "03b634d87b960ab1a38c4fe143b508576f075e7c978bfad18217645ebfdfa2ec" [[package]] name = "smallvec" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2dd574626839106c320a323308629dcb1acfc96e32a8cba364ddc61ac23ee83" +checksum = "2fd0db749597d91ff862fd1d55ea87f7855a744a8425a64695b6fca237d1dad1" [[package]] name = "stable_deref_trait" @@ -2319,9 +2328,9 @@ checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "syn" -version = "1.0.96" +version = "1.0.98" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0748dd251e24453cb8717f0354206b91557e4ec8703673a4b30208f2abaf1ebf" +checksum = "c50aef8a904de4c23c788f104b7dddc7d6f79c647c7c8ce4cc8f73eb0ca773dd" dependencies = [ "proc-macro2", "quote", @@ -2390,9 +2399,9 @@ dependencies = [ [[package]] name = "test-log" -version = "0.2.10" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4235dbf7ea878b3ef12dea20a59c134b405a66aafc4fc2c7b9935916e289e735" +checksum = "38f0c854faeb68a048f0f2dc410c5ddae3bf83854ef0e4977d58306a5edef50e" dependencies = [ "proc-macro2", "quote", @@ -2528,9 +2537,9 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.21" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc6b8ad3567499f98a1db7a752b07a7c8c7c7c34c332ec00effb2b0027974b7c" +checksum = "11c75893af559bc8e10716548bdef5cb2b983f8e637db9d0e15126b61b484ee2" dependencies = [ "proc-macro2", "quote", @@ -2539,22 +2548,21 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.27" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7709595b8878a4965ce5e87ebf880a7d39c9afc6837721b21a5a816a8117d921" +checksum = "7b7358be39f2f274f322d2aaed611acc57f382e8eb1e5b48cb9ae30933495ce7" dependencies = [ "once_cell", - "valuable", ] [[package]] name = "tracing-subscriber" -version = "0.3.11" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bc28f93baff38037f64e6f43d34cfa1605f27a49c34e8a04c5e78b0babf2596" +checksum = "60db860322da191b40952ad9affe65ea23e7dd6a5c442c2c42865810c6ab8e6b" dependencies = [ - "lazy_static", "matchers", + "once_cell", "regex", "sharded-slab", "thread_local", @@ -2620,15 +2628,15 @@ dependencies = [ [[package]] name = "ucd-trie" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c" +checksum = "89570599c4fe5585de2b388aab47e99f7fa4e9238a1399f707a02e356058141c" [[package]] name = "unicode-ident" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bd2fe26506023ed7b5e1e315add59d6f584c621d037f9368fea9cfb988f368c" +checksum = "15c61ba63f9235225a22310255a29b806b907c9b8c964bcbd0a2c70f3f2deea7" [[package]] name = "unicode-segmentation" @@ -2648,12 +2656,6 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "35abed4630bb800f02451a7428205d1f37b8e125001471bfab259beee6a587ed" -[[package]] -name = "valuable" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" - [[package]] name = "vec_map" version = "0.8.2" @@ -2700,7 +2702,7 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasi-test-generator" -version = "2.3.0" +version = "3.0.0-alpha.4" dependencies = [ "glob", "gumdrop", @@ -2712,9 +2714,9 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.81" +version = "0.2.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c53b543413a17a202f4be280a7e5c62a1c69345f5de525ee64f8cfdbc954994" +checksum = "fc7652e3f6c4706c8d9cd54832c4a4ccb9b5336e2c3bd154d5cccfbf1c1f5f7d" dependencies = [ "cfg-if 1.0.0", "wasm-bindgen-macro", @@ -2722,13 +2724,13 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.81" +version = "0.2.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5491a68ab4500fa6b4d726bd67408630c3dbe9c4fe7bda16d5c82a1fd8c7340a" +checksum = "662cd44805586bd52971b9586b1df85cdbbd9112e4ef4d8f41559c334dc6ac3f" dependencies = [ "bumpalo", - "lazy_static", "log", + "once_cell", "proc-macro2", "quote", "syn", @@ -2737,9 +2739,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.31" +version = "0.4.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de9a9cec1733468a8c657e57fa2413d2ae2c0129b95e87c5b72b8ace4d13f31f" +checksum = "fa76fb221a1f8acddf5b54ace85912606980ad661ac7a503b4570ffd3a624dad" dependencies = [ "cfg-if 1.0.0", "js-sys", @@ -2749,9 +2751,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.81" +version = "0.2.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c441e177922bc58f1e12c022624b6216378e5febc2f0533e41ba443d505b80aa" +checksum = "b260f13d3012071dfb1512849c033b1925038373aea48ced3012c09df952c602" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2759,9 +2761,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.81" +version = "0.2.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d94ac45fcf608c1f45ef53e748d35660f168490c10b23704c7779ab8f5c3048" +checksum = "5be8e654bdd9b79216c2929ab90721aa82faf65c48cdf08bdc4e7f51357b80da" dependencies = [ "proc-macro2", "quote", @@ -2772,15 +2774,15 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.81" +version = "0.2.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a89911bd99e5f3659ec4acf9c4d93b0a90fe4a2a11f15328472058edc5261be" +checksum = "6598dd0bd3c7d51095ff6531a5b23e02acdc81804e30d8f07afb77b7215a140a" [[package]] name = "wasm-bindgen-test" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b30cf2cba841a812f035c40c50f53eb9c56181192a9dd2c71b65e6a87a05ba" +checksum = "513df541345bb9fcc07417775f3d51bbb677daf307d8035c0afafd87dc2e6599" dependencies = [ "console_error_panic_hook", "js-sys", @@ -2792,9 +2794,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-test-macro" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ad594bf33e73cafcac2ae9062fc119d4f75f9c77e25022f91c9a64bd5b6463" +checksum = "6150d36a03e90a3cf6c12650be10626a9902d70c5270fd47d7a47e5389a10d56" dependencies = [ "proc-macro2", "quote", @@ -2811,9 +2813,9 @@ dependencies = [ [[package]] name = "wasm-encoder" -version = "0.13.0" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31f0c17267a5ffd6ae3d897589460e21db1673c84fb7016b909c9691369a75ea" +checksum = "8905fd25fdadeb0e7e8bf43a9f46f9f972d6291ad0c7a32573b88dd13a6cfa6b" dependencies = [ "leb128", ] @@ -2832,7 +2834,7 @@ dependencies = [ [[package]] name = "wasmer" -version = "2.3.0" +version = "3.0.0-alpha.4" dependencies = [ "anyhow", "cfg-if 1.0.0", @@ -2876,7 +2878,7 @@ dependencies = [ [[package]] name = "wasmer-c-api" -version = "2.3.0" +version = "3.0.0-alpha.4" dependencies = [ "cbindgen", "cfg-if 1.0.0", @@ -2902,7 +2904,7 @@ dependencies = [ [[package]] name = "wasmer-cache" -version = "2.3.0" +version = "3.0.0-alpha.4" dependencies = [ "blake3", "criterion", @@ -2916,7 +2918,7 @@ dependencies = [ [[package]] name = "wasmer-cli" -version = "2.3.0" +version = "3.0.0-alpha.4" dependencies = [ "anyhow", "atty", @@ -2947,7 +2949,7 @@ dependencies = [ [[package]] name = "wasmer-compiler" -version = "2.3.0" +version = "3.0.0-alpha.4" dependencies = [ "backtrace", "cfg-if 1.0.0", @@ -2972,7 +2974,7 @@ dependencies = [ [[package]] name = "wasmer-compiler-cli" -version = "2.3.0" +version = "3.0.0-alpha.4" dependencies = [ "anyhow", "atty", @@ -2993,7 +2995,7 @@ dependencies = [ [[package]] name = "wasmer-compiler-cranelift" -version = "2.3.0" +version = "3.0.0-alpha.4" dependencies = [ "cranelift-codegen", "cranelift-entity", @@ -3012,7 +3014,7 @@ dependencies = [ [[package]] name = "wasmer-compiler-llvm" -version = "2.3.0" +version = "3.0.0-alpha.4" dependencies = [ "byteorder", "cc", @@ -3020,11 +3022,11 @@ dependencies = [ "itertools", "lazy_static", "libc", - "object", + "object 0.28.4", "rayon", "regex", "rustc_version 0.4.0", - "semver 1.0.10", + "semver 1.0.12", "smallvec", "target-lexicon 0.12.4", "wasmer-compiler", @@ -3034,7 +3036,7 @@ dependencies = [ [[package]] name = "wasmer-compiler-singlepass" -version = "2.3.0" +version = "3.0.0-alpha.4" dependencies = [ "byteorder", "dynasm", @@ -3052,7 +3054,7 @@ dependencies = [ [[package]] name = "wasmer-derive" -version = "2.3.0" +version = "3.0.0-alpha.4" dependencies = [ "compiletest_rs", "proc-macro-error", @@ -3064,7 +3066,7 @@ dependencies = [ [[package]] name = "wasmer-emscripten" -version = "2.3.0" +version = "3.0.0-alpha.4" dependencies = [ "byteorder", "getrandom", @@ -3078,7 +3080,7 @@ dependencies = [ [[package]] name = "wasmer-integration-tests-cli" -version = "2.3.0" +version = "3.0.0-alpha.4" dependencies = [ "anyhow", "rand", @@ -3087,11 +3089,11 @@ dependencies = [ [[package]] name = "wasmer-integration-tests-ios" -version = "2.3.0" +version = "3.0.0-alpha.4" [[package]] name = "wasmer-middlewares" -version = "2.3.0" +version = "3.0.0-alpha.4" dependencies = [ "wasmer", "wasmer-types", @@ -3100,9 +3102,9 @@ dependencies = [ [[package]] name = "wasmer-object" -version = "2.3.0" +version = "3.0.0-alpha.4" dependencies = [ - "object", + "object 0.28.4", "thiserror", "wasmer-compiler", "wasmer-types", @@ -3110,7 +3112,7 @@ dependencies = [ [[package]] name = "wasmer-types" -version = "2.3.0" +version = "3.0.0-alpha.4" dependencies = [ "enum-iterator", "enumset", @@ -3125,7 +3127,7 @@ dependencies = [ [[package]] name = "wasmer-vbus" -version = "2.3.0" +version = "3.0.0-alpha.4" dependencies = [ "libc", "serde", @@ -3138,7 +3140,7 @@ dependencies = [ [[package]] name = "wasmer-vfs" -version = "2.3.0" +version = "3.0.0-alpha.4" dependencies = [ "libc", "serde", @@ -3150,7 +3152,7 @@ dependencies = [ [[package]] name = "wasmer-vm" -version = "2.3.0" +version = "3.0.0-alpha.4" dependencies = [ "backtrace", "cc", @@ -3173,7 +3175,7 @@ dependencies = [ [[package]] name = "wasmer-vnet" -version = "2.3.0" +version = "3.0.0-alpha.4" dependencies = [ "bytes", "libc", @@ -3187,7 +3189,7 @@ dependencies = [ [[package]] name = "wasmer-wasi" -version = "2.3.0" +version = "3.0.0-alpha.4" dependencies = [ "bincode", "bytes", @@ -3215,7 +3217,7 @@ dependencies = [ [[package]] name = "wasmer-wasi-experimental-io-devices" -version = "2.3.0" +version = "3.0.0-alpha.4" dependencies = [ "minifb", "nix", @@ -3228,7 +3230,7 @@ dependencies = [ [[package]] name = "wasmer-wasi-local-networking" -version = "2.3.0" +version = "3.0.0-alpha.4" dependencies = [ "bytes", "tracing", @@ -3238,7 +3240,7 @@ dependencies = [ [[package]] name = "wasmer-wasi-types" -version = "2.3.0" +version = "3.0.0-alpha.4" dependencies = [ "byteorder", "serde", @@ -3249,7 +3251,7 @@ dependencies = [ [[package]] name = "wasmer-wast" -version = "2.3.0" +version = "3.0.0-alpha.4" dependencies = [ "anyhow", "serde", @@ -3263,7 +3265,7 @@ dependencies = [ [[package]] name = "wasmer-workspace" -version = "2.3.0" +version = "3.0.0-alpha.4" dependencies = [ "anyhow", "build-deps", @@ -3301,21 +3303,21 @@ checksum = "718ed7c55c2add6548cca3ddd6383d738cd73b892df400e96b9aa876f0141d7a" [[package]] name = "wasmparser" -version = "0.86.0" +version = "0.88.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bcbfe95447da2aa7ff171857fc8427513eb57c75a729bb190e974dc695e8f5c" +checksum = "fb8cf7dd82407fe68161bedcd57fde15596f32ebf6e9b3bdbf3ae1da20e38e5e" dependencies = [ "indexmap", ] [[package]] name = "wasmprinter" -version = "0.2.36" +version = "0.2.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa4cca415278da771add7c9ab7f3391f04b8d98719d2cf28a185d38d5206697e" +checksum = "04f2786f19a25211ddfa331e28b7579a6d6880f5f4b18d21253cd90274aa4c21" dependencies = [ "anyhow", - "wasmparser 0.86.0", + "wasmparser 0.88.0", ] [[package]] @@ -3338,23 +3340,23 @@ dependencies = [ [[package]] name = "wast" -version = "42.0.0" +version = "45.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "badcb03f976f983ff0daf294da9697be659442f61e6b0942bb37a2b6cbfe9dd4" +checksum = "186c474c4f9bb92756b566d592a16591b4526b1a4841171caa3f31d7fe330d96" dependencies = [ "leb128", "memchr", "unicode-width", - "wasm-encoder 0.13.0", + "wasm-encoder 0.15.0", ] [[package]] name = "wat" -version = "1.0.44" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b92f20b742ac527066c8414bc0637352661b68cab07ef42586cefaba71c965cf" +checksum = "c2d4bc4724b4f02a482c8cab053dac5ef26410f264c06ce914958f9a42813556" dependencies = [ - "wast 42.0.0", + "wast 45.0.0", ] [[package]] @@ -3429,9 +3431,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.58" +version = "0.3.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fed94beee57daf8dd7d51f2b15dc2bcde92d7a72304cdf662a4371008b71b90" +checksum = "ed055ab27f941423197eb86b2035720b1a3ce40504df082cac2ecc6ed73335a1" dependencies = [ "js-sys", "wasm-bindgen", @@ -3483,11 +3485,24 @@ version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43dbb096663629518eb1dfa72d80243ca5a6aca764cae62a2df70af760a9be75" dependencies = [ - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_msvc", + "windows_aarch64_msvc 0.33.0", + "windows_i686_gnu 0.33.0", + "windows_i686_msvc 0.33.0", + "windows_x86_64_gnu 0.33.0", + "windows_x86_64_msvc 0.33.0", +] + +[[package]] +name = "windows-sys" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" +dependencies = [ + "windows_aarch64_msvc 0.36.1", + "windows_i686_gnu 0.36.1", + "windows_i686_msvc 0.36.1", + "windows_x86_64_gnu 0.36.1", + "windows_x86_64_msvc 0.36.1", ] [[package]] @@ -3496,30 +3511,60 @@ version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cd761fd3eb9ab8cc1ed81e56e567f02dd82c4c837e48ac3b2181b9ffc5060807" +[[package]] +name = "windows_aarch64_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" + [[package]] name = "windows_i686_gnu" version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cab0cf703a96bab2dc0c02c0fa748491294bf9b7feb27e1f4f96340f208ada0e" +[[package]] +name = "windows_i686_gnu" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" + [[package]] name = "windows_i686_msvc" version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8cfdbe89cc9ad7ce618ba34abc34bbb6c36d99e96cae2245b7943cd75ee773d0" +[[package]] +name = "windows_i686_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" + [[package]] name = "windows_x86_64_gnu" version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4dd9b0c0e9ece7bb22e84d70d01b71c6d6248b81a3c60d11869451b4cb24784" +[[package]] +name = "windows_x86_64_gnu" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" + [[package]] name = "windows_x86_64_msvc" version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff1e4aa646495048ec7f3ffddc411e1d829c026a2ec62b39da15c1055e406eaa" +[[package]] +name = "windows_x86_64_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" + [[package]] name = "x11-dl" version = "2.19.1" diff --git a/Cargo.toml b/Cargo.toml index 95a9e4782..47b3265dd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmer-workspace" -version = "2.3.0" +version = "3.0.0-alpha.4" description = "Wasmer workspace" authors = ["Wasmer Engineering Team "] repository = "https://github.com/wasmerio/wasmer" @@ -10,18 +10,18 @@ publish = false autoexamples = false [dependencies] -wasmer = { version = "=2.3.0", path = "lib/api", default-features = false } -wasmer-compiler = { version = "=2.3.0", path = "lib/compiler", features = ["compiler"] } -wasmer-compiler-cranelift = { version = "=2.3.0", path = "lib/compiler-cranelift", optional = true } -wasmer-compiler-singlepass = { version = "=2.3.0", path = "lib/compiler-singlepass", optional = true } -wasmer-compiler-llvm = { version = "=2.3.0", path = "lib/compiler-llvm", optional = true } -wasmer-emscripten = { version = "=2.3.0", path = "lib/emscripten", optional = true } -wasmer-wasi = { version = "=2.3.0", path = "lib/wasi", optional = true } -wasmer-wast = { version = "=2.3.0", path = "tests/lib/wast", optional = true } -wasi-test-generator = { version = "=2.3.0", path = "tests/wasi-wast", optional = true } -wasmer-cache = { version = "=2.3.0", path = "lib/cache", optional = true } -wasmer-types = { version = "=2.3.0", path = "lib/types" } -wasmer-middlewares = { version = "=2.3.0", path = "lib/middlewares", optional = true } +wasmer = { version = "=3.0.0-alpha.4", path = "lib/api", default-features = false } +wasmer-compiler = { version = "=3.0.0-alpha.4", path = "lib/compiler", features = ["compiler"] } +wasmer-compiler-cranelift = { version = "=3.0.0-alpha.4", path = "lib/compiler-cranelift", optional = true } +wasmer-compiler-singlepass = { version = "=3.0.0-alpha.4", path = "lib/compiler-singlepass", optional = true } +wasmer-compiler-llvm = { version = "=3.0.0-alpha.4", path = "lib/compiler-llvm", optional = true } +wasmer-emscripten = { version = "=3.0.0-alpha.4", path = "lib/emscripten", optional = true } +wasmer-wasi = { version = "=3.0.0-alpha.4", path = "lib/wasi", optional = true } +wasmer-wast = { version = "=3.0.0-alpha.4", path = "tests/lib/wast", optional = true } +wasi-test-generator = { version = "=3.0.0-alpha.4", path = "tests/wasi-wast", optional = true } +wasmer-cache = { version = "=3.0.0-alpha.4", path = "lib/cache", optional = true } +wasmer-types = { version = "=3.0.0-alpha.4", path = "lib/types" } +wasmer-middlewares = { version = "=3.0.0-alpha.4", path = "lib/middlewares", optional = true } cfg-if = "1.0" [workspace] @@ -64,7 +64,7 @@ glob = "0.3" rustc_version = "0.4" [dev-dependencies] -wasmer = { version = "=2.3.0", path = "lib/api", default-features = false, features = ["cranelift"] } +wasmer = { version = "=3.0.0-alpha.4", path = "lib/api", default-features = false, features = ["cranelift"] } anyhow = "1.0" criterion = "0.3" lazy_static = "1.4" diff --git a/lib/api/Cargo.toml b/lib/api/Cargo.toml index aeee50c53..16a518fa9 100644 --- a/lib/api/Cargo.toml +++ b/lib/api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmer" -version = "2.3.0" +version = "3.0.0-alpha.4" description = "High-performance WebAssembly runtime" categories = ["wasm"] keywords = ["wasm", "webassembly", "runtime", "vm"] @@ -33,15 +33,15 @@ wat = { version = "1.0", optional = true } # Dependencies and Development Dependencies for `sys`. [target.'cfg(not(target_arch = "wasm32"))'.dependencies] # - Mandatory dependencies for `sys`. -wasmer-vm = { path = "../vm", version = "=2.3.0" } -wasmer-compiler = { path = "../compiler", version = "=2.3.0" } -wasmer-derive = { path = "../derive", version = "=2.3.0" } -wasmer-types = { path = "../types", version = "=2.3.0" } +wasmer-vm = { path = "../vm", version = "=3.0.0-alpha.4" } +wasmer-compiler = { path = "../compiler", version = "=3.0.0-alpha.4" } +wasmer-derive = { path = "../derive", version = "=3.0.0-alpha.4" } +wasmer-types = { path = "../types", version = "=3.0.0-alpha.4" } target-lexicon = { version = "0.12.2", default-features = false } # - Optional dependencies for `sys`. -wasmer-compiler-singlepass = { path = "../compiler-singlepass", version = "=2.3.0", optional = true } -wasmer-compiler-cranelift = { path = "../compiler-cranelift", version = "=2.3.0", optional = true } -wasmer-compiler-llvm = { path = "../compiler-llvm", version = "=2.3.0", optional = true } +wasmer-compiler-singlepass = { path = "../compiler-singlepass", version = "=3.0.0-alpha.4", optional = true } +wasmer-compiler-cranelift = { path = "../compiler-cranelift", version = "=3.0.0-alpha.4", optional = true } +wasmer-compiler-llvm = { path = "../compiler-llvm", version = "=3.0.0-alpha.4", optional = true } wasm-bindgen = { version = "0.2.74", optional = true } js-sys = { version = "0.3.51", optional = true } @@ -58,11 +58,11 @@ anyhow = "1.0" # Dependencies and Develoment Dependencies for `js`. [target.'cfg(target_arch = "wasm32")'.dependencies] # - Mandatory dependencies for `js`. -wasmer-types = { path = "../types", version = "=2.3.0", default-features = false, features = ["std"] } +wasmer-types = { path = "../types", version = "=3.0.0-alpha.4", default-features = false, features = ["std"] } wasm-bindgen = "0.2.74" js-sys = "0.3.51" #web-sys = { version = "0.3.51", features = [ "console" ] } -wasmer-derive = { path = "../derive", version = "=2.3.0" } +wasmer-derive = { path = "../derive", version = "=3.0.0-alpha.4" } # - Optional dependencies for `js`. wasmparser = { version = "0.83", default-features = false, optional = true } hashbrown = { version = "0.11", optional = true } diff --git a/lib/api/src/sys/externals/function.rs b/lib/api/src/sys/externals/function.rs index c317b9648..3a0bedd14 100644 --- a/lib/api/src/sys/externals/function.rs +++ b/lib/api/src/sys/externals/function.rs @@ -42,6 +42,7 @@ pub struct Function { } impl Function { + #[cfg(feature = "compiler")] /// Creates a new host `Function` (dynamic) with the provided signature. /// /// If you know the signature of the host function at compile time, @@ -159,6 +160,7 @@ impl Function { } } + #[cfg(feature = "compiler")] /// Creates a new host `Function` from a native function. /// /// The function signature is automatically retrieved using the @@ -248,6 +250,7 @@ impl Function { .clone() } + #[cfg(feature = "compiler")] fn call_wasm( &self, store: &mut impl AsStoreMut, @@ -365,6 +368,7 @@ impl Function { self.ty(store).results().len() } + #[cfg(feature = "compiler")] /// Call the `Function` function. /// /// Depending on where the Function is defined, it will call it. @@ -422,6 +426,7 @@ impl Function { VMFuncRef(vm_function.anyfunc.as_ptr()) } + #[cfg(feature = "compiler")] pub(crate) unsafe fn from_vm_funcref(store: &mut impl AsStoreMut, funcref: VMFuncRef) -> Self { let signature = store .as_store_ref() @@ -771,6 +776,7 @@ mod inner { } } + #[cfg(feature = "compiler")] unsafe impl FromToNativeWasmType for Option { type Native = Self; diff --git a/lib/api/src/sys/externals/global.rs b/lib/api/src/sys/externals/global.rs index ecc9d0eff..2dfc77ff0 100644 --- a/lib/api/src/sys/externals/global.rs +++ b/lib/api/src/sys/externals/global.rs @@ -95,6 +95,7 @@ impl Global { *self.handle.get(store.as_store_ref().objects()).ty() } + #[cfg(feature = "compiler")] /// Retrieves the current value [`Value`] that the Global has. /// /// # Example diff --git a/lib/api/src/sys/externals/memory.rs b/lib/api/src/sys/externals/memory.rs index 5cc57086e..7ed86e8d8 100644 --- a/lib/api/src/sys/externals/memory.rs +++ b/lib/api/src/sys/externals/memory.rs @@ -34,6 +34,7 @@ pub struct Memory { } impl Memory { + #[cfg(feature = "compiler")] /// Creates a new host `Memory` from the provided [`MemoryType`]. /// /// This function will construct the `Memory` using the store diff --git a/lib/api/src/sys/externals/table.rs b/lib/api/src/sys/externals/table.rs index d0e12ecce..ee3a6fba4 100644 --- a/lib/api/src/sys/externals/table.rs +++ b/lib/api/src/sys/externals/table.rs @@ -46,6 +46,7 @@ fn value_to_table_element( }) } +#[cfg(feature = "compiler")] fn value_from_table_element(store: &mut impl AsStoreMut, item: wasmer_vm::TableElement) -> Value { match item { wasmer_vm::TableElement::FuncRef(funcref) => { @@ -58,6 +59,7 @@ fn value_from_table_element(store: &mut impl AsStoreMut, item: wasmer_vm::TableE } impl Table { + #[cfg(feature = "compiler")] /// Creates a new `Table` with the provided [`TableType`] definition. /// /// All the elements in the table will be set to the `init` value. @@ -92,6 +94,7 @@ impl Table { *self.handle.get(store.as_store_ref().objects()).ty() } + #[cfg(feature = "compiler")] /// Retrieves an element of the table at the provided `index`. pub fn get(&self, store: &mut impl AsStoreMut, index: u32) -> Option { let item = self.handle.get(store.as_store_ref().objects()).get(index)?; diff --git a/lib/api/src/sys/instance.rs b/lib/api/src/sys/instance.rs index ae1b1118f..ab8e9d5c2 100644 --- a/lib/api/src/sys/instance.rs +++ b/lib/api/src/sys/instance.rs @@ -79,6 +79,7 @@ impl From for InstantiationError { } impl Instance { + #[cfg(feature = "compiler")] /// Creates a new `Instance` from a WebAssembly [`Module`] and a /// set of imports using [`Imports`] or the [`imports`] macro helper. /// @@ -137,6 +138,7 @@ impl Instance { Ok(instance) } + #[cfg(feature = "compiler")] /// Creates a new `Instance` from a WebAssembly [`Module`] and a /// vector of imports. /// diff --git a/lib/api/src/sys/module.rs b/lib/api/src/sys/module.rs index a4cdf8dda..b730a19b9 100644 --- a/lib/api/src/sys/module.rs +++ b/lib/api/src/sys/module.rs @@ -55,6 +55,7 @@ pub struct Module { } impl Module { + #[cfg(feature = "compiler")] /// Creates a new WebAssembly Module given the configuration /// in the store. /// @@ -127,6 +128,7 @@ impl Module { Self::from_binary(store, bytes.as_ref()) } + #[cfg(feature = "compiler")] /// Creates a new WebAssembly module from a file path. pub fn from_file( store: &impl AsStoreRef, @@ -143,6 +145,7 @@ impl Module { Ok(module) } + #[cfg(feature = "compiler")] /// Creates a new WebAssembly module from a binary. /// /// Opposed to [`Module::new`], this function is not compatible with @@ -153,6 +156,7 @@ impl Module { unsafe { Self::from_binary_unchecked(store, binary) } } + #[cfg(feature = "compiler")] /// Creates a new WebAssembly module skipping any kind of validation. /// /// # Safety @@ -168,6 +172,7 @@ impl Module { Ok(module) } + #[cfg(feature = "compiler")] /// Validates a new WebAssembly Module given the configuration /// in the Store. /// @@ -178,6 +183,7 @@ impl Module { store.as_store_ref().engine().validate(binary) } + #[cfg(feature = "compiler")] fn compile(store: &impl AsStoreRef, binary: &[u8]) -> Result { let artifact = store .as_store_ref() @@ -222,6 +228,7 @@ impl Module { self.artifact.serialize_to_file(path.as_ref()) } + #[cfg(feature = "compiler")] /// Deserializes a serialized Module binary into a `Module`. /// > Note: the module has to be serialized before with the `serialize` method. /// @@ -253,6 +260,7 @@ impl Module { Ok(Self::from_artifact(artifact)) } + #[cfg(feature = "compiler")] /// Deserializes a a serialized Module located in a `Path` into a `Module`. /// > Note: the module has to be serialized before with the `serialize` method. /// @@ -288,6 +296,7 @@ impl Module { } } + #[cfg(feature = "compiler")] pub(crate) fn instantiate( &self, store: &mut impl AsStoreMut, diff --git a/lib/api/src/sys/native_type.rs b/lib/api/src/sys/native_type.rs index f8555e6f3..8446e95b3 100644 --- a/lib/api/src/sys/native_type.rs +++ b/lib/api/src/sys/native_type.rs @@ -170,6 +170,7 @@ impl NativeWasmType for Function { type Abi = usize; } +#[cfg(feature = "compiler")] impl NativeWasmTypeInto for Option { #[inline] unsafe fn from_abi(store: &mut impl AsStoreMut, abi: Self::Abi) -> Self { diff --git a/lib/api/src/sys/store.rs b/lib/api/src/sys/store.rs index c75f1f018..f97456eb4 100644 --- a/lib/api/src/sys/store.rs +++ b/lib/api/src/sys/store.rs @@ -12,7 +12,9 @@ use wasmer_vm::StoreObjects; /// wrap the actual context in a box. pub(crate) struct StoreInner { pub(crate) objects: StoreObjects, + #[cfg(feature = "compiler")] pub(crate) engine: Engine, + #[cfg(feature = "compiler")] pub(crate) tunables: Box, pub(crate) trap_handler: Option>>, } @@ -29,6 +31,7 @@ pub(crate) struct StoreInner { /// Spec: pub struct Store { pub(crate) inner: Box, + #[cfg(feature = "compiler")] engine: Engine, trap_handler: Arc>>>>, } @@ -42,6 +45,7 @@ impl Store { Self::new_with_tunables(engine, BaseTunables::for_target(&target)) } + #[cfg(feature = "compiler")] #[deprecated( since = "3.0.0", note = "Store::new_with_engine has been deprecated in favor of Store::new" @@ -56,6 +60,7 @@ impl Store { self.inner.trap_handler = handler; } + #[cfg(feature = "compiler")] /// Creates a new `Store` with a specific [`Engine`] and [`Tunables`]. pub fn new_with_tunables( engine: impl Into, @@ -79,16 +84,19 @@ impl Store { } } + #[cfg(feature = "compiler")] /// Returns the [`Tunables`]. pub fn tunables(&self) -> &dyn Tunables { self.inner.tunables.as_ref() } + #[cfg(feature = "compiler")] /// Returns the [`Engine`]. pub fn engine(&self) -> &Engine { &self.engine } + #[cfg(feature = "compiler")] /// Checks whether two stores are identical. A store is considered /// equal to another store if both have the same engine. The /// tunables are excluded from the logic. @@ -97,6 +105,7 @@ impl Store { } } +#[cfg(feature = "compiler")] impl PartialEq for Store { fn eq(&self, other: &Self) -> bool { Self::same(self, other) @@ -207,16 +216,19 @@ impl<'a> StoreRef<'a> { &self.inner.objects } + #[cfg(feature = "compiler")] /// Returns the [`Tunables`]. pub fn tunables(&self) -> &dyn Tunables { self.inner.tunables.as_ref() } + #[cfg(feature = "compiler")] /// Returns the [`Engine`]. pub fn engine(&self) -> &Engine { &self.inner.engine } + #[cfg(feature = "compiler")] /// Checks whether two stores are identical. A store is considered /// equal to another store if both have the same engine. The /// tunables are excluded from the logic. @@ -241,15 +253,18 @@ pub struct StoreMut<'a> { impl<'a> StoreMut<'a> { /// Returns the [`Tunables`]. + #[cfg(feature = "compiler")] pub fn tunables(&self) -> &dyn Tunables { self.inner.tunables.as_ref() } /// Returns the [`Engine`]. + #[cfg(feature = "compiler")] pub fn engine(&self) -> &Engine { &self.inner.engine } + #[cfg(feature = "compiler")] /// Checks whether two stores are identical. A store is considered /// equal to another store if both have the same engine. The /// tunables are excluded from the logic. @@ -257,6 +272,7 @@ impl<'a> StoreMut<'a> { a.inner.engine.id() == b.inner.engine.id() } + #[cfg(feature = "compiler")] pub(crate) fn tunables_and_objects_mut(&mut self) -> (&dyn Tunables, &mut StoreObjects) { (self.inner.tunables.as_ref(), &mut self.inner.objects) } diff --git a/lib/api/src/sys/value.rs b/lib/api/src/sys/value.rs index 63521b7b3..f2b2a0b8a 100644 --- a/lib/api/src/sys/value.rs +++ b/lib/api/src/sys/value.rs @@ -106,6 +106,7 @@ impl Value { } } + #[cfg(feature = "compiler")] /// Converts a `RawValue` to a `Value`. /// /// # Safety diff --git a/lib/c-api/Cargo.toml b/lib/c-api/Cargo.toml index 9b3a93f4d..ecbd90add 100644 --- a/lib/c-api/Cargo.toml +++ b/lib/c-api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmer-c-api" -version = "2.3.0" +version = "3.0.0-alpha.4" description = "Wasmer C API library" categories = ["wasm", "api-bindings"] keywords = ["wasm", "webassembly", "runtime"] @@ -22,15 +22,15 @@ crate-type = ["cdylib", "rlib", "staticlib"] [dependencies] # We rename `wasmer` to `wasmer-api` to avoid the conflict with this # library name (see `[lib]`). -wasmer-api = { version = "=2.3.0", path = "../api", default-features = false, features = ["sys"], package = "wasmer" } -wasmer-compiler-cranelift = { version = "=2.3.0", path = "../compiler-cranelift", optional = true } -wasmer-compiler-singlepass = { version = "=2.3.0", path = "../compiler-singlepass", optional = true } -wasmer-compiler-llvm = { version = "=2.3.0", path = "../compiler-llvm", optional = true } -wasmer-emscripten = { version = "=2.3.0", path = "../emscripten", optional = true } -wasmer-compiler = { version = "=2.3.0", path = "../compiler" } -wasmer-middlewares = { version = "=2.3.0", path = "../middlewares", optional = true } -wasmer-wasi = { version = "=2.3.0", path = "../wasi", default-features = false, features = ["host-fs", "sys"], optional = true } -wasmer-types = { version = "=2.3.0", path = "../types" } +wasmer-api = { version = "=3.0.0-alpha.4", path = "../api", default-features = false, features = ["sys"], package = "wasmer" } +wasmer-compiler-cranelift = { version = "=3.0.0-alpha.4", path = "../compiler-cranelift", optional = true } +wasmer-compiler-singlepass = { version = "=3.0.0-alpha.4", path = "../compiler-singlepass", optional = true } +wasmer-compiler-llvm = { version = "=3.0.0-alpha.4", path = "../compiler-llvm", optional = true } +wasmer-emscripten = { version = "=3.0.0-alpha.4", path = "../emscripten", optional = true } +wasmer-compiler = { version = "=3.0.0-alpha.4", path = "../compiler" } +wasmer-middlewares = { version = "=3.0.0-alpha.4", path = "../middlewares", optional = true } +wasmer-wasi = { version = "=3.0.0-alpha.4", path = "../wasi", default-features = false, features = ["host-fs", "sys"], optional = true } +wasmer-types = { version = "=3.0.0-alpha.4", path = "../types" } enumset = "1.0.2" cfg-if = "1.0" lazy_static = "1.4" diff --git a/lib/c-api/build.rs b/lib/c-api/build.rs index 40f9ab820..8fb05bc97 100644 --- a/lib/c-api/build.rs +++ b/lib/c-api/build.rs @@ -56,14 +56,16 @@ macro_rules! map_feature_as_c_define { ($feature:expr, $c_define:ident, $accumulator:ident) => { #[cfg(feature = $feature)] { - $accumulator.push_str(&format!( + use std::fmt::Write; + let _ = write!( + $accumulator, r#" // The `{feature}` feature has been enabled for this build. #define {define} "#, feature = $feature, define = $c_define, - )); + ); } }; } @@ -184,7 +186,9 @@ fn build_wasm_c_api_headers(crate_dir: &str, out_dir: &str) { } fn add_wasmer_version(pre_header: &mut String) { - pre_header.push_str(&format!( + use std::fmt::Write; + let _ = write!( + pre_header, r#" // This file corresponds to the following Wasmer version. #define WASMER_VERSION "{full}" @@ -198,7 +202,7 @@ fn add_wasmer_version(pre_header: &mut String) { minor = env!("CARGO_PKG_VERSION_MINOR"), patch = env!("CARGO_PKG_VERSION_PATCH"), pre = env!("CARGO_PKG_VERSION_PRE"), - )); + ); } /// Create a fresh new `Builder`, already pre-configured. diff --git a/lib/cache/Cargo.toml b/lib/cache/Cargo.toml index 21fc17980..83b1712fe 100644 --- a/lib/cache/Cargo.toml +++ b/lib/cache/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmer-cache" -version = "2.3.0" +version = "3.0.0-alpha.4" description = "Cache system for Wasmer WebAssembly runtime" categories = ["wasm", "caching"] keywords = ["wasm", "webassembly", "cache"] @@ -11,7 +11,7 @@ readme = "README.md" edition = "2018" [dependencies] -wasmer = { path = "../api", version = "=2.3.0", default-features = false, features = ["sys"] } +wasmer = { path = "../api", version = "=3.0.0-alpha.4", default-features = false, features = ["sys"] } hex = "0.4" thiserror = "1" blake3 = "1.0" @@ -20,9 +20,9 @@ blake3 = "1.0" criterion = "0.3" tempfile = "3" rand = "0.8.3" -wasmer-compiler-singlepass = { path = "../compiler-singlepass", version = "=2.3.0" } +wasmer-compiler-singlepass = { path = "../compiler-singlepass", version = "=3.0.0-alpha.4" } [features] -default = ["wasmer/js-serializable-module", "filesystem"] +default = ["wasmer/js-serializable-module", "wasmer/compiler", "filesystem"] filesystem = [] blake3-pure = ["blake3/pure"] diff --git a/lib/cli-compiler/Cargo.toml b/lib/cli-compiler/Cargo.toml index dd70bc754..188cb04fb 100644 --- a/lib/cli-compiler/Cargo.toml +++ b/lib/cli-compiler/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmer-compiler-cli" -version = "2.3.0" +version = "3.0.0-alpha.4" description = "Wasmer Compiler CLI" categories = ["wasm", "command-line-interface"] keywords = ["wasm", "webassembly", "cli"] @@ -18,8 +18,8 @@ path = "src/bin/wasmer_compiler.rs" doc = false [dependencies] -wasmer-compiler = { version = "=2.3.0", path = "../compiler", features = ["compiler"] } -wasmer-types = { version = "=2.3.0", path = "../types" } +wasmer-compiler = { version = "=3.0.0-alpha.4", path = "../compiler", features = ["compiler"] } +wasmer-types = { version = "=3.0.0-alpha.4", path = "../types" } atty = "0.2" colored = "2.0" anyhow = "1.0" @@ -35,12 +35,12 @@ log = { version = "0.4", optional = true } tempfile = "3" [target.'cfg(not(target_arch = "wasm32"))'.dependencies] -wasmer-compiler-singlepass = { version = "=2.3.0", path = "../compiler-singlepass", optional = true } -wasmer-compiler-cranelift = { version = "=2.3.0", path = "../compiler-cranelift", optional = true } +wasmer-compiler-singlepass = { version = "=3.0.0-alpha.4", path = "../compiler-singlepass", optional = true } +wasmer-compiler-cranelift = { version = "=3.0.0-alpha.4", path = "../compiler-cranelift", optional = true } [target.'cfg(target_arch = "wasm32")'.dependencies] -wasmer-compiler-singlepass = { version = "=2.3.0", path = "../compiler-singlepass", optional = true, default-features = false, features = ["wasm"] } -wasmer-compiler-cranelift = { version = "=2.3.0", path = "../compiler-cranelift", optional = true, default-features = false, features = ["wasm"] } +wasmer-compiler-singlepass = { version = "=3.0.0-alpha.4", path = "../compiler-singlepass", optional = true, default-features = false, features = ["wasm"] } +wasmer-compiler-cranelift = { version = "=3.0.0-alpha.4", path = "../compiler-cranelift", optional = true, default-features = false, features = ["wasm"] } [target.'cfg(target_os = "linux")'.dependencies] unix_mode = "0.1.3" diff --git a/lib/cli/Cargo.toml b/lib/cli/Cargo.toml index d43d15c52..c686fe545 100644 --- a/lib/cli/Cargo.toml +++ b/lib/cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmer-cli" -version = "2.3.0" +version = "3.0.0-alpha.4" description = "Wasmer CLI" categories = ["wasm", "command-line-interface"] keywords = ["wasm", "webassembly", "cli"] @@ -25,20 +25,20 @@ doc = false required-features = ["headless"] [dependencies] -wasmer = { version = "=2.3.0", path = "../api", default-features = false } -wasmer-compiler = { version = "=2.3.0", path = "../compiler", features = ["compiler", ] } -wasmer-compiler-cranelift = { version = "=2.3.0", path = "../compiler-cranelift", optional = true } -wasmer-compiler-singlepass = { version = "=2.3.0", path = "../compiler-singlepass", optional = true } -wasmer-compiler-llvm = { version = "=2.3.0", path = "../compiler-llvm", optional = true } -wasmer-emscripten = { version = "=2.3.0", path = "../emscripten", optional = true } -wasmer-vm = { version = "=2.3.0", path = "../vm" } -wasmer-wasi = { version = "=2.3.0", path = "../wasi", optional = true } -wasmer-wasi-experimental-io-devices = { version = "=2.3.0", path = "../wasi-experimental-io-devices", optional = true, features = ["link_external_libs"] } -wasmer-wast = { version = "=2.3.0", path = "../../tests/lib/wast", optional = true } -wasmer-cache = { version = "=2.3.0", path = "../cache", optional = true } -wasmer-types = { version = "=2.3.0", path = "../types" } -wasmer-vfs = { version = "=2.3.0", path = "../vfs", default-features = false, features = ["host-fs"] } -wasmer-object = { version = "=2.3.0", path = "../object" } +wasmer = { version = "=3.0.0-alpha.4", path = "../api", default-features = false } +wasmer-compiler = { version = "=3.0.0-alpha.4", path = "../compiler", features = ["compiler", ] } +wasmer-compiler-cranelift = { version = "=3.0.0-alpha.4", path = "../compiler-cranelift", optional = true } +wasmer-compiler-singlepass = { version = "=3.0.0-alpha.4", path = "../compiler-singlepass", optional = true } +wasmer-compiler-llvm = { version = "=3.0.0-alpha.4", path = "../compiler-llvm", optional = true } +wasmer-emscripten = { version = "=3.0.0-alpha.4", path = "../emscripten", optional = true } +wasmer-vm = { version = "=3.0.0-alpha.4", path = "../vm" } +wasmer-wasi = { version = "=3.0.0-alpha.4", path = "../wasi", optional = true } +wasmer-wasi-experimental-io-devices = { version = "=3.0.0-alpha.4", path = "../wasi-experimental-io-devices", optional = true, features = ["link_external_libs"] } +wasmer-wast = { version = "=3.0.0-alpha.4", path = "../../tests/lib/wast", optional = true } +wasmer-cache = { version = "=3.0.0-alpha.4", path = "../cache", optional = true } +wasmer-types = { version = "=3.0.0-alpha.4", path = "../types" } +wasmer-object = { version = "=3.0.0-alpha.4", path = "../object" } +wasmer-vfs = { version = "=3.0.0-alpha.4", path = "../vfs", default-features = false, features = ["host-fs"] } atty = "0.2" colored = "2.0" anyhow = "1.0" diff --git a/lib/compiler-cranelift/Cargo.toml b/lib/compiler-cranelift/Cargo.toml index 05ee34ac9..5793fc1e8 100644 --- a/lib/compiler-cranelift/Cargo.toml +++ b/lib/compiler-cranelift/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmer-compiler-cranelift" -version = "2.3.0" +version = "3.0.0-alpha.4" description = "Cranelift compiler for Wasmer WebAssembly runtime" categories = ["wasm"] keywords = ["wasm", "webassembly", "compiler", "cranelift"] @@ -12,8 +12,8 @@ readme = "README.md" edition = "2018" [dependencies] -wasmer-compiler = { path = "../compiler", version = "=2.3.0", features = ["translator", "compiler"], default-features = false } -wasmer-types = { path = "../types", version = "=2.3.0", default-features = false, features = ["std"] } +wasmer-compiler = { path = "../compiler", version = "=3.0.0-alpha.4", features = ["translator", "compiler"], default-features = false } +wasmer-types = { path = "../types", version = "=3.0.0-alpha.4", default-features = false, features = ["std"] } cranelift-entity = { version = "0.86.1", default-features = false } cranelift-codegen = { version = "0.86.1", default-features = false, features = ["x86", "arm64"] } cranelift-frontend = { version = "0.86.1", default-features = false } diff --git a/lib/compiler-llvm/Cargo.toml b/lib/compiler-llvm/Cargo.toml index 4365ef98a..72396cb95 100644 --- a/lib/compiler-llvm/Cargo.toml +++ b/lib/compiler-llvm/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmer-compiler-llvm" -version = "2.3.0" +version = "3.0.0-alpha.4" description = "LLVM compiler for Wasmer WebAssembly runtime" categories = ["wasm"] keywords = ["wasm", "webassembly", "compiler", "llvm"] @@ -12,11 +12,11 @@ readme = "README.md" edition = "2018" [dependencies] -wasmer-compiler = { path = "../compiler", version = "=2.3.0", features = [ +wasmer-compiler = { path = "../compiler", version = "=3.0.0-alpha.4", features = [ "translator", "compiler" ] } -wasmer-vm = { path = "../vm", version = "=2.3.0" } -wasmer-types = { path = "../types", version = "=2.3.0" } +wasmer-vm = { path = "../vm", version = "=3.0.0-alpha.4" } +wasmer-types = { path = "../types", version = "=3.0.0-alpha.4" } target-lexicon = { version = "0.12.2", default-features = false } smallvec = "1.6" object = { version = "0.28.3", default-features = false, features = ["read"] } diff --git a/lib/compiler-singlepass/Cargo.toml b/lib/compiler-singlepass/Cargo.toml index c5479028f..238f7ed96 100644 --- a/lib/compiler-singlepass/Cargo.toml +++ b/lib/compiler-singlepass/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmer-compiler-singlepass" -version = "2.3.0" +version = "3.0.0-alpha.4" description = "Singlepass compiler for Wasmer WebAssembly runtime" categories = ["wasm"] keywords = ["wasm", "webassembly", "compiler", "singlepass"] @@ -12,8 +12,8 @@ readme = "README.md" edition = "2018" [dependencies] -wasmer-compiler = { path = "../compiler", version = "=2.3.0", features = ["translator", "compiler"], default-features = false } -wasmer-types = { path = "../types", version = "=2.3.0", default-features = false, features = ["std"] } +wasmer-compiler = { path = "../compiler", version = "=3.0.0-alpha.4", features = ["translator", "compiler"], default-features = false } +wasmer-types = { path = "../types", version = "=3.0.0-alpha.4", default-features = false, features = ["std"] } hashbrown = { version = "0.11", optional = true } gimli = { version = "0.26", optional = true } more-asserts = "0.2" diff --git a/lib/compiler/Cargo.toml b/lib/compiler/Cargo.toml index 43be84396..05e37c734 100644 --- a/lib/compiler/Cargo.toml +++ b/lib/compiler/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmer-compiler" -version = "2.3.0" +version = "3.0.0-alpha.4" description = "Base compiler abstraction for Wasmer WebAssembly runtime" categories = ["wasm", "no-std"] keywords = ["wasm", "webassembly", "compiler"] @@ -11,7 +11,7 @@ readme = "README.md" edition = "2018" [dependencies] -wasmer-types = { path = "../types", version = "=2.3.0", default-features = false } +wasmer-types = { path = "../types", version = "=3.0.0-alpha.4", default-features = false } wasmparser = { version = "0.83", optional = true, default-features = false } enumset = "1.0.2" hashbrown = { version = "0.11", optional = true } @@ -31,7 +31,7 @@ leb128 = "0.2" enum-iterator = "0.7.0" [target.'cfg(not(target_arch = "wasm32"))'.dependencies] -wasmer-vm = { path = "../vm", version = "=2.3.0" } +wasmer-vm = { path = "../vm", version = "=3.0.0-alpha.4" } region = { version = "3.0" } [target.'cfg(target_os = "windows")'.dependencies] diff --git a/lib/compiler/src/artifact_builders/artifact_builder.rs b/lib/compiler/src/artifact_builders/artifact_builder.rs index 321434b03..aef2db988 100644 --- a/lib/compiler/src/artifact_builders/artifact_builder.rs +++ b/lib/compiler/src/artifact_builders/artifact_builder.rs @@ -4,7 +4,6 @@ #[cfg(feature = "compiler")] use super::trampoline::{libcall_trampoline_len, make_libcall_trampolines}; use crate::ArtifactCreate; -#[cfg(feature = "compiler")] use crate::EngineInner; use crate::Features; use crate::{ModuleEnvironment, ModuleMiddlewareChain}; diff --git a/lib/compiler/src/engine/inner.rs b/lib/compiler/src/engine/inner.rs index 5ff4dccf7..26c1e453d 100644 --- a/lib/compiler/src/engine/inner.rs +++ b/lib/compiler/src/engine/inner.rs @@ -76,7 +76,9 @@ impl Engine { pub fn headless() -> Self { Self { inner: Arc::new(Mutex::new(EngineInner { + #[cfg(feature = "compiler")] compiler: None, + #[cfg(feature = "compiler")] features: Features::default(), #[cfg(not(target_arch = "wasm32"))] code_memory: vec![], @@ -118,6 +120,7 @@ impl Engine { } /// Validates a WebAssembly module + #[cfg(feature = "compiler")] pub fn validate(&self, binary: &[u8]) -> Result<(), CompileError> { self.inner().validate(binary) } @@ -217,12 +220,14 @@ impl EngineInner { } /// Validate the module + #[cfg(feature = "compiler")] pub fn validate(&self, data: &[u8]) -> Result<(), CompileError> { let compiler = self.compiler()?; compiler.validate_module(&self.features, data) } /// The Wasm features + #[cfg(feature = "compiler")] pub fn features(&self) -> &Features { &self.features } @@ -348,6 +353,7 @@ impl EngineInner { } } +#[cfg(feature = "compiler")] impl From> for Engine { fn from(config: Box) -> Self { EngineBuilder::new(config).engine() diff --git a/lib/derive/Cargo.toml b/lib/derive/Cargo.toml index e07eb6f4a..5c82a1191 100644 --- a/lib/derive/Cargo.toml +++ b/lib/derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmer-derive" -version = "2.3.0" +version = "3.0.0-alpha.4" description = "Wasmer derive macros" authors = ["Wasmer Engineering Team "] repository = "https://github.com/wasmerio/wasmer" diff --git a/lib/emscripten/Cargo.toml b/lib/emscripten/Cargo.toml index ed5049763..34b54b46f 100644 --- a/lib/emscripten/Cargo.toml +++ b/lib/emscripten/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmer-emscripten" -version = "2.3.0" +version = "3.0.0-alpha.4" description = "Emscripten implementation library for Wasmer WebAssembly runtime" categories = ["wasm", "os"] keywords = ["wasm", "webassembly", "abi", "emscripten", "posix"] @@ -16,8 +16,8 @@ lazy_static = "1.4" libc = "^0.2" log = "0.4" time = { version = "0.2", features = ["std"] } -wasmer = { path = "../api", version = "=2.3.0", default-features = false, features = ["sys", "compiler"] } -wasmer-types = { path = "../types", version = "=2.3.0" } +wasmer = { path = "../api", version = "=3.0.0-alpha.4", default-features = false, features = ["sys", "compiler"] } +wasmer-types = { path = "../types", version = "=3.0.0-alpha.4" } [target.'cfg(windows)'.dependencies] getrandom = "0.2" diff --git a/lib/middlewares/Cargo.toml b/lib/middlewares/Cargo.toml index c1f230f87..5f588b291 100644 --- a/lib/middlewares/Cargo.toml +++ b/lib/middlewares/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmer-middlewares" -version = "2.3.0" +version = "3.0.0-alpha.4" authors = ["Wasmer Engineering Team "] description = "A collection of various useful middlewares" license = "MIT OR Apache-2.0 WITH LLVM-exception" @@ -11,12 +11,12 @@ readme = "README.md" edition = "2018" [dependencies] -wasmer = { path = "../api", version = "=2.3.0", default-features = false, features = ["compiler"] } -wasmer-types = { path = "../types", version = "=2.3.0" } -wasmer-vm = { path = "../vm", version = "=2.3.0" } +wasmer = { path = "../api", version = "=3.0.0-alpha.4", default-features = false, features = ["compiler"] } +wasmer-types = { path = "../types", version = "=3.0.0-alpha.4" } +wasmer-vm = { path = "../vm", version = "=3.0.0-alpha.4" } [dev-dependencies] -wasmer = { path = "../api", version = "=2.3.0", features = ["compiler"] } +wasmer = { path = "../api", version = "=3.0.0-alpha.4", features = ["compiler"] } [badges] maintenance = { status = "actively-developed" } diff --git a/lib/object/Cargo.toml b/lib/object/Cargo.toml index 2449e4106..6dd1f05e9 100644 --- a/lib/object/Cargo.toml +++ b/lib/object/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmer-object" -version = "2.3.0" +version = "3.0.0-alpha.4" description = "Wasmer Native Object generator" categories = ["wasm"] keywords = ["wasm", "webassembly"] @@ -11,8 +11,8 @@ readme = "README.md" edition = "2018" [dependencies] -wasmer-types = { path = "../types", version = "=2.3.0" } -wasmer-compiler = { path = "../compiler", version = "=2.3.0", default-features = false, features = [ +wasmer-types = { path = "../types", version = "=3.0.0-alpha.4" } +wasmer-compiler = { path = "../compiler", version = "=3.0.0-alpha.4", default-features = false, features = [ "std", "translator", ] } diff --git a/lib/object/src/lib.rs b/lib/object/src/lib.rs index db674a5e9..aa0cfc362 100644 --- a/lib/object/src/lib.rs +++ b/lib/object/src/lib.rs @@ -24,4 +24,4 @@ mod module; pub use crate::error::ObjectError; pub use crate::module::{emit_compilation, emit_data, emit_serialized, get_object_for_target}; -pub use object::{self, Object}; +pub use object::{self, write::Object}; diff --git a/lib/types/Cargo.toml b/lib/types/Cargo.toml index ddb6781f9..391a95d5b 100644 --- a/lib/types/Cargo.toml +++ b/lib/types/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmer-types" -version = "2.3.0" +version = "3.0.0-alpha.4" description = "Wasmer Common Types" categories = ["wasm", "no-std", "data-structures"] keywords = ["wasm", "webassembly", "types"] diff --git a/lib/types/src/units.rs b/lib/types/src/units.rs index 88f7e5b18..c19250252 100644 --- a/lib/types/src/units.rs +++ b/lib/types/src/units.rs @@ -115,7 +115,7 @@ where } /// The only error that can happen when converting `Bytes` to `Pages` -#[derive(Debug, Clone, Copy, PartialEq, Error)] +#[derive(Debug, Clone, Copy, PartialEq, Eq, Error)] #[error("Number of pages exceeds uint32 range")] pub struct PageCountOutOfRange; diff --git a/lib/vbus/Cargo.toml b/lib/vbus/Cargo.toml index bf0400e22..a54b3841b 100644 --- a/lib/vbus/Cargo.toml +++ b/lib/vbus/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmer-vbus" -version = "2.3.0" +version = "3.0.0-alpha.4" description = "Wasmer Virtual Bus" authors = ["Wasmer Engineering Team "] license = "MIT" @@ -13,7 +13,9 @@ tracing = { version = "0.1" } typetag = { version = "0.1", optional = true } serde = { version = "1.0", default-features = false, features = ["derive"], optional = true } slab = { version = "0.4", optional = true } -wasmer-vfs = { path = "../vfs", version = "=2.3.0", default-features = false } +wasmer-vfs = { path = "../vfs", version = "=3.0.0-alpha.4", default-features = false } [features] -default = [] +default = ["mem_fs"] +mem_fs = ["wasmer-vfs/mem-fs"] +host_fs = ["wasmer-vfs/host-fs"] \ No newline at end of file diff --git a/lib/vfs/Cargo.toml b/lib/vfs/Cargo.toml index e77e405e1..6ea1c3617 100644 --- a/lib/vfs/Cargo.toml +++ b/lib/vfs/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmer-vfs" -version = "2.3.0" +version = "3.0.0-alpha.4" description = "Wasmer Virtual FileSystem" authors = ["Wasmer Engineering Team "] license = "MIT" diff --git a/lib/vfs/src/mem_fs/file.rs b/lib/vfs/src/mem_fs/file.rs index d587dd03e..18618e8c7 100644 --- a/lib/vfs/src/mem_fs/file.rs +++ b/lib/vfs/src/mem_fs/file.rs @@ -51,12 +51,11 @@ impl VirtualFile for FileHandle { _ => return 0, }; - let node = match fs.storage.get(self.inode) { - Some(node) => node, - _ => return 0, - }; - - node.metadata().accessed + let inode = fs.storage.get(self.inode); + match inode { + Some(node) => node.metadata().accessed, + _ => 0, + } } fn last_modified(&self) -> u64 { @@ -65,12 +64,11 @@ impl VirtualFile for FileHandle { _ => return 0, }; - let node = match fs.storage.get(self.inode) { - Some(node) => node, - _ => return 0, - }; - - node.metadata().modified + let inode = fs.storage.get(self.inode); + match inode { + Some(node) => node.metadata().modified, + _ => 0, + } } fn created_time(&self) -> u64 { @@ -79,7 +77,8 @@ impl VirtualFile for FileHandle { _ => return 0, }; - let node = match fs.storage.get(self.inode) { + let inode = fs.storage.get(self.inode); + let node = match inode { Some(node) => node, _ => return 0, }; @@ -93,7 +92,8 @@ impl VirtualFile for FileHandle { _ => return 0, }; - match fs.storage.get(self.inode) { + let inode = fs.storage.get(self.inode); + match inode { Some(Node::File { file, .. }) => file.len().try_into().unwrap_or(0), _ => 0, } @@ -106,7 +106,8 @@ impl VirtualFile for FileHandle { .try_write() .map_err(|_| FsError::Lock)?; - match fs.storage.get_mut(self.inode) { + let inode = fs.storage.get_mut(self.inode); + match inode { Some(Node::File { file, metadata, .. }) => { file.buffer .resize(new_size.try_into().map_err(|_| FsError::UnknownError)?, 0); @@ -178,7 +179,8 @@ impl VirtualFile for FileHandle { .try_read() .map_err(|_| FsError::Lock)?; - match fs.storage.get(self.inode) { + let inode = fs.storage.get(self.inode); + match inode { Some(Node::File { file, .. }) => Ok(file.buffer.len() - file.cursor), _ => Err(FsError::NotAFile), } @@ -416,7 +418,8 @@ impl Read for FileHandle { io::Error::new(io::ErrorKind::Other, "failed to acquire a write lock") })?; - let file = match fs.storage.get_mut(self.inode) { + let inode = fs.storage.get_mut(self.inode); + let file = match inode { Some(Node::File { file, .. }) => file, _ => { return Err(io::Error::new( @@ -445,7 +448,8 @@ impl Read for FileHandle { io::Error::new(io::ErrorKind::Other, "failed to acquire a write lock") })?; - let file = match fs.storage.get_mut(self.inode) { + let inode = fs.storage.get_mut(self.inode); + let file = match inode { Some(Node::File { file, .. }) => file, _ => { return Err(io::Error::new( @@ -493,7 +497,8 @@ impl Read for FileHandle { io::Error::new(io::ErrorKind::Other, "failed to acquire a write lock") })?; - let file = match fs.storage.get_mut(self.inode) { + let inode = fs.storage.get_mut(self.inode); + let file = match inode { Some(Node::File { file, .. }) => file, _ => { return Err(io::Error::new( @@ -532,7 +537,8 @@ impl Seek for FileHandle { io::Error::new(io::ErrorKind::Other, "failed to acquire a write lock") })?; - let file = match fs.storage.get_mut(self.inode) { + let inode = fs.storage.get_mut(self.inode); + let file = match inode { Some(Node::File { file, .. }) => file, _ => { return Err(io::Error::new( @@ -563,7 +569,8 @@ impl Write for FileHandle { io::Error::new(io::ErrorKind::Other, "failed to acquire a write lock") })?; - let (file, metadata) = match fs.storage.get_mut(self.inode) { + let inode = fs.storage.get_mut(self.inode); + let (file, metadata) = match inode { Some(Node::File { file, metadata, .. }) => (file, metadata), _ => { return Err(io::Error::new( diff --git a/lib/vfs/src/mem_fs/file_opener.rs b/lib/vfs/src/mem_fs/file_opener.rs index 80fc9255b..4193f5e69 100644 --- a/lib/vfs/src/mem_fs/file_opener.rs +++ b/lib/vfs/src/mem_fs/file_opener.rs @@ -61,7 +61,7 @@ impl crate::FileOpener for FileOpener { // Find the inode of the file if it exists. let maybe_inode_of_file = fs - .from_parent_get_position_and_inode_of_file(inode_of_parent, &name_of_file)? + .as_parent_get_position_and_inode_of_file(inode_of_parent, &name_of_file)? .map(|(_nth, inode)| inode); (inode_of_parent, maybe_inode_of_file, name_of_file) @@ -81,7 +81,8 @@ impl crate::FileOpener for FileOpener { .try_write() .map_err(|_| FsError::Lock)?; - match fs.storage.get_mut(inode_of_file) { + let inode = fs.storage.get_mut(inode_of_file); + match inode { Some(Node::File { metadata, file, .. }) => { // Update the accessed time. metadata.accessed = time(); diff --git a/lib/vfs/src/mem_fs/filesystem.rs b/lib/vfs/src/mem_fs/filesystem.rs index 5d154b8ea..c485431e7 100644 --- a/lib/vfs/src/mem_fs/filesystem.rs +++ b/lib/vfs/src/mem_fs/filesystem.rs @@ -28,7 +28,8 @@ impl crate::FileSystem for FileSystem { let (path, inode_of_directory) = fs.canonicalize(path)?; // Check it's a directory and fetch the immediate children as `DirEntry`. - let children = match fs.storage.get(inode_of_directory) { + let inode = fs.storage.get(inode_of_directory); + let children = match inode { Some(Node::Directory { children, .. }) => children .iter() .filter_map(|inode| fs.storage.get(*inode)) @@ -133,12 +134,11 @@ impl crate::FileSystem for FileSystem { // Get the child index to remove in the parent node, in // addition to the inode of the directory to remove. - let (position, inode_of_directory) = fs - .from_parent_get_position_and_inode_of_directory( - inode_of_parent, - &name_of_directory, - DirectoryMustBeEmpty::Yes, - )?; + let (position, inode_of_directory) = fs.as_parent_get_position_and_inode_of_directory( + inode_of_parent, + &name_of_directory, + DirectoryMustBeEmpty::Yes, + )?; (inode_of_parent, position, inode_of_directory) }; @@ -183,7 +183,7 @@ impl crate::FileSystem for FileSystem { // Get the child indexes to update in the parent nodes, in // addition to the inode of the directory to update. let (position_of_from, inode) = fs - .from_parent_get_position_and_inode(inode_of_from_parent, &name_of_from)? + .as_parent_get_position_and_inode(inode_of_from_parent, &name_of_from)? .ok_or(FsError::NotAFile)?; ( @@ -211,7 +211,8 @@ impl crate::FileSystem for FileSystem { } // Otherwise, we need to at least update the modified time of the parent. else { - match fs.storage.get_mut(inode_of_from_parent) { + let inode = fs.storage.get_mut(inode_of_from_parent); + match inode { Some(Node::Directory { metadata: Metadata { modified, .. }, .. @@ -258,7 +259,7 @@ impl crate::FileSystem for FileSystem { // Find the inode of the file if it exists, along with its position. let maybe_position_and_inode_of_file = - fs.from_parent_get_position_and_inode_of_file(inode_of_parent, &name_of_file)?; + fs.as_parent_get_position_and_inode_of_file(inode_of_parent, &name_of_file)?; match maybe_position_and_inode_of_file { Some((position, inode_of_file)) => (inode_of_parent, position, inode_of_file), @@ -318,13 +319,7 @@ impl FileSystemInner { Node::Directory { children, .. } => children .iter() .filter_map(|inode| self.storage.get(*inode)) - .find_map(|node| { - if node.name() == component.as_os_str() { - Some(node) - } else { - None - } - }) + .find(|node| node.name() == component.as_os_str()) .ok_or(FsError::NotAFile)?, _ => return Err(FsError::BaseNotDirectory), }; @@ -347,7 +342,7 @@ impl FileSystemInner { /// From the inode of a parent node (so, a directory), returns the /// child index of `name_of_directory` along with its inode. - pub(super) fn from_parent_get_position_and_inode_of_directory( + pub(super) fn as_parent_get_position_and_inode_of_directory( &self, inode_of_parent: Inode, name_of_directory: &OsString, @@ -382,7 +377,7 @@ impl FileSystemInner { /// From the inode of a parent node (so, a directory), returns the /// child index of `name_of_file` along with its inode. - pub(super) fn from_parent_get_position_and_inode_of_file( + pub(super) fn as_parent_get_position_and_inode_of_file( &self, inode_of_parent: Inode, name_of_file: &OsString, @@ -409,7 +404,7 @@ impl FileSystemInner { /// From the inode of a parent node (so, a directory), returns the /// child index of `name_of` along with its inode, whatever the /// type of inode is (directory or file). - fn from_parent_get_position_and_inode( + fn as_parent_get_position_and_inode( &self, inode_of_parent: Inode, name_of: &OsString, diff --git a/lib/vm/Cargo.toml b/lib/vm/Cargo.toml index 236474b30..21d384bd7 100644 --- a/lib/vm/Cargo.toml +++ b/lib/vm/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmer-vm" -version = "2.3.0" +version = "3.0.0-alpha.4" description = "Runtime library support for Wasmer" categories = ["wasm"] keywords = ["wasm", "webassembly"] @@ -11,7 +11,7 @@ readme = "README.md" edition = "2018" [dependencies] -wasmer-types = { path = "../types", version = "=2.3.0" } +wasmer-types = { path = "../types", version = "=3.0.0-alpha.4" } libc = { version = "^0.2", default-features = false } memoffset = "0.6" indexmap = { version = "1.6", features = ["serde-1"] } diff --git a/lib/vnet/Cargo.toml b/lib/vnet/Cargo.toml index a61e81752..697b316a7 100644 --- a/lib/vnet/Cargo.toml +++ b/lib/vnet/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmer-vnet" -version = "2.3.0" +version = "3.0.0-alpha.4" description = "Wasmer Virtual Networking" authors = ["Wasmer Engineering Team "] license = "MIT" @@ -13,8 +13,10 @@ tracing = { version = "0.1" } typetag = { version = "0.1", optional = true } serde = { version = "1.0", default-features = false, features = ["derive"], optional = true } slab = { version = "0.4", optional = true } -wasmer-vfs = { path = "../vfs", version = "=2.3.0", default-features = false } +wasmer-vfs = { path = "../vfs", version = "=3.0.0-alpha.4", default-features = false } bytes = "1" [features] -default = [] +default = ["mem_fs"] +mem_fs = ["wasmer-vfs/mem-fs"] +host_fs = ["wasmer-vfs/host-fs"] \ No newline at end of file diff --git a/lib/wasi-experimental-io-devices/Cargo.toml b/lib/wasi-experimental-io-devices/Cargo.toml index 20403a896..f0f40e57e 100644 --- a/lib/wasi-experimental-io-devices/Cargo.toml +++ b/lib/wasi-experimental-io-devices/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmer-wasi-experimental-io-devices" -version = "2.3.0" +version = "3.0.0-alpha.4" description = "An experimental non-standard WASI extension for graphics" categories = ["wasm"] keywords = ["wasm", "webassembly", "types"] @@ -14,7 +14,7 @@ edition = "2018" maintenance = { status = "experimental" } [dependencies] -wasmer-wasi = { version = "=2.3.0", path = "../wasi", default-features=false } +wasmer-wasi = { version = "=3.0.0-alpha.4", path = "../wasi", default-features=false } tracing = "0.1" minifb = { version = "0.19", optional = true } nix = "0.20.2" diff --git a/lib/wasi-local-networking/Cargo.toml b/lib/wasi-local-networking/Cargo.toml index ff18b7048..295aac971 100644 --- a/lib/wasi-local-networking/Cargo.toml +++ b/lib/wasi-local-networking/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmer-wasi-local-networking" -version = "2.3.0" +version = "3.0.0-alpha.4" description = "An WASIX extension for local networking" categories = ["wasm"] keywords = ["wasm", "webassembly", "types"] @@ -14,11 +14,13 @@ edition = "2018" maintenance = { status = "experimental" } [dependencies] -wasmer-vnet = { version = "=2.3.0", path = "../vnet", default-features = false } -wasmer-vfs = { path = "../vfs", version = "=2.3.0", default-features = false, features = [ "host-fs" ] } +wasmer-vnet = { version = "=3.0.0-alpha.4", path = "../vnet", default-features = false } +wasmer-vfs = { path = "../vfs", version = "=3.0.0-alpha.4", default-features = false } tracing = "0.1" bytes = "1.1" [features] -default = [ ] +default = ["host_fs"] wasix = [ ] +host_fs = ["wasmer-vnet/host_fs", "wasmer-vfs/host-fs"] +mem_fs = ["wasmer-vnet/mem_fs", "wasmer-vfs/mem-fs"] \ No newline at end of file diff --git a/lib/wasi-types/Cargo.toml b/lib/wasi-types/Cargo.toml index d91ed71b7..297d7784b 100644 --- a/lib/wasi-types/Cargo.toml +++ b/lib/wasi-types/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmer-wasi-types" -version = "2.3.0" +version = "3.0.0-alpha.4" description = "WASI types for Wasmer WebAssembly runtime" categories = ["wasm", "os"] keywords = ["wasm", "webassembly", "wasi", "sandbox", "ABI"] @@ -11,8 +11,8 @@ readme = "README.md" edition = "2018" [dependencies] -wasmer-types = { path = "../types", version = "=2.3.0" } -wasmer-derive = { path = "../derive", version = "=2.3.0" } +wasmer-types = { path = "../types", version = "=3.0.0-alpha.4" } +wasmer-derive = { path = "../derive", version = "=3.0.0-alpha.4" } serde = { version = "1.0", features = ["derive"], optional=true } byteorder = "1.3" time = "0.2" diff --git a/lib/wasi/Cargo.toml b/lib/wasi/Cargo.toml index c9e35a7be..1800ba124 100644 --- a/lib/wasi/Cargo.toml +++ b/lib/wasi/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmer-wasi" -version = "2.3.0" +version = "3.0.0-alpha.4" description = "WASI implementation library for Wasmer WebAssembly runtime" categories = ["wasm", "os"] keywords = ["wasm", "webassembly", "wasi", "sandbox", "ABI"] @@ -19,12 +19,12 @@ thiserror = "1" generational-arena = { version = "0.2" } tracing = "0.1" getrandom = "0.2" -wasmer-wasi-types = { path = "../wasi-types", version = "=2.3.0" } -wasmer = { path = "../api", version = "=2.3.0", default-features = false } -wasmer-vfs = { path = "../vfs", version = "=2.3.0", default-features = false } -wasmer-vbus = { path = "../vbus", version = "=2.3.0", default-features = false } -wasmer-vnet = { path = "../vnet", version = "=2.3.0", default-features = false } -wasmer-wasi-local-networking = { path = "../wasi-local-networking", version = "=2.3.0", default-features = false, optional = true } +wasmer-wasi-types = { path = "../wasi-types", version = "=3.0.0-alpha.4" } +wasmer = { path = "../api", version = "=3.0.0-alpha.4", default-features = false } +wasmer-vfs = { path = "../vfs", version = "=3.0.0-alpha.4", default-features = false } +wasmer-vbus = { path = "../vbus", version = "=3.0.0-alpha.4", default-features = false } +wasmer-vnet = { path = "../vnet", version = "=3.0.0-alpha.4", default-features = false } +wasmer-wasi-local-networking = { path = "../wasi-local-networking", version = "=3.0.0-alpha.4", default-features = false, optional = true } typetag = { version = "0.1", optional = true } serde = { version = "1.0", default-features = false, features = ["derive"], optional = true } bincode = { version = "1.3", optional = true } diff --git a/scripts/publish.py b/scripts/publish.py index 6cc7884bc..1d7b94d80 100644 --- a/scripts/publish.py +++ b/scripts/publish.py @@ -22,60 +22,43 @@ except ImportError: # TODO: find this automatically -target_version = "2.3.0" +target_version = "3.0.0-alpha.4" # TODO: generate this by parsing toml files dep_graph = { "wasmer-types": set([]), "wasmer-derive": set([]), - "wasmer-vm": set(["wasmer-types", "wasmer-artifact"]), + "wasmer-vm": set(["wasmer-types"]), "wasmer-compiler": set(["wasmer-types"]), + "wasmer-compiler-singlepass": set(["wasmer-types", "wasmer-compiler"]), + "wasmer-compiler-cranelift": set(["wasmer-types", "wasmer-compiler"]), "wasmer-compiler-cli": set( [ - "wasmer-engine-universal-artifact", "wasmer-compiler", "wasmer-types", "wasmer-compiler-singlepass", "wasmer-compiler-cranelift", ] ), - "wasmer-engine-universal-artifact": set( - ["wasmer-artifact", "wasmer-types", "wasmer-compiler"] - ), - "wasmer-artifact": set(["wasmer-types", "wasmer-compiler"]), "wasmer-object": set(["wasmer-types", "wasmer-compiler"]), - "wasmer-engine": set( - ["wasmer-types", "wasmer-compiler", "wasmer-artifact", "wasmer-vm"] - ), - "wasmer-compiler-singlepass": set(["wasmer-types", "wasmer-compiler"]), - "wasmer-compiler-cranelift": set(["wasmer-types", "wasmer-compiler"]), "wasmer-compiler-llvm": set(["wasmer-compiler", "wasmer-vm", "wasmer-types"]), - "wasmer-engine-universal": set( - [ - "wasmer-engine-universal-artifact", - "wasmer-types", - "wasmer-compiler", - "wasmer-vm", - "wasmer-engine", - ] - ), "wasmer": set( [ - "wasmer-artifact", "wasmer-vm", "wasmer-compiler", "wasmer-derive", - "wasmer-engine", "wasmer-types", "wasmer-compiler-singlepass", "wasmer-compiler-cranelift", "wasmer-compiler-llvm", - "wasmer-engine-universal", ] ), "wasmer-vfs": set([]), + "wasmer-vbus": set([]), + "wasmer-vnet": set([]), + "wasmer-wasi-local-networking": set([]), "wasmer-cache": set(["wasmer"]), - "wasmer-wasi": set(["wasmer", "wasmer-wasi-types", "wasmer-vfs"]), + "wasmer-wasi": set(["wasmer", "wasmer-wasi-types", "wasmer-vfs", "wasmer-vbus", "wasmer-vnet"]), "wasmer-wasi-types": set(["wasmer-types"]), "wasmer-wasi-experimental-io-devices": set(["wasmer-wasi"]), "wasmer-emscripten": set(["wasmer"]), @@ -87,8 +70,6 @@ dep_graph = { "wasmer-compiler-singlepass", "wasmer-compiler-llvm", "wasmer-emscripten", - "wasmer-engine", - "wasmer-engine-universal", "wasmer-middlewares", "wasmer-wasi", "wasmer-types", @@ -104,8 +85,6 @@ dep_graph = { "wasmer-compiler-singlepass", "wasmer-compiler-llvm", "wasmer-emscripten", - "wasmer-engine", - "wasmer-engine-universal", "wasmer-vm", "wasmer-wasi", "wasmer-wasi-experimental-io-devices", @@ -120,20 +99,15 @@ dep_graph = { # where each crate is located in the `lib` directory # TODO: this could also be generated from the toml files location = { - "wasmer-artifact": "artifact", - "wasmer-engine-universal-artifact": "universal-artifact", "wasmer-compiler-cli": "cli-compiler", "wasmer-types": "types", "wasmer-derive": "derive", "wasmer-vm": "vm", "wasmer-compiler": "compiler", "wasmer-object": "object", - "wasmer-engine": "engine", "wasmer-compiler-singlepass": "compiler-singlepass", "wasmer-compiler-cranelift": "compiler-cranelift", "wasmer-compiler-llvm": "compiler-llvm", - "wasmer-engine": "engine", - "wasmer-engine-universal": "engine-universal", "wasmer-cache": "cache", "wasmer": "api", "wasmer-wasi": "wasi", @@ -143,7 +117,10 @@ location = { "wasmer-c-api": "c-api", "wasmer-middlewares": "middlewares", "wasmer-vfs": "vfs", + "wasmer-vbus": "vbus", + "wasmer-vnet": "vnet", "wasmer-cli": "cli", + "wasmer-wasi-local-networking": "wasi-local-networking", "wasmer-wast": "../tests/lib/wast", } diff --git a/scripts/update-version.sh b/scripts/update-version.sh index 3666eb983..b5dea7ff5 100755 --- a/scripts/update-version.sh +++ b/scripts/update-version.sh @@ -4,8 +4,8 @@ : "${FD:=fd}" # A script to update the version of all the crates at the same time -PREVIOUS_VERSION='2.2.1' -NEXT_VERSION='2.3.0' +PREVIOUS_VERSION='3.0.0-alpha.3' +NEXT_VERSION='3.0.0-alpha.4' # quick hack ${FD} Cargo.toml --exec sed -i '{}' -e "s/version = \"$PREVIOUS_VERSION\"/version = \"$NEXT_VERSION\"/" diff --git a/scripts/windows-installer/wasmer.iss b/scripts/windows-installer/wasmer.iss index eb350905b..ea07ce5c1 100644 --- a/scripts/windows-installer/wasmer.iss +++ b/scripts/windows-installer/wasmer.iss @@ -1,6 +1,6 @@ [Setup] AppName=Wasmer -AppVersion=2.3.0 +AppVersion=3.0.0-alpha.4 DefaultDirName={pf}\Wasmer DefaultGroupName=Wasmer Compression=lzma2 diff --git a/tests/integration/cli/Cargo.toml b/tests/integration/cli/Cargo.toml index b3ea4e06b..094b7ee5e 100644 --- a/tests/integration/cli/Cargo.toml +++ b/tests/integration/cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmer-integration-tests-cli" -version = "2.3.0" +version = "3.0.0-alpha.4" authors = ["Wasmer Engineering Team "] description = "CLI integration tests" repository = "https://github.com/wasmerio/wasmer" diff --git a/tests/integration/ios/Cargo.toml b/tests/integration/ios/Cargo.toml index 356c1cdc5..583b548fb 100644 --- a/tests/integration/ios/Cargo.toml +++ b/tests/integration/ios/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmer-integration-tests-ios" -version = "2.3.0" +version = "3.0.0-alpha.4" authors = ["Wasmer Engineering Team "] description = "iOS integration tests" repository = "https://github.com/wasmerio/wasmer" diff --git a/tests/lib/wast/Cargo.toml b/tests/lib/wast/Cargo.toml index 44b8ce383..03911436c 100644 --- a/tests/lib/wast/Cargo.toml +++ b/tests/lib/wast/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmer-wast" -version = "2.3.0" +version = "3.0.0-alpha.4" authors = ["Wasmer Engineering Team "] description = "wast testing support for wasmer" license = "MIT OR Apache-2.0 WITH LLVM-exception" @@ -12,9 +12,9 @@ edition = "2018" [dependencies] anyhow = "1.0" -wasmer = { path = "../../../lib/api", version = "=2.3.0", default-features = false } -wasmer-wasi = { path = "../../../lib/wasi", version = "=2.3.0" } -wasmer-vfs = { path = "../../../lib/vfs", version = "=2.3.0" } +wasmer = { path = "../../../lib/api", version = "=3.0.0-alpha.4", default-features = false } +wasmer-wasi = { path = "../../../lib/wasi", version = "=3.0.0-alpha.4" } +wasmer-vfs = { path = "../../../lib/vfs", version = "=3.0.0-alpha.4" } wast = "38.0" serde = "1" tempfile = "3" diff --git a/tests/wasi-wast/Cargo.toml b/tests/wasi-wast/Cargo.toml index 582bf1b2f..595a68d9a 100644 --- a/tests/wasi-wast/Cargo.toml +++ b/tests/wasi-wast/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasi-test-generator" -version = "2.3.0" +version = "3.0.0-alpha.4" description = "Tests for our WASI implementation" license = "MIT" authors = ["Wasmer Engineering Team "] diff --git a/tests/wasi-wast/src/wasitests.rs b/tests/wasi-wast/src/wasitests.rs index 20898c7ea..2a204d8a5 100644 --- a/tests/wasi-wast/src/wasitests.rs +++ b/tests/wasi-wast/src/wasitests.rs @@ -16,7 +16,7 @@ use std::io::prelude::*; use super::util; use super::wasi_version::*; -#[derive(Debug, Clone, PartialEq)] +#[derive(Debug, Clone, PartialEq, Eq)] pub struct NativeOutput { stdout: String, stderr: String, @@ -284,6 +284,8 @@ pub struct WasiTest { impl WasiTest { fn into_wasi_wast(self) -> String { + use std::fmt::Write; + let mut out = format!( ";; This file was generated by https://github.com/wasmerio/wasi-tests\n (wasi_test \"{}\"", @@ -297,7 +299,7 @@ impl WasiTest { .map(|(name, value)| format!("\"{}={}\"", name, value)) .collect::>() .join(" "); - out += &format!("\n (envs {})", envs); + let _ = write!(out, "\n (envs {})", envs); } if !self.options.args.is_empty() { let args = self @@ -307,7 +309,7 @@ impl WasiTest { .map(|v| format!("\"{}\"", v)) .collect::>() .join(" "); - out += &format!("\n (args {})", args); + let _ = write!(out, "\n (args {})", args); } if !self.options.dir.is_empty() { @@ -318,7 +320,7 @@ impl WasiTest { .map(|v| format!("\"{}\"", v)) .collect::>() .join(" "); - out += &format!("\n (preopens {})", preopens); + let _ = write!(out, "\n (preopens {})", preopens); } if !self.options.mapdir.is_empty() { let map_dirs = self @@ -328,7 +330,7 @@ impl WasiTest { .map(|(a, b)| format!("\"{}:{}\"", a, b)) .collect::>() .join(" "); - out += &format!("\n (map_dirs {})", map_dirs); + let _ = write!(out, "\n (map_dirs {})", map_dirs); } if !self.options.tempdir.is_empty() { let temp_dirs = self @@ -338,22 +340,22 @@ impl WasiTest { .map(|td| format!("\"{}\"", td)) .collect::>() .join(" "); - out += &format!("\n (temp_dirs {})", temp_dirs); + let _ = write!(out, "\n (temp_dirs {})", temp_dirs); } - out += &format!("\n (assert_return (i64.const {}))", self.result); + let _ = write!(out, "\n (assert_return (i64.const {}))", self.result); if let Some(stdin) = &self.options.stdin { - out += &format!("\n (stdin {:?})", stdin); + let _ = write!(out, "\n (stdin {:?})", stdin); } if !self.stdout.is_empty() { - out += &format!("\n (assert_stdout {:?})", self.stdout); + let _ = write!(out, "\n (assert_stdout {:?})", self.stdout); } if !self.stderr.is_empty() { - out += &format!("\n (assert_stderr {:?})", self.stderr); + let _ = write!(out, "\n (assert_stderr {:?})", self.stderr); } - out += "\n)\n"; + let _ = write!(out, "\n)\n"); out }