diff --git a/.appveyor.yml b/.appveyor.yml index c057f81d3..dbddab9a3 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -58,7 +58,7 @@ build_script: - cd wapm-cli - rename wapm-cli-target target - cd .. - - cargo build --release --manifest-path wapm-cli/Cargo.toml --features telemetry + - cargo build --release --manifest-path wapm-cli/Cargo.toml --features "telemetry update-notifications" - cd wapm-cli - cd .. - xcopy wapm-cli\target wapm-cli-target\ /i /y diff --git a/.circleci/config.yml b/.circleci/config.yml index 40c2772ea..13d0d450f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -226,7 +226,7 @@ jobs: command: | export LLVM_SYS_70_PREFIX="`pwd`/clang+llvm-7.0.0-x86_64-linux-gnu-ubuntu-16.04/" make release - cargo build --release --manifest-path wapm-cli/Cargo.toml --features telemetry + cargo build --release --manifest-path wapm-cli/Cargo.toml --features "telemetry update-notifications" mkdir -p artifacts VERSION=$(cargo pkgid | cut -d# -f2 | cut -d: -f2) # GIT_VERSION=$(git describe --exact-match --tags) @@ -301,7 +301,7 @@ jobs: export PATH="$HOME/.cargo/bin:$PATH" export LLVM_SYS_70_PREFIX="`pwd`/clang+llvm-7.0.0-x86_64-apple-darwin/" make release - cargo build --release --manifest-path wapm-cli/Cargo.toml --features telemetry + cargo build --release --manifest-path wapm-cli/Cargo.toml --features "telemetry update-notifications" mkdir -p artifacts make build-install cp ./wasmer.tar.gz ./artifacts/$(./binary-name.sh) diff --git a/CHANGELOG.md b/CHANGELOG.md index fc92dfc71..afadd155f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,11 +5,14 @@ All PRs to the Wasmer repository must add to this file. Blocks of changes will separated by version increments. ## **[Unreleased]** + +## 0.5.7 +- [#575](https://github.com/wasmerio/wasmer/pull/575) Prepare for release; update wapm to 0.3.6 - [#555](https://github.com/wasmerio/wasmer/pull/555) WASI filesystem rewrite. Major improvements - adds virtual root showing all preopened directories - improved sandboxing and code-reuse - symlinks work in a lot more situations - - many various improvements to most syscalls touching the filesystem + - many misc. improvements to most syscalls touching the filesystem ## 0.5.6 - [#565](https://github.com/wasmerio/wasmer/pull/565) Update wapm and bump version to 0.5.6 diff --git a/Cargo.lock b/Cargo.lock index df8860459..2b83df7da 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1377,7 +1377,7 @@ dependencies = [ [[package]] name = "wasmer" -version = "0.5.6" +version = "0.5.7" dependencies = [ "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "errno 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1386,23 +1386,23 @@ dependencies = [ "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "structopt 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)", "wabt 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", - "wasmer-clif-backend 0.5.6", - "wasmer-dev-utils 0.5.6", - "wasmer-emscripten 0.5.6", - "wasmer-emscripten-tests 0.5.6", + "wasmer-clif-backend 0.5.7", + "wasmer-dev-utils 0.5.7", + "wasmer-emscripten 0.5.7", + "wasmer-emscripten-tests 0.5.7", "wasmer-kernel-loader 0.1.0", - "wasmer-llvm-backend 0.5.6", - "wasmer-middleware-common 0.5.6", - "wasmer-runtime 0.5.6", - "wasmer-runtime-core 0.5.6", - "wasmer-singlepass-backend 0.5.6", - "wasmer-wasi 0.5.6", - "wasmer-wasi-tests 0.5.6", + "wasmer-llvm-backend 0.5.7", + "wasmer-middleware-common 0.5.7", + "wasmer-runtime 0.5.7", + "wasmer-runtime-core 0.5.7", + "wasmer-singlepass-backend 0.5.7", + "wasmer-wasi 0.5.7", + "wasmer-wasi-tests 0.5.7", ] [[package]] name = "wasmer-clif-backend" -version = "0.5.6" +version = "0.5.7" dependencies = [ "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "cranelift-codegen 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1419,8 +1419,8 @@ dependencies = [ "target-lexicon 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "wasmer-clif-fork-frontend 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)", "wasmer-clif-fork-wasm 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)", - "wasmer-runtime-core 0.5.6", - "wasmer-win-exception-handler 0.5.6", + "wasmer-runtime-core 0.5.7", + "wasmer-win-exception-handler 0.5.7", "wasmparser 0.32.1 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1451,14 +1451,14 @@ dependencies = [ [[package]] name = "wasmer-dev-utils" -version = "0.5.6" +version = "0.5.7" dependencies = [ "libc 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "wasmer-emscripten" -version = "0.5.6" +version = "0.5.7" dependencies = [ "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "hashbrown 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1466,21 +1466,21 @@ dependencies = [ "libc 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "wasmer-runtime-core 0.5.6", + "wasmer-runtime-core 0.5.7", ] [[package]] name = "wasmer-emscripten-tests" -version = "0.5.6" +version = "0.5.7" dependencies = [ "glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "wabt 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", - "wasmer-clif-backend 0.5.6", - "wasmer-dev-utils 0.5.6", - "wasmer-emscripten 0.5.6", - "wasmer-llvm-backend 0.5.6", - "wasmer-runtime-core 0.5.6", - "wasmer-singlepass-backend 0.5.6", + "wasmer-clif-backend 0.5.7", + "wasmer-dev-utils 0.5.7", + "wasmer-emscripten 0.5.7", + "wasmer-llvm-backend 0.5.7", + "wasmer-runtime-core 0.5.7", + "wasmer-singlepass-backend 0.5.7", ] [[package]] @@ -1488,12 +1488,12 @@ name = "wasmer-kernel-loader" version = "0.1.0" dependencies = [ "libc 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)", - "wasmer-runtime-core 0.5.6", + "wasmer-runtime-core 0.5.7", ] [[package]] name = "wasmer-llvm-backend" -version = "0.5.6" +version = "0.5.7" dependencies = [ "capstone 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "cc 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1508,50 +1508,50 @@ dependencies = [ "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", "wabt 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", - "wasmer-runtime-core 0.5.6", + "wasmer-runtime-core 0.5.7", "wasmparser 0.32.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "wasmer-middleware-common" -version = "0.5.6" +version = "0.5.7" dependencies = [ "criterion 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "wabt 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", - "wasmer-clif-backend 0.5.6", - "wasmer-llvm-backend 0.5.6", - "wasmer-runtime-core 0.5.6", - "wasmer-singlepass-backend 0.5.6", + "wasmer-clif-backend 0.5.7", + "wasmer-llvm-backend 0.5.7", + "wasmer-runtime-core 0.5.7", + "wasmer-singlepass-backend 0.5.7", ] [[package]] name = "wasmer-runtime" -version = "0.5.6" +version = "0.5.7" dependencies = [ "criterion 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "memmap 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "tempfile 3.0.8 (registry+https://github.com/rust-lang/crates.io-index)", "wabt 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", - "wasmer-clif-backend 0.5.6", - "wasmer-llvm-backend 0.5.6", - "wasmer-runtime-core 0.5.6", - "wasmer-singlepass-backend 0.5.6", + "wasmer-clif-backend 0.5.7", + "wasmer-llvm-backend 0.5.7", + "wasmer-runtime-core 0.5.7", + "wasmer-singlepass-backend 0.5.7", ] [[package]] name = "wasmer-runtime-c-api" -version = "0.5.6" +version = "0.5.7" dependencies = [ "cbindgen 0.8.7 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)", - "wasmer-runtime 0.5.6", - "wasmer-runtime-core 0.5.6", + "wasmer-runtime 0.5.7", + "wasmer-runtime-core 0.5.7", ] [[package]] name = "wasmer-runtime-core" -version = "0.5.6" +version = "0.5.7" dependencies = [ "bincode 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "blake2b_simd 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1580,7 +1580,7 @@ dependencies = [ [[package]] name = "wasmer-singlepass-backend" -version = "0.5.6" +version = "0.5.7" dependencies = [ "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "colored 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1591,24 +1591,24 @@ dependencies = [ "libc 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)", "nix 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", - "wasmer-runtime-core 0.5.6", + "wasmer-runtime-core 0.5.7", "wasmparser 0.32.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "wasmer-spectests" -version = "0.5.6" +version = "0.5.7" dependencies = [ "wabt 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", - "wasmer-clif-backend 0.5.6", - "wasmer-llvm-backend 0.5.6", - "wasmer-runtime-core 0.5.6", - "wasmer-singlepass-backend 0.5.6", + "wasmer-clif-backend 0.5.7", + "wasmer-llvm-backend 0.5.7", + "wasmer-runtime-core 0.5.7", + "wasmer-singlepass-backend 0.5.7", ] [[package]] name = "wasmer-wasi" -version = "0.5.6" +version = "0.5.7" dependencies = [ "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "generational-arena 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1616,32 +1616,32 @@ dependencies = [ "libc 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "wasmer-runtime-core 0.5.6", + "wasmer-runtime-core 0.5.7", "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "wasmer-wasi-tests" -version = "0.5.6" +version = "0.5.7" dependencies = [ "glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "wasmer-clif-backend 0.5.6", - "wasmer-dev-utils 0.5.6", - "wasmer-llvm-backend 0.5.6", - "wasmer-runtime-core 0.5.6", - "wasmer-singlepass-backend 0.5.6", - "wasmer-wasi 0.5.6", + "wasmer-clif-backend 0.5.7", + "wasmer-dev-utils 0.5.7", + "wasmer-llvm-backend 0.5.7", + "wasmer-runtime-core 0.5.7", + "wasmer-singlepass-backend 0.5.7", + "wasmer-wasi 0.5.7", ] [[package]] name = "wasmer-win-exception-handler" -version = "0.5.6" +version = "0.5.7" dependencies = [ "bindgen 0.46.0 (registry+https://github.com/rust-lang/crates.io-index)", "cmake 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.57 (registry+https://github.com/rust-lang/crates.io-index)", "regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "wasmer-runtime-core 0.5.6", + "wasmer-runtime-core 0.5.7", "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] diff --git a/Cargo.toml b/Cargo.toml index 25d21c64d..76514165d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmer" -version = "0.5.6" +version = "0.5.7" authors = ["The Wasmer Engineering Team "] edition = "2018" repository = "https://github.com/wasmerio/wasmer" diff --git a/bors.toml b/bors.toml index c29be2c9f..d54fd2222 100644 --- a/bors.toml +++ b/bors.toml @@ -6,5 +6,5 @@ status = [ "continuous-integration/appveyor/branch" ] required_approvals = 1 -timeout_sec = 900 +timeout_sec = 7200 delete_merged_branches = true diff --git a/lib/clif-backend/Cargo.toml b/lib/clif-backend/Cargo.toml index 29e7f9722..4752b8413 100644 --- a/lib/clif-backend/Cargo.toml +++ b/lib/clif-backend/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmer-clif-backend" -version = "0.5.6" +version = "0.5.7" description = "Wasmer runtime Cranelift compiler backend" license = "MIT" authors = ["The Wasmer Engineering Team "] @@ -8,7 +8,7 @@ repository = "https://github.com/wasmerio/wasmer" edition = "2018" [dependencies] -wasmer-runtime-core = { path = "../runtime-core", version = "0.5.6" } +wasmer-runtime-core = { path = "../runtime-core", version = "0.5.7" } cranelift-native = { version = "0.31" } cranelift-codegen = { version = "0.31" } cranelift-entity = { version = "0.31" } @@ -34,7 +34,7 @@ version = "0.0.7" [target.'cfg(windows)'.dependencies] winapi = { version = "0.3", features = ["errhandlingapi", "minwindef", "minwinbase", "winnt"] } -wasmer-win-exception-handler = { path = "../win-exception-handler", version = "0.5.6" } +wasmer-win-exception-handler = { path = "../win-exception-handler", version = "0.5.7" } [features] debug = ["wasmer-runtime-core/debug"] diff --git a/lib/dev-utils/Cargo.toml b/lib/dev-utils/Cargo.toml index 171e81a7c..add06c9ac 100644 --- a/lib/dev-utils/Cargo.toml +++ b/lib/dev-utils/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmer-dev-utils" -version = "0.5.6" +version = "0.5.7" description = "Wasmer runtime core library" license = "MIT" authors = ["The Wasmer Engineering Team "] diff --git a/lib/emscripten-tests/Cargo.toml b/lib/emscripten-tests/Cargo.toml index e5c21ec69..3a2b83224 100644 --- a/lib/emscripten-tests/Cargo.toml +++ b/lib/emscripten-tests/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmer-emscripten-tests" -version = "0.5.6" +version = "0.5.7" description = "Tests for our Emscripten implementation" license = "MIT" authors = ["The Wasmer Engineering Team "] @@ -9,15 +9,15 @@ publish = false build = "build/mod.rs" [dependencies] -wasmer-emscripten = { path = "../emscripten", version = "0.5.6" } -wasmer-runtime-core = { path = "../runtime-core", version = "0.5.6" } -wasmer-clif-backend = { path = "../clif-backend", version = "0.5.6" } -wasmer-llvm-backend = { path = "../llvm-backend", version = "0.5.6", optional = true } -wasmer-singlepass-backend = { path = "../singlepass-backend", version = "0.5.6", optional = true } +wasmer-emscripten = { path = "../emscripten", version = "0.5.7" } +wasmer-runtime-core = { path = "../runtime-core", version = "0.5.7" } +wasmer-clif-backend = { path = "../clif-backend", version = "0.5.7" } +wasmer-llvm-backend = { path = "../llvm-backend", version = "0.5.7", optional = true } +wasmer-singlepass-backend = { path = "../singlepass-backend", version = "0.5.7", optional = true } [dev-dependencies] wabt = "0.7.2" -wasmer-dev-utils = { path = "../dev-utils", version = "0.5.6"} +wasmer-dev-utils = { path = "../dev-utils", version = "0.5.7"} [build-dependencies] glob = "0.2.11" diff --git a/lib/emscripten/Cargo.toml b/lib/emscripten/Cargo.toml index 110d9e7d5..fc27ac59b 100644 --- a/lib/emscripten/Cargo.toml +++ b/lib/emscripten/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmer-emscripten" -version = "0.5.6" +version = "0.5.7" description = "Wasmer runtime emscripten implementation library" license = "MIT" authors = ["The Wasmer Engineering Team "] @@ -13,7 +13,7 @@ hashbrown = "0.1" lazy_static = "1.2.0" libc = "0.2.49" time = "0.1.41" -wasmer-runtime-core = { path = "../runtime-core", version = "0.5.6" } +wasmer-runtime-core = { path = "../runtime-core", version = "0.5.7" } [target.'cfg(windows)'.dependencies] rand = "0.6" diff --git a/lib/llvm-backend/Cargo.toml b/lib/llvm-backend/Cargo.toml index e5e93261b..ecfa469b3 100644 --- a/lib/llvm-backend/Cargo.toml +++ b/lib/llvm-backend/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "wasmer-llvm-backend" -version = "0.5.6" +version = "0.5.7" authors = ["Lachlan Sneff "] edition = "2018" [dependencies] -wasmer-runtime-core = { path = "../runtime-core", version = "0.5.6" } +wasmer-runtime-core = { path = "../runtime-core", version = "0.5.7" } inkwell = { git = "https://github.com/wasmerio/inkwell", branch = "llvm7-0" } wasmparser = "0.32.1" hashbrown = "0.1.8" diff --git a/lib/middleware-common/Cargo.toml b/lib/middleware-common/Cargo.toml index d3a8e9b41..651beed5a 100644 --- a/lib/middleware-common/Cargo.toml +++ b/lib/middleware-common/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmer-middleware-common" -version = "0.5.6" +version = "0.5.7" repository = "https://github.com/wasmerio/wasmer" description = "Wasmer runtime common middlewares" license = "MIT" @@ -9,9 +9,9 @@ edition = "2018" [dependencies] wasmer-runtime-core = { path = "../runtime-core" } -wasmer-clif-backend = { path = "../clif-backend", version = "0.5.6" } -wasmer-llvm-backend = { path = "../llvm-backend", version = "0.5.6", optional = true } -wasmer-singlepass-backend = { path = "../singlepass-backend", version = "0.5.6", optional = true } +wasmer-clif-backend = { path = "../clif-backend", version = "0.5.7" } +wasmer-llvm-backend = { path = "../llvm-backend", version = "0.5.7", optional = true } +wasmer-singlepass-backend = { path = "../singlepass-backend", version = "0.5.7", optional = true } [dev-dependencies] wabt = "0.7.4" diff --git a/lib/runtime-abi/Cargo.toml b/lib/runtime-abi/Cargo.toml index 84c6c9000..f1524b5cd 100644 --- a/lib/runtime-abi/Cargo.toml +++ b/lib/runtime-abi/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmer-runtime-abi" -version = "0.5.6" +version = "0.5.7" description = "Wasmer runtime core library" license = "MIT" authors = ["The Wasmer Engineering Team "] diff --git a/lib/runtime-c-api/Cargo.toml b/lib/runtime-c-api/Cargo.toml index eca706860..97a168912 100644 --- a/lib/runtime-c-api/Cargo.toml +++ b/lib/runtime-c-api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmer-runtime-c-api" -version = "0.5.6" +version = "0.5.7" description = "Wasmer C API library" license = "MIT" authors = ["The Wasmer Engineering Team "] @@ -16,11 +16,11 @@ libc = "0.2" [dependencies.wasmer-runtime] path = "../runtime" -version = "0.5.6" +version = "0.5.7" [dependencies.wasmer-runtime-core] path = "../runtime-core" -version = "0.5.6" +version = "0.5.7" [features] debug = ["wasmer-runtime/debug"] diff --git a/lib/runtime-core/Cargo.toml b/lib/runtime-core/Cargo.toml index 4538cc442..4787be953 100644 --- a/lib/runtime-core/Cargo.toml +++ b/lib/runtime-core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmer-runtime-core" -version = "0.5.6" +version = "0.5.7" description = "Wasmer runtime core library" license = "MIT" authors = ["The Wasmer Engineering Team "] diff --git a/lib/runtime-core/src/instance.rs b/lib/runtime-core/src/instance.rs index cf09b48e7..9cfdbc948 100644 --- a/lib/runtime-core/src/instance.rs +++ b/lib/runtime-core/src/instance.rs @@ -16,7 +16,7 @@ use crate::{ vm::{self, InternalField}, }; use smallvec::{smallvec, SmallVec}; -use std::{mem, ptr::NonNull, sync::Arc}; +use std::{mem, pin::Pin, ptr::NonNull, sync::Arc}; pub(crate) struct InstanceInner { #[allow(dead_code)] @@ -41,7 +41,7 @@ impl Drop for InstanceInner { /// [`ImportObject`]: struct.ImportObject.html pub struct Instance { pub module: Arc, - inner: Box, + inner: Pin>, #[allow(dead_code)] import_object: ImportObject, } @@ -51,32 +51,32 @@ impl Instance { // We need the backing and import_backing to create a vm::Ctx, but we need // a vm::Ctx to create a backing and an import_backing. The solution is to create an // uninitialized vm::Ctx and then initialize it in-place. - let mut vmctx = unsafe { Box::new(mem::uninitialized()) }; + let mut vmctx: Box> = + Box::new(mem::MaybeUninit::::zeroed()); - let import_backing = ImportBacking::new(&module, &imports, &mut *vmctx)?; - let backing = LocalBacking::new(&module, &import_backing, &mut *vmctx); + let import_backing = ImportBacking::new(&module, &imports, vmctx.as_mut_ptr())?; + let backing = LocalBacking::new(&module, &import_backing, vmctx.as_mut_ptr()); - // When Pin is stablized, this will use `Box::pinned` instead of `Box::new`. - let mut inner = Box::new(InstanceInner { + let mut inner = Box::pin(InstanceInner { backing, import_backing, - vmctx: Box::leak(vmctx), + vmctx: vmctx.as_mut_ptr(), }); // Initialize the vm::Ctx in-place after the backing // has been boxed. unsafe { - *inner.vmctx = match imports.call_state_creator() { - Some((data, dtor)) => vm::Ctx::new_with_data( - &mut inner.backing, - &mut inner.import_backing, - &module, - data, - dtor, - ), - None => vm::Ctx::new(&mut inner.backing, &mut inner.import_backing, &module), + let backing = &mut *(&mut inner.backing as *mut _); + let import_backing = &mut *(&mut inner.import_backing as *mut _); + let real_ctx = match imports.call_state_creator() { + Some((data, dtor)) => { + vm::Ctx::new_with_data(backing, import_backing, &module, data, dtor) + } + None => vm::Ctx::new(backing, import_backing, &module), }; + vmctx.as_mut_ptr().write(real_ctx); }; + Box::leak(vmctx); let instance = Instance { module, diff --git a/lib/runtime/Cargo.toml b/lib/runtime/Cargo.toml index 4c36b6985..1234d11a6 100644 --- a/lib/runtime/Cargo.toml +++ b/lib/runtime/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmer-runtime" -version = "0.5.6" +version = "0.5.7" description = "Wasmer runtime library" license = "MIT" authors = ["The Wasmer Engineering Team "] @@ -9,17 +9,17 @@ edition = "2018" readme = "README.md" [dependencies] -wasmer-singlepass-backend = { path = "../singlepass-backend", version = "0.5.6", optional = true } +wasmer-singlepass-backend = { path = "../singlepass-backend", version = "0.5.7", optional = true } lazy_static = "1.2.0" memmap = "0.7.0" [dependencies.wasmer-runtime-core] path = "../runtime-core" -version = "0.5.6" +version = "0.5.7" [dependencies.wasmer-clif-backend] path = "../clif-backend" -version = "0.5.6" +version = "0.5.7" optional = true [dev-dependencies] diff --git a/lib/singlepass-backend/Cargo.toml b/lib/singlepass-backend/Cargo.toml index f31242212..50ddeabc5 100644 --- a/lib/singlepass-backend/Cargo.toml +++ b/lib/singlepass-backend/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmer-singlepass-backend" -version = "0.5.6" +version = "0.5.7" repository = "https://github.com/wasmerio/wasmer" description = "Wasmer runtime single pass compiler backend" license = "MIT" @@ -8,7 +8,7 @@ authors = ["The Wasmer Engineering Team "] edition = "2018" [dependencies] -wasmer-runtime-core = { path = "../runtime-core", version = "0.5.6" } +wasmer-runtime-core = { path = "../runtime-core", version = "0.5.7" } wasmparser = "0.32.1" dynasm = "0.3.2" dynasmrt = "0.3.1" diff --git a/lib/spectests/Cargo.toml b/lib/spectests/Cargo.toml index fa57b794c..93102c435 100644 --- a/lib/spectests/Cargo.toml +++ b/lib/spectests/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmer-spectests" -version = "0.5.6" +version = "0.5.7" description = "Wasmer spectests library" license = "MIT" authors = ["The Wasmer Engineering Team "] @@ -9,10 +9,10 @@ edition = "2018" build = "build/mod.rs" [dependencies] -wasmer-runtime-core = { path = "../runtime-core", version = "0.5.6" } -wasmer-clif-backend = { path = "../clif-backend", version = "0.5.6" } -wasmer-llvm-backend = { path = "../llvm-backend", version = "0.5.6", optional = true } -wasmer-singlepass-backend = { path = "../singlepass-backend", version = "0.5.6", optional = true } +wasmer-runtime-core = { path = "../runtime-core", version = "0.5.7" } +wasmer-clif-backend = { path = "../clif-backend", version = "0.5.7" } +wasmer-llvm-backend = { path = "../llvm-backend", version = "0.5.7", optional = true } +wasmer-singlepass-backend = { path = "../singlepass-backend", version = "0.5.7", optional = true } [build-dependencies] wabt = "0.7.2" diff --git a/lib/wasi-tests/Cargo.toml b/lib/wasi-tests/Cargo.toml index ba62e0458..f7790df10 100644 --- a/lib/wasi-tests/Cargo.toml +++ b/lib/wasi-tests/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmer-wasi-tests" -version = "0.5.6" +version = "0.5.7" description = "Tests for our WASI implementation" license = "MIT" authors = ["The Wasmer Engineering Team "] @@ -9,19 +9,19 @@ publish = false build = "build/mod.rs" [dependencies] -wasmer-runtime-core = { path = "../runtime-core", version = "0.5.6" } -wasmer-wasi = { path = "../wasi", version = "0.5.6" } +wasmer-runtime-core = { path = "../runtime-core", version = "0.5.7" } +wasmer-wasi = { path = "../wasi", version = "0.5.7" } # hack to get tests to work -wasmer-singlepass-backend = { path = "../singlepass-backend", version = "0.5.6", optional = true } -wasmer-llvm-backend = { path = "../llvm-backend", version = "0.5.6", optional = true } +wasmer-singlepass-backend = { path = "../singlepass-backend", version = "0.5.7", optional = true } +wasmer-llvm-backend = { path = "../llvm-backend", version = "0.5.7", optional = true } [build-dependencies] glob = "0.2.11" [dev-dependencies] -wasmer-clif-backend = { path = "../clif-backend", version = "0.5.6" } -wasmer-dev-utils = { path = "../dev-utils", version = "0.5.6"} +wasmer-clif-backend = { path = "../clif-backend", version = "0.5.7" } +wasmer-dev-utils = { path = "../dev-utils", version = "0.5.7"} [features] clif = [] diff --git a/lib/wasi/Cargo.toml b/lib/wasi/Cargo.toml index 26f255d33..8b8a83dca 100644 --- a/lib/wasi/Cargo.toml +++ b/lib/wasi/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmer-wasi" -version = "0.5.6" +version = "0.5.7" description = "Wasmer runtime WASI implementation library" license = "MIT" authors = ["The Wasmer Engineering Team "] @@ -8,7 +8,7 @@ repository = "https://github.com/wasmerio/wasmer" edition = "2018" [dependencies] -wasmer-runtime-core = { path = "../runtime-core", version = "0.5.6" } +wasmer-runtime-core = { path = "../runtime-core", version = "0.5.7" } libc = "0.2.50" rand = "0.6.5" # wasmer-runtime-abi = { path = "../runtime-abi" } diff --git a/lib/win-exception-handler/Cargo.toml b/lib/win-exception-handler/Cargo.toml index 4439c31d0..5fee918af 100644 --- a/lib/win-exception-handler/Cargo.toml +++ b/lib/win-exception-handler/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmer-win-exception-handler" -version = "0.5.6" +version = "0.5.7" description = "Wasmer runtime exception handling for Windows" license = "MIT" authors = ["The Wasmer Engineering Team "] @@ -8,7 +8,7 @@ repository = "https://github.com/wasmerio/wasmer" edition = "2018" [target.'cfg(windows)'.dependencies] -wasmer-runtime-core = { path = "../runtime-core", version = "0.5.6" } +wasmer-runtime-core = { path = "../runtime-core", version = "0.5.7" } winapi = { version = "0.3", features = ["winbase", "errhandlingapi", "minwindef", "minwinbase", "winnt"] } libc = "0.2.49" diff --git a/update_version_numbers.sh b/update_version_numbers.sh index 5e41e5704..0f39ec149 100755 --- a/update_version_numbers.sh +++ b/update_version_numbers.sh @@ -1,5 +1,5 @@ -PREVIOUS_VERSION='0.5.5' -NEXT_VERSION='0.5.6' +PREVIOUS_VERSION='0.5.6' +NEXT_VERSION='0.5.7' # quick hack fd Cargo.toml --exec sed -i '' "s/version = \"$PREVIOUS_VERSION\"/version = \"$NEXT_VERSION\"/" diff --git a/wapm-cli b/wapm-cli index 192cd2ceb..62ec59a53 160000 --- a/wapm-cli +++ b/wapm-cli @@ -1 +1 @@ -Subproject commit 192cd2cebd978b48e26ac69c5773d6d8903fc5cc +Subproject commit 62ec59a53ca3df84019092a750aeb56e08b9d556