Merge remote-tracking branch 'origin/master' into wasix

This commit is contained in:
Christoph Herzog
2023-01-23 22:00:16 +01:00
60 changed files with 476 additions and 344 deletions

View File

@@ -9,6 +9,48 @@ Looking for changes that affect our C API? See the [C API Changelog](lib/c-api/C
## **Unreleased**
## 3.2.0-alpha.1 - 23/01/2023
## Added
- [#3477](https://github.com/wasmerio/wasmer/pull/3477) Added support for Wasm Module custom sections in js
- [#3462](https://github.com/wasmerio/wasmer/pull/3462) [SINGLEPASS] Added a special case on SSE4.2 backend when dst == src1
## Changed
- [#3511](https://github.com/wasmerio/wasmer/pull/3511) Incremented CURRENT_VERSION, so all cache will be invalidate and be rebuilt with the 3.2 version
- [#3498](https://github.com/wasmerio/wasmer/pull/3498) Wasix Control Plane - Thread Limit + Cleanup
- [#3465](https://github.com/wasmerio/wasmer/pull/3465) Remove assert in sse_round_fn and handle case where src2 is in memory
- [#3494](https://github.com/wasmerio/wasmer/pull/3494) Update wasmer-toml version
- [#3426](https://github.com/wasmerio/wasmer/pull/3426) WASIX Preparation
- [#3480](https://github.com/wasmerio/wasmer/pull/3480) Ignore Create-exe with serialize test, something is wrong with the generated exe
- [#3471](https://github.com/wasmerio/wasmer/pull/3471) Rename `WasiState::new()` to `WasiState::builder()`
- [#3430](https://github.com/wasmerio/wasmer/pull/3430) Implement support for multiple commands in one native executable
- [#3455](https://github.com/wasmerio/wasmer/pull/3455) Remove hardcoded rust-toolchain and use panic=abort on windows-gnu
- [#3353](https://github.com/wasmerio/wasmer/pull/3353) Speed up CI
- [#3433](https://github.com/wasmerio/wasmer/pull/3433) Module.deserialize - accept AsEngineRef
- [#3428](https://github.com/wasmerio/wasmer/pull/3428) Implement wasmer config
- [#3432](https://github.com/wasmerio/wasmer/pull/3432) Amend changes to wasmer init
- [#3439](https://github.com/wasmerio/wasmer/pull/3439) Use GNU/Linux frame registration code for FreeBSD too
- [#3324](https://github.com/wasmerio/wasmer/pull/3324) Implement wasmer init and wasmer publish
- [#3431](https://github.com/wasmerio/wasmer/pull/3431) Revert "Implement wasmer init and wasmer publish"
## Fixed
- [#3483](https://github.com/wasmerio/wasmer/pull/3483) Fix feature flags for make-build-wasmer-headless
- [#3496](https://github.com/wasmerio/wasmer/pull/3496) Fixed create-exe tests for object-format serialized
- [#3479](https://github.com/wasmerio/wasmer/pull/3479) This should fix CI build of CAPI Headless
- [#3473](https://github.com/wasmerio/wasmer/pull/3473) Fix wasm publish validation
- [#3467](https://github.com/wasmerio/wasmer/pull/3467) Fix wasmer-wasi-js compilation
- [#3443](https://github.com/wasmerio/wasmer/pull/3443) Fix fuzz errors
- [#3456](https://github.com/wasmerio/wasmer/pull/3456) Fix wasmer-rust readme example
- [#3440](https://github.com/wasmerio/wasmer/pull/3440) Fix CI for external collaborator PRs
- [#3427](https://github.com/wasmerio/wasmer/pull/3427) Fix cargo-deny failing on webc crate
- [#3423](https://github.com/wasmerio/wasmer/pull/3423) Fix minor typo
- [#3419](https://github.com/wasmerio/wasmer/pull/3419) Fix CHANGELOG generation to list by PR merged date, not created date
## Fixed
- [#3439](https://github.com/wasmerio/wasmer/pull/3439) Use GNU/Linux frame registration code for FreeBSD too

68
Cargo.lock generated
View File

@@ -2016,7 +2016,7 @@ dependencies = [
[[package]]
name = "macro-wasmer-universal-test"
version = "3.1.0"
version = "3.2.0-alpha.1"
dependencies = [
"proc-macro2",
"proc-quote",
@@ -4365,7 +4365,7 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
[[package]]
name = "wasi-test-generator"
version = "3.1.0"
version = "3.2.0-alpha.1"
dependencies = [
"glob",
"gumdrop",
@@ -4529,7 +4529,7 @@ dependencies = [
[[package]]
name = "wasmer"
version = "3.1.0"
version = "3.2.0-alpha.1"
dependencies = [
"anyhow",
"bytes",
@@ -4579,7 +4579,7 @@ dependencies = [
[[package]]
name = "wasmer-c-api"
version = "3.1.0"
version = "3.2.0-alpha.1"
dependencies = [
"cbindgen",
"cfg-if 1.0.0",
@@ -4607,7 +4607,7 @@ dependencies = [
[[package]]
name = "wasmer-c-api-test-runner"
version = "3.1.0"
version = "3.2.0-alpha.1"
dependencies = [
"cc",
"regex",
@@ -4617,7 +4617,7 @@ dependencies = [
[[package]]
name = "wasmer-cache"
version = "3.1.0"
version = "3.2.0-alpha.1"
dependencies = [
"blake3",
"criterion",
@@ -4631,7 +4631,7 @@ dependencies = [
[[package]]
name = "wasmer-capi-examples-runner"
version = "3.1.0"
version = "3.2.0-alpha.1"
dependencies = [
"cc",
"regex",
@@ -4641,7 +4641,7 @@ dependencies = [
[[package]]
name = "wasmer-cli"
version = "3.1.0"
version = "3.2.0-alpha.1"
dependencies = [
"anyhow",
"atty",
@@ -4658,6 +4658,7 @@ dependencies = [
"flate2",
"hex",
"http_req",
"indexmap",
"isatty",
"libc",
"log",
@@ -4709,7 +4710,7 @@ dependencies = [
[[package]]
name = "wasmer-compiler"
version = "3.1.0"
version = "3.2.0-alpha.1"
dependencies = [
"backtrace",
"cfg-if 1.0.0",
@@ -4735,7 +4736,7 @@ dependencies = [
[[package]]
name = "wasmer-compiler-cli"
version = "3.1.0"
version = "3.2.0-alpha.1"
dependencies = [
"anyhow",
"atty",
@@ -4757,7 +4758,7 @@ dependencies = [
[[package]]
name = "wasmer-compiler-cranelift"
version = "3.1.0"
version = "3.2.0-alpha.1"
dependencies = [
"cranelift-codegen",
"cranelift-entity",
@@ -4776,7 +4777,7 @@ dependencies = [
[[package]]
name = "wasmer-compiler-llvm"
version = "3.1.0"
version = "3.2.0-alpha.1"
dependencies = [
"byteorder",
"cc",
@@ -4798,7 +4799,7 @@ dependencies = [
[[package]]
name = "wasmer-compiler-singlepass"
version = "3.1.0"
version = "3.2.0-alpha.1"
dependencies = [
"byteorder",
"dynasm",
@@ -4817,7 +4818,7 @@ dependencies = [
[[package]]
name = "wasmer-derive"
version = "3.1.0"
version = "3.2.0-alpha.1"
dependencies = [
"compiletest_rs",
"proc-macro-error",
@@ -4829,7 +4830,7 @@ dependencies = [
[[package]]
name = "wasmer-emscripten"
version = "3.1.0"
version = "3.2.0-alpha.1"
dependencies = [
"byteorder",
"getrandom",
@@ -4871,7 +4872,7 @@ dependencies = [
[[package]]
name = "wasmer-integration-tests-cli"
version = "3.1.0"
version = "3.2.0-alpha.1"
dependencies = [
"anyhow",
"flate2",
@@ -4889,11 +4890,11 @@ dependencies = [
[[package]]
name = "wasmer-integration-tests-ios"
version = "3.1.0"
version = "3.2.0-alpha.1"
[[package]]
name = "wasmer-middlewares"
version = "3.1.0"
version = "3.2.0-alpha.1"
dependencies = [
"wasmer",
"wasmer-types",
@@ -4902,7 +4903,7 @@ dependencies = [
[[package]]
name = "wasmer-object"
version = "3.1.0"
version = "3.2.0-alpha.1"
dependencies = [
"object 0.28.4",
"thiserror",
@@ -4946,11 +4947,12 @@ dependencies = [
[[package]]
name = "wasmer-toml"
version = "0.5.0"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "03d0f664e5dfad0339727ad2f4f8a7d982b4c120d87b800380e306c0dc038a49"
checksum = "4232db0aff83ed6208d541ddcf1bf72730673528be8c4fe13c6369060f6e05a7"
dependencies = [
"anyhow",
"indexmap",
"semver 1.0.14",
"serde",
"serde_cbor",
@@ -4962,7 +4964,7 @@ dependencies = [
[[package]]
name = "wasmer-types"
version = "3.1.0"
version = "3.2.0-alpha.1"
dependencies = [
"enum-iterator",
"enumset",
@@ -4978,7 +4980,7 @@ dependencies = [
[[package]]
name = "wasmer-vbus"
version = "3.1.0"
version = "3.2.0-alpha.1"
dependencies = [
"libc",
"slab",
@@ -4992,7 +4994,7 @@ dependencies = [
[[package]]
name = "wasmer-vfs"
version = "3.1.0"
version = "3.2.0-alpha.1"
dependencies = [
"anyhow",
"async-trait",
@@ -5015,7 +5017,7 @@ dependencies = [
[[package]]
name = "wasmer-vm"
version = "3.1.0"
version = "3.2.0-alpha.1"
dependencies = [
"backtrace",
"cc",
@@ -5040,7 +5042,7 @@ dependencies = [
[[package]]
name = "wasmer-vnet"
version = "3.1.0"
version = "3.2.0-alpha.1"
dependencies = [
"async-trait",
"bytes",
@@ -5050,7 +5052,7 @@ dependencies = [
[[package]]
name = "wasmer-wasi"
version = "3.1.0"
version = "3.2.0-alpha.1"
dependencies = [
"anyhow",
"async-trait",
@@ -5111,7 +5113,7 @@ dependencies = [
[[package]]
name = "wasmer-wasi-experimental-io-devices"
version = "3.1.0"
version = "3.2.0-alpha.1"
dependencies = [
"minifb",
"nix 0.25.1",
@@ -5124,7 +5126,7 @@ dependencies = [
[[package]]
name = "wasmer-wasi-local-networking"
version = "3.1.0"
version = "3.2.0-alpha.1"
dependencies = [
"async-trait",
"bytes",
@@ -5136,7 +5138,7 @@ dependencies = [
[[package]]
name = "wasmer-wasi-types"
version = "3.1.0"
version = "3.2.0-alpha.1"
dependencies = [
"anyhow",
"bitflags",
@@ -5158,7 +5160,7 @@ dependencies = [
[[package]]
name = "wasmer-wasm-interface"
version = "3.1.0"
version = "3.2.0-alpha.1"
dependencies = [
"bincode",
"either",
@@ -5170,7 +5172,7 @@ dependencies = [
[[package]]
name = "wasmer-wast"
version = "3.1.0"
version = "3.2.0-alpha.1"
dependencies = [
"anyhow",
"serde",
@@ -5185,7 +5187,7 @@ dependencies = [
[[package]]
name = "wasmer-workspace"
version = "3.1.0"
version = "3.2.0-alpha.1"
dependencies = [
"anyhow",
"build-deps",

View File

@@ -1,6 +1,6 @@
[package]
name = "wasmer-workspace"
version = "3.1.0"
version = "3.2.0-alpha.1"
description = "Wasmer workspace"
authors = ["Wasmer Engineering Team <engineering@wasmer.io>"]
repository = "https://github.com/wasmerio/wasmer"
@@ -10,18 +10,18 @@ publish = false
autoexamples = false
[dependencies]
wasmer = { version = "=3.1.0", path = "lib/api", default-features = false }
wasmer-compiler = { version = "=3.1.0", path = "lib/compiler", features = ["compiler"] }
wasmer-compiler-cranelift = { version = "=3.1.0", path = "lib/compiler-cranelift", optional = true }
wasmer-compiler-singlepass = { version = "=3.1.0", path = "lib/compiler-singlepass", optional = true }
wasmer-compiler-llvm = { version = "=3.1.0", path = "lib/compiler-llvm", optional = true }
wasmer-emscripten = { version = "=3.1.0", path = "lib/emscripten", optional = true }
wasmer-wasi = { version = "=3.1.0", path = "lib/wasi", optional = true }
wasmer-wast = { version = "=3.1.0", path = "tests/lib/wast", optional = true }
wasi-test-generator = { version = "=3.1.0", path = "tests/wasi-wast", optional = true }
wasmer-cache = { version = "=3.1.0", path = "lib/cache", optional = true }
wasmer-types = { version = "=3.1.0", path = "lib/types" }
wasmer-middlewares = { version = "=3.1.0", path = "lib/middlewares", optional = true }
wasmer = { version = "=3.2.0-alpha.1", path = "lib/api", default-features = false }
wasmer-compiler = { version = "=3.2.0-alpha.1", path = "lib/compiler", features = ["compiler"] }
wasmer-compiler-cranelift = { version = "=3.2.0-alpha.1", path = "lib/compiler-cranelift", optional = true }
wasmer-compiler-singlepass = { version = "=3.2.0-alpha.1", path = "lib/compiler-singlepass", optional = true }
wasmer-compiler-llvm = { version = "=3.2.0-alpha.1", path = "lib/compiler-llvm", optional = true }
wasmer-emscripten = { version = "=3.2.0-alpha.1", path = "lib/emscripten", optional = true }
wasmer-wasi = { version = "=3.2.0-alpha.1", path = "lib/wasi", optional = true }
wasmer-wast = { version = "=3.2.0-alpha.1", path = "tests/lib/wast", optional = true }
wasi-test-generator = { version = "=3.2.0-alpha.1", path = "tests/wasi-wast", optional = true }
wasmer-cache = { version = "=3.2.0-alpha.1", path = "lib/cache", optional = true }
wasmer-types = { version = "=3.2.0-alpha.1", path = "lib/types" }
wasmer-middlewares = { version = "=3.2.0-alpha.1", path = "lib/middlewares", optional = true }
cfg-if = "1.0"
[workspace]
@@ -71,7 +71,7 @@ glob = "0.3"
rustc_version = "0.4"
[dev-dependencies]
wasmer = { version = "=3.1.0", path = "lib/api", default-features = false, features = ["cranelift"] }
wasmer = { version = "=3.2.0-alpha.1", path = "lib/api", default-features = false, features = ["cranelift"] }
anyhow = "1.0"
criterion = "0.3"
lazy_static = "1.4"

View File

@@ -1,6 +1,6 @@
[package]
name = "wasmer"
version = "3.1.0"
version = "3.2.0-alpha.1"
description = "High-performance WebAssembly runtime"
categories = ["wasm"]
keywords = ["wasm", "webassembly", "runtime", "vm"]
@@ -35,15 +35,15 @@ tracing = { version = "0.1", optional = true }
# Dependencies and Development Dependencies for `sys`.
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
# - Mandatory dependencies for `sys`.
wasmer-vm = { path = "../vm", version = "=3.1.0" }
wasmer-compiler = { path = "../compiler", version = "=3.1.0" }
wasmer-derive = { path = "../derive", version = "=3.1.0" }
wasmer-types = { path = "../types", version = "=3.1.0" }
wasmer-vm = { path = "../vm", version = "=3.2.0-alpha.1" }
wasmer-compiler = { path = "../compiler", version = "=3.2.0-alpha.1" }
wasmer-derive = { path = "../derive", version = "=3.2.0-alpha.1" }
wasmer-types = { path = "../types", version = "=3.2.0-alpha.1" }
target-lexicon = { version = "0.12.2", default-features = false }
# - Optional dependencies for `sys`.
wasmer-compiler-singlepass = { path = "../compiler-singlepass", version = "=3.1.0", optional = true }
wasmer-compiler-cranelift = { path = "../compiler-cranelift", version = "=3.1.0", optional = true }
wasmer-compiler-llvm = { path = "../compiler-llvm", version = "=3.1.0", optional = true }
wasmer-compiler-singlepass = { path = "../compiler-singlepass", version = "=3.2.0-alpha.1", optional = true }
wasmer-compiler-cranelift = { path = "../compiler-cranelift", version = "=3.2.0-alpha.1", optional = true }
wasmer-compiler-llvm = { path = "../compiler-llvm", version = "=3.2.0-alpha.1", optional = true }
wasm-bindgen = { version = "0.2.74", optional = true }
js-sys = { version = "0.3.51", optional = true }
@@ -56,17 +56,17 @@ winapi = "0.3"
wat = "1.0"
tempfile = "3.1"
anyhow = "1.0"
macro-wasmer-universal-test = { version = "3.1.0", path = "./macro-wasmer-universal-test" }
macro-wasmer-universal-test = { version = "3.2.0-alpha.1", path = "./macro-wasmer-universal-test" }
# Dependencies and Develoment Dependencies for `js`.
[target.'cfg(target_arch = "wasm32")'.dependencies]
# - Mandatory dependencies for `js`.
wasmer-types = { path = "../types", version = "=3.1.0", default-features = false, features = ["std"] }
wasmer-types = { path = "../types", version = "=3.2.0-alpha.1", default-features = false, features = ["std"] }
wasm-bindgen = "0.2.74"
wasm-bindgen-downcast = { version = "0.1.1" }
js-sys = "0.3.51"
#web-sys = { version = "0.3.51", features = [ "console" ] }
wasmer-derive = { path = "../derive", version = "=3.1.0" }
wasmer-derive = { path = "../derive", version = "=3.2.0-alpha.1" }
# - Optional dependencies for `js`.
wasmparser = { version = "0.83", default-features = false, optional = true }
hashbrown = { version = "0.11", optional = true }
@@ -78,7 +78,7 @@ serde = { version = "1.0", features = ["derive"] }
wat = "1.0"
anyhow = "1.0"
wasm-bindgen-test = "0.3.0"
macro-wasmer-universal-test = { version = "3.1.0", path = "./macro-wasmer-universal-test" }
macro-wasmer-universal-test = { version = "3.2.0-alpha.1", path = "./macro-wasmer-universal-test" }
# Specific to `js`.
#

View File

@@ -1,6 +1,6 @@
[package]
name = "macro-wasmer-universal-test"
version = "3.1.0"
version = "3.2.0-alpha.1"
edition = "2021"
license = "MIT"
description = "Universal test macro for wasmer-test"

View File

@@ -174,7 +174,6 @@ impl Default for Store {
fn get_engine() -> Engine {
cfg_if::cfg_if! {
if #[cfg(feature = "compiler")] {
cfg_if::cfg_if! {
if #[cfg(any(feature = "cranelift", feature = "llvm", feature = "singlepass"))]
{

View File

@@ -1,6 +1,6 @@
[package]
name = "wasmer-c-api"
version = "3.1.0"
version = "3.2.0-alpha.1"
description = "Wasmer C API library"
categories = ["wasm", "api-bindings"]
keywords = ["wasm", "webassembly", "runtime"]
@@ -22,16 +22,16 @@ crate-type = ["staticlib", "cdylib"] #"cdylib", "rlib", "staticlib"]
[dependencies]
# We rename `wasmer` to `wasmer-api` to avoid the conflict with this
# library name (see `[lib]`).
wasmer-api = { version = "=3.1.0", path = "../api", default-features = false, features = ["sys"], package = "wasmer" }
wasmer-compiler-cranelift = { version = "=3.1.0", path = "../compiler-cranelift", optional = true }
wasmer-compiler-singlepass = { version = "=3.1.0", path = "../compiler-singlepass", optional = true }
wasmer-compiler-llvm = { version = "=3.1.0", path = "../compiler-llvm", optional = true }
wasmer-emscripten = { version = "=3.1.0", path = "../emscripten", optional = true }
wasmer-compiler = { version = "=3.1.0", path = "../compiler" }
wasmer-middlewares = { version = "=3.1.0", path = "../middlewares", optional = true }
wasmer-wasi = { version = "=3.1.0", path = "../wasi", default-features = false, features = ["host-fs", "sys"], optional = true }
wasmer-types = { version = "=3.1.0", path = "../types" }
wasmer-vfs = { version = "=3.1.0", path = "../vfs", optional = true, default-features = false, features = ["static-fs"] }
wasmer-api = { version = "=3.2.0-alpha.1", path = "../api", default-features = false, features = ["sys"], package = "wasmer" }
wasmer-compiler-cranelift = { version = "=3.2.0-alpha.1", path = "../compiler-cranelift", optional = true }
wasmer-compiler-singlepass = { version = "=3.2.0-alpha.1", path = "../compiler-singlepass", optional = true }
wasmer-compiler-llvm = { version = "=3.2.0-alpha.1", path = "../compiler-llvm", optional = true }
wasmer-emscripten = { version = "=3.2.0-alpha.1", path = "../emscripten", optional = true }
wasmer-compiler = { version = "=3.2.0-alpha.1", path = "../compiler" }
wasmer-middlewares = { version = "=3.2.0-alpha.1", path = "../middlewares", optional = true }
wasmer-wasi = { version = "=3.2.0-alpha.1", path = "../wasi", default-features = false, features = ["host-fs", "sys"], optional = true }
wasmer-types = { version = "=3.2.0-alpha.1", path = "../types" }
wasmer-vfs = { version = "=3.2.0-alpha.1", path = "../vfs", optional = true, default-features = false, features = ["static-fs"] }
webc = { version = "4.0.0", optional = true }
enumset = "1.0.2"
cfg-if = "1.0"

View File

@@ -1,6 +1,6 @@
[package]
name = "wasmer-capi-examples-runner"
version = "3.1.0"
version = "3.2.0-alpha.1"
edition = "2021"
license = "MIT"
description = "wasmer-capi-examples-runner"

View File

@@ -1,6 +1,6 @@
[package]
name = "wasmer-c-api-test-runner"
version = "3.1.0"
version = "3.2.0-alpha.1"
edition = "2021"
license = "MIT"
description = "wasmer-c-api-test-runner"

View File

@@ -1,6 +1,6 @@
[package]
name = "wasmer-cache"
version = "3.1.0"
version = "3.2.0-alpha.1"
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 = "=3.1.0", default-features = false, features = ["sys"] }
wasmer = { path = "../api", version = "=3.2.0-alpha.1", default-features = false, features = ["sys"] }
hex = "0.4"
thiserror = "1"
blake3 = "1.0"
@@ -20,7 +20,7 @@ blake3 = "1.0"
criterion = "0.3"
tempfile = "3"
rand = "0.8.3"
wasmer-compiler-singlepass = { path = "../compiler-singlepass", version = "=3.1.0" }
wasmer-compiler-singlepass = { path = "../compiler-singlepass", version = "=3.2.0-alpha.1" }
[features]
default = ["wasmer/js-serializable-module", "wasmer/compiler", "filesystem"]

View File

@@ -1,6 +1,6 @@
[package]
name = "wasmer-compiler-cli"
version = "3.1.0"
version = "3.2.0-alpha.1"
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 = "=3.1.0", path = "../compiler", features = ["compiler"] }
wasmer-types = { version = "=3.1.0", path = "../types" }
wasmer-compiler = { version = "=3.2.0-alpha.1", path = "../compiler", features = ["compiler"] }
wasmer-types = { version = "=3.2.0-alpha.1", path = "../types" }
atty = "0.2"
colored = "2.0"
anyhow = "1.0"
@@ -36,12 +36,12 @@ target-lexicon = { version = "0.12", features = ["std"] }
tempfile = "3"
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
wasmer-compiler-singlepass = { version = "=3.1.0", path = "../compiler-singlepass", optional = true }
wasmer-compiler-cranelift = { version = "=3.1.0", path = "../compiler-cranelift", optional = true }
wasmer-compiler-singlepass = { version = "=3.2.0-alpha.1", path = "../compiler-singlepass", optional = true }
wasmer-compiler-cranelift = { version = "=3.2.0-alpha.1", path = "../compiler-cranelift", optional = true }
[target.'cfg(target_arch = "wasm32")'.dependencies]
wasmer-compiler-singlepass = { version = "=3.1.0", path = "../compiler-singlepass", optional = true, default-features = false, features = ["wasm"] }
wasmer-compiler-cranelift = { version = "=3.1.0", path = "../compiler-cranelift", optional = true, default-features = false, features = ["wasm"] }
wasmer-compiler-singlepass = { version = "=3.2.0-alpha.1", path = "../compiler-singlepass", optional = true, default-features = false, features = ["wasm"] }
wasmer-compiler-cranelift = { version = "=3.2.0-alpha.1", path = "../compiler-cranelift", optional = true, default-features = false, features = ["wasm"] }
[target.'cfg(target_os = "linux")'.dependencies]
unix_mode = "0.1.3"

View File

@@ -1,6 +1,6 @@
[package]
name = "wasmer-cli"
version = "3.1.0"
version = "3.2.0-alpha.1"
description = "Wasmer CLI"
categories = ["wasm", "command-line-interface"]
keywords = ["wasm", "webassembly", "cli"]
@@ -25,22 +25,22 @@ doc = false
required-features = ["headless"]
[dependencies]
wasmer = { version = "=3.1.0", path = "../api", default-features = false }
wasmer-compiler = { version = "=3.1.0", path = "../compiler", features = ["compiler", ] }
wasmer-compiler-cranelift = { version = "=3.1.0", path = "../compiler-cranelift", optional = true }
wasmer-compiler-singlepass = { version = "=3.1.0", path = "../compiler-singlepass", optional = true }
wasmer-compiler-llvm = { version = "=3.1.0", path = "../compiler-llvm", optional = true }
wasmer-emscripten = { version = "=3.1.0", path = "../emscripten", optional = true }
wasmer-vm = { version = "=3.1.0", path = "../vm" }
wasmer-wasi = { version = "=3.1.0", path = "../wasi", optional = true }
wasmer-wasi-experimental-io-devices = { version = "=3.1.0", path = "../wasi-experimental-io-devices", optional = true, features = ["link_external_libs"] }
wasmer-wast = { version = "=3.1.0", path = "../../tests/lib/wast", optional = true }
wasmer-cache = { version = "=3.1.0", path = "../cache", optional = true }
wasmer-types = { version = "=3.1.0", path = "../types", features = ["enable-serde"] }
wasmer = { version = "=3.2.0-alpha.1", path = "../api", default-features = false }
wasmer-compiler = { version = "=3.2.0-alpha.1", path = "../compiler", features = ["compiler", ] }
wasmer-compiler-cranelift = { version = "=3.2.0-alpha.1", path = "../compiler-cranelift", optional = true }
wasmer-compiler-singlepass = { version = "=3.2.0-alpha.1", path = "../compiler-singlepass", optional = true }
wasmer-compiler-llvm = { version = "=3.2.0-alpha.1", path = "../compiler-llvm", optional = true }
wasmer-emscripten = { version = "=3.2.0-alpha.1", path = "../emscripten", optional = true }
wasmer-vm = { version = "=3.2.0-alpha.1", path = "../vm" }
wasmer-wasi = { version = "=3.2.0-alpha.1", path = "../wasi", optional = true }
wasmer-wasi-experimental-io-devices = { version = "=3.2.0-alpha.1", path = "../wasi-experimental-io-devices", optional = true, features = ["link_external_libs"] }
wasmer-wast = { version = "=3.2.0-alpha.1", path = "../../tests/lib/wast", optional = true }
wasmer-cache = { version = "=3.2.0-alpha.1", path = "../cache", optional = true }
wasmer-types = { version = "=3.2.0-alpha.1", path = "../types", features = ["enable-serde"] }
wasmer-registry = { version = "=4.0.0", path = "../registry" }
wasmer-object = { version = "=3.1.0", path = "../object", optional = true }
wasmer-vfs = { version = "=3.1.0", path = "../vfs", default-features = false, features = ["host-fs"] }
wasmer-wasm-interface = { version = "3.1.0", path = "../wasm-interface" }
wasmer-object = { version = "=3.2.0-alpha.1", path = "../object", optional = true }
wasmer-vfs = { version = "=3.2.0-alpha.1", path = "../vfs", default-features = false, features = ["host-fs"] }
wasmer-wasm-interface = { version = "3.2.0-alpha.1", path = "../wasm-interface" }
wasmparser = "0.51.4"
atty = "0.2"
colored = "2.0"
@@ -63,7 +63,8 @@ dirs = { version = "4.0" }
serde_json = { version = "1.0" }
target-lexicon = { version = "0.12", features = ["std"] }
prettytable-rs = "0.9.0"
wasmer-toml = "0.5.0"
wasmer-toml = "0.6.0"
indexmap = "1.9.2"
walkdir = "2.3.2"
regex = "1.6.0"
toml = "0.5.9"

View File

@@ -6,14 +6,13 @@ use crate::commands::Binfmt;
use crate::commands::Compile;
#[cfg(any(feature = "static-artifact-create", feature = "wasmer-artifact-create"))]
use crate::commands::CreateExe;
#[cfg(feature = "static-artifact-create")]
use crate::commands::CreateObj;
#[cfg(feature = "wast")]
use crate::commands::Wast;
use crate::commands::{
Add, Cache, Config, GenCHeader, Init, Inspect, List, Login, Publish, Run, SelfUpdate, Validate,
Whoami,
Add, Cache, Config, Init, Inspect, List, Login, Publish, Run, SelfUpdate, Validate, Whoami,
};
#[cfg(feature = "static-artifact-create")]
use crate::commands::{CreateObj, GenCHeader};
use crate::error::PrettyError;
use clap::{CommandFactory, ErrorKind, Parser};
@@ -130,6 +129,7 @@ enum WasmerCLIOptions {
CreateObj(CreateObj),
/// Generate the C static_defs.h header file for the input .wasm module
#[cfg(feature = "static-artifact-create")]
GenCHeader(GenCHeader),
/// Get various configuration information needed
@@ -181,6 +181,7 @@ impl WasmerCLIOptions {
Self::List(list) => list.execute(),
Self::Login(login) => login.execute(),
Self::Publish(publish) => publish.execute(),
#[cfg(feature = "static-artifact-create")]
Self::GenCHeader(gen_heder) => gen_heder.execute(),
#[cfg(feature = "wast")]
Self::Wast(wast) => wast.execute(),

View File

@@ -10,6 +10,7 @@ mod config;
mod create_exe;
#[cfg(feature = "static-artifact-create")]
mod create_obj;
#[cfg(feature = "static-artifact-create")]
mod gen_c_header;
mod init;
mod inspect;
@@ -29,19 +30,18 @@ pub use binfmt::*;
pub use compile::*;
#[cfg(any(feature = "static-artifact-create", feature = "wasmer-artifact-create"))]
pub use create_exe::*;
#[cfg(feature = "static-artifact-create")]
pub use create_obj::*;
use serde::{Deserialize, Serialize};
#[cfg(feature = "wast")]
pub use wast::*;
pub use {
add::*, cache::*, config::*, gen_c_header::*, init::*, inspect::*, list::*, login::*,
publish::*, run::*, self_update::*, validate::*, whoami::*,
add::*, cache::*, config::*, init::*, inspect::*, list::*, login::*, publish::*, run::*,
self_update::*, validate::*, whoami::*,
};
#[cfg(feature = "static-artifact-create")]
pub use {create_obj::*, gen_c_header::*};
/// The kind of object format to emit.
#[derive(Debug, Copy, Clone, PartialEq, Eq, clap::Parser, Serialize, Deserialize)]
#[cfg(any(feature = "static-artifact-create", feature = "wasmer-artifact-create"))]
pub enum ObjectFormat {
/// Serialize the entire module into an object file.
Serialized,

View File

@@ -1,6 +1,7 @@
//! Create a standalone native executable for a given Wasm file.
use super::ObjectFormat;
use crate::common::normalize_path;
use crate::store::CompilerOptions;
use anyhow::{Context, Result};
use clap::Parser;
@@ -224,6 +225,7 @@ impl CreateExe {
}
let (_, compiler_type) = self.compiler.get_store_for_target(target.clone())?;
println!("Compiler: {}", compiler_type.to_string());
println!("Target: {}", target.triple());
println!("Format: {:?}", object_format);
@@ -231,6 +233,7 @@ impl CreateExe {
"Using path `{}` as libwasmer path.",
cross_compilation.library.display()
);
if !cross_compilation.library.exists() {
return Err(anyhow::anyhow!("library path does not exist"));
}
@@ -967,16 +970,16 @@ fn get_module_infos(
let mut module_infos = BTreeMap::new();
for (atom_name, atom_bytes) in atoms {
let store = Store::default();
let module = Module::from_binary(&store, atom_bytes.as_slice())
.map_err(|e| anyhow::anyhow!("could not deserialize module {atom_name}: {e}"))?;
let module_info = Engine::get_module_info(atom_bytes.as_slice())
.map_err(|e| anyhow::anyhow!("could not get module info for atom {atom_name}: {e}"))?;
if let Some(s) = entrypoint
.atoms
.iter_mut()
.find(|a| a.atom.as_str() == atom_name.as_str())
{
s.module_info = Some(module.info().clone());
module_infos.insert(atom_name.clone(), module.info().clone());
s.module_info = Some(module_info.clone());
module_infos.insert(atom_name.clone(), module_info.clone());
}
}
@@ -1222,6 +1225,10 @@ fn link_exe_from_dir(
include_path.pop();
include_path.pop();
include_path.push("include");
if !include_path.exists() {
// Can happen when we got the wrong library_path
return Err(anyhow::anyhow!("Wasmer include path {} does not exist, maybe library path {} is wrong (expected /lib/libwasmer.a)?", include_path.display(), library_path.display()));
}
cmd.arg("-I");
cmd.arg(normalize_path(&format!("{}", include_path.display())));
@@ -1279,20 +1286,16 @@ fn link_exe_from_dir(
cmd.args(files_winsdk);
}
if debug {
println!("running cmd: {cmd:?}");
cmd.stdout(Stdio::inherit());
cmd.stderr(Stdio::inherit());
}
let compilation = cmd
.stdout(Stdio::inherit())
.stderr(Stdio::inherit())
.output()
.context(anyhow!("Could not execute `zig`: {cmd:?}"))?;
println!(
"file {} exists: {:?}",
out_path.display(),
out_path.exists()
);
if !compilation.status.success() {
return Err(anyhow::anyhow!(String::from_utf8_lossy(
&compilation.stderr
@@ -1302,7 +1305,6 @@ fn link_exe_from_dir(
// remove file if it exists - if not done, can lead to errors on copy
let output_path_normalized = normalize_path(&format!("{}", output_path.display()));
println!("removing {output_path_normalized}");
let _ = std::fs::remove_file(&output_path_normalized);
std::fs::copy(
&normalize_path(&format!("{}", out_path.display())),
@@ -1319,10 +1321,6 @@ fn link_exe_from_dir(
Ok(())
}
pub(crate) fn normalize_path(s: &str) -> String {
s.strip_prefix(r"\\?\").unwrap_or(s).to_string()
}
/// Link compiled objects using the system linker
#[allow(clippy::too_many_arguments)]
fn link_objects_system_linker(

View File

@@ -11,9 +11,6 @@ use std::path::PathBuf;
use wasmer::*;
#[cfg(feature = "webc_runner")]
use webc::{ParseOptions, WebCMmap};
#[derive(Debug, Parser)]
/// The options for the `wasmer create-exe` subcommand
pub struct CreateObj {
@@ -73,7 +70,7 @@ pub struct CreateObj {
impl CreateObj {
/// Runs logic for the `create-obj` subcommand
pub fn execute(&self) -> Result<()> {
let path = crate::commands::create_exe::normalize_path(&format!("{}", self.path.display()));
let path = crate::common::normalize_path(&format!("{}", self.path.display()));
let target_triple = self.target_triple.clone().unwrap_or_else(Triple::host);
let starting_cd = env::current_dir()?;
let input_path = starting_cd.join(&path);
@@ -98,8 +95,9 @@ impl CreateObj {
println!("Target: {}", target.triple());
println!("Format: {:?}", object_format);
let atoms =
if let Ok(pirita) = WebCMmap::parse(input_path.clone(), &ParseOptions::default()) {
let atoms = if let Ok(pirita) =
webc::WebCMmap::parse(input_path.clone(), &webc::ParseOptions::default())
{
crate::commands::create_exe::compile_pirita_into_directory(
&pirita,
&output_directory_path,

View File

@@ -7,8 +7,6 @@ use wasmer_types::compilation::symbols::ModuleMetadataSymbolRegistry;
use wasmer_types::{CpuFeature, MetadataHeader, Triple};
use webc::WebC;
use super::normalize_path;
#[derive(Debug, Parser)]
/// The options for the `wasmer gen-c-header` subcommand
pub struct GenCHeader {
@@ -50,7 +48,7 @@ pub struct GenCHeader {
impl GenCHeader {
/// Runs logic for the `gen-c-header` subcommand
pub fn execute(&self) -> Result<(), anyhow::Error> {
let path = crate::commands::normalize_path(&format!("{}", self.path.display()));
let path = crate::common::normalize_path(&format!("{}", self.path.display()));
let mut file = std::fs::read(&path)
.map_err(|e| anyhow::anyhow!("{e}"))
.with_context(|| anyhow::anyhow!("{path}"))?;
@@ -126,7 +124,7 @@ impl GenCHeader {
metadata_length,
);
let output = normalize_path(&self.output.display().to_string());
let output = crate::common::normalize_path(&self.output.display().to_string());
std::fs::write(&output, &header_file_src)
.map_err(|e| anyhow::anyhow!("{e}"))

View File

@@ -1,6 +1,7 @@
use anyhow::Context;
use cargo_metadata::{CargoOpt, MetadataCommand};
use clap::Parser;
use indexmap::IndexMap;
use std::collections::HashMap;
use std::path::Path;
use std::path::PathBuf;
@@ -204,7 +205,7 @@ impl Init {
}
}
fn get_filesystem_mapping(include: &[String]) -> Option<HashMap<String, PathBuf>> {
fn get_filesystem_mapping(include: &[String]) -> Option<IndexMap<String, PathBuf>> {
if include.is_empty() {
return None;
}
@@ -428,8 +429,8 @@ fn construct_manifest(
.join(&format!("{package_name}.wasm"));
let canonicalized_outpath = outpath.canonicalize().unwrap_or(outpath);
let outpath_str =
crate::commands::normalize_path(&canonicalized_outpath.display().to_string());
let manifest_canonicalized = crate::commands::normalize_path(
crate::common::normalize_path(&canonicalized_outpath.display().to_string());
let manifest_canonicalized = crate::common::normalize_path(
&manifest_path
.parent()
.and_then(|p| p.canonicalize().ok())

View File

@@ -215,7 +215,7 @@ fn construct_tar_gz(
}
// bundle the package filesystem
let default = std::collections::HashMap::default();
let default = indexmap::IndexMap::default();
for (_alias, path) in manifest.fs.as_ref().unwrap_or(&default).iter() {
let normalized_path = normalize_path(cwd, path);
let path_metadata = normalized_path.metadata().map_err(|_| {

View File

@@ -1,3 +1,4 @@
#[cfg(feature = "cache")]
use crate::common::get_cache_dir;
#[cfg(feature = "debug")]
use crate::logging;
@@ -7,10 +8,11 @@ use crate::suggestions::suggest_function_exports;
use crate::warning;
use anyhow::{anyhow, Context, Result};
use clap::Parser;
use std::collections::HashMap;
use std::ops::Deref;
use std::path::PathBuf;
#[cfg(feature = "cache")]
use std::str::FromStr;
#[cfg(feature = "emscripten")]
use wasmer::FunctionEnv;
use wasmer::*;
#[cfg(feature = "cache")]
@@ -121,7 +123,12 @@ impl RunWithPathBuf {
#[cfg(feature = "wasi")]
{
let default = HashMap::default();
// See https://github.com/wasmerio/wasmer/issues/3492 -
// we need IndexMap to have a stable ordering for the [fs] mapping,
// otherwise overlapping filesystem mappings might not work
// since we want to control the order of mounting directories from the
// wasmer.toml file
let default = indexmap::IndexMap::default();
let fs = manifest.fs.as_ref().unwrap_or(&default);
for (alias, real_dir) in fs.iter() {
let real_dir = self_clone.path.join(&real_dir);
@@ -195,7 +202,8 @@ impl RunWithPathBuf {
#[cfg(feature = "webc_runner")]
{
if let Ok(pf) = WapmContainer::new(self.path.clone()) {
return Self::run_container(
return self
.run_container(
pf,
&self.command_name.clone().unwrap_or_default(),
&self.args,
@@ -340,7 +348,12 @@ impl RunWithPathBuf {
}
#[cfg(feature = "webc_runner")]
fn run_container(container: WapmContainer, id: &str, args: &[String]) -> Result<(), String> {
fn run_container(
&self,
container: WapmContainer,
id: &str,
args: &[String],
) -> Result<(), anyhow::Error> {
let mut result = None;
#[cfg(feature = "wasi")]
@@ -349,12 +362,15 @@ impl RunWithPathBuf {
return r;
}
let mut runner = wasmer_wasi::runners::wasi::WasiRunner::default();
let (store, _compiler_type) = self.store.get_store()?;
let mut runner = wasmer_wasi::runners::wasi::WasiRunner::new(store);
runner.set_args(args.to_vec());
result = Some(if id.is_empty() {
runner.run(&container).map_err(|e| format!("{e}"))
runner.run(&container).map_err(|e| anyhow::anyhow!("{e}"))
} else {
runner.run_cmd(&container, id).map_err(|e| format!("{e}"))
runner
.run_cmd(&container, id)
.map_err(|e| anyhow::anyhow!("{e}"))
});
}
@@ -364,16 +380,19 @@ impl RunWithPathBuf {
return r;
}
let mut runner = wasmer_wasi::runners::emscripten::EmscriptenRunner::default();
let (store, _compiler_type) = self.store.get_store()?;
let mut runner = wasmer_wasi::runners::emscripten::EmscriptenRunner::new(store);
runner.set_args(args.to_vec());
result = Some(if id.is_empty() {
runner.run(&container).map_err(|e| format!("{e}"))
runner.run(&container).map_err(|e| anyhow::anyhow!("{e}"))
} else {
runner.run_cmd(&container, id).map_err(|e| format!("{e}"))
runner
.run_cmd(&container, id)
.map_err(|e| anyhow::anyhow!("{e}"))
});
}
result.unwrap_or_else(|| Err("neither emscripten or wasi file".to_string()))
result.unwrap_or_else(|| Err(anyhow::anyhow!("neither emscripten or wasi file")))
}
fn get_store_module(&self) -> Result<(Store, Module)> {

View File

@@ -51,3 +51,7 @@ pub fn get_cache_dir() -> PathBuf {
}
}
}
pub(crate) fn normalize_path(s: &str) -> String {
s.strip_prefix(r"\\?\").unwrap_or(s).to_string()
}

View File

@@ -1,6 +1,6 @@
[package]
name = "wasmer-compiler-cranelift"
version = "3.1.0"
version = "3.2.0-alpha.1"
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 = "=3.1.0", features = ["translator", "compiler"], default-features = false }
wasmer-types = { path = "../types", version = "=3.1.0", default-features = false, features = ["std"] }
wasmer-compiler = { path = "../compiler", version = "=3.2.0-alpha.1", features = ["translator", "compiler"], default-features = false }
wasmer-types = { path = "../types", version = "=3.2.0-alpha.1", 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 }

View File

@@ -1,6 +1,6 @@
[package]
name = "wasmer-compiler-llvm"
version = "3.1.0"
version = "3.2.0-alpha.1"
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 = "=3.1.0", features = [
wasmer-compiler = { path = "../compiler", version = "=3.2.0-alpha.1", features = [
"translator", "compiler"
] }
wasmer-vm = { path = "../vm", version = "=3.1.0" }
wasmer-types = { path = "../types", version = "=3.1.0" }
wasmer-vm = { path = "../vm", version = "=3.2.0-alpha.1" }
wasmer-types = { path = "../types", version = "=3.2.0-alpha.1" }
target-lexicon = { version = "0.12.2", default-features = false }
smallvec = "1.6"
object = { version = "0.28.3", default-features = false, features = ["read"] }

View File

@@ -1,6 +1,6 @@
[package]
name = "wasmer-compiler-singlepass"
version = "3.1.0"
version = "3.2.0-alpha.1"
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 = "=3.1.0", features = ["translator", "compiler"], default-features = false }
wasmer-types = { path = "../types", version = "=3.1.0", default-features = false, features = ["std"] }
wasmer-compiler = { path = "../compiler", version = "=3.2.0-alpha.1", features = ["translator", "compiler"], default-features = false }
wasmer-types = { path = "../types", version = "=3.2.0-alpha.1", default-features = false, features = ["std"] }
hashbrown = { version = "0.11", optional = true }
gimli = { version = "0.26", optional = true }
enumset = "1.0.2"

View File

@@ -909,11 +909,14 @@ macro_rules! sse_round_fn {
|emitter: &mut AssemblerX64, precision: Precision, src1: XMM, src2: XMMOrMemory, dst: XMM| {
match src2 {
XMMOrMemory::XMM(x) => {
assert_eq!(src1, x);
if x != dst {
move_src_to_dst(emitter, precision, src1, dst);
dynasm!(emitter ; $ins Rx((dst as u8)), Rx((dst as u8)), $mode)
}
XMMOrMemory::Memory(..) => unreachable!(),
dynasm!(emitter ; $ins Rx((x as u8)), Rx((dst as u8)), $mode)
}
XMMOrMemory::Memory(base, disp) => {
dynasm!(emitter ; $ins Rx((dst as u8)), [Rq((base as u8)) + disp], $mode)
},
}
}
}

View File

@@ -1,6 +1,6 @@
[package]
name = "wasmer-compiler"
version = "3.1.0"
version = "3.2.0-alpha.1"
description = "Base compiler abstraction for Wasmer WebAssembly runtime"
categories = ["wasm", "no-std"]
keywords = ["wasm", "webassembly", "compiler"]
@@ -11,8 +11,8 @@ readme = "README.md"
edition = "2018"
[dependencies]
wasmer-types = { path = "../types", version = "=3.1.0", default-features = false }
wasmer-object = { path = "../object", version = "=3.1.0", optional = true }
wasmer-types = { path = "../types", version = "=3.2.0-alpha.1", default-features = false }
wasmer-object = { path = "../object", version = "=3.2.0-alpha.1", optional = true }
wasmparser = { version = "0.83", optional = true, default-features = false }
enumset = "1.0.2"
hashbrown = { version = "0.11", optional = true }
@@ -32,7 +32,7 @@ leb128 = "0.2"
enum-iterator = "0.7.0"
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
wasmer-vm = { path = "../vm", version = "=3.1.0" }
wasmer-vm = { path = "../vm", version = "=3.2.0-alpha.1" }
region = { version = "3.0" }
[target.'cfg(target_os = "windows")'.dependencies]

View File

@@ -13,7 +13,7 @@ use wasmer_types::entity::PrimaryMap;
use wasmer_types::CompileModuleInfo;
use wasmer_types::{
CompileError, CpuFeature, CustomSection, Dwarf, FunctionIndex, LocalFunctionIndex, MemoryIndex,
MemoryStyle, ModuleInfo, OwnedDataInitializer, Pages, Relocation, SectionIndex, SignatureIndex,
MemoryStyle, ModuleInfo, OwnedDataInitializer, Relocation, SectionIndex, SignatureIndex,
TableIndex, TableStyle, Target,
};
use wasmer_types::{
@@ -119,17 +119,10 @@ impl ArtifactBuild {
compile_info,
data_initializers,
cpu_features: cpu_features.as_u64(),
module_start: None,
};
Ok(Self { serializable })
}
/// Specify the fixed virtual memory address for the compiled module
pub fn with_module_start(mut self, module_start: Option<Pages>) -> Self {
self.serializable.module_start = module_start;
self
}
/// Compile a data buffer into a `ArtifactBuild`, which may then be instantiated.
#[cfg(not(feature = "compiler"))]
#[cfg(not(target_arch = "wasm32"))]
@@ -150,11 +143,6 @@ impl ArtifactBuild {
Self { serializable }
}
/// Returns the memory start address for this compiled module
pub fn get_memory_start(&self) -> Option<Pages> {
self.serializable.module_start
}
/// Get Functions Bodies ref
pub fn get_function_bodies_ref(&self) -> &PrimaryMap<LocalFunctionIndex, FunctionBody> {
&self.serializable.compilation.function_bodies

View File

@@ -56,8 +56,8 @@ impl Artifact {
data: &[u8],
tunables: &dyn Tunables,
) -> Result<Self, CompileError> {
let environ = ModuleEnvironment::new();
let mut inner_engine = engine.inner_mut();
let environ = ModuleEnvironment::new();
let translation = environ.translate(data).map_err(CompileError::Wasm)?;
let module = translation.module;
let memory_styles: PrimaryMap<MemoryIndex, MemoryStyle> = module
@@ -77,8 +77,7 @@ impl Artifact {
engine.target(),
memory_styles,
table_styles,
)?
.with_module_start(tunables.module_start());
)?;
Self::from_parts(&mut inner_engine, artifact)
}
@@ -712,7 +711,6 @@ impl Artifact {
compile_info: metadata.compile_info,
data_initializers: metadata.data_initializers,
cpu_features: metadata.cpu_features,
module_start: None,
});
let finished_function_lengths = finished_functions

View File

@@ -22,9 +22,9 @@ use std::sync::{Arc, Mutex};
#[cfg(not(target_arch = "wasm32"))]
use wasmer_types::{
entity::PrimaryMap, DeserializeError, FunctionBody, FunctionIndex, FunctionType,
LocalFunctionIndex, ModuleInfo, SignatureIndex,
LocalFunctionIndex, SignatureIndex,
};
use wasmer_types::{CompileError, Features, Target};
use wasmer_types::{CompileError, Features, ModuleInfo, Target};
#[cfg(not(target_arch = "wasm32"))]
use wasmer_types::{CustomSection, CustomSectionProtection, SectionIndex};
#[cfg(not(target_arch = "wasm32"))]
@@ -74,6 +74,15 @@ impl Engine {
}
}
/// Returns only the `ModuleInfo` given a `wasm` byte slice
#[cfg(feature = "compiler")]
pub fn get_module_info(data: &[u8]) -> Result<ModuleInfo, CompileError> {
// this is from `artifact_builder.rs`
let environ = crate::ModuleEnvironment::new();
let translation = environ.translate(data).map_err(CompileError::Wasm)?;
Ok(translation.module)
}
/// Returns the name of this engine
pub fn name(&self) -> &str {
self.name.as_str()
@@ -267,7 +276,7 @@ impl EngineInner {
pub fn compiler(&self) -> Result<&dyn Compiler, CompileError> {
match self.compiler.as_ref() {
None => Err(CompileError::Codegen(
"The Engine is not compiled in.".to_string(),
"No compiler compiled into executable".to_string(),
)),
Some(compiler) => Ok(&**compiler),
}

View File

@@ -13,11 +13,6 @@ use wasmer_vm::{VMMemoryDefinition, VMTableDefinition};
/// An engine delegates the creation of memories, tables, and globals
/// to a foreign implementor of this trait.
pub trait Tunables {
/// Fixed virtual memory address for the compiled module
fn module_start(&self) -> Option<Pages> {
None
}
/// Construct a `MemoryStyle` for the provided `MemoryType`
fn memory_style(&self, memory: &MemoryType) -> MemoryStyle;

View File

@@ -36,7 +36,7 @@ impl UnwindRegistry {
) -> Result<(), String> {
match info {
CompiledFunctionUnwindInfo::Dwarf => {}
_ => return Err("unsupported unwind information".to_string()),
_ => return Err(format!("unsupported unwind information {info:?}")),
};
Ok(())
}

View File

@@ -1,6 +1,6 @@
[package]
name = "wasmer-derive"
version = "3.1.0"
version = "3.2.0-alpha.1"
description = "Wasmer derive macros"
authors = ["Wasmer Engineering Team <engineering@wasmer.io>"]
repository = "https://github.com/wasmerio/wasmer"

View File

@@ -1,6 +1,6 @@
[package]
name = "wasmer-emscripten"
version = "3.1.0"
version = "3.2.0-alpha.1"
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 = "=3.1.0", default-features = false, features = ["sys", "compiler"] }
wasmer-types = { path = "../types", version = "=3.1.0" }
wasmer = { path = "../api", version = "=3.2.0-alpha.1", default-features = false, features = ["sys", "compiler"] }
wasmer-types = { path = "../types", version = "=3.2.0-alpha.1" }
[target.'cfg(windows)'.dependencies]
getrandom = "0.2"

View File

@@ -1,6 +1,6 @@
[package]
name = "wasmer-middlewares"
version = "3.1.0"
version = "3.2.0-alpha.1"
authors = ["Wasmer Engineering Team <engineering@wasmer.io>"]
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 = "=3.1.0", default-features = false, features = ["compiler"] }
wasmer-types = { path = "../types", version = "=3.1.0" }
wasmer-vm = { path = "../vm", version = "=3.1.0" }
wasmer = { path = "../api", version = "=3.2.0-alpha.1", default-features = false, features = ["compiler"] }
wasmer-types = { path = "../types", version = "=3.2.0-alpha.1" }
wasmer-vm = { path = "../vm", version = "=3.2.0-alpha.1" }
[dev-dependencies]
wasmer = { path = "../api", version = "=3.1.0", features = ["compiler"] }
wasmer = { path = "../api", version = "=3.2.0-alpha.1", features = ["compiler"] }
[badges]
maintenance = { status = "actively-developed" }

View File

@@ -1,6 +1,6 @@
[package]
name = "wasmer-object"
version = "3.1.0"
version = "3.2.0-alpha.1"
description = "Wasmer Native Object generator"
categories = ["wasm"]
keywords = ["wasm", "webassembly"]
@@ -11,6 +11,6 @@ readme = "README.md"
edition = "2018"
[dependencies]
wasmer-types = { path = "../types", version = "=3.1.0" }
wasmer-types = { path = "../types", version = "=3.2.0-alpha.1" }
object = { version = "0.28.3", default-features = false, features = ["write"] }
thiserror = "1.0"

View File

@@ -20,7 +20,7 @@ serde_json = "1.0.85"
url = "2.3.1"
thiserror = "1.0.37"
toml = "0.5.9"
wasmer-toml = "0.5.0"
wasmer-toml = "0.6.0"
tar = "0.4.38"
flate2 = "1.0.24"
semver = "1.0.14"

View File

@@ -1,6 +1,6 @@
[package]
name = "wasmer-types"
version = "3.1.0"
version = "3.2.0-alpha.1"
description = "Wasmer Common Types"
categories = ["wasm", "no-std", "data-structures"]
keywords = ["wasm", "webassembly", "types"]

View File

@@ -1,5 +1,4 @@
use crate::entity::PrimaryMap;
use crate::Pages;
use crate::{
compilation::target::CpuFeature, CompileModuleInfo, CompiledFunctionFrameInfo, CustomSection,
DeserializeError, Dwarf, Features, FunctionBody, FunctionIndex, LocalFunctionIndex,
@@ -62,8 +61,6 @@ pub struct SerializableModule {
pub data_initializers: Box<[OwnedDataInitializer]>,
/// CPU Feature flags for this compilation
pub cpu_features: u64,
/// The start memory address of this serializable module
pub module_start: Option<Pages>,
}
fn to_serialize_error(err: impl std::error::Error) -> SerializeError {
@@ -181,7 +178,7 @@ pub struct MetadataHeader {
impl MetadataHeader {
/// Current ABI version. Increment this any time breaking changes are made
/// to the format of the serialized data.
const CURRENT_VERSION: u32 = 1;
const CURRENT_VERSION: u32 = 2;
/// Magic number to identify wasmer metadata.
const MAGIC: [u8; 8] = *b"WASMER\0\0";

View File

@@ -1,6 +1,6 @@
[package]
name = "wasmer-vbus"
version = "3.1.0"
version = "3.2.0-alpha.1"
description = "Wasmer Virtual Bus"
authors = ["Wasmer Engineering Team <engineering@wasmer.io>"]
license = "MIT"
@@ -13,9 +13,9 @@ thiserror = "1"
tracing = { version = "0.1" }
typetag = { version = "0.1", optional = true }
slab = { version = "0.4", optional = true }
wasmer = { path = "../api", version = "=3.1.0", default-features = false }
wasmer-vfs = { path = "../vfs", version = "=3.1.0", default-features = false }
wasmer-wasi-types = { path = "../wasi-types/", version = "3.1.0" }
wasmer = { path = "../api", version = "=3.2.0-alpha.1", default-features = false }
wasmer-vfs = { path = "../vfs", version = "=3.2.0-alpha.1", default-features = false }
wasmer-wasi-types = { path = "../wasi-types/", version = "=3.2.0-alpha.1" }
[features]
default = []

View File

@@ -1,14 +1,14 @@
[package]
name = "wasmer-vfs"
version = "3.1.0"
version = "3.2.0-alpha.1"
description = "Wasmer Virtual FileSystem"
authors = ["Wasmer Engineering Team <engineering@wasmer.io>"]
license = "MIT"
edition = "2018"
[dependencies]
wasmer-types = { path = "../types", version = "3.1.0", default_features = false }
wasmer-wasi-types = { path = "../wasi-types", version = "3.1.0", default_features = false }
wasmer-types = { path = "../types", version = "=3.2.0-alpha.1", default_features = false }
wasmer-wasi-types = { path = "../wasi-types", version = "=3.2.0-alpha.1", default_features = false }
libc = { version = "^0.2", default-features = false, optional = true }
thiserror = "1"

View File

@@ -1,6 +1,6 @@
[package]
name = "wasmer-vm"
version = "3.1.0"
version = "3.2.0-alpha.1"
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 = "=3.1.0" }
wasmer-types = { path = "../types", version = "=3.2.0-alpha.1" }
libc = { version = "^0.2", default-features = false }
memoffset = "0.6"
indexmap = { version = "1.6" }

View File

@@ -1,6 +1,6 @@
[package]
name = "wasmer-vnet"
version = "3.1.0"
version = "3.2.0-alpha.1"
description = "Wasmer Virtual Networking"
authors = ["Wasmer Engineering Team <engineering@wasmer.io>"]
license = "MIT"
@@ -8,7 +8,7 @@ edition = "2018"
[dependencies]
thiserror = "1"
wasmer-vfs = { path = "../vfs", version = "=3.1.0", default-features = false }
wasmer-vfs = { path = "../vfs", version = "=3.2.0-alpha.1", default-features = false }
bytes = "1"
async-trait = { version = "^0.1" }

View File

@@ -18,7 +18,7 @@ once_cell = "1.13"
thiserror = "1.0"
tracing-lib = { version = "0.1.26", optional = true, package = "tracing" }
wai-bindgen-wasmer-impl = { version = "0.2.2" }
wasmer = { version = "3.1.0", path = "../api", default-features = false }
wasmer = { version = "=3.2.0-alpha.1", path = "../api", default-features = false }
[features]
# Enables generated code to emit events via the `tracing` crate whenever wasm is

View File

@@ -1,6 +1,6 @@
[package]
name = "wasmer-wasi-experimental-io-devices"
version = "3.1.0"
version = "3.2.0-alpha.1"
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 = "=3.1.0", path = "../wasi", default-features=false }
wasmer-wasi = { version = "=3.2.0-alpha.1", path = "../wasi", default-features=false }
tracing = "0.1"
minifb = { version = "0.23", optional = true }
nix = "0.25.0"

View File

@@ -1,6 +1,6 @@
[package]
name = "wasmer-wasi-local-networking"
version = "3.1.0"
version = "3.2.0-alpha.1"
description = "An WASIX extension for local networking"
categories = ["wasm"]
keywords = ["wasm", "webassembly", "types"]
@@ -14,8 +14,8 @@ edition = "2018"
maintenance = { status = "experimental" }
[dependencies]
wasmer-vnet = { version = "=3.1.0", path = "../vnet", default-features = false }
wasmer-vfs = { path = "../vfs", version = "=3.1.0", default-features = false }
wasmer-vnet = { version = "=3.2.0-alpha.1", path = "../vnet", default-features = false }
wasmer-vfs = { path = "../vfs", version = "=3.2.0-alpha.1", default-features = false }
tracing = "0.1"
bytes = "1.1"
tokio = { version = "1", features = [ "sync", "macros", "io-util", "signal" ], default_features = false }

View File

@@ -1,6 +1,6 @@
[package]
name = "wasmer-wasi-types"
version = "3.1.0"
version = "3.2.0-alpha.1"
description = "WASI types for Wasmer WebAssembly runtime"
categories = ["wasm", "os"]
keywords = ["wasm", "webassembly", "wasi", "sandbox", "ABI"]
@@ -13,9 +13,9 @@ edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
wasmer = { default-features = false, path = "../api", version = "=3.1.0" }
wasmer-types = { path = "../types", version = "=3.1.0" }
wasmer-derive = { path = "../derive", version = "=3.1.0" }
wasmer = { default-features = false, path = "../api", version = "=3.2.0-alpha.1" }
wasmer-types = { path = "../types", version = "=3.2.0-alpha.1" }
wasmer-derive = { path = "../derive", version = "=3.2.0-alpha.1" }
wai-bindgen-gen-rust = "0.2.1"
wai-bindgen-rust = { version = "0.2.1", default-features = false, features = ["macros"] }
wai-bindgen-gen-rust-wasm = "0.2.1"

View File

@@ -1,6 +1,6 @@
[package]
name = "wasmer-wasi"
version = "3.1.0"
version = "3.2.0-alpha.1"
description = "WASI implementation library for Wasmer WebAssembly runtime"
categories = ["wasm", "os"]
keywords = ["wasm", "webassembly", "wasi", "sandbox", "ABI"]
@@ -16,15 +16,15 @@ thiserror = "1"
generational-arena = { version = "0.2" }
tracing = "0.1"
getrandom = "0.2"
wasmer-wasi-types = { path = "../wasi-types", version = "=3.1.0" }
wasmer-types = { path = "../types", version = "=3.1.0", default-features = false }
wasmer = { path = "../api", version = "=3.1.0", default-features = false, features = ["wat", "js-serializable-module"] }
wasmer-vfs = { path = "../vfs", version = "=3.1.0", default-features = false, features = ["webc-fs"] }
wasmer-vm = { path = "../vm", version = "=3.1.0", optional = true }
wasmer-vbus = { path = "../vbus", version = "=3.1.0", default-features = false }
wasmer-vnet = { path = "../vnet", version = "=3.1.0", default-features = false }
wasmer-wasi-local-networking = { path = "../wasi-local-networking", version = "=3.1.0", default-features = false, optional = true }
wasmer-emscripten = { path = "../emscripten", version = "=3.1.0", optional = true }
wasmer-wasi-types = { path = "../wasi-types", version = "=3.2.0-alpha.1" }
wasmer-types = { path = "../types", version = "=3.2.0-alpha.1", default-features = false }
wasmer = { path = "../api", version = "=3.2.0-alpha.1", default-features = false, features = ["wat", "js-serializable-module"] }
wasmer-vfs = { path = "../vfs", version = "=3.2.0-alpha.1", default-features = false, features = ["webc-fs"] }
wasmer-vm = { path = "../vm", version = "=3.2.0-alpha.1", optional = true }
wasmer-vbus = { path = "../vbus", version = "=3.2.0-alpha.1", default-features = false }
wasmer-vnet = { path = "../vnet", version = "=3.2.0-alpha.1", default-features = false }
wasmer-wasi-local-networking = { path = "../wasi-local-networking", version = "=3.2.0-alpha.1", default-features = false, optional = true }
wasmer-emscripten = { path = "../emscripten", version = "=3.2.0-alpha.1", optional = true }
typetag = { version = "0.1", optional = true }
serde = { version = "1.0", default-features = false, features = ["derive"] }
bincode = { version = "1.3" }
@@ -55,10 +55,10 @@ linked_hash_set = { version = "0.1" }
# used by feature='host-termios'
termios = { version = "0.3", optional = true }
# the various compilers
wasmer-compiler-cranelift = { version = "3.0.0-beta", path = "../compiler-cranelift", optional = true }
wasmer-compiler-llvm = { version = "3.0.0-beta", path = "../compiler-llvm", optional = true }
wasmer-compiler-singlepass = { version = "3.0.0-beta", path = "../compiler-singlepass", optional = true }
wasmer-compiler = { version = "3.0.0-beta", path = "../compiler", features = [ "translator" ], optional = true }
wasmer-compiler-cranelift = { version = "=3.2.0-alpha.1", path = "../compiler-cranelift", optional = true }
wasmer-compiler-llvm = { version = "=3.2.0-alpha.1", path = "../compiler-llvm", optional = true }
wasmer-compiler-singlepass = { version = "=3.2.0-alpha.1", path = "../compiler-singlepass", optional = true }
wasmer-compiler = { version = "=3.2.0-alpha.1", path = "../compiler", features = [ "translator" ], optional = true }
http = "0.2.8"
wai-bindgen-wasmer = { path = "../wai-bindgen-wasmer", version = "0.2.3", features = ["tracing"] }
region = { version = "3.0", optional = true }
@@ -79,8 +79,8 @@ winapi = "0.3"
wasm-bindgen = "0.2.74"
[dev-dependencies]
wasmer-compiler-cranelift = { version = "3.0.0-beta", path = "../compiler-cranelift" }
wasmer = { path = "../api", version = "=3.1.0", default-features = false, features = ["wat", "js-serializable-module", "cranelift", "compiler"] }
wasmer-compiler-cranelift = { version = "=3.2.0-alpha.1", path = "../compiler-cranelift" }
wasmer = { path = "../api", version = "=3.2.0-alpha.1", default-features = false, features = ["wat", "js-serializable-module", "cranelift", "compiler"] }
[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
wasm-bindgen-test = "0.3.0"

View File

@@ -1,4 +1,4 @@
#![cfg(feature = "webc_runner_rt_wasi")]
#![cfg(feature = "webc_runner_rt_emscripten")]
//! WebC container support for running Emscripten modules
use crate::runners::WapmContainer;
@@ -6,19 +6,41 @@ use anyhow::anyhow;
use serde::{Deserialize, Serialize};
use std::error::Error as StdError;
use std::sync::Arc;
use wasmer::{Cranelift, FunctionEnv, Instance, Module, Store};
use wasmer::{FunctionEnv, Instance, Module, Store};
use wasmer_emscripten::{
generate_emscripten_env, is_emscripten_module, run_emscripten_instance, EmEnv,
EmscriptenGlobals,
};
use webc::{Command, WebCMmap};
#[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Hash, Serialize, Deserialize)]
#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct EmscriptenRunner {
args: Vec<String>,
#[serde(skip, default)]
store: Store,
}
impl EmscriptenRunner {
/// Constructs a new `EmscriptenRunner` given an `Store`
pub fn new(store: Store) -> Self {
Self {
args: Vec::new(),
store,
}
}
/// Returns the current arguments for this `EmscriptenRunner`
pub fn get_args(&self) -> Vec<String> {
self.args.clone()
}
/// Builder method to provide CLI args to the runner
pub fn with_args(mut self, args: Vec<String>) -> Self {
self.set_args(args);
self
}
/// Set the CLI args
pub fn set_args(&mut self, args: Vec<String>) {
self.args = args;
}
@@ -33,6 +55,7 @@ impl crate::runners::Runner for EmscriptenRunner {
.starts_with("https://webc.org/runner/emscripten"))
}
#[allow(unreachable_code, unused_variables)]
fn run_command(
&mut self,
command_name: &str,
@@ -43,16 +66,14 @@ impl crate::runners::Runner for EmscriptenRunner {
let main_args = container.get_main_args_for_command(command_name);
let atom_bytes = container.get_atom(&container.get_package_name(), &atom_name)?;
let compiler = Cranelift::default();
let mut store = Store::new(compiler);
let mut module = Module::new(&store, atom_bytes)?;
let mut module = Module::new(&self.store, atom_bytes)?;
module.set_name(&atom_name);
let (mut globals, env) =
prepare_emscripten_env(&mut store, &module, container.webc.clone(), &atom_name)?;
prepare_emscripten_env(&mut self.store, &module, container.webc.clone(), &atom_name)?;
exec_module(
&mut store,
&mut self.store,
&module,
&mut globals,
env,

View File

@@ -1,4 +1,4 @@
#![cfg(feature = "webc_runner_rt_emscripten")]
#![cfg(feature = "webc_runner_rt_wasi")]
//! WebC container support for running WASI modules
use crate::runners::WapmContainer;
@@ -7,16 +7,38 @@ use anyhow::Context;
use serde::{Deserialize, Serialize};
use std::error::Error as StdError;
use std::sync::Arc;
use wasmer::{Cranelift, Instance, Module, Store};
use wasmer::{Instance, Module, Store};
use wasmer_vfs::webc_fs::WebcFileSystem;
use webc::{Command, WebCMmap};
#[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Hash, Serialize, Deserialize)]
#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct WasiRunner {
args: Vec<String>,
#[serde(skip, default)]
store: Store,
}
impl WasiRunner {
/// Constructs a new `WasiRunner` given an `Store`
pub fn new(store: Store) -> Self {
Self {
args: Vec::new(),
store,
}
}
/// Returns the current arguments for this `WasiRunner`
pub fn get_args(&self) -> Vec<String> {
self.args.clone()
}
/// Builder method to provide CLI args to the runner
pub fn with_args(mut self, args: Vec<String>) -> Self {
self.set_args(args);
self
}
/// Set the CLI args
pub fn set_args(&mut self, args: Vec<String>) {
self.args = args;
}
@@ -33,6 +55,7 @@ impl crate::runners::Runner for WasiRunner {
Ok(command.runner.starts_with("https://webc.org/runner/wasi"))
}
#[allow(unreachable_code, unused_variables)]
fn run_command(
&mut self,
command_name: &str,
@@ -42,14 +65,17 @@ impl crate::runners::Runner for WasiRunner {
let atom_name = container.get_atom_name_for_command("wasi", command_name)?;
let atom_bytes = container.get_atom(&container.get_package_name(), &atom_name)?;
let compiler = Cranelift::default();
let mut store = Store::new(compiler);
let mut module = Module::new(&store, atom_bytes)?;
let mut module = Module::new(&self.store, atom_bytes)?;
module.set_name(&atom_name);
let env = prepare_webc_env(&mut store, container.webc.clone(), &atom_name, &self.args)?;
let env = prepare_webc_env(
&mut self.store,
container.webc.clone(),
&atom_name,
&self.args,
)?;
exec_module(&mut store, &module, env)?;
exec_module(&mut self.store, &module, env)?;
Ok(())
}

View File

@@ -1,6 +1,6 @@
[package]
name = "wasmer-wasm-interface"
version = "3.1.0"
version = "3.2.0-alpha.1"
authors = ["The Wasmer Engineering Team <engineering@wasmer.io>"]
edition = "2018"
repository = "https://github.com/wasmerio/wapm-cli"

View File

@@ -46,6 +46,7 @@ SETTINGS = {
# compiler by default otherwise it won't work standalone
"publish_features": {
"wasmer-cli": "default,cranelift",
"wasmer-wasi": "sys",
},
# workspace members we want to publish but whose path doesn't start by
# "./lib/"
@@ -173,21 +174,6 @@ class Publisher:
dependencies = return_dependencies(member_data)
crates.append(Crate(dependencies, member_data, cargo_file_path=member))
invalids: typing.List[str] = []
for crate in crates:
if crate.version != self.version:
print(
f"Crate {crate.name} is version {crate.version} but"
f" we're publishing for version {self.version}"
)
invalids.append(crate.name)
if len(invalids) > 0:
raise Exception(
f"Some crates have a different version than the"
f" one we're publishing ({self.version}): {invalids}"
)
self.crates = crates
self.crate_index: typing.Dict[str, Crate] = {c.name: c for c in crates}

View File

@@ -1,7 +1,7 @@
#!/usr/bin/python
PREVIOUS_VERSION='3.0.2'
NEXT_VERSION='3.1.0'
PREVIOUS_VERSION='3.1.0'
NEXT_VERSION='3.2.0-alpha.1'
import os
import re

View File

@@ -1,6 +1,6 @@
[Setup]
AppName=Wasmer
AppVersion=3.1.0
AppVersion=3.2.0-alpha.1
DefaultDirName={pf}\Wasmer
DefaultGroupName=Wasmer
Compression=lzma2

View File

@@ -11,6 +11,7 @@ llvm+aarch64 traps::test_trap_trace
singlepass+aarch64+macos traps::test_trap_stack_overflow # Need to investigate
singlepass+aarch64+macos traps::trap_display_pretty
llvm traps::trap_display_pretty
windows trap_display_pretty
cranelift+aarch64+macos traps::trap_display_pretty
singlepass+aarch64+macos traps::trap_display_multi_module
llvm traps::trap_display_multi_module

View File

@@ -1,6 +1,6 @@
[package]
name = "wasmer-integration-tests-cli"
version = "3.1.0"
version = "3.2.0-alpha.1"
authors = ["Wasmer Engineering Team <engineering@wasmer.io>"]
description = "CLI integration tests"
repository = "https://github.com/wasmerio/wasmer"

View File

@@ -257,8 +257,14 @@ fn test_create_exe_with_precompiled_works_1() {
// Ignored because of -lunwind linker issue on Windows
// see https://github.com/wasmerio/wasmer/issues/3459
#[cfg_attr(target_os = "windows", ignore)]
// #[cfg_attr(target_os = "windows", ignore)]
#[test]
// Test temporarily ignored during the release of 3.2.0-alpha
// because create-exe links to the old libwasmer.a which expects
// MetadataHeader::VERSION == 1, but we want to upgrade to version 2.
//
// https://github.com/wasmerio/wasmer/issues/3513
#[ignore]
fn create_exe_works() -> anyhow::Result<()> {
let temp_dir = tempfile::tempdir()?;
let operating_dir: PathBuf = temp_dir.path().to_owned();
@@ -295,8 +301,14 @@ fn create_exe_works() -> anyhow::Result<()> {
/// Tests that "-c" and "-- -c" are treated differently
// Ignored because of -lunwind linker issue on Windows
// see https://github.com/wasmerio/wasmer/issues/3459
#[cfg_attr(target_os = "windows", ignore)]
// #[cfg_attr(target_os = "windows", ignore)]
#[test]
// Test temporarily ignored during the release of 3.2.0-alpha
// because create-exe links to the old libwasmer.a which expects
// MetadataHeader::VERSION == 1, but we want to upgrade to version 2.
//
// https://github.com/wasmerio/wasmer/issues/3513
#[ignore]
fn create_exe_works_multi_command_args_handling() -> anyhow::Result<()> {
let temp_dir = tempfile::tempdir()?;
let operating_dir: PathBuf = temp_dir.path().to_owned();
@@ -361,8 +373,14 @@ fn create_exe_works_multi_command_args_handling() -> anyhow::Result<()> {
// Ignored because of -lunwind linker issue on Windows
// see https://github.com/wasmerio/wasmer/issues/3459
#[cfg_attr(target_os = "windows", ignore)]
// #[cfg_attr(target_os = "windows", ignore)]
#[test]
// Test temporarily ignored during the release of 3.2.0-alpha
// because create-exe links to the old libwasmer.a which expects
// MetadataHeader::VERSION == 1, but we want to upgrade to version 2.
//
// https://github.com/wasmerio/wasmer/issues/3513
#[ignore]
fn create_exe_works_multi_command() -> anyhow::Result<()> {
let temp_dir = tempfile::tempdir()?;
let operating_dir: PathBuf = temp_dir.path().to_owned();
@@ -418,8 +436,14 @@ fn create_exe_works_multi_command() -> anyhow::Result<()> {
// Ignored because of -lunwind linker issue on Windows
// see https://github.com/wasmerio/wasmer/issues/3459
#[cfg_attr(target_os = "windows", ignore)]
// #[cfg_attr(target_os = "windows", ignore)]
#[test]
// Test temporarily ignored during the release of 3.2.0-alpha
// because create-exe links to the old libwasmer.a which expects
// MetadataHeader::VERSION == 1, but we want to upgrade to version 2.
//
// https://github.com/wasmerio/wasmer/issues/3513
#[ignore]
fn create_exe_works_with_file() -> anyhow::Result<()> {
let temp_dir = tempfile::tempdir()?;
let operating_dir: PathBuf = temp_dir.path().to_owned();
@@ -483,10 +507,14 @@ fn create_exe_works_with_file() -> anyhow::Result<()> {
// Ignored because of -lunwind linker issue on Windows
// see https://github.com/wasmerio/wasmer/issues/3459
//#[cfg_attr(target_os = "windows", ignore)]
// TODO: fix the cretae_exe with serialized object issue #3481
#[ignore]
#[cfg_attr(target_os = "windows", ignore)]
#[test]
// Test temporarily ignored during the release of 3.2.0-alpha
// because create-exe links to the old libwasmer.a which expects
// MetadataHeader::VERSION == 1, but we want to upgrade to version 2.
//
// https://github.com/wasmerio/wasmer/issues/3513
#[ignore]
fn create_exe_serialized_works() -> anyhow::Result<()> {
let temp_dir = tempfile::tempdir()?;
let operating_dir: PathBuf = temp_dir.path().to_owned();
@@ -669,26 +697,42 @@ fn create_exe_with_object_input(args: Vec<String>) -> anyhow::Result<()> {
// Ignored because of -lunwind linker issue on Windows
// see https://github.com/wasmerio/wasmer/issues/3459
#[cfg_attr(target_os = "windows", ignore)]
// #[cfg_attr(target_os = "windows", ignore)]
#[test]
// Test temporarily ignored during the release of 3.2.0-alpha
// because create-exe links to the old libwasmer.a which expects
// MetadataHeader::VERSION == 1, but we want to upgrade to version 2.
//
// https://github.com/wasmerio/wasmer/issues/3513
#[ignore]
fn create_exe_with_object_input_default() -> anyhow::Result<()> {
create_exe_with_object_input(vec![])
}
// Ignored because of -lunwind linker issue on Windows
// see https://github.com/wasmerio/wasmer/issues/3459
#[cfg_attr(target_os = "windows", ignore)]
// #[cfg_attr(target_os = "windows", ignore)]
#[test]
// Test temporarily ignored during the release of 3.2.0-alpha
// because create-exe links to the old libwasmer.a which expects
// MetadataHeader::VERSION == 1, but we want to upgrade to version 2.
//
// https://github.com/wasmerio/wasmer/issues/3513
#[ignore]
fn create_exe_with_object_input_symbols() -> anyhow::Result<()> {
create_exe_with_object_input(vec!["--object-format".to_string(), "symbols".to_string()])
}
// Ignored because of -lunwind linker issue on Windows
// see https://github.com/wasmerio/wasmer/issues/3459
//#[cfg_attr(target_os = "windows", ignore)]
// TODO: fix the cretae_exe with serialized object issue #3481
#[ignore]
// #[cfg_attr(target_os = "windows", ignore)]
#[test]
// Test temporarily ignored during the release of 3.2.0-alpha
// because create-exe links to the old libwasmer.a which expects
// MetadataHeader::VERSION == 1, but we want to upgrade to version 2.
//
// https://github.com/wasmerio/wasmer/issues/3513
#[ignore]
fn create_exe_with_object_input_serialized() -> anyhow::Result<()> {
create_exe_with_object_input(vec![
"--object-format".to_string(),

View File

@@ -1,6 +1,6 @@
[package]
name = "wasmer-integration-tests-ios"
version = "3.1.0"
version = "3.2.0-alpha.1"
authors = ["Wasmer Engineering Team <engineering@wasmer.io>"]
description = "iOS integration tests"
repository = "https://github.com/wasmerio/wasmer"

View File

@@ -1,6 +1,6 @@
[package]
name = "wasmer-wast"
version = "3.1.0"
version = "3.2.0-alpha.1"
authors = ["Wasmer Engineering Team <engineering@wasmer.io>"]
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 = "=3.1.0", default-features = false }
wasmer-wasi = { path = "../../../lib/wasi", version = "=3.1.0" }
wasmer-vfs = { path = "../../../lib/vfs", version = "=3.1.0" }
wasmer = { path = "../../../lib/api", version = "=3.2.0-alpha.1", default-features = false }
wasmer-wasi = { path = "../../../lib/wasi", version = "=3.2.0-alpha.1" }
wasmer-vfs = { path = "../../../lib/vfs", version = "=3.2.0-alpha.1" }
wast = "38.0"
serde = "1"
tempfile = "3"

View File

@@ -2,6 +2,7 @@ use wasmer::*;
/// Return an instance implementing the "spectest" interface used in the
/// spec testsuite.
#[allow(clippy::print_stdout)]
pub fn spectest_importobject(store: &mut Store) -> Imports {
let print = Function::new_typed(store, || {});
let print_i32 = Function::new_typed(store, |val: i32| println!("{}: i32", val));

View File

@@ -1,6 +1,6 @@
[package]
name = "wasi-test-generator"
version = "3.1.0"
version = "3.2.0-alpha.1"
description = "Tests for our WASI implementation"
license = "MIT"
authors = ["Wasmer Engineering Team <engineering@wasmer.io>"]