From ba10624fe1fc9bb0e9374b7890e52f855653136c Mon Sep 17 00:00:00 2001 From: sydhds Date: Tue, 10 Jan 2023 11:37:45 +0100 Subject: [PATCH 01/55] Remove assert in sse_round_fn and handle case where src2 is in memory --- lib/compiler-singlepass/src/emitter_x64.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/compiler-singlepass/src/emitter_x64.rs b/lib/compiler-singlepass/src/emitter_x64.rs index 38a91689f1c..32a35673414 100644 --- a/lib/compiler-singlepass/src/emitter_x64.rs +++ b/lib/compiler-singlepass/src/emitter_x64.rs @@ -909,11 +909,12 @@ 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); - move_src_to_dst(emitter, precision, src1, dst); + move_src_to_dst(emitter, precision, x, dst); dynasm!(emitter ; $ins Rx((dst as u8)), Rx((dst as u8)), $mode) } - XMMOrMemory::Memory(..) => unreachable!(), + XMMOrMemory::Memory(base, disp) => { + dynasm!(emitter ; $ins Rx((dst as u8)), [Rq((base as u8)) + disp], $mode) + }, } } } From 2d05574590a01247dcd2345ddb07032cafdda58a Mon Sep 17 00:00:00 2001 From: sydhds Date: Tue, 10 Jan 2023 14:40:30 +0100 Subject: [PATCH 02/55] Add if else --- lib/compiler-singlepass/src/emitter_x64.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/compiler-singlepass/src/emitter_x64.rs b/lib/compiler-singlepass/src/emitter_x64.rs index 32a35673414..bcf7af79b1f 100644 --- a/lib/compiler-singlepass/src/emitter_x64.rs +++ b/lib/compiler-singlepass/src/emitter_x64.rs @@ -909,7 +909,11 @@ macro_rules! sse_round_fn { |emitter: &mut AssemblerX64, precision: Precision, src1: XMM, src2: XMMOrMemory, dst: XMM| { match src2 { XMMOrMemory::XMM(x) => { - move_src_to_dst(emitter, precision, x, dst); + if src1 == x { + move_src_to_dst(emitter, precision, x, dst); + } else { + move_src_to_dst(emitter, precision, src1, dst); + } dynasm!(emitter ; $ins Rx((dst as u8)), Rx((dst as u8)), $mode) } XMMOrMemory::Memory(base, disp) => { From bfa1b678db2dc9574ef90f32a2c77fe4d7575789 Mon Sep 17 00:00:00 2001 From: sydhds Date: Tue, 10 Jan 2023 15:33:57 +0100 Subject: [PATCH 03/55] Rework fix when x != dst --- lib/compiler-singlepass/src/emitter_x64.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/compiler-singlepass/src/emitter_x64.rs b/lib/compiler-singlepass/src/emitter_x64.rs index bcf7af79b1f..8a04a45c42d 100644 --- a/lib/compiler-singlepass/src/emitter_x64.rs +++ b/lib/compiler-singlepass/src/emitter_x64.rs @@ -909,12 +909,10 @@ macro_rules! sse_round_fn { |emitter: &mut AssemblerX64, precision: Precision, src1: XMM, src2: XMMOrMemory, dst: XMM| { match src2 { XMMOrMemory::XMM(x) => { - if src1 == x { - move_src_to_dst(emitter, precision, x, dst); - } else { + if x != dst { move_src_to_dst(emitter, precision, src1, dst); } - dynasm!(emitter ; $ins Rx((dst as u8)), Rx((dst as u8)), $mode) + 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) From 1cb29bbfa176bd4451a70be266c19df23c31e5f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=BCtt?= Date: Tue, 17 Jan 2023 10:31:07 +0100 Subject: [PATCH 04/55] Fix feature flags for make-build-wasmer-headless --- lib/cli/Cargo.toml | 2 +- lib/vfs/Cargo.toml | 2 +- lib/wasi/Cargo.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/cli/Cargo.toml b/lib/cli/Cargo.toml index a1960afa947..514c5f67ca3 100644 --- a/lib/cli/Cargo.toml +++ b/lib/cli/Cargo.toml @@ -162,7 +162,7 @@ llvm = [ debug = ["fern", "wasmer-wasi/logging"] disable-all-logging = ["wasmer-wasi/disable-all-logging"] headless = [] -headless-minimal = ["headless", "disable-all-logging", "wasi"] +headless-minimal = ["headless", "disable-all-logging", "wasi", "compiler", "webc_runner", "static-artifact-create"] # Optional enable-serde = [ diff --git a/lib/vfs/Cargo.toml b/lib/vfs/Cargo.toml index cd44f06d4f0..25ce6cc62fe 100644 --- a/lib/vfs/Cargo.toml +++ b/lib/vfs/Cargo.toml @@ -20,7 +20,7 @@ anyhow = { version = "1.0.66", optional = true } default = ["host-fs", "mem-fs", "webc-fs", "static-fs"] host-fs = ["libc"] mem-fs = ["slab"] -webc-fs = ["webc", "anyhow"] +webc-fs = ["webc", "mem-fs", "anyhow"] static-fs = ["webc", "anyhow", "mem-fs"] enable-serde = [ "serde", diff --git a/lib/wasi/Cargo.toml b/lib/wasi/Cargo.toml index b975d874c8b..b7f26f5d85a 100644 --- a/lib/wasi/Cargo.toml +++ b/lib/wasi/Cargo.toml @@ -50,7 +50,7 @@ tracing-wasm = "0.2" default = ["sys-default"] wasix = [] -webc_runner = ["webc", "serde_cbor", "anyhow", "serde", "wasmer/compiler", "wasmer/cranelift"] +webc_runner = ["webc", "serde_cbor", "anyhow", "serde", "wasmer/compiler", "wasmer/cranelift", "wasmer-vfs/webc-fs"] webc_runner_rt_emscripten = ["wasmer-emscripten"] webc_runner_rt_wasi = [] From a674471a8f3a93154915a31029074e963fbb1149 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=BCtt?= <12084016+fschutt@users.noreply.github.com> Date: Tue, 17 Jan 2023 19:39:29 +0100 Subject: [PATCH 05/55] Disable compilers in wasi/Cargo.toml Co-authored-by: Syrus Akbary --- lib/wasi/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/wasi/Cargo.toml b/lib/wasi/Cargo.toml index b7f26f5d85a..9c0f44e65cf 100644 --- a/lib/wasi/Cargo.toml +++ b/lib/wasi/Cargo.toml @@ -50,7 +50,7 @@ tracing-wasm = "0.2" default = ["sys-default"] wasix = [] -webc_runner = ["webc", "serde_cbor", "anyhow", "serde", "wasmer/compiler", "wasmer/cranelift", "wasmer-vfs/webc-fs"] +webc_runner = ["webc", "serde_cbor", "anyhow", "serde", "wasmer-vfs/webc-fs"] webc_runner_rt_emscripten = ["wasmer-emscripten"] webc_runner_rt_wasi = [] From 9091054b21aef6b501d2755dd50fe932c4242c57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=BCtt?= <12084016+fschutt@users.noreply.github.com> Date: Tue, 17 Jan 2023 19:40:17 +0100 Subject: [PATCH 06/55] Disable compiler feature for headless-minimal again. Co-authored-by: Syrus Akbary --- lib/cli/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cli/Cargo.toml b/lib/cli/Cargo.toml index 514c5f67ca3..9fb50a1fb8d 100644 --- a/lib/cli/Cargo.toml +++ b/lib/cli/Cargo.toml @@ -162,7 +162,7 @@ llvm = [ debug = ["fern", "wasmer-wasi/logging"] disable-all-logging = ["wasmer-wasi/disable-all-logging"] headless = [] -headless-minimal = ["headless", "disable-all-logging", "wasi", "compiler", "webc_runner", "static-artifact-create"] +headless-minimal = ["headless", "disable-all-logging", "wasi", "webc_runner", "static-artifact-create"] # Optional enable-serde = [ From 71fdf26e089a12378cc2d032608f4a91c1fdcf69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=BCtt?= Date: Tue, 17 Jan 2023 20:22:40 +0100 Subject: [PATCH 07/55] Remove dependency on wasmer/compiler from webc-runner --- lib/wasi/Cargo.toml | 6 ++++++ lib/wasi/src/runners/emscripten.rs | 20 +++++++++++++++++--- lib/wasi/src/runners/wasi.rs | 18 +++++++++++++++--- 3 files changed, 38 insertions(+), 6 deletions(-) diff --git a/lib/wasi/Cargo.toml b/lib/wasi/Cargo.toml index 9c0f44e65cf..2a15355d3c2 100644 --- a/lib/wasi/Cargo.toml +++ b/lib/wasi/Cargo.toml @@ -53,6 +53,12 @@ wasix = [] webc_runner = ["webc", "serde_cbor", "anyhow", "serde", "wasmer-vfs/webc-fs"] webc_runner_rt_emscripten = ["wasmer-emscripten"] webc_runner_rt_wasi = [] +emscripten_cranelift = ["wasmer/cranelift"] +wasi_cranelift = ["wasmer/cranelift"] +emscripten_singlepass = ["wasmer/singlepass"] +wasi_singlepass = ["wasmer/singlepass"] +emscripten_llvm = ["wasmer/llvm"] +wasi_llvm = ["wasmer/llvm"] sys = ["wasmer/sys", "wasix", "wasmer-wasi-types/sys"] sys-default = ["wasmer/wat", "wasmer/compiler", "sys", "logging", "host-fs", "sys-poll", "host-vnet" ] diff --git a/lib/wasi/src/runners/emscripten.rs b/lib/wasi/src/runners/emscripten.rs index cbfb5ce0051..acf6df06edf 100644 --- a/lib/wasi/src/runners/emscripten.rs +++ b/lib/wasi/src/runners/emscripten.rs @@ -6,7 +6,7 @@ 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, @@ -33,6 +33,7 @@ impl crate::runners::Runner for EmscriptenRunner { .starts_with("https://webc.org/runner/emscripten")) } + #[allow(unreachable_code)] fn run_command( &mut self, command_name: &str, @@ -43,8 +44,21 @@ 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); + #[cfg(feature = "emscripten_cranelift")] + let mut store = Store::new(wasmer::Cranelift::default()); + #[cfg(feature = "emscripten_llvm")] + let mut store = Store::new(wasmer::Llvm::default()); + #[cfg(feature = "emscripten_singlepass")] + let mut store = Store::new(wasmer::Singlepass::default()); + #[cfg(not(any( + feature = "emscripten_cranelift", + feature = "emscripten_llvm", + feature = "emscripten_singlepass" + )))] + let mut store = { + return Err(anyhow::anyhow!("wasmer-wasi needs one of emscripten_cranelift or emscripten_llvm or emscripten_singlepass features enabled").into()); + }; + let mut module = Module::new(&store, atom_bytes)?; module.set_name(&atom_name); diff --git a/lib/wasi/src/runners/wasi.rs b/lib/wasi/src/runners/wasi.rs index d73ee69c7e7..8dfd9c5da2b 100644 --- a/lib/wasi/src/runners/wasi.rs +++ b/lib/wasi/src/runners/wasi.rs @@ -7,7 +7,7 @@ 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}; @@ -42,8 +42,20 @@ 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); + #[cfg(feature = "wasi_cranelift")] + let mut store = Store::new(wasmer::Cranelift::default()); + #[cfg(feature = "wasi_llvm")] + let mut store = Store::new(wasmer::Llvm::default()); + #[cfg(feature = "wasi_singlepass")] + let mut store = Store::new(wasmer::Singlepass::default()); + #[cfg(not(any( + feature = "wasi_cranelift", + feature = "wasi_llvm", + feature = "wasi_singlepass" + )))] + let mut store = { + return Err(anyhow::anyhow!("wasmer-wasi needs one of wasi_cranelift or wasi_llvm or wasi_singlepass features enabled").into()); + }; let mut module = Module::new(&store, atom_bytes)?; module.set_name(&atom_name); From 8715e221e7b5c783b40ead24439262f614e675d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=BCtt?= Date: Tue, 17 Jan 2023 20:39:35 +0100 Subject: [PATCH 08/55] Allow unused variables --- lib/wasi/src/runners/emscripten.rs | 2 +- lib/wasi/src/runners/wasi.rs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/wasi/src/runners/emscripten.rs b/lib/wasi/src/runners/emscripten.rs index acf6df06edf..9dd6fa4af01 100644 --- a/lib/wasi/src/runners/emscripten.rs +++ b/lib/wasi/src/runners/emscripten.rs @@ -33,7 +33,7 @@ impl crate::runners::Runner for EmscriptenRunner { .starts_with("https://webc.org/runner/emscripten")) } - #[allow(unreachable_code)] + #[allow(unreachable_code, unused_variables)] fn run_command( &mut self, command_name: &str, diff --git a/lib/wasi/src/runners/wasi.rs b/lib/wasi/src/runners/wasi.rs index 8dfd9c5da2b..7a36179846d 100644 --- a/lib/wasi/src/runners/wasi.rs +++ b/lib/wasi/src/runners/wasi.rs @@ -33,6 +33,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, From 1ca0de826d51854daac85d6f920ad16214335aaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=BCtt?= Date: Tue, 17 Jan 2023 20:51:27 +0100 Subject: [PATCH 09/55] Minimize dependencies of wasmer-headless build --- lib/cli/Cargo.toml | 2 +- lib/cli/src/commands/create_obj.rs | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/cli/Cargo.toml b/lib/cli/Cargo.toml index 9fb50a1fb8d..bf19710af7f 100644 --- a/lib/cli/Cargo.toml +++ b/lib/cli/Cargo.toml @@ -162,7 +162,7 @@ llvm = [ debug = ["fern", "wasmer-wasi/logging"] disable-all-logging = ["wasmer-wasi/disable-all-logging"] headless = [] -headless-minimal = ["headless", "disable-all-logging", "wasi", "webc_runner", "static-artifact-create"] +headless-minimal = ["headless", "disable-all-logging", "wasi", "webc", "static-artifact-create"] # Optional enable-serde = [ diff --git a/lib/cli/src/commands/create_obj.rs b/lib/cli/src/commands/create_obj.rs index b369590984d..1f715ff1fdf 100644 --- a/lib/cli/src/commands/create_obj.rs +++ b/lib/cli/src/commands/create_obj.rs @@ -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 { @@ -99,7 +96,7 @@ impl CreateObj { println!("Format: {:?}", object_format); let atoms = - if let Ok(pirita) = WebCMmap::parse(input_path.clone(), &ParseOptions::default()) { + 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, From 0678e90cbdf034637e4d2f89ec78b8c8801d4138 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=BCtt?= Date: Tue, 17 Jan 2023 21:02:44 +0100 Subject: [PATCH 10/55] Fix headless-minimal properly --- lib/cli/Cargo.toml | 2 +- lib/cli/src/cli.rs | 9 ++--- lib/cli/src/commands.rs | 10 +++--- lib/cli/src/commands/create_exe.rs | 5 +-- lib/cli/src/commands/create_obj.rs | 53 ++++++++++++++-------------- lib/cli/src/commands/gen_c_header.rs | 6 ++-- lib/cli/src/commands/init.rs | 4 +-- lib/cli/src/common.rs | 4 +++ 8 files changed, 47 insertions(+), 46 deletions(-) diff --git a/lib/cli/Cargo.toml b/lib/cli/Cargo.toml index bf19710af7f..a1960afa947 100644 --- a/lib/cli/Cargo.toml +++ b/lib/cli/Cargo.toml @@ -162,7 +162,7 @@ llvm = [ debug = ["fern", "wasmer-wasi/logging"] disable-all-logging = ["wasmer-wasi/disable-all-logging"] headless = [] -headless-minimal = ["headless", "disable-all-logging", "wasi", "webc", "static-artifact-create"] +headless-minimal = ["headless", "disable-all-logging", "wasi"] # Optional enable-serde = [ diff --git a/lib/cli/src/cli.rs b/lib/cli/src/cli.rs index be137ce53a0..5b65f312951 100644 --- a/lib/cli/src/cli.rs +++ b/lib/cli/src/cli.rs @@ -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(), diff --git a/lib/cli/src/commands.rs b/lib/cli/src/commands.rs index a70d8d42db2..fa241435f1b 100644 --- a/lib/cli/src/commands.rs +++ b/lib/cli/src/commands.rs @@ -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, diff --git a/lib/cli/src/commands/create_exe.rs b/lib/cli/src/commands/create_exe.rs index c804aa86823..84f1db388fc 100644 --- a/lib/cli/src/commands/create_exe.rs +++ b/lib/cli/src/commands/create_exe.rs @@ -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; @@ -1319,10 +1320,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( diff --git a/lib/cli/src/commands/create_obj.rs b/lib/cli/src/commands/create_obj.rs index 1f715ff1fdf..15f5a5c041c 100644 --- a/lib/cli/src/commands/create_obj.rs +++ b/lib/cli/src/commands/create_obj.rs @@ -70,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); @@ -95,31 +95,32 @@ impl CreateObj { println!("Target: {}", target.triple()); println!("Format: {:?}", object_format); - 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, - &self.compiler, - &self.cpu_features, - &target_triple, - object_format, - &prefix, - crate::commands::AllowMultiWasm::Reject(self.atom.clone()), - self.debug_dir.is_some(), - ) - } else { - crate::commands::create_exe::prepare_directory_from_single_wasm_file( - &input_path, - &output_directory_path, - &self.compiler, - &target_triple, - &self.cpu_features, - object_format, - &prefix, - self.debug_dir.is_some(), - ) - }?; + 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, + &self.compiler, + &self.cpu_features, + &target_triple, + object_format, + &prefix, + crate::commands::AllowMultiWasm::Reject(self.atom.clone()), + self.debug_dir.is_some(), + ) + } else { + crate::commands::create_exe::prepare_directory_from_single_wasm_file( + &input_path, + &output_directory_path, + &self.compiler, + &target_triple, + &self.cpu_features, + object_format, + &prefix, + self.debug_dir.is_some(), + ) + }?; // Copy output files into target path, depending on whether // there are one or many files being compiled diff --git a/lib/cli/src/commands/gen_c_header.rs b/lib/cli/src/commands/gen_c_header.rs index 4ddff10d8b2..2a309af21a6 100644 --- a/lib/cli/src/commands/gen_c_header.rs +++ b/lib/cli/src/commands/gen_c_header.rs @@ -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}")) diff --git a/lib/cli/src/commands/init.rs b/lib/cli/src/commands/init.rs index f6b1fb89e83..584c7764d3b 100644 --- a/lib/cli/src/commands/init.rs +++ b/lib/cli/src/commands/init.rs @@ -428,8 +428,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()) diff --git a/lib/cli/src/common.rs b/lib/cli/src/common.rs index 81af03197cd..a06ded1fd19 100644 --- a/lib/cli/src/common.rs +++ b/lib/cli/src/common.rs @@ -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() +} From e2755b71078ffb9103561762474b2b295e6c02c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=BCtt?= Date: Tue, 17 Jan 2023 20:04:29 +0100 Subject: [PATCH 11/55] Fix make lint --- lib/api/src/sys/imports.rs | 1 + lib/api/src/sys/instance.rs | 2 ++ lib/api/src/sys/module.rs | 1 + lib/c-api/src/wasm_c_api/engine.rs | 10 ++++---- lib/cli/src/commands/create_exe.rs | 10 ++++---- lib/cli/src/commands/init.rs | 4 +-- lib/cli/src/commands/publish.rs | 4 +-- lib/cli/src/commands/run.rs | 2 +- lib/compiler-llvm/src/abi/aarch64_systemv.rs | 13 +++------- lib/compiler-llvm/src/abi/x86_64_systemv.rs | 13 +++------- lib/compiler-llvm/src/translator/code.rs | 1 + lib/compiler-singlepass/src/arm64_decl.rs | 3 ++- lib/compiler-singlepass/src/codegen.rs | 4 +-- lib/compiler-singlepass/src/emitter_arm64.rs | 26 ++++++++++++++------ lib/compiler-singlepass/src/machine_arm64.rs | 2 ++ lib/compiler/src/engine/artifact.rs | 3 +++ lib/compiler/src/engine/resolver.rs | 1 + lib/compiler/src/engine/tunables.rs | 3 +++ lib/emscripten/src/syscalls/mod.rs | 1 + lib/vbus/src/lib.rs | 2 +- lib/vm/src/vmcontext.rs | 4 +-- lib/wasi/src/runtime.rs | 7 +++--- lib/wasi/src/state/mod.rs | 12 ++++----- lib/wasi/src/syscalls/mod.rs | 3 +-- 24 files changed, 74 insertions(+), 58 deletions(-) diff --git a/lib/api/src/sys/imports.rs b/lib/api/src/sys/imports.rs index a08d1b6adad..fd753c40ff9 100644 --- a/lib/api/src/sys/imports.rs +++ b/lib/api/src/sys/imports.rs @@ -174,6 +174,7 @@ impl Imports { /// Resolve and return a vector of imports in the order they are defined in the `module`'s source code. /// /// This means the returned `Vec` might be a subset of the imports contained in `self`. + #[allow(clippy::result_large_err)] pub fn imports_for_module(&self, module: &Module) -> Result, LinkError> { let mut ret = vec![]; for import in module.imports() { diff --git a/lib/api/src/sys/instance.rs b/lib/api/src/sys/instance.rs index 4e0d90d3f18..877749ca789 100644 --- a/lib/api/src/sys/instance.rs +++ b/lib/api/src/sys/instance.rs @@ -111,6 +111,7 @@ impl Instance { /// Those are, as defined by the spec: /// * Link errors that happen when plugging the imports into the instance /// * Runtime errors that happen when running the module `start` function. + #[allow(clippy::result_large_err)] pub fn new( store: &mut impl AsStoreMut, module: &Module, @@ -158,6 +159,7 @@ impl Instance { /// Those are, as defined by the spec: /// * Link errors that happen when plugging the imports into the instance /// * Runtime errors that happen when running the module `start` function. + #[allow(clippy::result_large_err)] pub fn new_by_index( store: &mut impl AsStoreMut, module: &Module, diff --git a/lib/api/src/sys/module.rs b/lib/api/src/sys/module.rs index 9d49179265e..a83f5f10f04 100644 --- a/lib/api/src/sys/module.rs +++ b/lib/api/src/sys/module.rs @@ -311,6 +311,7 @@ impl Module { } } + #[allow(clippy::result_large_err)] #[cfg(feature = "compiler")] pub(crate) fn instantiate( &self, diff --git a/lib/c-api/src/wasm_c_api/engine.rs b/lib/c-api/src/wasm_c_api/engine.rs index 0c69c78db56..0cb0a54d615 100644 --- a/lib/c-api/src/wasm_c_api/engine.rs +++ b/lib/c-api/src/wasm_c_api/engine.rs @@ -117,7 +117,7 @@ pub struct wasm_config_t { /// cbindgen:ignore #[no_mangle] pub extern "C" fn wasm_config_new() -> Box { - Box::new(wasm_config_t::default()) + Box::::default() } /// Delete a Wasmer config object. @@ -256,11 +256,11 @@ use wasmer_api::CompilerConfig; fn get_default_compiler_config() -> Box { cfg_if! { if #[cfg(feature = "cranelift")] { - Box::new(wasmer_compiler_cranelift::Cranelift::default()) + Box::::default() } else if #[cfg(feature = "llvm")] { - Box::new(wasmer_compiler_llvm::LLVM::default()) + Box::::default() } else if #[cfg(feature = "singlepass")] { - Box::new(wasmer_compiler_singlepass::Singlepass::default()) + Box::::default() } else { compile_error!("Please enable one of the compiler backends") } @@ -368,7 +368,7 @@ pub extern "C" fn wasm_engine_new_with_config( wasmer_compiler_t::CRANELIFT => { cfg_if! { if #[cfg(feature = "cranelift")] { - Box::new(wasmer_compiler_cranelift::Cranelift::default()) + Box::::default() } else { return return_with_error("Wasmer has not been compiled with the `cranelift` feature."); } diff --git a/lib/cli/src/commands/create_exe.rs b/lib/cli/src/commands/create_exe.rs index 84f1db388fc..9f75d8deb2f 100644 --- a/lib/cli/src/commands/create_exe.rs +++ b/lib/cli/src/commands/create_exe.rs @@ -867,7 +867,7 @@ fn write_volume_obj( object_name, )?; - let mut writer = BufWriter::new(File::create(&output_path)?); + let mut writer = BufWriter::new(File::create(output_path)?); volumes_object .write_stream(&mut writer) .map_err(|err| anyhow::anyhow!(err.to_string()))?; @@ -1050,7 +1050,7 @@ pub(crate) fn create_header_files_in_dir( &ModuleMetadataSymbolRegistry { prefix: prefix.clone(), }, - metadata_length as usize, + metadata_length, ); std::fs::write(&header_file_path, &header_file_src).map_err(|e| { @@ -1195,7 +1195,7 @@ fn link_exe_from_dir( .as_ref() .ok_or_else(|| anyhow::anyhow!("could not find zig in $PATH {}", directory.display()))?; - let mut cmd = Command::new(&zig_binary_path); + let mut cmd = Command::new(zig_binary_path); cmd.arg("build-exe"); cmd.arg("--verbose-cc"); cmd.arg("--verbose-link"); @@ -1872,7 +1872,7 @@ pub(super) mod utils { let path_var = std::env::var("PATH").unwrap_or_default(); #[cfg(unix)] let system_path_var = std::process::Command::new("getconf") - .args(&["PATH"]) + .args(["PATH"]) .output() .map(|output| output.stdout) .unwrap_or_default(); @@ -2265,7 +2265,7 @@ mod http_fetch { pub(crate) fn list_dir(target: &Path) -> Vec { use walkdir::WalkDir; - WalkDir::new(&target) + WalkDir::new(target) .into_iter() .filter_map(|e| e.ok()) .map(|entry| entry.path().to_path_buf()) diff --git a/lib/cli/src/commands/init.rs b/lib/cli/src/commands/init.rs index 584c7764d3b..b31f7ec14dd 100644 --- a/lib/cli/src/commands/init.rs +++ b/lib/cli/src/commands/init.rs @@ -160,7 +160,7 @@ impl Init { .collect::>() .join(NEWLINE); - std::fs::write(&path, &toml_string) + std::fs::write(path, &toml_string) .with_context(|| format!("Unable to write to \"{}\"", path.display()))?; Ok(()) @@ -493,7 +493,7 @@ fn construct_manifest( } fn parse_cargo_toml(manifest_path: &PathBuf) -> Result { let mut metadata = MetadataCommand::new(); - metadata.manifest_path(&manifest_path); + metadata.manifest_path(manifest_path); metadata.no_deps(); metadata.features(CargoOpt::AllFeatures); diff --git a/lib/cli/src/commands/publish.rs b/lib/cli/src/commands/publish.rs index 889a39f1457..7f2136cd17a 100644 --- a/lib/cli/src/commands/publish.rs +++ b/lib/cli/src/commands/publish.rs @@ -247,7 +247,7 @@ fn append_path_to_tar_gz( .metadata() .map_err(|e| (normalized_path.clone(), e))?; builder - .append_path_with_name(&normalized_path, &target_path) + .append_path_with_name(&normalized_path, target_path) .map_err(|e| (normalized_path.clone(), e))?; Ok(normalized_path) } @@ -386,7 +386,7 @@ fn apply_migration(conn: &mut Connection, migration_number: i32) -> Result<(), M tx.execute_batch(migration_to_apply) .map_err(|e| MigrationError::TransactionFailed(migration_number, format!("{}", e)))?; - tx.pragma_update(None, "user_version", &(migration_number + 1)) + tx.pragma_update(None, "user_version", (migration_number + 1)) .map_err(|e| MigrationError::TransactionFailed(migration_number, format!("{}", e)))?; tx.commit() .map_err(|_| MigrationError::CommitFailed(migration_number)) diff --git a/lib/cli/src/commands/run.rs b/lib/cli/src/commands/run.rs index e3c968ebd6b..b53c5644475 100644 --- a/lib/cli/src/commands/run.rs +++ b/lib/cli/src/commands/run.rs @@ -124,7 +124,7 @@ impl RunWithPathBuf { let default = HashMap::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); + let real_dir = self_clone.path.join(real_dir); if !real_dir.exists() { #[cfg(feature = "debug")] if self_clone.debug { diff --git a/lib/compiler-llvm/src/abi/aarch64_systemv.rs b/lib/compiler-llvm/src/abi/aarch64_systemv.rs index 8bcb65a008c..63069de8a22 100644 --- a/lib/compiler-llvm/src/abi/aarch64_systemv.rs +++ b/lib/compiler-llvm/src/abi/aarch64_systemv.rs @@ -21,19 +21,14 @@ impl Abi for Aarch64SystemV { // Given a function definition, retrieve the parameter that is the vmctx pointer. fn get_vmctx_ptr_param<'ctx>(&self, func_value: &FunctionValue<'ctx>) -> PointerValue<'ctx> { func_value - .get_nth_param( - if func_value + .get_nth_param(u32::from( + func_value .get_enum_attribute( AttributeLoc::Param(0), Attribute::get_named_enum_kind_id("sret"), ) - .is_some() - { - 1 - } else { - 0 - }, - ) + .is_some(), + )) .unwrap() .into_pointer_value() } diff --git a/lib/compiler-llvm/src/abi/x86_64_systemv.rs b/lib/compiler-llvm/src/abi/x86_64_systemv.rs index 7075193080a..2e444d078a0 100644 --- a/lib/compiler-llvm/src/abi/x86_64_systemv.rs +++ b/lib/compiler-llvm/src/abi/x86_64_systemv.rs @@ -23,19 +23,14 @@ impl Abi for X86_64SystemV { // Given a function definition, retrieve the parameter that is the vmctx pointer. fn get_vmctx_ptr_param<'ctx>(&self, func_value: &FunctionValue<'ctx>) -> PointerValue<'ctx> { func_value - .get_nth_param( - if func_value + .get_nth_param(u32::from( + func_value .get_enum_attribute( AttributeLoc::Param(0), Attribute::get_named_enum_kind_id("sret"), ) - .is_some() - { - 1 - } else { - 0 - }, - ) + .is_some(), + )) .unwrap() .into_pointer_value() } diff --git a/lib/compiler-llvm/src/translator/code.rs b/lib/compiler-llvm/src/translator/code.rs index 8bdd065532c..8d35957c9de 100644 --- a/lib/compiler-llvm/src/translator/code.rs +++ b/lib/compiler-llvm/src/translator/code.rs @@ -1048,6 +1048,7 @@ impl<'ctx, 'a> LLVMFunctionCodeGenerator<'ctx, 'a> { Ok(()) } + #[allow(clippy::unnecessary_cast)] fn resolve_memory_ptr( &mut self, memory_index: MemoryIndex, diff --git a/lib/compiler-singlepass/src/arm64_decl.rs b/lib/compiler-singlepass/src/arm64_decl.rs index b810cfa763c..1bcf54c20f8 100644 --- a/lib/compiler-singlepass/src/arm64_decl.rs +++ b/lib/compiler-singlepass/src/arm64_decl.rs @@ -8,6 +8,7 @@ use std::slice::Iter; use wasmer_types::{CallingConvention, Type}; /// General-purpose registers. +#[allow(clippy::upper_case_acronyms)] #[repr(u8)] #[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] pub enum GPR { @@ -48,7 +49,7 @@ pub enum GPR { /// NEON registers. #[repr(u8)] #[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] -#[allow(dead_code)] +#[allow(dead_code, clippy::upper_case_acronyms)] pub enum NEON { V0 = 0, V1 = 1, diff --git a/lib/compiler-singlepass/src/codegen.rs b/lib/compiler-singlepass/src/codegen.rs index 9b24e3be68f..c9ab5760d45 100644 --- a/lib/compiler-singlepass/src/codegen.rs +++ b/lib/compiler-singlepass/src/codegen.rs @@ -1143,7 +1143,7 @@ impl<'a, M: Machine> FuncGen<'a, M> { let fsm = FunctionStateMap::new( machine.new_machine_state(), - local_func_index.index() as usize, + local_func_index.index(), 32, (0..local_types.len()) .map(|_| WasmAbstractValue::Runtime) @@ -6057,7 +6057,7 @@ impl<'a, M: Machine> FuncGen<'a, M> { .emit_call_register(this.machine.get_grp_for_call()) }, // [vmctx, func_index] -> funcref - iter::once(Location::Imm32(function_index as u32)), + iter::once(Location::Imm32(function_index)), iter::once(WpType::I64), )?; diff --git a/lib/compiler-singlepass/src/emitter_arm64.rs b/lib/compiler-singlepass/src/emitter_arm64.rs index 948fe793ced..104d7787c9b 100644 --- a/lib/compiler-singlepass/src/emitter_arm64.rs +++ b/lib/compiler-singlepass/src/emitter_arm64.rs @@ -805,6 +805,7 @@ impl EmitterARM64 for Assembler { } Ok(()) } + #[allow(clippy::unnecessary_cast)] fn emit_ldria( &mut self, sz: Size, @@ -849,6 +850,7 @@ impl EmitterARM64 for Assembler { } Ok(()) } + #[allow(clippy::unnecessary_cast)] fn emit_ldpia( &mut self, sz: Size, @@ -1248,9 +1250,9 @@ impl EmitterARM64 for Assembler { (Size::S64, Location::Imm64(val), Location::GPR(dst)) => { let dst = dst.into_index() as u32; if val < 0x1000 { - dynasm!(self ; mov W(dst), val as u64); + dynasm!(self ; mov W(dst), val); } else if encode_logical_immediate_64bit(val as _).is_some() { - dynasm!(self ; orr X(dst), xzr, val as u64); + dynasm!(self ; orr X(dst), xzr, val); } else { codegen_error!("singleplasse can't emit MOV S64 {}, {:?}", val, dst); } @@ -1594,6 +1596,7 @@ impl EmitterARM64 for Assembler { } Ok(()) } + #[allow(clippy::unnecessary_cast)] fn emit_add_lsl( &mut self, sz: Size, @@ -1621,6 +1624,7 @@ impl EmitterARM64 for Assembler { Ok(()) } + #[allow(clippy::unnecessary_cast)] fn emit_cmp(&mut self, sz: Size, src: Location, dst: Location) -> Result<(), CompileError> { match (sz, src, dst) { (Size::S64, Location::GPR(src), Location::GPR(dst)) => { @@ -1642,7 +1646,7 @@ impl EmitterARM64 for Assembler { if imm >= 0x1000 { codegen_error!("singlepass CMP with imm too large {}", imm); } - dynasm!(self ; cmp X(dst), imm as u32); + dynasm!(self ; cmp X(dst), imm); } (Size::S64, Location::Imm64(imm), Location::GPR(dst)) => { let dst = dst.into_index() as u32; @@ -1683,10 +1687,10 @@ impl EmitterARM64 for Assembler { } (Size::S64, Location::Imm64(imm), Location::GPR(dst)) => { let dst = dst.into_index() as u32; - if encode_logical_immediate_64bit(imm as u64).is_none() { + if encode_logical_immediate_64bit(imm).is_none() { codegen_error!("singlepass TST with incompatible imm {}", imm); } - dynasm!(self ; tst X(dst), imm as u64); + dynasm!(self ; tst X(dst), imm); } (Size::S32, Location::GPR(src), Location::GPR(dst)) => { let src = src.into_index() as u32; @@ -1724,7 +1728,6 @@ impl EmitterARM64 for Assembler { if imm > 63 { codegen_error!("singlepass LSL with incompatible imm {}", imm); } - let imm = imm as u32; let dst = dst.into_index() as u32; dynasm!(self ; lsl X(dst), X(src1), imm); } @@ -1768,7 +1771,7 @@ impl EmitterARM64 for Assembler { if imm > 31 { codegen_error!("singlepass LSL with incompatible imm {}", imm); } - dynasm!(self ; lsl W(dst), W(src1), imm as u32); + dynasm!(self ; lsl W(dst), W(src1), imm); } _ => codegen_error!( "singlepass can't emit LSL {:?} {:?} {:?} {:?}", @@ -1780,6 +1783,7 @@ impl EmitterARM64 for Assembler { } Ok(()) } + #[allow(clippy::unnecessary_cast)] fn emit_asr( &mut self, sz: Size, @@ -1843,7 +1847,7 @@ impl EmitterARM64 for Assembler { if imm == 0 || imm > 31 { codegen_error!("singlepass ASR with incompatible imm {}", imm); } - dynasm!(self ; asr W(dst), W(src1), imm as u32); + dynasm!(self ; asr W(dst), W(src1), imm); } _ => codegen_error!( "singlepass can't emit ASR {:?} {:?} {:?} {:?}", @@ -1855,6 +1859,7 @@ impl EmitterARM64 for Assembler { } Ok(()) } + #[allow(clippy::unnecessary_cast)] fn emit_lsr( &mut self, sz: Size, @@ -1930,6 +1935,7 @@ impl EmitterARM64 for Assembler { } Ok(()) } + #[allow(clippy::unnecessary_cast)] fn emit_ror( &mut self, sz: Size, @@ -1998,6 +2004,7 @@ impl EmitterARM64 for Assembler { Ok(()) } + #[allow(clippy::unnecessary_cast)] fn emit_or( &mut self, sz: Size, @@ -2046,6 +2053,7 @@ impl EmitterARM64 for Assembler { } Ok(()) } + #[allow(clippy::unnecessary_cast)] fn emit_and( &mut self, sz: Size, @@ -2094,6 +2102,7 @@ impl EmitterARM64 for Assembler { } Ok(()) } + #[allow(clippy::unnecessary_cast)] fn emit_eor( &mut self, sz: Size, @@ -3209,6 +3218,7 @@ impl EmitterARM64 for Assembler { } } +#[allow(clippy::unnecessary_cast)] pub fn gen_std_trampoline_arm64( sig: &FunctionType, calling_convention: CallingConvention, diff --git a/lib/compiler-singlepass/src/machine_arm64.rs b/lib/compiler-singlepass/src/machine_arm64.rs index b07e0f46ed9..4788e50618a 100644 --- a/lib/compiler-singlepass/src/machine_arm64.rs +++ b/lib/compiler-singlepass/src/machine_arm64.rs @@ -168,6 +168,7 @@ impl MachineARM64 { } } + #[allow(clippy::unnecessary_cast)] fn location_to_reg( &mut self, sz: Size, @@ -320,6 +321,7 @@ impl MachineARM64 { _ => codegen_error!("singlepass can't emit location_to_reg {:?} {:?}", sz, src), } } + #[allow(clippy::unnecessary_cast)] fn location_to_neon( &mut self, sz: Size, diff --git a/lib/compiler/src/engine/artifact.rs b/lib/compiler/src/engine/artifact.rs index b9ac9029227..a0c6d9bb1ea 100644 --- a/lib/compiler/src/engine/artifact.rs +++ b/lib/compiler/src/engine/artifact.rs @@ -300,6 +300,7 @@ impl Artifact { } /// Do preinstantiation logic that is executed before instantiating + #[allow(clippy::result_large_err)] pub fn preinstantiate(&self) -> Result<(), InstantiationError> { Ok(()) } @@ -309,6 +310,7 @@ impl Artifact { /// # Safety /// /// See [`InstanceHandle::new`]. + #[allow(clippy::result_large_err)] pub unsafe fn instantiate( &self, tunables: &dyn Tunables, @@ -389,6 +391,7 @@ impl Artifact { /// # Safety /// /// See [`InstanceHandle::finish_instantiation`]. + #[allow(clippy::result_large_err)] pub unsafe fn finish_instantiation( &self, trap_handler: Option<*const TrapHandlerFn<'static>>, diff --git a/lib/compiler/src/engine/resolver.rs b/lib/compiler/src/engine/resolver.rs index 9fac5fc0aec..e4699370bd0 100644 --- a/lib/compiler/src/engine/resolver.rs +++ b/lib/compiler/src/engine/resolver.rs @@ -60,6 +60,7 @@ fn get_runtime_size(context: &StoreObjects, extern_: &VMExtern) -> Option { /// a `Resolver`. /// /// If all imports are satisfied returns an `Imports` instance required for a module instantiation. +#[allow(clippy::result_large_err)] pub fn resolve_imports( module: &ModuleInfo, imports: &[VMExtern], diff --git a/lib/compiler/src/engine/tunables.rs b/lib/compiler/src/engine/tunables.rs index 9eab1ce85f1..12b16ea563b 100644 --- a/lib/compiler/src/engine/tunables.rs +++ b/lib/compiler/src/engine/tunables.rs @@ -65,6 +65,7 @@ pub trait Tunables { /// /// # Safety /// - `memory_definition_locations` must point to a valid locations in VM memory. + #[allow(clippy::result_large_err)] unsafe fn create_memories( &self, context: &mut StoreObjects, @@ -98,6 +99,7 @@ pub trait Tunables { /// # Safety /// /// To be done + #[allow(clippy::result_large_err)] unsafe fn create_tables( &self, context: &mut StoreObjects, @@ -128,6 +130,7 @@ pub trait Tunables { /// Allocate memory for just the globals of the current module, /// with initializers applied. + #[allow(clippy::result_large_err)] fn create_globals( &self, context: &mut StoreObjects, diff --git a/lib/emscripten/src/syscalls/mod.rs b/lib/emscripten/src/syscalls/mod.rs index 42ce7b1ece4..41ba7761c69 100644 --- a/lib/emscripten/src/syscalls/mod.rs +++ b/lib/emscripten/src/syscalls/mod.rs @@ -405,6 +405,7 @@ pub fn ___syscall192(mut ctx: FunctionEnvMut, _which: c_int, mut varargs: } /// lseek +#[allow(clippy::unnecessary_cast)] pub fn ___syscall140(ctx: FunctionEnvMut, _which: i32, mut varargs: VarArgs) -> i32 { // -> c_int debug!("emscripten::___syscall140 (lseek) {}", _which); diff --git a/lib/vbus/src/lib.rs b/lib/vbus/src/lib.rs index e51ec11ffac..0b6696d64ff 100644 --- a/lib/vbus/src/lib.rs +++ b/lib/vbus/src/lib.rs @@ -285,7 +285,7 @@ pub struct UnsupportedVirtualBus {} impl VirtualBus for UnsupportedVirtualBus { fn new_spawn(&self) -> SpawnOptions { - SpawnOptions::new(Box::new(UnsupportedVirtualBusSpawner::default())) + SpawnOptions::new(Box::::default()) } fn listen(&self) -> Result> { diff --git a/lib/vm/src/vmcontext.rs b/lib/vm/src/vmcontext.rs index f87df89c471..d682f53d554 100644 --- a/lib/vm/src/vmcontext.rs +++ b/lib/vm/src/vmcontext.rs @@ -404,7 +404,7 @@ pub(crate) unsafe fn memory32_atomic_check32( let dst = mem.base.offset(dst) as *mut u32; let atomic_dst = AtomicPtr::new(dst); let read_val = *atomic_dst.load(Ordering::Acquire); - let ret = if read_val == val { 0 } else { 1 }; + let ret = u32::from(read_val != val); Ok(ret) } @@ -435,7 +435,7 @@ pub(crate) unsafe fn memory32_atomic_check64( let dst = mem.base.offset(dst) as *mut u64; let atomic_dst = AtomicPtr::new(dst); let read_val = *atomic_dst.load(Ordering::Acquire); - let ret = if read_val == val { 0 } else { 1 }; + let ret = u32::from(read_val != val); Ok(ret) } diff --git a/lib/wasi/src/runtime.rs b/lib/wasi/src/runtime.rs index 1394e010b8a..6b6893a77b8 100644 --- a/lib/wasi/src/runtime.rs +++ b/lib/wasi/src/runtime.rs @@ -123,14 +123,15 @@ impl PluggableRuntimeImplementation { } } +#[allow(clippy::derivable_impls)] impl Default for PluggableRuntimeImplementation { fn default() -> Self { Self { #[cfg(not(feature = "host-vnet"))] - networking: Box::new(wasmer_vnet::UnsupportedVirtualNetworking::default()), + networking: Box::::default(), #[cfg(feature = "host-vnet")] - networking: Box::new(wasmer_wasi_local_networking::LocalNetworking::default()), - bus: Box::new(UnsupportedVirtualBus::default()), + networking: Box::::default(), + bus: Box::::default(), thread_id_seed: Default::default(), } } diff --git a/lib/wasi/src/state/mod.rs b/lib/wasi/src/state/mod.rs index 69f83ee548e..0715d645bde 100644 --- a/lib/wasi/src/state/mod.rs +++ b/lib/wasi/src/state/mod.rs @@ -356,11 +356,11 @@ pub struct WasiFs { pub(crate) fn default_fs_backing() -> Box { cfg_if::cfg_if! { if #[cfg(feature = "host-fs")] { - Box::new(wasmer_vfs::host_fs::FileSystem::default()) + Box::::default() } else if #[cfg(feature = "mem-fs")] { - Box::new(wasmer_vfs::mem_fs::FileSystem::default()) + Box::::default() } else { - Box::new(FallbackFileSystem::default()) + Box::::default() } } } @@ -1550,7 +1550,7 @@ impl WasiFs { fn create_stdout(&self, inodes: &mut WasiInodes) { self.create_std_dev_inner( inodes, - Box::new(Stdout::default()), + Box::::default(), "stdout", __WASI_STDOUT_FILENO, STDOUT_DEFAULT_RIGHTS, @@ -1560,7 +1560,7 @@ impl WasiFs { fn create_stdin(&self, inodes: &mut WasiInodes) { self.create_std_dev_inner( inodes, - Box::new(Stdin::default()), + Box::::default(), "stdin", __WASI_STDIN_FILENO, STDIN_DEFAULT_RIGHTS, @@ -1570,7 +1570,7 @@ impl WasiFs { fn create_stderr(&self, inodes: &mut WasiInodes) { self.create_std_dev_inner( inodes, - Box::new(Stderr::default()), + Box::::default(), "stderr", __WASI_STDERR_FILENO, STDERR_DEFAULT_RIGHTS, diff --git a/lib/wasi/src/syscalls/mod.rs b/lib/wasi/src/syscalls/mod.rs index ebf755d920a..01328a25ad3 100644 --- a/lib/wasi/src/syscalls/mod.rs +++ b/lib/wasi/src/syscalls/mod.rs @@ -877,8 +877,7 @@ pub fn fd_pread( Kind::File { handle, .. } => { if let Some(h) = handle { wasi_try_ok!( - h.seek(std::io::SeekFrom::Start(offset as u64)) - .map_err(map_io_err), + h.seek(std::io::SeekFrom::Start(offset)).map_err(map_io_err), env ); wasi_try_ok!(read_bytes(h, &memory, iovs), env) From 912f21ab03ab3534c917348a902b525e8f7cbce1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=BCtt?= Date: Tue, 17 Jan 2023 21:23:07 +0100 Subject: [PATCH 12/55] Fix make lint --- lib/c-api/src/wasm_c_api/wasi/mod.rs | 4 ++-- lib/cache/src/hash.rs | 2 +- lib/cli/build.rs | 2 +- lib/cli/src/commands/publish.rs | 2 +- lib/emscripten/src/env/mod.rs | 4 ++-- lib/registry/src/lib.rs | 4 ++-- lib/vfs/src/webc_fs.rs | 3 ++- lib/wasi/src/lib.rs | 4 ++-- lib/wasi/src/state/pipe.rs | 4 ++-- lib/wasi/src/syscalls/mod.rs | 6 ++++-- tests/lib/test-generator/src/lib.rs | 3 +-- tests/lib/wast/src/wast.rs | 2 +- tests/wasi-wast/src/wasitests.rs | 4 ++-- 13 files changed, 23 insertions(+), 21 deletions(-) diff --git a/lib/c-api/src/wasm_c_api/wasi/mod.rs b/lib/c-api/src/wasm_c_api/wasi/mod.rs index 1f3354d0a77..fb7395e1e49 100644 --- a/lib/c-api/src/wasm_c_api/wasi/mod.rs +++ b/lib/c-api/src/wasm_c_api/wasi/mod.rs @@ -342,7 +342,7 @@ pub unsafe extern "C" fn wasi_env_read_stdout( buffer: *mut c_char, buffer_len: usize, ) -> isize { - let inner_buffer = slice::from_raw_parts_mut(buffer as *mut _, buffer_len as usize); + let inner_buffer = slice::from_raw_parts_mut(buffer as *mut _, buffer_len); let mut store_mut = env.store.store_mut(); let state = env.inner.data_mut(&mut store_mut).state(); @@ -365,7 +365,7 @@ pub unsafe extern "C" fn wasi_env_read_stderr( buffer: *mut c_char, buffer_len: usize, ) -> isize { - let inner_buffer = slice::from_raw_parts_mut(buffer as *mut _, buffer_len as usize); + let inner_buffer = slice::from_raw_parts_mut(buffer as *mut _, buffer_len); let mut store_mut = env.store.store_mut(); let state = env.inner.data_mut(&mut store_mut).state(); if let Ok(mut stderr) = state.stderr() { diff --git a/lib/cache/src/hash.rs b/lib/cache/src/hash.rs index 29e7fa7ce65..2a4b6fb7b5a 100644 --- a/lib/cache/src/hash.rs +++ b/lib/cache/src/hash.rs @@ -31,7 +31,7 @@ impl ToString for Hash { /// Create the hexadecimal representation of the /// stored hash. fn to_string(&self) -> String { - hex::encode(&self.to_array()) + hex::encode(self.to_array()) } } diff --git a/lib/cli/build.rs b/lib/cli/build.rs index f9aecaaf01c..4444630121c 100644 --- a/lib/cli/build.rs +++ b/lib/cli/build.rs @@ -4,7 +4,7 @@ use std::process::Command; pub fn main() { // Set WASMER_GIT_HASH let git_hash = Command::new("git") - .args(&["rev-parse", "HEAD"]) + .args(["rev-parse", "HEAD"]) .output() .ok() .and_then(|output| String::from_utf8(output.stdout).ok()) diff --git a/lib/cli/src/commands/publish.rs b/lib/cli/src/commands/publish.rs index 7f2136cd17a..0c6756de48a 100644 --- a/lib/cli/src/commands/publish.rs +++ b/lib/cli/src/commands/publish.rs @@ -386,7 +386,7 @@ fn apply_migration(conn: &mut Connection, migration_number: i32) -> Result<(), M tx.execute_batch(migration_to_apply) .map_err(|e| MigrationError::TransactionFailed(migration_number, format!("{}", e)))?; - tx.pragma_update(None, "user_version", (migration_number + 1)) + tx.pragma_update(None, "user_version", migration_number + 1) .map_err(|e| MigrationError::TransactionFailed(migration_number, format!("{}", e)))?; tx.commit() .map_err(|_| MigrationError::CommitFailed(migration_number)) diff --git a/lib/emscripten/src/env/mod.rs b/lib/emscripten/src/env/mod.rs index a560a416912..03e05fb7417 100644 --- a/lib/emscripten/src/env/mod.rs +++ b/lib/emscripten/src/env/mod.rs @@ -79,9 +79,9 @@ pub fn ___build_environment(mut ctx: FunctionEnvMut, environ: c_int) { let environment = emscripten_memory_pointer!(memory.view(&ctx), environ) as *mut c_int; let (mut pool_offset, env_ptr, mut pool_ptr) = unsafe { let (pool_offset, _pool_slice): (u32, &mut [u8]) = - allocate_on_stack(&mut ctx, TOTAL_ENV_SIZE as u32); + allocate_on_stack(&mut ctx, TOTAL_ENV_SIZE); let (env_offset, _env_slice): (u32, &mut [u8]) = - allocate_on_stack(&mut ctx, (MAX_ENV_VALUES * 4) as u32); + allocate_on_stack(&mut ctx, MAX_ENV_VALUES * 4); let env_ptr = emscripten_memory_pointer!(memory.view(&ctx), env_offset) as *mut c_int; let pool_ptr = emscripten_memory_pointer!(memory.view(&ctx), pool_offset) as *mut u8; *env_ptr = pool_offset as i32; diff --git a/lib/registry/src/lib.rs b/lib/registry/src/lib.rs index bb6f6a162c8..d1300bdfbb4 100644 --- a/lib/registry/src/lib.rs +++ b/lib/registry/src/lib.rs @@ -418,7 +418,7 @@ pub fn try_unpack_targz>( let target_targz_path = target_targz_path.as_ref(); let target_path = target_path.as_ref(); let open_file = || { - std::fs::File::open(&target_targz_path) + std::fs::File::open(target_targz_path) .map_err(|e| anyhow::anyhow!("failed to open {}: {e}", target_targz_path.display())) }; @@ -860,7 +860,7 @@ fn get_bytes( } if let Some(path) = stream_response_into.as_ref() { - let mut file = std::fs::File::create(&path).map_err(|e| { + let mut file = std::fs::File::create(path).map_err(|e| { anyhow::anyhow!("failed to download {url} into {}: {e}", path.display()) })?; diff --git a/lib/vfs/src/webc_fs.rs b/lib/vfs/src/webc_fs.rs index 34402356357..6b6d467cb8c 100644 --- a/lib/vfs/src/webc_fs.rs +++ b/lib/vfs/src/webc_fs.rs @@ -66,7 +66,8 @@ where ) -> Result, FsError> { match get_volume_name_opt(path) { Some(volume) => { - let file = (*self.webc) + let file = self + .webc .volumes .get(&volume) .ok_or(FsError::EntityNotFound)? diff --git a/lib/wasi/src/lib.rs b/lib/wasi/src/lib.rs index 79a518c6fff..340a5d63745 100644 --- a/lib/wasi/src/lib.rs +++ b/lib/wasi/src/lib.rs @@ -102,7 +102,7 @@ impl From for WasiThreadId { } impl From for u32 { fn from(t: WasiThreadId) -> u32 { - t.0 as u32 + t.0 } } @@ -117,7 +117,7 @@ impl From for WasiBusProcessId { } impl From for u32 { fn from(id: WasiBusProcessId) -> u32 { - id.0 as u32 + id.0 } } diff --git a/lib/wasi/src/state/pipe.rs b/lib/wasi/src/state/pipe.rs index 4781ab0a02f..d91f6a108d5 100644 --- a/lib/wasi/src/state/pipe.rs +++ b/lib/wasi/src/state/pipe.rs @@ -50,7 +50,7 @@ impl WasiPipe { let buf_len = buf.len(); if buf_len > 0 { let reader = buf.as_ref(); - let read = read_bytes(reader, memory, iov).map(|_| buf_len as usize)?; + let read = read_bytes(reader, memory, iov).map(|_| buf_len)?; buf.advance(read); return Ok(read); } @@ -101,7 +101,7 @@ impl Read for WasiPipe { let buf_len = inner_buf.len(); if buf_len > 0 { let mut reader = inner_buf.as_ref(); - let read = reader.read(buf).map(|_| buf_len as usize)?; + let read = reader.read(buf).map(|_| buf_len)?; inner_buf.advance(read); return Ok(read); } diff --git a/lib/wasi/src/syscalls/mod.rs b/lib/wasi/src/syscalls/mod.rs index 01328a25ad3..d69eaca8543 100644 --- a/lib/wasi/src/syscalls/mod.rs +++ b/lib/wasi/src/syscalls/mod.rs @@ -998,6 +998,7 @@ pub fn fd_prestat_dir_name( /// Output: /// - `u32 *nwritten` /// Number of bytes written +#[allow(clippy::unnecessary_cast)] pub fn fd_pwrite( ctx: FunctionEnvMut<'_, WasiEnv>, fd: WasiFd, @@ -2781,7 +2782,7 @@ pub fn path_rename( // implements the logic of "I'm not actually a file, I'll try to be as needed". let result = if let Some(h) = handle { drop(guard); - state.fs_rename(&source_path, &host_adjusted_target_path) + state.fs_rename(source_path, &host_adjusted_target_path) } else { let path_clone = path.clone(); drop(guard); @@ -3594,6 +3595,7 @@ pub fn thread_spawn( /// ## Parameters /// /// * `duration` - Amount of time that the thread should sleep +#[allow(clippy::unnecessary_cast)] pub fn thread_sleep( ctx: FunctionEnvMut<'_, WasiEnv>, duration: Timestamp, @@ -5462,7 +5464,7 @@ pub unsafe fn sock_send_file( { let mut fd_map = state.fs.fd_map.write().unwrap(); let fd_entry = wasi_try_ok!(fd_map.get_mut(&in_fd).ok_or(Errno::Badf)); - fd_entry.offset = offset as u64; + fd_entry.offset = offset; } // Enter a loop that will process all the data diff --git a/tests/lib/test-generator/src/lib.rs b/tests/lib/test-generator/src/lib.rs index e3256e3c264..b1e4a16e09c 100644 --- a/tests/lib/test-generator/src/lib.rs +++ b/tests/lib/test-generator/src/lib.rs @@ -85,8 +85,7 @@ pub fn extract_name(path: impl AsRef) -> String { .expect("filename should have a stem") .to_str() .expect("filename should be representable as a string") - .replace('-', "_") - .replace('/', "_") + .replace(['-', '/'], "_") } pub fn with_test_module( diff --git a/tests/lib/wast/src/wast.rs b/tests/lib/wast/src/wast.rs index 50bc02b3883..80b02adc276 100644 --- a/tests/lib/wast/src/wast.rs +++ b/tests/lib/wast/src/wast.rs @@ -437,7 +437,7 @@ impl Wast { // Checks if the `assert_unlinkable` message matches the expected one fn matches_message_assert_unlinkable(expected: &str, actual: &str) -> bool { - actual.contains(&expected) + actual.contains(expected) } // Checks if the `assert_invalid` message matches the expected one diff --git a/tests/wasi-wast/src/wasitests.rs b/tests/wasi-wast/src/wasitests.rs index 2a204d8a587..d01d048c13e 100644 --- a/tests/wasi-wast/src/wasitests.rs +++ b/tests/wasi-wast/src/wasitests.rs @@ -124,7 +124,7 @@ fn compile_wasm_for_version( ) -> io::Result { //let out_dir = base_dir; //base_dir.join("..").join(version.get_directory_name()); if !out_dir.exists() { - fs::create_dir(&out_dir)?; + fs::create_dir(out_dir)?; } let wasm_out_name = { let mut wasm_out_name = out_dir.join(rs_mod_name); @@ -134,7 +134,7 @@ fn compile_wasm_for_version( println!("Reading contents from file `{}`", file); let file_contents: String = { let mut fc = String::new(); - let mut f = fs::OpenOptions::new().read(true).open(&file)?; + let mut f = fs::OpenOptions::new().read(true).open(file)?; f.read_to_string(&mut fc)?; fc }; From 8183474d109c9fc3c358fa146477e038abe9e3e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=BCtt?= Date: Tue, 17 Jan 2023 21:38:25 +0100 Subject: [PATCH 13/55] Adjust feature flags --- Cargo.toml | 8 ++++---- lib/c-api/Cargo.toml | 6 ++++++ lib/cli/Cargo.toml | 2 +- lib/wasi-experimental-io-devices/Cargo.toml | 2 +- tests/lib/wast/Cargo.toml | 2 +- 5 files changed, 13 insertions(+), 7 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 25dbdf20a83..ef50a99fad6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -100,16 +100,16 @@ engine = ["universal"] universal = [] cache = ["wasmer-cache"] wast = ["wasmer-wast"] -wasi = ["wasmer-wasi"] +wasi = ["wasmer-wasi", "wasmer-wasi/emscripten_cranelift", "wasmer-wasi/wasi_cranelift"] emscripten = ["wasmer-emscripten"] wat = ["wasmer/wat"] compiler = [ "wasmer/compiler", "wasmer-compiler/translator", ] -singlepass = ["wasmer-compiler-singlepass", "compiler"] -cranelift = ["wasmer-compiler-cranelift", "compiler"] -llvm = ["wasmer-compiler-llvm", "compiler"] +singlepass = ["wasmer-compiler-singlepass", "compiler", "wasmer-wasi/emscripten_singlepass", "wasmer-wasi/wasi_singlepass"] +cranelift = ["wasmer-compiler-cranelift", "compiler", "wasmer-wasi/emscripten_cranelift", "wasmer-wasi/wasi_cranelift"] +llvm = ["wasmer-compiler-llvm", "compiler", "wasmer-wasi/emscripten_llvm", "wasmer-wasi/wasi_llvm"] middlewares = ["wasmer-middlewares"] wasmer-artifact-load = ["wasmer-compiler/wasmer-artifact-load"] wasmer-artifact-create = ["wasmer-compiler/wasmer-artifact-create"] diff --git a/lib/c-api/Cargo.toml b/lib/c-api/Cargo.toml index 6f5190fa317..a10090903b5 100644 --- a/lib/c-api/Cargo.toml +++ b/lib/c-api/Cargo.toml @@ -78,14 +78,20 @@ compiler-headless = [ ] singlepass = [ "wasmer-compiler-singlepass", + "wasmer-wasi/emscripten_singlepass", + "wasmer-wasi/wasi_singlepass", "compiler", ] cranelift = [ "wasmer-compiler-cranelift", + "wasmer-wasi/emscripten_cranelift", + "wasmer-wasi/wasi_cranelift", "compiler", ] llvm = [ "wasmer-compiler-llvm", + "wasmer-wasi/emscripten_llvm", + "wasmer-wasi/wasi_llvm", "compiler", ] wasmer-artifact-load = ["wasmer-compiler/wasmer-artifact-load"] diff --git a/lib/cli/Cargo.toml b/lib/cli/Cargo.toml index a1960afa947..6be7a2f305e 100644 --- a/lib/cli/Cargo.toml +++ b/lib/cli/Cargo.toml @@ -32,7 +32,7 @@ wasmer-compiler-singlepass = { version = "=3.1.0", path = "../compiler-singlepas 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 = { version = "=3.1.0", path = "../wasi", features = ["emscripten_cranelift", "wasi_cranelift"], 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 } diff --git a/lib/wasi-experimental-io-devices/Cargo.toml b/lib/wasi-experimental-io-devices/Cargo.toml index 2d867fe0f22..30f91dfd45f 100644 --- a/lib/wasi-experimental-io-devices/Cargo.toml +++ b/lib/wasi-experimental-io-devices/Cargo.toml @@ -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.1.0", path = "../wasi", default-features=false, features = ["emscripten_cranelift", "wasi_cranelift"] } tracing = "0.1" minifb = { version = "0.23", optional = true } nix = "0.25.0" diff --git a/tests/lib/wast/Cargo.toml b/tests/lib/wast/Cargo.toml index 4d9507ae097..5ed6c8a7242 100644 --- a/tests/lib/wast/Cargo.toml +++ b/tests/lib/wast/Cargo.toml @@ -13,7 +13,7 @@ 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-wasi = { path = "../../../lib/wasi", version = "=3.1.0", features = ["emscripten_cranelift", "wasi_cranelift"] } wasmer-vfs = { path = "../../../lib/vfs", version = "=3.1.0" } wast = "38.0" serde = "1" From a483d047de82c89a295d3fbf7ce813dfdea1ed32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=BCtt?= Date: Wed, 18 Jan 2023 10:45:12 +0100 Subject: [PATCH 14/55] Address review comments --- Cargo.toml | 8 ++++---- lib/c-api/Cargo.toml | 6 ------ lib/cli/Cargo.toml | 2 +- lib/cli/src/commands/run.rs | 3 +++ lib/wasi-experimental-io-devices/Cargo.toml | 2 +- lib/wasi/Cargo.toml | 6 ------ lib/wasi/src/runners/emscripten.rs | 18 ++---------------- lib/wasi/src/runners/wasi.rs | 17 ++--------------- tests/lib/wast/Cargo.toml | 2 +- tests/lib/wast/src/spectest.rs | 1 + 10 files changed, 15 insertions(+), 50 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index ef50a99fad6..25dbdf20a83 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -100,16 +100,16 @@ engine = ["universal"] universal = [] cache = ["wasmer-cache"] wast = ["wasmer-wast"] -wasi = ["wasmer-wasi", "wasmer-wasi/emscripten_cranelift", "wasmer-wasi/wasi_cranelift"] +wasi = ["wasmer-wasi"] emscripten = ["wasmer-emscripten"] wat = ["wasmer/wat"] compiler = [ "wasmer/compiler", "wasmer-compiler/translator", ] -singlepass = ["wasmer-compiler-singlepass", "compiler", "wasmer-wasi/emscripten_singlepass", "wasmer-wasi/wasi_singlepass"] -cranelift = ["wasmer-compiler-cranelift", "compiler", "wasmer-wasi/emscripten_cranelift", "wasmer-wasi/wasi_cranelift"] -llvm = ["wasmer-compiler-llvm", "compiler", "wasmer-wasi/emscripten_llvm", "wasmer-wasi/wasi_llvm"] +singlepass = ["wasmer-compiler-singlepass", "compiler"] +cranelift = ["wasmer-compiler-cranelift", "compiler"] +llvm = ["wasmer-compiler-llvm", "compiler"] middlewares = ["wasmer-middlewares"] wasmer-artifact-load = ["wasmer-compiler/wasmer-artifact-load"] wasmer-artifact-create = ["wasmer-compiler/wasmer-artifact-create"] diff --git a/lib/c-api/Cargo.toml b/lib/c-api/Cargo.toml index a10090903b5..6f5190fa317 100644 --- a/lib/c-api/Cargo.toml +++ b/lib/c-api/Cargo.toml @@ -78,20 +78,14 @@ compiler-headless = [ ] singlepass = [ "wasmer-compiler-singlepass", - "wasmer-wasi/emscripten_singlepass", - "wasmer-wasi/wasi_singlepass", "compiler", ] cranelift = [ "wasmer-compiler-cranelift", - "wasmer-wasi/emscripten_cranelift", - "wasmer-wasi/wasi_cranelift", "compiler", ] llvm = [ "wasmer-compiler-llvm", - "wasmer-wasi/emscripten_llvm", - "wasmer-wasi/wasi_llvm", "compiler", ] wasmer-artifact-load = ["wasmer-compiler/wasmer-artifact-load"] diff --git a/lib/cli/Cargo.toml b/lib/cli/Cargo.toml index 6be7a2f305e..a1960afa947 100644 --- a/lib/cli/Cargo.toml +++ b/lib/cli/Cargo.toml @@ -32,7 +32,7 @@ wasmer-compiler-singlepass = { version = "=3.1.0", path = "../compiler-singlepas 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", features = ["emscripten_cranelift", "wasi_cranelift"], optional = true } +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 } diff --git a/lib/cli/src/commands/run.rs b/lib/cli/src/commands/run.rs index b53c5644475..337158aa344 100644 --- a/lib/cli/src/commands/run.rs +++ b/lib/cli/src/commands/run.rs @@ -1,3 +1,4 @@ +#[cfg(feature = "cache")] use crate::common::get_cache_dir; #[cfg(feature = "debug")] use crate::logging; @@ -10,7 +11,9 @@ 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")] diff --git a/lib/wasi-experimental-io-devices/Cargo.toml b/lib/wasi-experimental-io-devices/Cargo.toml index 30f91dfd45f..2d867fe0f22 100644 --- a/lib/wasi-experimental-io-devices/Cargo.toml +++ b/lib/wasi-experimental-io-devices/Cargo.toml @@ -14,7 +14,7 @@ edition = "2018" maintenance = { status = "experimental" } [dependencies] -wasmer-wasi = { version = "=3.1.0", path = "../wasi", default-features=false, features = ["emscripten_cranelift", "wasi_cranelift"] } +wasmer-wasi = { version = "=3.1.0", path = "../wasi", default-features=false } tracing = "0.1" minifb = { version = "0.23", optional = true } nix = "0.25.0" diff --git a/lib/wasi/Cargo.toml b/lib/wasi/Cargo.toml index 2a15355d3c2..9c0f44e65cf 100644 --- a/lib/wasi/Cargo.toml +++ b/lib/wasi/Cargo.toml @@ -53,12 +53,6 @@ wasix = [] webc_runner = ["webc", "serde_cbor", "anyhow", "serde", "wasmer-vfs/webc-fs"] webc_runner_rt_emscripten = ["wasmer-emscripten"] webc_runner_rt_wasi = [] -emscripten_cranelift = ["wasmer/cranelift"] -wasi_cranelift = ["wasmer/cranelift"] -emscripten_singlepass = ["wasmer/singlepass"] -wasi_singlepass = ["wasmer/singlepass"] -emscripten_llvm = ["wasmer/llvm"] -wasi_llvm = ["wasmer/llvm"] sys = ["wasmer/sys", "wasix", "wasmer-wasi-types/sys"] sys-default = ["wasmer/wat", "wasmer/compiler", "sys", "logging", "host-fs", "sys-poll", "host-vnet" ] diff --git a/lib/wasi/src/runners/emscripten.rs b/lib/wasi/src/runners/emscripten.rs index 9dd6fa4af01..bcad14b0f10 100644 --- a/lib/wasi/src/runners/emscripten.rs +++ b/lib/wasi/src/runners/emscripten.rs @@ -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; @@ -44,21 +44,7 @@ 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)?; - #[cfg(feature = "emscripten_cranelift")] - let mut store = Store::new(wasmer::Cranelift::default()); - #[cfg(feature = "emscripten_llvm")] - let mut store = Store::new(wasmer::Llvm::default()); - #[cfg(feature = "emscripten_singlepass")] - let mut store = Store::new(wasmer::Singlepass::default()); - #[cfg(not(any( - feature = "emscripten_cranelift", - feature = "emscripten_llvm", - feature = "emscripten_singlepass" - )))] - let mut store = { - return Err(anyhow::anyhow!("wasmer-wasi needs one of emscripten_cranelift or emscripten_llvm or emscripten_singlepass features enabled").into()); - }; - + let mut store = Store::default(); let mut module = Module::new(&store, atom_bytes)?; module.set_name(&atom_name); diff --git a/lib/wasi/src/runners/wasi.rs b/lib/wasi/src/runners/wasi.rs index 7a36179846d..4925b59864b 100644 --- a/lib/wasi/src/runners/wasi.rs +++ b/lib/wasi/src/runners/wasi.rs @@ -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; @@ -43,20 +43,7 @@ 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)?; - #[cfg(feature = "wasi_cranelift")] - let mut store = Store::new(wasmer::Cranelift::default()); - #[cfg(feature = "wasi_llvm")] - let mut store = Store::new(wasmer::Llvm::default()); - #[cfg(feature = "wasi_singlepass")] - let mut store = Store::new(wasmer::Singlepass::default()); - #[cfg(not(any( - feature = "wasi_cranelift", - feature = "wasi_llvm", - feature = "wasi_singlepass" - )))] - let mut store = { - return Err(anyhow::anyhow!("wasmer-wasi needs one of wasi_cranelift or wasi_llvm or wasi_singlepass features enabled").into()); - }; + let mut store = Store::default(); let mut module = Module::new(&store, atom_bytes)?; module.set_name(&atom_name); diff --git a/tests/lib/wast/Cargo.toml b/tests/lib/wast/Cargo.toml index 5ed6c8a7242..4d9507ae097 100644 --- a/tests/lib/wast/Cargo.toml +++ b/tests/lib/wast/Cargo.toml @@ -13,7 +13,7 @@ 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", features = ["emscripten_cranelift", "wasi_cranelift"] } +wasmer-wasi = { path = "../../../lib/wasi", version = "=3.1.0" } wasmer-vfs = { path = "../../../lib/vfs", version = "=3.1.0" } wast = "38.0" serde = "1" diff --git a/tests/lib/wast/src/spectest.rs b/tests/lib/wast/src/spectest.rs index b4d44938491..7eda1b643b4 100644 --- a/tests/lib/wast/src/spectest.rs +++ b/tests/lib/wast/src/spectest.rs @@ -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)); From a70a4922ad7d82ebabcfefc74f20cd161f08f1b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=BCtt?= Date: Wed, 18 Jan 2023 12:21:16 +0100 Subject: [PATCH 15/55] Fix feature flags and misleading error message --- lib/api/src/sys/store.rs | 27 +++++++++++++-------------- lib/cli/Cargo.toml | 3 +++ lib/compiler/src/engine/inner.rs | 2 +- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/lib/api/src/sys/store.rs b/lib/api/src/sys/store.rs index 032b6c60d23..04d94e6ca62 100644 --- a/lib/api/src/sys/store.rs +++ b/lib/api/src/sys/store.rs @@ -66,6 +66,13 @@ impl Store { } } + /// Creates a new headless `Store` without any compilers enabled that can + /// be used to execute `Module`s, but not compile them. + #[cfg(feature = "compiler")] + pub fn headless() -> Self { + Self::new(EngineBuilder::headless().engine()) + } + #[cfg(feature = "compiler")] #[deprecated( since = "3.0.0", @@ -173,21 +180,13 @@ impl Default for Store { #[allow(unreachable_code, unused_mut)] 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"))] - { - let config = get_config(); - EngineBuilder::new(Box::new(config) as Box) - .engine() - } else { - EngineBuilder::headless() - .engine() - } - } + if #[cfg(any(feature = "cranelift", feature = "llvm", feature = "singlepass"))] + { + let config = get_config(); + EngineBuilder::new(Box::new(config) as Box) + .engine() } else { - compile_error!("No default engine chosen") + compile_error!("No compiler [cranelift, llvm, singlepass] enabled, use Store::headless() instead of Store::default() for a headless engine") } } } diff --git a/lib/cli/Cargo.toml b/lib/cli/Cargo.toml index a1960afa947..f58df9798a8 100644 --- a/lib/cli/Cargo.toml +++ b/lib/cli/Cargo.toml @@ -149,14 +149,17 @@ experimental-io-devices = [ ] singlepass = [ "wasmer-compiler-singlepass", + "wasmer/singlepass", "compiler", ] cranelift = [ "wasmer-compiler-cranelift", + "wasmer/cranelift", "compiler", ] llvm = [ "wasmer-compiler-llvm", + "wasmer/llvm", "compiler", ] debug = ["fern", "wasmer-wasi/logging"] diff --git a/lib/compiler/src/engine/inner.rs b/lib/compiler/src/engine/inner.rs index 0347b87b729..3abe6f6cd0e 100644 --- a/lib/compiler/src/engine/inner.rs +++ b/lib/compiler/src/engine/inner.rs @@ -267,7 +267,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), } From 9c052489ffcc5a83e60a2220c08234e2c8322ea9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=BCtt?= Date: Wed, 18 Jan 2023 12:28:21 +0100 Subject: [PATCH 16/55] Revert changes to Store::default and remove Store::headless again --- lib/api/src/sys/store.rs | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/api/src/sys/store.rs b/lib/api/src/sys/store.rs index 04d94e6ca62..bb90e7de06f 100644 --- a/lib/api/src/sys/store.rs +++ b/lib/api/src/sys/store.rs @@ -66,13 +66,6 @@ impl Store { } } - /// Creates a new headless `Store` without any compilers enabled that can - /// be used to execute `Module`s, but not compile them. - #[cfg(feature = "compiler")] - pub fn headless() -> Self { - Self::new(EngineBuilder::headless().engine()) - } - #[cfg(feature = "compiler")] #[deprecated( since = "3.0.0", @@ -180,11 +173,18 @@ impl Default for Store { #[allow(unreachable_code, unused_mut)] fn get_engine() -> Engine { cfg_if::cfg_if! { - if #[cfg(any(feature = "cranelift", feature = "llvm", feature = "singlepass"))] - { - let config = get_config(); - EngineBuilder::new(Box::new(config) as Box) - .engine() + if #[cfg(feature = "compiler")] { + cfg_if::cfg_if! { + if #[cfg(any(feature = "cranelift", feature = "llvm", feature = "singlepass"))] + { + let config = get_config(); + EngineBuilder::new(Box::new(config) as Box) + .engine() + } else { + EngineBuilder::headless() + .engine() + } + } } else { compile_error!("No compiler [cranelift, llvm, singlepass] enabled, use Store::headless() instead of Store::default() for a headless engine") } From 639b56fe70b3dfe3dce4a463f95ed31ba271c400 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=BCtt?= Date: Wed, 18 Jan 2023 12:42:14 +0100 Subject: [PATCH 17/55] Update wasmer-toml version --- Cargo.lock | 6 ++++-- lib/cli/Cargo.toml | 3 ++- lib/cli/src/commands/init.rs | 3 ++- lib/cli/src/commands/publish.rs | 2 +- lib/cli/src/commands/run.rs | 3 +-- lib/registry/Cargo.toml | 2 +- 6 files changed, 11 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 742a1f4b0b1..fc933c28285 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4324,6 +4324,7 @@ dependencies = [ "flate2", "hex", "http_req", + "indexmap", "isatty", "libc", "log", @@ -4608,11 +4609,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", diff --git a/lib/cli/Cargo.toml b/lib/cli/Cargo.toml index a1960afa947..49d4fad8aa8 100644 --- a/lib/cli/Cargo.toml +++ b/lib/cli/Cargo.toml @@ -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" diff --git a/lib/cli/src/commands/init.rs b/lib/cli/src/commands/init.rs index f6b1fb89e83..2d925e8fa1d 100644 --- a/lib/cli/src/commands/init.rs +++ b/lib/cli/src/commands/init.rs @@ -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> { + fn get_filesystem_mapping(include: &[String]) -> Option> { if include.is_empty() { return None; } diff --git a/lib/cli/src/commands/publish.rs b/lib/cli/src/commands/publish.rs index 889a39f1457..145092bc472 100644 --- a/lib/cli/src/commands/publish.rs +++ b/lib/cli/src/commands/publish.rs @@ -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(|_| { diff --git a/lib/cli/src/commands/run.rs b/lib/cli/src/commands/run.rs index e3c968ebd6b..285ade969e6 100644 --- a/lib/cli/src/commands/run.rs +++ b/lib/cli/src/commands/run.rs @@ -7,7 +7,6 @@ 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; use std::str::FromStr; @@ -121,7 +120,7 @@ impl RunWithPathBuf { #[cfg(feature = "wasi")] { - let default = HashMap::default(); + 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); diff --git a/lib/registry/Cargo.toml b/lib/registry/Cargo.toml index a6608da9da6..ce3523aec21 100644 --- a/lib/registry/Cargo.toml +++ b/lib/registry/Cargo.toml @@ -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" From 70080236783b909e9e883aefcc49fa02a64887e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=BCtt?= Date: Wed, 18 Jan 2023 12:53:13 +0100 Subject: [PATCH 18/55] Fix make lint --- lib/cli/src/store.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cli/src/store.rs b/lib/cli/src/store.rs index 49b897c7bc3..87da6d5bd9b 100644 --- a/lib/cli/src/store.rs +++ b/lib/cli/src/store.rs @@ -152,7 +152,7 @@ impl CompilerOptions { use std::fs::File; use std::io::Write; use wasmer_compiler_llvm::{ - CompiledKind, InkwellMemoryBuffer, InkwellModule, LLVMCallbacks, LLVM, + CompiledKind, InkwellMemoryBuffer, InkwellModule, LLVMCallbacks, }; use wasmer_types::entity::EntityRef; let mut config = LLVM::new(); From caeca9a7a82739152e4a9a4d724dc7ce1a080133 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=BCtt?= <12084016+fschutt@users.noreply.github.com> Date: Wed, 18 Jan 2023 15:33:36 +0100 Subject: [PATCH 19/55] Revert error message text --- lib/api/src/sys/store.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/api/src/sys/store.rs b/lib/api/src/sys/store.rs index bb90e7de06f..6f7cf6ac9fd 100644 --- a/lib/api/src/sys/store.rs +++ b/lib/api/src/sys/store.rs @@ -186,7 +186,7 @@ impl Default for Store { } } } else { - compile_error!("No compiler [cranelift, llvm, singlepass] enabled, use Store::headless() instead of Store::default() for a headless engine") + compile_error!("No default engine chosen") } } } From 8d3e7c0dadc638cec97265415a46c32f035ae073 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=BCtt?= Date: Wed, 18 Jan 2023 16:02:26 +0100 Subject: [PATCH 20/55] Refactor WasiRunner / EmscriptenRunner to take a Store as an argument --- lib/cli/Cargo.toml | 3 --- lib/cli/src/commands/run.rs | 5 +++-- lib/wasi/src/runners/emscripten.rs | 31 ++++++++++++++++++++----- lib/wasi/src/runners/wasi.rs | 36 +++++++++++++++++++++++++----- 4 files changed, 60 insertions(+), 15 deletions(-) diff --git a/lib/cli/Cargo.toml b/lib/cli/Cargo.toml index f58df9798a8..a1960afa947 100644 --- a/lib/cli/Cargo.toml +++ b/lib/cli/Cargo.toml @@ -149,17 +149,14 @@ experimental-io-devices = [ ] singlepass = [ "wasmer-compiler-singlepass", - "wasmer/singlepass", "compiler", ] cranelift = [ "wasmer-compiler-cranelift", - "wasmer/cranelift", "compiler", ] llvm = [ "wasmer-compiler-llvm", - "wasmer/llvm", "compiler", ] debug = ["fern", "wasmer-wasi/logging"] diff --git a/lib/cli/src/commands/run.rs b/lib/cli/src/commands/run.rs index 337158aa344..5764c1e887c 100644 --- a/lib/cli/src/commands/run.rs +++ b/lib/cli/src/commands/run.rs @@ -352,7 +352,7 @@ impl RunWithPathBuf { return r; } - let mut runner = wasmer_wasi::runners::wasi::WasiRunner::default(); + let mut runner = wasmer_wasi::runners::wasi::WasiRunner::new(Store::default()); runner.set_args(args.to_vec()); result = Some(if id.is_empty() { runner.run(&container).map_err(|e| format!("{e}")) @@ -367,7 +367,8 @@ impl RunWithPathBuf { return r; } - let mut runner = wasmer_wasi::runners::emscripten::EmscriptenRunner::default(); + let mut runner = + wasmer_wasi::runners::emscripten::EmscriptenRunner::new(Store::default()); runner.set_args(args.to_vec()); result = Some(if id.is_empty() { runner.run(&container).map_err(|e| format!("{e}")) diff --git a/lib/wasi/src/runners/emscripten.rs b/lib/wasi/src/runners/emscripten.rs index bcad14b0f10..fd92bbb74f9 100644 --- a/lib/wasi/src/runners/emscripten.rs +++ b/lib/wasi/src/runners/emscripten.rs @@ -13,12 +13,34 @@ use wasmer_emscripten::{ }; use webc::{Command, WebCMmap}; -#[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Hash, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct EmscriptenRunner { args: Vec, + #[serde(skip, default)] + store: Store, } impl EmscriptenRunner { + /// Constructs a new `EmscriptenRunner` given an `Engine` + pub fn new(store: Store) -> Self { + Self { + args: Vec::new(), + store, + } + } + + /// Returns the current arguments for this `EmscriptenRunner` + pub fn get_args(&self) -> Vec { + self.args.clone() + } + + /// Builder method to provide CLI args to the runner + pub fn with_args(mut self, args: Vec) -> Self { + self.set_args(args); + self + } + + /// Set the CLI args pub fn set_args(&mut self, args: Vec) { self.args = args; } @@ -44,15 +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 mut store = Store::default(); - 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, diff --git a/lib/wasi/src/runners/wasi.rs b/lib/wasi/src/runners/wasi.rs index 4925b59864b..e010a51406a 100644 --- a/lib/wasi/src/runners/wasi.rs +++ b/lib/wasi/src/runners/wasi.rs @@ -11,12 +11,34 @@ 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, + #[serde(skip, default)] + store: Store, } impl WasiRunner { + /// Constructs a new `WasiRunner` given an `Engine` + pub fn new(store: Store) -> Self { + Self { + args: Vec::new(), + store, + } + } + + /// Returns the current arguments for this `WasiRunner` + pub fn get_args(&self) -> Vec { + self.args.clone() + } + + /// Builder method to provide CLI args to the runner + pub fn with_args(mut self, args: Vec) -> Self { + self.set_args(args); + self + } + + /// Set the CLI args pub fn set_args(&mut self, args: Vec) { self.args = args; } @@ -43,13 +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 mut store = Store::default(); - 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(()) } From 3d73c536d624e965c15732cdfab02a983d173af0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=BCtt?= Date: Wed, 18 Jan 2023 16:25:24 +0100 Subject: [PATCH 21/55] Fix unit tests on Linux --- lib/cli/src/store.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cli/src/store.rs b/lib/cli/src/store.rs index 87da6d5bd9b..49b897c7bc3 100644 --- a/lib/cli/src/store.rs +++ b/lib/cli/src/store.rs @@ -152,7 +152,7 @@ impl CompilerOptions { use std::fs::File; use std::io::Write; use wasmer_compiler_llvm::{ - CompiledKind, InkwellMemoryBuffer, InkwellModule, LLVMCallbacks, + CompiledKind, InkwellMemoryBuffer, InkwellModule, LLVMCallbacks, LLVM, }; use wasmer_types::entity::EntityRef; let mut config = LLVM::new(); From de62fdd07502ccbbc5c05ebcc204cfd54542d88d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=BCtt?= Date: Wed, 18 Jan 2023 16:55:06 +0100 Subject: [PATCH 22/55] Remove uses of Store::default in create-exe and wasmer run --- lib/cli/src/commands/create_exe.rs | 8 +++--- lib/cli/src/commands/run.rs | 41 +++++++++++++++++++----------- 2 files changed, 30 insertions(+), 19 deletions(-) diff --git a/lib/cli/src/commands/create_exe.rs b/lib/cli/src/commands/create_exe.rs index 9f75d8deb2f..08b28860fa6 100644 --- a/lib/cli/src/commands/create_exe.rs +++ b/lib/cli/src/commands/create_exe.rs @@ -224,7 +224,7 @@ impl CreateExe { return Err(anyhow::anyhow!("input path cannot be a directory")); } - let (_, compiler_type) = self.compiler.get_store_for_target(target.clone())?; + let (store, compiler_type) = self.compiler.get_store_for_target(target.clone())?; println!("Compiler: {}", compiler_type.to_string()); println!("Target: {}", target.triple()); println!("Format: {:?}", object_format); @@ -271,7 +271,7 @@ impl CreateExe { ) }?; - get_module_infos(&tempdir, &atoms, object_format)?; + get_module_infos(&tempdir, &atoms, object_format, &store)?; let mut entrypoint = get_entrypoint(&tempdir)?; create_header_files_in_dir(&tempdir, &mut entrypoint, &atoms, &self.precompiled_atom)?; link_exe_from_dir( @@ -962,14 +962,14 @@ fn get_module_infos( directory: &Path, atoms: &[(String, Vec)], object_format: ObjectFormat, + store: &Store, ) -> Result, anyhow::Error> { let mut entrypoint = get_entrypoint(directory).with_context(|| anyhow::anyhow!("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()) + let module = Module::from_binary(store, atom_bytes.as_slice()) .map_err(|e| anyhow::anyhow!("could not deserialize module {atom_name}: {e}"))?; if let Some(s) = entrypoint .atoms diff --git a/lib/cli/src/commands/run.rs b/lib/cli/src/commands/run.rs index 5764c1e887c..b351f0c7610 100644 --- a/lib/cli/src/commands/run.rs +++ b/lib/cli/src/commands/run.rs @@ -198,12 +198,13 @@ impl RunWithPathBuf { #[cfg(feature = "webc_runner")] { if let Ok(pf) = WapmContainer::new(self.path.clone()) { - return Self::run_container( - pf, - &self.command_name.clone().unwrap_or_default(), - &self.args, - ) - .map_err(|e| anyhow!("Could not run PiritaFile: {e}")); + return self + .run_container( + pf, + &self.command_name.clone().unwrap_or_default(), + &self.args, + ) + .map_err(|e| anyhow!("Could not run PiritaFile: {e}")); } } let (mut store, module) = self.get_store_module()?; @@ -343,7 +344,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")] @@ -352,12 +358,15 @@ impl RunWithPathBuf { return r; } - let mut runner = wasmer_wasi::runners::wasi::WasiRunner::new(Store::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}")) }); } @@ -367,17 +376,19 @@ impl RunWithPathBuf { return r; } - let mut runner = - wasmer_wasi::runners::emscripten::EmscriptenRunner::new(Store::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)> { From 790fcfca5978f73547d6c86fe5751d31344a31e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=BCtt?= Date: Wed, 18 Jan 2023 18:39:00 +0100 Subject: [PATCH 23/55] Debug why get_store_for_target fails --- lib/cli/src/commands/create_exe.rs | 6 ++++-- lib/compiler/src/engine/unwind/systemv.rs | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/cli/src/commands/create_exe.rs b/lib/cli/src/commands/create_exe.rs index 08b28860fa6..a6ab8916afd 100644 --- a/lib/cli/src/commands/create_exe.rs +++ b/lib/cli/src/commands/create_exe.rs @@ -224,9 +224,11 @@ impl CreateExe { return Err(anyhow::anyhow!("input path cannot be a directory")); } - let (store, compiler_type) = self.compiler.get_store_for_target(target.clone())?; + let (store, compiler_type) = self + .compiler + .get_store_for_target(Target::new(target_triple, Default::default()))?; println!("Compiler: {}", compiler_type.to_string()); - println!("Target: {}", target.triple()); + println!("Target: {:?}", target); println!("Format: {:?}", object_format); println!( "Using path `{}` as libwasmer path.", diff --git a/lib/compiler/src/engine/unwind/systemv.rs b/lib/compiler/src/engine/unwind/systemv.rs index 38d51e219f4..11e08e4b34b 100644 --- a/lib/compiler/src/engine/unwind/systemv.rs +++ b/lib/compiler/src/engine/unwind/systemv.rs @@ -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(()) } From 2ce32dba799a76d088ad89d74657353266877e40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=BCtt?= Date: Wed, 18 Jan 2023 19:00:47 +0100 Subject: [PATCH 24/55] Debug why get_store_for_target returns wrong UnwindInfo --- lib/cli/src/commands/create_exe.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/cli/src/commands/create_exe.rs b/lib/cli/src/commands/create_exe.rs index a6ab8916afd..630ff768d74 100644 --- a/lib/cli/src/commands/create_exe.rs +++ b/lib/cli/src/commands/create_exe.rs @@ -224,9 +224,7 @@ impl CreateExe { return Err(anyhow::anyhow!("input path cannot be a directory")); } - let (store, compiler_type) = self - .compiler - .get_store_for_target(Target::new(target_triple, Default::default()))?; + let (store, compiler_type) = self.compiler.get_store_for_target(target.clone())?; println!("Compiler: {}", compiler_type.to_string()); println!("Target: {:?}", target); println!("Format: {:?}", object_format); From be30f664b22748e4249c7cd7ad5bf9ef0338bbc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=BCtt?= Date: Wed, 18 Jan 2023 19:07:59 +0100 Subject: [PATCH 25/55] Print store information on CI --- lib/cli/src/commands/create_exe.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/cli/src/commands/create_exe.rs b/lib/cli/src/commands/create_exe.rs index 630ff768d74..a3248a83a94 100644 --- a/lib/cli/src/commands/create_exe.rs +++ b/lib/cli/src/commands/create_exe.rs @@ -232,6 +232,7 @@ impl CreateExe { "Using path `{}` as libwasmer path.", cross_compilation.library.display() ); + println!("store: {:#?}", store); if !cross_compilation.library.exists() { return Err(anyhow::anyhow!("library path does not exist")); } From 321c1f3c834e9d547fed9eb2582a71088851eb52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=BCtt?= Date: Wed, 18 Jan 2023 19:21:21 +0100 Subject: [PATCH 26/55] Try to imitate the previous Store creation with get_config(( --- lib/cli/src/commands/create_exe.rs | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/lib/cli/src/commands/create_exe.rs b/lib/cli/src/commands/create_exe.rs index a3248a83a94..b6ec395b12c 100644 --- a/lib/cli/src/commands/create_exe.rs +++ b/lib/cli/src/commands/create_exe.rs @@ -224,7 +224,29 @@ impl CreateExe { return Err(anyhow::anyhow!("input path cannot be a directory")); } - let (store, compiler_type) = self.compiler.get_store_for_target(target.clone())?; + let (_, compiler_type) = self.compiler.get_store_for_target(target.clone())?; + + fn get_config() -> impl wasmer_compiler::CompilerConfig + 'static { + cfg_if::cfg_if! { + if #[cfg(feature = "cranelift")] { + wasmer_compiler_cranelift::Cranelift::default() + } else if #[cfg(feature = "llvm")] { + wasmer_compiler_llvm::LLVM::default() + } else if #[cfg(feature = "singlepass")] { + wasmer_compiler_singlepass::Singlepass::default() + } else { + compile_error!("No default compiler chosen") + } + } + } + + let engine = + EngineBuilder::new(Box::new(get_config()) as Box) + .engine(); + + let tunables = BaseTunables::for_target(engine.target()); + let store = Store::new_with_tunables(&engine, tunables); + println!("Compiler: {}", compiler_type.to_string()); println!("Target: {:?}", target); println!("Format: {:?}", object_format); From ed7f122ed5b0f63d04ce93acaa3c82370dff66e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=BCtt?= Date: Tue, 17 Jan 2023 18:44:09 +0100 Subject: [PATCH 27/55] Fixed create_exe_serialized tests --- .../src/artifact_builders/artifact_builder.rs | 14 +------------- lib/compiler/src/engine/artifact.rs | 4 +--- lib/compiler/src/engine/tunables.rs | 5 ----- lib/types/src/serialize.rs | 3 --- tests/integration/cli/tests/create_exe.rs | 8 ++------ 5 files changed, 4 insertions(+), 30 deletions(-) diff --git a/lib/compiler/src/artifact_builders/artifact_builder.rs b/lib/compiler/src/artifact_builders/artifact_builder.rs index e95061fb29b..f1940bdc1e6 100644 --- a/lib/compiler/src/artifact_builders/artifact_builder.rs +++ b/lib/compiler/src/artifact_builders/artifact_builder.rs @@ -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) -> 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 { - self.serializable.module_start - } - /// Get Functions Bodies ref pub fn get_function_bodies_ref(&self) -> &PrimaryMap { &self.serializable.compilation.function_bodies diff --git a/lib/compiler/src/engine/artifact.rs b/lib/compiler/src/engine/artifact.rs index b9ac9029227..e60a86142ed 100644 --- a/lib/compiler/src/engine/artifact.rs +++ b/lib/compiler/src/engine/artifact.rs @@ -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 diff --git a/lib/compiler/src/engine/tunables.rs b/lib/compiler/src/engine/tunables.rs index 9eab1ce85f1..596af921dc5 100644 --- a/lib/compiler/src/engine/tunables.rs +++ b/lib/compiler/src/engine/tunables.rs @@ -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 { - None - } - /// Construct a `MemoryStyle` for the provided `MemoryType` fn memory_style(&self, memory: &MemoryType) -> MemoryStyle; diff --git a/lib/types/src/serialize.rs b/lib/types/src/serialize.rs index 4b8d3be2bb4..cab04942438 100644 --- a/lib/types/src/serialize.rs +++ b/lib/types/src/serialize.rs @@ -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, } fn to_serialize_error(err: impl std::error::Error) -> SerializeError { diff --git a/tests/integration/cli/tests/create_exe.rs b/tests/integration/cli/tests/create_exe.rs index 1ede069f763..25edb4617a9 100644 --- a/tests/integration/cli/tests/create_exe.rs +++ b/tests/integration/cli/tests/create_exe.rs @@ -483,9 +483,7 @@ 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] fn create_exe_serialized_works() -> anyhow::Result<()> { let temp_dir = tempfile::tempdir()?; @@ -685,9 +683,7 @@ fn create_exe_with_object_input_symbols() -> 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] fn create_exe_with_object_input_serialized() -> anyhow::Result<()> { create_exe_with_object_input(vec![ From 5c927b974dcf77a34a18be8bd56eba874fe944d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=BCtt?= Date: Thu, 19 Jan 2023 09:20:57 +0100 Subject: [PATCH 28/55] Fix create-exe to work --- lib/cli/src/commands/create_exe.rs | 80 ++++++++++++++++++++++-------- lib/cli/src/store.rs | 6 +-- 2 files changed, 63 insertions(+), 23 deletions(-) diff --git a/lib/cli/src/commands/create_exe.rs b/lib/cli/src/commands/create_exe.rs index b6ec395b12c..00c21de7254 100644 --- a/lib/cli/src/commands/create_exe.rs +++ b/lib/cli/src/commands/create_exe.rs @@ -2,7 +2,7 @@ use super::ObjectFormat; use crate::common::normalize_path; -use crate::store::CompilerOptions; +use crate::store::{CompilerOptions, CompilerType}; use anyhow::{Context, Result}; use clap::Parser; use serde::{Deserialize, Serialize}; @@ -224,37 +224,31 @@ impl CreateExe { return Err(anyhow::anyhow!("input path cannot be a directory")); } - let (_, compiler_type) = self.compiler.get_store_for_target(target.clone())?; + let (_, ct) = self.compiler.get_store_for_target(target.clone())?; - fn get_config() -> impl wasmer_compiler::CompilerConfig + 'static { - cfg_if::cfg_if! { - if #[cfg(feature = "cranelift")] { - wasmer_compiler_cranelift::Cranelift::default() - } else if #[cfg(feature = "llvm")] { - wasmer_compiler_llvm::LLVM::default() - } else if #[cfg(feature = "singlepass")] { - wasmer_compiler_singlepass::Singlepass::default() - } else { - compile_error!("No default compiler chosen") - } - } - } + let compiler_type = if self.compiler.singlepass { + CompilerType::Singlepass + } else if self.compiler.cranelift { + CompilerType::Cranelift + } else if self.compiler.llvm { + CompilerType::LLVM + } else { + ct // default compiler type + }; - let engine = - EngineBuilder::new(Box::new(get_config()) as Box) - .engine(); + let engine = EngineBuilder::new(get_config(&compiler_type)?).engine(); let tunables = BaseTunables::for_target(engine.target()); let store = Store::new_with_tunables(&engine, tunables); println!("Compiler: {}", compiler_type.to_string()); - println!("Target: {:?}", target); + println!("Target: {}", target.triple()); println!("Format: {:?}", object_format); println!( "Using path `{}` as libwasmer path.", cross_compilation.library.display() ); - println!("store: {:#?}", store); + if !cross_compilation.library.exists() { return Err(anyhow::anyhow!("library path does not exist")); } @@ -324,6 +318,52 @@ impl CreateExe { } } +fn get_config( + compiler: &CompilerType, +) -> Result, anyhow::Error> { + match compiler { + CompilerType::Cranelift => { + #[cfg(feature = "cranelift")] + { + Ok(Box::new(wasmer_compiler_cranelift::Cranelift::default())) + } + #[cfg(not(feature = "cranelift"))] + { + Err(anyhow::anyhow!( + "compiler \"cranelift\" not embedded in wasmer-cli" + )) + } + } + CompilerType::Singlepass => { + #[cfg(feature = "singlepass")] + { + Ok(Box::new(wasmer_compiler_singlepass::Singlepass::default())) + } + #[cfg(not(feature = "singlepass"))] + { + Err(anyhow::anyhow!( + "compiler \"singlepass\" not embedded in wasmer-cli" + )) + } + } + CompilerType::LLVM => { + #[cfg(feature = "llvm")] + { + Ok(Box::new(wasmer_compiler_llvm::LLVM::default())) + } + #[cfg(not(feature = "llvm"))] + { + Err(anyhow::anyhow!( + "compiler \"llvm\" not embedded in wasmer-cli" + )) + } + } + CompilerType::Headless => Err(anyhow::anyhow!( + "cannot compile .wasm files to object files with compiler \"headless\"" + )), + } +} + fn write_entrypoint(directory: &Path, entrypoint: &Entrypoint) -> Result<(), anyhow::Error> { std::fs::write( directory.join("entrypoint.json"), diff --git a/lib/cli/src/store.rs b/lib/cli/src/store.rs index 49b897c7bc3..1d2c55904cb 100644 --- a/lib/cli/src/store.rs +++ b/lib/cli/src/store.rs @@ -30,15 +30,15 @@ pub struct StoreOptions { pub struct CompilerOptions { /// Use Singlepass compiler. #[clap(long, conflicts_with_all = &["cranelift", "llvm"])] - singlepass: bool, + pub singlepass: bool, /// Use Cranelift compiler. #[clap(long, conflicts_with_all = &["singlepass", "llvm"])] - cranelift: bool, + pub cranelift: bool, /// Use LLVM compiler. #[clap(long, conflicts_with_all = &["singlepass", "cranelift"])] - llvm: bool, + pub llvm: bool, /// Enable compiler internal verification. #[clap(long)] From 1042053b6e058430d7e8990da576360b24bd8a65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=BCtt?= Date: Thu, 19 Jan 2023 09:22:45 +0100 Subject: [PATCH 29/55] Revert "Fix make lint" This reverts commit 912f21ab03ab3534c917348a902b525e8f7cbce1. --- lib/c-api/src/wasm_c_api/wasi/mod.rs | 4 ++-- lib/cache/src/hash.rs | 2 +- lib/cli/build.rs | 2 +- lib/cli/src/commands/publish.rs | 2 +- lib/emscripten/src/env/mod.rs | 4 ++-- lib/registry/src/lib.rs | 4 ++-- lib/vfs/src/webc_fs.rs | 3 +-- lib/wasi/src/lib.rs | 4 ++-- lib/wasi/src/state/pipe.rs | 4 ++-- lib/wasi/src/syscalls/mod.rs | 6 ++---- tests/lib/test-generator/src/lib.rs | 3 ++- tests/lib/wast/src/wast.rs | 2 +- tests/wasi-wast/src/wasitests.rs | 4 ++-- 13 files changed, 21 insertions(+), 23 deletions(-) diff --git a/lib/c-api/src/wasm_c_api/wasi/mod.rs b/lib/c-api/src/wasm_c_api/wasi/mod.rs index fb7395e1e49..1f3354d0a77 100644 --- a/lib/c-api/src/wasm_c_api/wasi/mod.rs +++ b/lib/c-api/src/wasm_c_api/wasi/mod.rs @@ -342,7 +342,7 @@ pub unsafe extern "C" fn wasi_env_read_stdout( buffer: *mut c_char, buffer_len: usize, ) -> isize { - let inner_buffer = slice::from_raw_parts_mut(buffer as *mut _, buffer_len); + let inner_buffer = slice::from_raw_parts_mut(buffer as *mut _, buffer_len as usize); let mut store_mut = env.store.store_mut(); let state = env.inner.data_mut(&mut store_mut).state(); @@ -365,7 +365,7 @@ pub unsafe extern "C" fn wasi_env_read_stderr( buffer: *mut c_char, buffer_len: usize, ) -> isize { - let inner_buffer = slice::from_raw_parts_mut(buffer as *mut _, buffer_len); + let inner_buffer = slice::from_raw_parts_mut(buffer as *mut _, buffer_len as usize); let mut store_mut = env.store.store_mut(); let state = env.inner.data_mut(&mut store_mut).state(); if let Ok(mut stderr) = state.stderr() { diff --git a/lib/cache/src/hash.rs b/lib/cache/src/hash.rs index 2a4b6fb7b5a..29e7fa7ce65 100644 --- a/lib/cache/src/hash.rs +++ b/lib/cache/src/hash.rs @@ -31,7 +31,7 @@ impl ToString for Hash { /// Create the hexadecimal representation of the /// stored hash. fn to_string(&self) -> String { - hex::encode(self.to_array()) + hex::encode(&self.to_array()) } } diff --git a/lib/cli/build.rs b/lib/cli/build.rs index 4444630121c..f9aecaaf01c 100644 --- a/lib/cli/build.rs +++ b/lib/cli/build.rs @@ -4,7 +4,7 @@ use std::process::Command; pub fn main() { // Set WASMER_GIT_HASH let git_hash = Command::new("git") - .args(["rev-parse", "HEAD"]) + .args(&["rev-parse", "HEAD"]) .output() .ok() .and_then(|output| String::from_utf8(output.stdout).ok()) diff --git a/lib/cli/src/commands/publish.rs b/lib/cli/src/commands/publish.rs index 0c6756de48a..7f2136cd17a 100644 --- a/lib/cli/src/commands/publish.rs +++ b/lib/cli/src/commands/publish.rs @@ -386,7 +386,7 @@ fn apply_migration(conn: &mut Connection, migration_number: i32) -> Result<(), M tx.execute_batch(migration_to_apply) .map_err(|e| MigrationError::TransactionFailed(migration_number, format!("{}", e)))?; - tx.pragma_update(None, "user_version", migration_number + 1) + tx.pragma_update(None, "user_version", (migration_number + 1)) .map_err(|e| MigrationError::TransactionFailed(migration_number, format!("{}", e)))?; tx.commit() .map_err(|_| MigrationError::CommitFailed(migration_number)) diff --git a/lib/emscripten/src/env/mod.rs b/lib/emscripten/src/env/mod.rs index 03e05fb7417..a560a416912 100644 --- a/lib/emscripten/src/env/mod.rs +++ b/lib/emscripten/src/env/mod.rs @@ -79,9 +79,9 @@ pub fn ___build_environment(mut ctx: FunctionEnvMut, environ: c_int) { let environment = emscripten_memory_pointer!(memory.view(&ctx), environ) as *mut c_int; let (mut pool_offset, env_ptr, mut pool_ptr) = unsafe { let (pool_offset, _pool_slice): (u32, &mut [u8]) = - allocate_on_stack(&mut ctx, TOTAL_ENV_SIZE); + allocate_on_stack(&mut ctx, TOTAL_ENV_SIZE as u32); let (env_offset, _env_slice): (u32, &mut [u8]) = - allocate_on_stack(&mut ctx, MAX_ENV_VALUES * 4); + allocate_on_stack(&mut ctx, (MAX_ENV_VALUES * 4) as u32); let env_ptr = emscripten_memory_pointer!(memory.view(&ctx), env_offset) as *mut c_int; let pool_ptr = emscripten_memory_pointer!(memory.view(&ctx), pool_offset) as *mut u8; *env_ptr = pool_offset as i32; diff --git a/lib/registry/src/lib.rs b/lib/registry/src/lib.rs index d1300bdfbb4..bb6f6a162c8 100644 --- a/lib/registry/src/lib.rs +++ b/lib/registry/src/lib.rs @@ -418,7 +418,7 @@ pub fn try_unpack_targz>( let target_targz_path = target_targz_path.as_ref(); let target_path = target_path.as_ref(); let open_file = || { - std::fs::File::open(target_targz_path) + std::fs::File::open(&target_targz_path) .map_err(|e| anyhow::anyhow!("failed to open {}: {e}", target_targz_path.display())) }; @@ -860,7 +860,7 @@ fn get_bytes( } if let Some(path) = stream_response_into.as_ref() { - let mut file = std::fs::File::create(path).map_err(|e| { + let mut file = std::fs::File::create(&path).map_err(|e| { anyhow::anyhow!("failed to download {url} into {}: {e}", path.display()) })?; diff --git a/lib/vfs/src/webc_fs.rs b/lib/vfs/src/webc_fs.rs index 6b6d467cb8c..34402356357 100644 --- a/lib/vfs/src/webc_fs.rs +++ b/lib/vfs/src/webc_fs.rs @@ -66,8 +66,7 @@ where ) -> Result, FsError> { match get_volume_name_opt(path) { Some(volume) => { - let file = self - .webc + let file = (*self.webc) .volumes .get(&volume) .ok_or(FsError::EntityNotFound)? diff --git a/lib/wasi/src/lib.rs b/lib/wasi/src/lib.rs index 340a5d63745..79a518c6fff 100644 --- a/lib/wasi/src/lib.rs +++ b/lib/wasi/src/lib.rs @@ -102,7 +102,7 @@ impl From for WasiThreadId { } impl From for u32 { fn from(t: WasiThreadId) -> u32 { - t.0 + t.0 as u32 } } @@ -117,7 +117,7 @@ impl From for WasiBusProcessId { } impl From for u32 { fn from(id: WasiBusProcessId) -> u32 { - id.0 + id.0 as u32 } } diff --git a/lib/wasi/src/state/pipe.rs b/lib/wasi/src/state/pipe.rs index d91f6a108d5..4781ab0a02f 100644 --- a/lib/wasi/src/state/pipe.rs +++ b/lib/wasi/src/state/pipe.rs @@ -50,7 +50,7 @@ impl WasiPipe { let buf_len = buf.len(); if buf_len > 0 { let reader = buf.as_ref(); - let read = read_bytes(reader, memory, iov).map(|_| buf_len)?; + let read = read_bytes(reader, memory, iov).map(|_| buf_len as usize)?; buf.advance(read); return Ok(read); } @@ -101,7 +101,7 @@ impl Read for WasiPipe { let buf_len = inner_buf.len(); if buf_len > 0 { let mut reader = inner_buf.as_ref(); - let read = reader.read(buf).map(|_| buf_len)?; + let read = reader.read(buf).map(|_| buf_len as usize)?; inner_buf.advance(read); return Ok(read); } diff --git a/lib/wasi/src/syscalls/mod.rs b/lib/wasi/src/syscalls/mod.rs index d69eaca8543..01328a25ad3 100644 --- a/lib/wasi/src/syscalls/mod.rs +++ b/lib/wasi/src/syscalls/mod.rs @@ -998,7 +998,6 @@ pub fn fd_prestat_dir_name( /// Output: /// - `u32 *nwritten` /// Number of bytes written -#[allow(clippy::unnecessary_cast)] pub fn fd_pwrite( ctx: FunctionEnvMut<'_, WasiEnv>, fd: WasiFd, @@ -2782,7 +2781,7 @@ pub fn path_rename( // implements the logic of "I'm not actually a file, I'll try to be as needed". let result = if let Some(h) = handle { drop(guard); - state.fs_rename(source_path, &host_adjusted_target_path) + state.fs_rename(&source_path, &host_adjusted_target_path) } else { let path_clone = path.clone(); drop(guard); @@ -3595,7 +3594,6 @@ pub fn thread_spawn( /// ## Parameters /// /// * `duration` - Amount of time that the thread should sleep -#[allow(clippy::unnecessary_cast)] pub fn thread_sleep( ctx: FunctionEnvMut<'_, WasiEnv>, duration: Timestamp, @@ -5464,7 +5462,7 @@ pub unsafe fn sock_send_file( { let mut fd_map = state.fs.fd_map.write().unwrap(); let fd_entry = wasi_try_ok!(fd_map.get_mut(&in_fd).ok_or(Errno::Badf)); - fd_entry.offset = offset; + fd_entry.offset = offset as u64; } // Enter a loop that will process all the data diff --git a/tests/lib/test-generator/src/lib.rs b/tests/lib/test-generator/src/lib.rs index b1e4a16e09c..e3256e3c264 100644 --- a/tests/lib/test-generator/src/lib.rs +++ b/tests/lib/test-generator/src/lib.rs @@ -85,7 +85,8 @@ pub fn extract_name(path: impl AsRef) -> String { .expect("filename should have a stem") .to_str() .expect("filename should be representable as a string") - .replace(['-', '/'], "_") + .replace('-', "_") + .replace('/', "_") } pub fn with_test_module( diff --git a/tests/lib/wast/src/wast.rs b/tests/lib/wast/src/wast.rs index 80b02adc276..50bc02b3883 100644 --- a/tests/lib/wast/src/wast.rs +++ b/tests/lib/wast/src/wast.rs @@ -437,7 +437,7 @@ impl Wast { // Checks if the `assert_unlinkable` message matches the expected one fn matches_message_assert_unlinkable(expected: &str, actual: &str) -> bool { - actual.contains(expected) + actual.contains(&expected) } // Checks if the `assert_invalid` message matches the expected one diff --git a/tests/wasi-wast/src/wasitests.rs b/tests/wasi-wast/src/wasitests.rs index d01d048c13e..2a204d8a587 100644 --- a/tests/wasi-wast/src/wasitests.rs +++ b/tests/wasi-wast/src/wasitests.rs @@ -124,7 +124,7 @@ fn compile_wasm_for_version( ) -> io::Result { //let out_dir = base_dir; //base_dir.join("..").join(version.get_directory_name()); if !out_dir.exists() { - fs::create_dir(out_dir)?; + fs::create_dir(&out_dir)?; } let wasm_out_name = { let mut wasm_out_name = out_dir.join(rs_mod_name); @@ -134,7 +134,7 @@ fn compile_wasm_for_version( println!("Reading contents from file `{}`", file); let file_contents: String = { let mut fc = String::new(); - let mut f = fs::OpenOptions::new().read(true).open(file)?; + let mut f = fs::OpenOptions::new().read(true).open(&file)?; f.read_to_string(&mut fc)?; fc }; From fd5962dd66c620281ee89707399d5fa4a1ae07f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=BCtt?= Date: Thu, 19 Jan 2023 09:23:10 +0100 Subject: [PATCH 30/55] Revert "Fix make lint" This reverts commit e2755b71078ffb9103561762474b2b295e6c02c1. --- lib/api/src/sys/imports.rs | 1 - lib/api/src/sys/instance.rs | 2 -- lib/api/src/sys/module.rs | 1 - lib/c-api/src/wasm_c_api/engine.rs | 10 ++++---- lib/cli/src/commands/create_exe.rs | 10 ++++---- lib/cli/src/commands/init.rs | 4 +-- lib/cli/src/commands/publish.rs | 4 +-- lib/cli/src/commands/run.rs | 2 +- lib/compiler-llvm/src/abi/aarch64_systemv.rs | 13 +++++++--- lib/compiler-llvm/src/abi/x86_64_systemv.rs | 13 +++++++--- lib/compiler-llvm/src/translator/code.rs | 1 - lib/compiler-singlepass/src/arm64_decl.rs | 3 +-- lib/compiler-singlepass/src/codegen.rs | 4 +-- lib/compiler-singlepass/src/emitter_arm64.rs | 26 ++++++-------------- lib/compiler-singlepass/src/machine_arm64.rs | 2 -- lib/compiler/src/engine/artifact.rs | 3 --- lib/compiler/src/engine/resolver.rs | 1 - lib/compiler/src/engine/tunables.rs | 3 --- lib/emscripten/src/syscalls/mod.rs | 1 - lib/vbus/src/lib.rs | 2 +- lib/vm/src/vmcontext.rs | 4 +-- lib/wasi/src/runtime.rs | 7 +++--- lib/wasi/src/state/mod.rs | 12 ++++----- lib/wasi/src/syscalls/mod.rs | 3 ++- 24 files changed, 58 insertions(+), 74 deletions(-) diff --git a/lib/api/src/sys/imports.rs b/lib/api/src/sys/imports.rs index fd753c40ff9..a08d1b6adad 100644 --- a/lib/api/src/sys/imports.rs +++ b/lib/api/src/sys/imports.rs @@ -174,7 +174,6 @@ impl Imports { /// Resolve and return a vector of imports in the order they are defined in the `module`'s source code. /// /// This means the returned `Vec` might be a subset of the imports contained in `self`. - #[allow(clippy::result_large_err)] pub fn imports_for_module(&self, module: &Module) -> Result, LinkError> { let mut ret = vec![]; for import in module.imports() { diff --git a/lib/api/src/sys/instance.rs b/lib/api/src/sys/instance.rs index 877749ca789..4e0d90d3f18 100644 --- a/lib/api/src/sys/instance.rs +++ b/lib/api/src/sys/instance.rs @@ -111,7 +111,6 @@ impl Instance { /// Those are, as defined by the spec: /// * Link errors that happen when plugging the imports into the instance /// * Runtime errors that happen when running the module `start` function. - #[allow(clippy::result_large_err)] pub fn new( store: &mut impl AsStoreMut, module: &Module, @@ -159,7 +158,6 @@ impl Instance { /// Those are, as defined by the spec: /// * Link errors that happen when plugging the imports into the instance /// * Runtime errors that happen when running the module `start` function. - #[allow(clippy::result_large_err)] pub fn new_by_index( store: &mut impl AsStoreMut, module: &Module, diff --git a/lib/api/src/sys/module.rs b/lib/api/src/sys/module.rs index a83f5f10f04..9d49179265e 100644 --- a/lib/api/src/sys/module.rs +++ b/lib/api/src/sys/module.rs @@ -311,7 +311,6 @@ impl Module { } } - #[allow(clippy::result_large_err)] #[cfg(feature = "compiler")] pub(crate) fn instantiate( &self, diff --git a/lib/c-api/src/wasm_c_api/engine.rs b/lib/c-api/src/wasm_c_api/engine.rs index 0cb0a54d615..0c69c78db56 100644 --- a/lib/c-api/src/wasm_c_api/engine.rs +++ b/lib/c-api/src/wasm_c_api/engine.rs @@ -117,7 +117,7 @@ pub struct wasm_config_t { /// cbindgen:ignore #[no_mangle] pub extern "C" fn wasm_config_new() -> Box { - Box::::default() + Box::new(wasm_config_t::default()) } /// Delete a Wasmer config object. @@ -256,11 +256,11 @@ use wasmer_api::CompilerConfig; fn get_default_compiler_config() -> Box { cfg_if! { if #[cfg(feature = "cranelift")] { - Box::::default() + Box::new(wasmer_compiler_cranelift::Cranelift::default()) } else if #[cfg(feature = "llvm")] { - Box::::default() + Box::new(wasmer_compiler_llvm::LLVM::default()) } else if #[cfg(feature = "singlepass")] { - Box::::default() + Box::new(wasmer_compiler_singlepass::Singlepass::default()) } else { compile_error!("Please enable one of the compiler backends") } @@ -368,7 +368,7 @@ pub extern "C" fn wasm_engine_new_with_config( wasmer_compiler_t::CRANELIFT => { cfg_if! { if #[cfg(feature = "cranelift")] { - Box::::default() + Box::new(wasmer_compiler_cranelift::Cranelift::default()) } else { return return_with_error("Wasmer has not been compiled with the `cranelift` feature."); } diff --git a/lib/cli/src/commands/create_exe.rs b/lib/cli/src/commands/create_exe.rs index 00c21de7254..5ea79d90f08 100644 --- a/lib/cli/src/commands/create_exe.rs +++ b/lib/cli/src/commands/create_exe.rs @@ -930,7 +930,7 @@ fn write_volume_obj( object_name, )?; - let mut writer = BufWriter::new(File::create(output_path)?); + let mut writer = BufWriter::new(File::create(&output_path)?); volumes_object .write_stream(&mut writer) .map_err(|err| anyhow::anyhow!(err.to_string()))?; @@ -1113,7 +1113,7 @@ pub(crate) fn create_header_files_in_dir( &ModuleMetadataSymbolRegistry { prefix: prefix.clone(), }, - metadata_length, + metadata_length as usize, ); std::fs::write(&header_file_path, &header_file_src).map_err(|e| { @@ -1258,7 +1258,7 @@ fn link_exe_from_dir( .as_ref() .ok_or_else(|| anyhow::anyhow!("could not find zig in $PATH {}", directory.display()))?; - let mut cmd = Command::new(zig_binary_path); + let mut cmd = Command::new(&zig_binary_path); cmd.arg("build-exe"); cmd.arg("--verbose-cc"); cmd.arg("--verbose-link"); @@ -1935,7 +1935,7 @@ pub(super) mod utils { let path_var = std::env::var("PATH").unwrap_or_default(); #[cfg(unix)] let system_path_var = std::process::Command::new("getconf") - .args(["PATH"]) + .args(&["PATH"]) .output() .map(|output| output.stdout) .unwrap_or_default(); @@ -2328,7 +2328,7 @@ mod http_fetch { pub(crate) fn list_dir(target: &Path) -> Vec { use walkdir::WalkDir; - WalkDir::new(target) + WalkDir::new(&target) .into_iter() .filter_map(|e| e.ok()) .map(|entry| entry.path().to_path_buf()) diff --git a/lib/cli/src/commands/init.rs b/lib/cli/src/commands/init.rs index b31f7ec14dd..584c7764d3b 100644 --- a/lib/cli/src/commands/init.rs +++ b/lib/cli/src/commands/init.rs @@ -160,7 +160,7 @@ impl Init { .collect::>() .join(NEWLINE); - std::fs::write(path, &toml_string) + std::fs::write(&path, &toml_string) .with_context(|| format!("Unable to write to \"{}\"", path.display()))?; Ok(()) @@ -493,7 +493,7 @@ fn construct_manifest( } fn parse_cargo_toml(manifest_path: &PathBuf) -> Result { let mut metadata = MetadataCommand::new(); - metadata.manifest_path(manifest_path); + metadata.manifest_path(&manifest_path); metadata.no_deps(); metadata.features(CargoOpt::AllFeatures); diff --git a/lib/cli/src/commands/publish.rs b/lib/cli/src/commands/publish.rs index 7f2136cd17a..889a39f1457 100644 --- a/lib/cli/src/commands/publish.rs +++ b/lib/cli/src/commands/publish.rs @@ -247,7 +247,7 @@ fn append_path_to_tar_gz( .metadata() .map_err(|e| (normalized_path.clone(), e))?; builder - .append_path_with_name(&normalized_path, target_path) + .append_path_with_name(&normalized_path, &target_path) .map_err(|e| (normalized_path.clone(), e))?; Ok(normalized_path) } @@ -386,7 +386,7 @@ fn apply_migration(conn: &mut Connection, migration_number: i32) -> Result<(), M tx.execute_batch(migration_to_apply) .map_err(|e| MigrationError::TransactionFailed(migration_number, format!("{}", e)))?; - tx.pragma_update(None, "user_version", (migration_number + 1)) + tx.pragma_update(None, "user_version", &(migration_number + 1)) .map_err(|e| MigrationError::TransactionFailed(migration_number, format!("{}", e)))?; tx.commit() .map_err(|_| MigrationError::CommitFailed(migration_number)) diff --git a/lib/cli/src/commands/run.rs b/lib/cli/src/commands/run.rs index b351f0c7610..2c5fb3868fa 100644 --- a/lib/cli/src/commands/run.rs +++ b/lib/cli/src/commands/run.rs @@ -127,7 +127,7 @@ impl RunWithPathBuf { let default = HashMap::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); + let real_dir = self_clone.path.join(&real_dir); if !real_dir.exists() { #[cfg(feature = "debug")] if self_clone.debug { diff --git a/lib/compiler-llvm/src/abi/aarch64_systemv.rs b/lib/compiler-llvm/src/abi/aarch64_systemv.rs index 63069de8a22..8bcb65a008c 100644 --- a/lib/compiler-llvm/src/abi/aarch64_systemv.rs +++ b/lib/compiler-llvm/src/abi/aarch64_systemv.rs @@ -21,14 +21,19 @@ impl Abi for Aarch64SystemV { // Given a function definition, retrieve the parameter that is the vmctx pointer. fn get_vmctx_ptr_param<'ctx>(&self, func_value: &FunctionValue<'ctx>) -> PointerValue<'ctx> { func_value - .get_nth_param(u32::from( - func_value + .get_nth_param( + if func_value .get_enum_attribute( AttributeLoc::Param(0), Attribute::get_named_enum_kind_id("sret"), ) - .is_some(), - )) + .is_some() + { + 1 + } else { + 0 + }, + ) .unwrap() .into_pointer_value() } diff --git a/lib/compiler-llvm/src/abi/x86_64_systemv.rs b/lib/compiler-llvm/src/abi/x86_64_systemv.rs index 2e444d078a0..7075193080a 100644 --- a/lib/compiler-llvm/src/abi/x86_64_systemv.rs +++ b/lib/compiler-llvm/src/abi/x86_64_systemv.rs @@ -23,14 +23,19 @@ impl Abi for X86_64SystemV { // Given a function definition, retrieve the parameter that is the vmctx pointer. fn get_vmctx_ptr_param<'ctx>(&self, func_value: &FunctionValue<'ctx>) -> PointerValue<'ctx> { func_value - .get_nth_param(u32::from( - func_value + .get_nth_param( + if func_value .get_enum_attribute( AttributeLoc::Param(0), Attribute::get_named_enum_kind_id("sret"), ) - .is_some(), - )) + .is_some() + { + 1 + } else { + 0 + }, + ) .unwrap() .into_pointer_value() } diff --git a/lib/compiler-llvm/src/translator/code.rs b/lib/compiler-llvm/src/translator/code.rs index 8d35957c9de..8bdd065532c 100644 --- a/lib/compiler-llvm/src/translator/code.rs +++ b/lib/compiler-llvm/src/translator/code.rs @@ -1048,7 +1048,6 @@ impl<'ctx, 'a> LLVMFunctionCodeGenerator<'ctx, 'a> { Ok(()) } - #[allow(clippy::unnecessary_cast)] fn resolve_memory_ptr( &mut self, memory_index: MemoryIndex, diff --git a/lib/compiler-singlepass/src/arm64_decl.rs b/lib/compiler-singlepass/src/arm64_decl.rs index 1bcf54c20f8..b810cfa763c 100644 --- a/lib/compiler-singlepass/src/arm64_decl.rs +++ b/lib/compiler-singlepass/src/arm64_decl.rs @@ -8,7 +8,6 @@ use std::slice::Iter; use wasmer_types::{CallingConvention, Type}; /// General-purpose registers. -#[allow(clippy::upper_case_acronyms)] #[repr(u8)] #[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] pub enum GPR { @@ -49,7 +48,7 @@ pub enum GPR { /// NEON registers. #[repr(u8)] #[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] -#[allow(dead_code, clippy::upper_case_acronyms)] +#[allow(dead_code)] pub enum NEON { V0 = 0, V1 = 1, diff --git a/lib/compiler-singlepass/src/codegen.rs b/lib/compiler-singlepass/src/codegen.rs index c9ab5760d45..9b24e3be68f 100644 --- a/lib/compiler-singlepass/src/codegen.rs +++ b/lib/compiler-singlepass/src/codegen.rs @@ -1143,7 +1143,7 @@ impl<'a, M: Machine> FuncGen<'a, M> { let fsm = FunctionStateMap::new( machine.new_machine_state(), - local_func_index.index(), + local_func_index.index() as usize, 32, (0..local_types.len()) .map(|_| WasmAbstractValue::Runtime) @@ -6057,7 +6057,7 @@ impl<'a, M: Machine> FuncGen<'a, M> { .emit_call_register(this.machine.get_grp_for_call()) }, // [vmctx, func_index] -> funcref - iter::once(Location::Imm32(function_index)), + iter::once(Location::Imm32(function_index as u32)), iter::once(WpType::I64), )?; diff --git a/lib/compiler-singlepass/src/emitter_arm64.rs b/lib/compiler-singlepass/src/emitter_arm64.rs index 104d7787c9b..948fe793ced 100644 --- a/lib/compiler-singlepass/src/emitter_arm64.rs +++ b/lib/compiler-singlepass/src/emitter_arm64.rs @@ -805,7 +805,6 @@ impl EmitterARM64 for Assembler { } Ok(()) } - #[allow(clippy::unnecessary_cast)] fn emit_ldria( &mut self, sz: Size, @@ -850,7 +849,6 @@ impl EmitterARM64 for Assembler { } Ok(()) } - #[allow(clippy::unnecessary_cast)] fn emit_ldpia( &mut self, sz: Size, @@ -1250,9 +1248,9 @@ impl EmitterARM64 for Assembler { (Size::S64, Location::Imm64(val), Location::GPR(dst)) => { let dst = dst.into_index() as u32; if val < 0x1000 { - dynasm!(self ; mov W(dst), val); + dynasm!(self ; mov W(dst), val as u64); } else if encode_logical_immediate_64bit(val as _).is_some() { - dynasm!(self ; orr X(dst), xzr, val); + dynasm!(self ; orr X(dst), xzr, val as u64); } else { codegen_error!("singleplasse can't emit MOV S64 {}, {:?}", val, dst); } @@ -1596,7 +1594,6 @@ impl EmitterARM64 for Assembler { } Ok(()) } - #[allow(clippy::unnecessary_cast)] fn emit_add_lsl( &mut self, sz: Size, @@ -1624,7 +1621,6 @@ impl EmitterARM64 for Assembler { Ok(()) } - #[allow(clippy::unnecessary_cast)] fn emit_cmp(&mut self, sz: Size, src: Location, dst: Location) -> Result<(), CompileError> { match (sz, src, dst) { (Size::S64, Location::GPR(src), Location::GPR(dst)) => { @@ -1646,7 +1642,7 @@ impl EmitterARM64 for Assembler { if imm >= 0x1000 { codegen_error!("singlepass CMP with imm too large {}", imm); } - dynasm!(self ; cmp X(dst), imm); + dynasm!(self ; cmp X(dst), imm as u32); } (Size::S64, Location::Imm64(imm), Location::GPR(dst)) => { let dst = dst.into_index() as u32; @@ -1687,10 +1683,10 @@ impl EmitterARM64 for Assembler { } (Size::S64, Location::Imm64(imm), Location::GPR(dst)) => { let dst = dst.into_index() as u32; - if encode_logical_immediate_64bit(imm).is_none() { + if encode_logical_immediate_64bit(imm as u64).is_none() { codegen_error!("singlepass TST with incompatible imm {}", imm); } - dynasm!(self ; tst X(dst), imm); + dynasm!(self ; tst X(dst), imm as u64); } (Size::S32, Location::GPR(src), Location::GPR(dst)) => { let src = src.into_index() as u32; @@ -1728,6 +1724,7 @@ impl EmitterARM64 for Assembler { if imm > 63 { codegen_error!("singlepass LSL with incompatible imm {}", imm); } + let imm = imm as u32; let dst = dst.into_index() as u32; dynasm!(self ; lsl X(dst), X(src1), imm); } @@ -1771,7 +1768,7 @@ impl EmitterARM64 for Assembler { if imm > 31 { codegen_error!("singlepass LSL with incompatible imm {}", imm); } - dynasm!(self ; lsl W(dst), W(src1), imm); + dynasm!(self ; lsl W(dst), W(src1), imm as u32); } _ => codegen_error!( "singlepass can't emit LSL {:?} {:?} {:?} {:?}", @@ -1783,7 +1780,6 @@ impl EmitterARM64 for Assembler { } Ok(()) } - #[allow(clippy::unnecessary_cast)] fn emit_asr( &mut self, sz: Size, @@ -1847,7 +1843,7 @@ impl EmitterARM64 for Assembler { if imm == 0 || imm > 31 { codegen_error!("singlepass ASR with incompatible imm {}", imm); } - dynasm!(self ; asr W(dst), W(src1), imm); + dynasm!(self ; asr W(dst), W(src1), imm as u32); } _ => codegen_error!( "singlepass can't emit ASR {:?} {:?} {:?} {:?}", @@ -1859,7 +1855,6 @@ impl EmitterARM64 for Assembler { } Ok(()) } - #[allow(clippy::unnecessary_cast)] fn emit_lsr( &mut self, sz: Size, @@ -1935,7 +1930,6 @@ impl EmitterARM64 for Assembler { } Ok(()) } - #[allow(clippy::unnecessary_cast)] fn emit_ror( &mut self, sz: Size, @@ -2004,7 +1998,6 @@ impl EmitterARM64 for Assembler { Ok(()) } - #[allow(clippy::unnecessary_cast)] fn emit_or( &mut self, sz: Size, @@ -2053,7 +2046,6 @@ impl EmitterARM64 for Assembler { } Ok(()) } - #[allow(clippy::unnecessary_cast)] fn emit_and( &mut self, sz: Size, @@ -2102,7 +2094,6 @@ impl EmitterARM64 for Assembler { } Ok(()) } - #[allow(clippy::unnecessary_cast)] fn emit_eor( &mut self, sz: Size, @@ -3218,7 +3209,6 @@ impl EmitterARM64 for Assembler { } } -#[allow(clippy::unnecessary_cast)] pub fn gen_std_trampoline_arm64( sig: &FunctionType, calling_convention: CallingConvention, diff --git a/lib/compiler-singlepass/src/machine_arm64.rs b/lib/compiler-singlepass/src/machine_arm64.rs index 4788e50618a..b07e0f46ed9 100644 --- a/lib/compiler-singlepass/src/machine_arm64.rs +++ b/lib/compiler-singlepass/src/machine_arm64.rs @@ -168,7 +168,6 @@ impl MachineARM64 { } } - #[allow(clippy::unnecessary_cast)] fn location_to_reg( &mut self, sz: Size, @@ -321,7 +320,6 @@ impl MachineARM64 { _ => codegen_error!("singlepass can't emit location_to_reg {:?} {:?}", sz, src), } } - #[allow(clippy::unnecessary_cast)] fn location_to_neon( &mut self, sz: Size, diff --git a/lib/compiler/src/engine/artifact.rs b/lib/compiler/src/engine/artifact.rs index 74baf98b927..e60a86142ed 100644 --- a/lib/compiler/src/engine/artifact.rs +++ b/lib/compiler/src/engine/artifact.rs @@ -299,7 +299,6 @@ impl Artifact { } /// Do preinstantiation logic that is executed before instantiating - #[allow(clippy::result_large_err)] pub fn preinstantiate(&self) -> Result<(), InstantiationError> { Ok(()) } @@ -309,7 +308,6 @@ impl Artifact { /// # Safety /// /// See [`InstanceHandle::new`]. - #[allow(clippy::result_large_err)] pub unsafe fn instantiate( &self, tunables: &dyn Tunables, @@ -390,7 +388,6 @@ impl Artifact { /// # Safety /// /// See [`InstanceHandle::finish_instantiation`]. - #[allow(clippy::result_large_err)] pub unsafe fn finish_instantiation( &self, trap_handler: Option<*const TrapHandlerFn<'static>>, diff --git a/lib/compiler/src/engine/resolver.rs b/lib/compiler/src/engine/resolver.rs index e4699370bd0..9fac5fc0aec 100644 --- a/lib/compiler/src/engine/resolver.rs +++ b/lib/compiler/src/engine/resolver.rs @@ -60,7 +60,6 @@ fn get_runtime_size(context: &StoreObjects, extern_: &VMExtern) -> Option { /// a `Resolver`. /// /// If all imports are satisfied returns an `Imports` instance required for a module instantiation. -#[allow(clippy::result_large_err)] pub fn resolve_imports( module: &ModuleInfo, imports: &[VMExtern], diff --git a/lib/compiler/src/engine/tunables.rs b/lib/compiler/src/engine/tunables.rs index 945908a18cb..596af921dc5 100644 --- a/lib/compiler/src/engine/tunables.rs +++ b/lib/compiler/src/engine/tunables.rs @@ -60,7 +60,6 @@ pub trait Tunables { /// /// # Safety /// - `memory_definition_locations` must point to a valid locations in VM memory. - #[allow(clippy::result_large_err)] unsafe fn create_memories( &self, context: &mut StoreObjects, @@ -94,7 +93,6 @@ pub trait Tunables { /// # Safety /// /// To be done - #[allow(clippy::result_large_err)] unsafe fn create_tables( &self, context: &mut StoreObjects, @@ -125,7 +123,6 @@ pub trait Tunables { /// Allocate memory for just the globals of the current module, /// with initializers applied. - #[allow(clippy::result_large_err)] fn create_globals( &self, context: &mut StoreObjects, diff --git a/lib/emscripten/src/syscalls/mod.rs b/lib/emscripten/src/syscalls/mod.rs index 41ba7761c69..42ce7b1ece4 100644 --- a/lib/emscripten/src/syscalls/mod.rs +++ b/lib/emscripten/src/syscalls/mod.rs @@ -405,7 +405,6 @@ pub fn ___syscall192(mut ctx: FunctionEnvMut, _which: c_int, mut varargs: } /// lseek -#[allow(clippy::unnecessary_cast)] pub fn ___syscall140(ctx: FunctionEnvMut, _which: i32, mut varargs: VarArgs) -> i32 { // -> c_int debug!("emscripten::___syscall140 (lseek) {}", _which); diff --git a/lib/vbus/src/lib.rs b/lib/vbus/src/lib.rs index 0b6696d64ff..e51ec11ffac 100644 --- a/lib/vbus/src/lib.rs +++ b/lib/vbus/src/lib.rs @@ -285,7 +285,7 @@ pub struct UnsupportedVirtualBus {} impl VirtualBus for UnsupportedVirtualBus { fn new_spawn(&self) -> SpawnOptions { - SpawnOptions::new(Box::::default()) + SpawnOptions::new(Box::new(UnsupportedVirtualBusSpawner::default())) } fn listen(&self) -> Result> { diff --git a/lib/vm/src/vmcontext.rs b/lib/vm/src/vmcontext.rs index d682f53d554..f87df89c471 100644 --- a/lib/vm/src/vmcontext.rs +++ b/lib/vm/src/vmcontext.rs @@ -404,7 +404,7 @@ pub(crate) unsafe fn memory32_atomic_check32( let dst = mem.base.offset(dst) as *mut u32; let atomic_dst = AtomicPtr::new(dst); let read_val = *atomic_dst.load(Ordering::Acquire); - let ret = u32::from(read_val != val); + let ret = if read_val == val { 0 } else { 1 }; Ok(ret) } @@ -435,7 +435,7 @@ pub(crate) unsafe fn memory32_atomic_check64( let dst = mem.base.offset(dst) as *mut u64; let atomic_dst = AtomicPtr::new(dst); let read_val = *atomic_dst.load(Ordering::Acquire); - let ret = u32::from(read_val != val); + let ret = if read_val == val { 0 } else { 1 }; Ok(ret) } diff --git a/lib/wasi/src/runtime.rs b/lib/wasi/src/runtime.rs index 6b6893a77b8..1394e010b8a 100644 --- a/lib/wasi/src/runtime.rs +++ b/lib/wasi/src/runtime.rs @@ -123,15 +123,14 @@ impl PluggableRuntimeImplementation { } } -#[allow(clippy::derivable_impls)] impl Default for PluggableRuntimeImplementation { fn default() -> Self { Self { #[cfg(not(feature = "host-vnet"))] - networking: Box::::default(), + networking: Box::new(wasmer_vnet::UnsupportedVirtualNetworking::default()), #[cfg(feature = "host-vnet")] - networking: Box::::default(), - bus: Box::::default(), + networking: Box::new(wasmer_wasi_local_networking::LocalNetworking::default()), + bus: Box::new(UnsupportedVirtualBus::default()), thread_id_seed: Default::default(), } } diff --git a/lib/wasi/src/state/mod.rs b/lib/wasi/src/state/mod.rs index 0715d645bde..69f83ee548e 100644 --- a/lib/wasi/src/state/mod.rs +++ b/lib/wasi/src/state/mod.rs @@ -356,11 +356,11 @@ pub struct WasiFs { pub(crate) fn default_fs_backing() -> Box { cfg_if::cfg_if! { if #[cfg(feature = "host-fs")] { - Box::::default() + Box::new(wasmer_vfs::host_fs::FileSystem::default()) } else if #[cfg(feature = "mem-fs")] { - Box::::default() + Box::new(wasmer_vfs::mem_fs::FileSystem::default()) } else { - Box::::default() + Box::new(FallbackFileSystem::default()) } } } @@ -1550,7 +1550,7 @@ impl WasiFs { fn create_stdout(&self, inodes: &mut WasiInodes) { self.create_std_dev_inner( inodes, - Box::::default(), + Box::new(Stdout::default()), "stdout", __WASI_STDOUT_FILENO, STDOUT_DEFAULT_RIGHTS, @@ -1560,7 +1560,7 @@ impl WasiFs { fn create_stdin(&self, inodes: &mut WasiInodes) { self.create_std_dev_inner( inodes, - Box::::default(), + Box::new(Stdin::default()), "stdin", __WASI_STDIN_FILENO, STDIN_DEFAULT_RIGHTS, @@ -1570,7 +1570,7 @@ impl WasiFs { fn create_stderr(&self, inodes: &mut WasiInodes) { self.create_std_dev_inner( inodes, - Box::::default(), + Box::new(Stderr::default()), "stderr", __WASI_STDERR_FILENO, STDERR_DEFAULT_RIGHTS, diff --git a/lib/wasi/src/syscalls/mod.rs b/lib/wasi/src/syscalls/mod.rs index 01328a25ad3..ebf755d920a 100644 --- a/lib/wasi/src/syscalls/mod.rs +++ b/lib/wasi/src/syscalls/mod.rs @@ -877,7 +877,8 @@ pub fn fd_pread( Kind::File { handle, .. } => { if let Some(h) = handle { wasi_try_ok!( - h.seek(std::io::SeekFrom::Start(offset)).map_err(map_io_err), + h.seek(std::io::SeekFrom::Start(offset as u64)) + .map_err(map_io_err), env ); wasi_try_ok!(read_bytes(h, &memory, iovs), env) From b7c868e890bf18684d80b30a9c3fa2742988d25e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=BCtt?= Date: Thu, 19 Jan 2023 12:46:59 +0100 Subject: [PATCH 31/55] Fix more errors on Windows --- lib/wasi/src/state/types.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/wasi/src/state/types.rs b/lib/wasi/src/state/types.rs index f4aca85ab3f..d85c8dcb0bb 100644 --- a/lib/wasi/src/state/types.rs +++ b/lib/wasi/src/state/types.rs @@ -331,7 +331,7 @@ pub(crate) fn poll( .bytes_available_write()? .map(|s| s > 0) .unwrap_or(false); - let is_closed = file.is_open() == false; + let is_closed = !file.is_open(); tracing::debug!( "poll_evt can_read={} can_write={} is_closed={}", From c61a5d7cf5891bcd3e8e2ea6c5535d3ebec2eeb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=BCtt?= Date: Thu, 19 Jan 2023 13:08:27 +0100 Subject: [PATCH 32/55] Store::default - create new store with BaseTunables --- lib/cli/src/commands/create_exe.rs | 65 +----------------------------- lib/cli/src/store.rs | 6 ++- 2 files changed, 6 insertions(+), 65 deletions(-) diff --git a/lib/cli/src/commands/create_exe.rs b/lib/cli/src/commands/create_exe.rs index 5ea79d90f08..9144d21e3ad 100644 --- a/lib/cli/src/commands/create_exe.rs +++ b/lib/cli/src/commands/create_exe.rs @@ -2,7 +2,7 @@ use super::ObjectFormat; use crate::common::normalize_path; -use crate::store::{CompilerOptions, CompilerType}; +use crate::store::CompilerOptions; use anyhow::{Context, Result}; use clap::Parser; use serde::{Deserialize, Serialize}; @@ -224,22 +224,7 @@ impl CreateExe { return Err(anyhow::anyhow!("input path cannot be a directory")); } - let (_, ct) = self.compiler.get_store_for_target(target.clone())?; - - let compiler_type = if self.compiler.singlepass { - CompilerType::Singlepass - } else if self.compiler.cranelift { - CompilerType::Cranelift - } else if self.compiler.llvm { - CompilerType::LLVM - } else { - ct // default compiler type - }; - - let engine = EngineBuilder::new(get_config(&compiler_type)?).engine(); - - let tunables = BaseTunables::for_target(engine.target()); - let store = Store::new_with_tunables(&engine, tunables); + let (store, compiler_type) = self.compiler.get_store_for_target(target.clone())?; println!("Compiler: {}", compiler_type.to_string()); println!("Target: {}", target.triple()); @@ -318,52 +303,6 @@ impl CreateExe { } } -fn get_config( - compiler: &CompilerType, -) -> Result, anyhow::Error> { - match compiler { - CompilerType::Cranelift => { - #[cfg(feature = "cranelift")] - { - Ok(Box::new(wasmer_compiler_cranelift::Cranelift::default())) - } - #[cfg(not(feature = "cranelift"))] - { - Err(anyhow::anyhow!( - "compiler \"cranelift\" not embedded in wasmer-cli" - )) - } - } - CompilerType::Singlepass => { - #[cfg(feature = "singlepass")] - { - Ok(Box::new(wasmer_compiler_singlepass::Singlepass::default())) - } - #[cfg(not(feature = "singlepass"))] - { - Err(anyhow::anyhow!( - "compiler \"singlepass\" not embedded in wasmer-cli" - )) - } - } - CompilerType::LLVM => { - #[cfg(feature = "llvm")] - { - Ok(Box::new(wasmer_compiler_llvm::LLVM::default())) - } - #[cfg(not(feature = "llvm"))] - { - Err(anyhow::anyhow!( - "compiler \"llvm\" not embedded in wasmer-cli" - )) - } - } - CompilerType::Headless => Err(anyhow::anyhow!( - "cannot compile .wasm files to object files with compiler \"headless\"" - )), - } -} - fn write_entrypoint(directory: &Path, entrypoint: &Entrypoint) -> Result<(), anyhow::Error> { std::fs::write( directory.join("entrypoint.json"), diff --git a/lib/cli/src/store.rs b/lib/cli/src/store.rs index 1d2c55904cb..bf3e44123b4 100644 --- a/lib/cli/src/store.rs +++ b/lib/cli/src/store.rs @@ -105,7 +105,8 @@ impl CompilerOptions { pub fn get_store_for_target(&self, target: Target) -> Result<(Store, CompilerType)> { let (compiler_config, compiler_type) = self.get_compiler_config()?; let engine = self.get_engine(target, compiler_config)?; - let store = Store::new(engine); + let tunables = BaseTunables::for_target(engine.target()); + let store = Store::new_with_tunables(&engine, tunables); Ok((store, compiler_type)) } @@ -313,7 +314,8 @@ impl StoreOptions { pub fn get_store_for_target(&self, target: Target) -> Result<(Store, CompilerType)> { let (compiler_config, compiler_type) = self.compiler.get_compiler_config()?; let engine = self.get_engine_with_compiler(target, compiler_config)?; - let store = Store::new(engine); + let tunables = BaseTunables::for_target(engine.target()); + let store = Store::new_with_tunables(&engine, tunables); Ok((store, compiler_type)) } From 32fbfc338c314e54d74ed713fa5598b0238e9431 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=BCtt?= Date: Thu, 19 Jan 2023 15:41:49 +0100 Subject: [PATCH 33/55] Disable set_target(Some(target)) for Engine builder See https://github.com/wasmerio/wasmer/issues/3508 --- lib/cli/src/store.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/cli/src/store.rs b/lib/cli/src/store.rs index bf3e44123b4..e813cedd4ee 100644 --- a/lib/cli/src/store.rs +++ b/lib/cli/src/store.rs @@ -119,7 +119,8 @@ impl CompilerOptions { let features = self.get_features(compiler_config.default_features_for_target(&target))?; let engine: Engine = wasmer_compiler::EngineBuilder::new(compiler_config) .set_features(Some(features)) - .set_target(Some(target)) + // https://github.com/wasmerio/wasmer/issues/3508 + // .set_target(Some(target)) .engine(); Ok(engine) From 6398b068658b0d3d6ec7a33c833f0fa8c6001f25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=BCtt?= Date: Thu, 19 Jan 2023 16:24:13 +0100 Subject: [PATCH 34/55] Enable set_target() again, but disable unwind info --- lib/cli/src/store.rs | 3 +-- lib/compiler-cranelift/src/translator/unwind.rs | 12 +++++++----- lib/compiler-singlepass/src/codegen.rs | 10 ++++++---- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/lib/cli/src/store.rs b/lib/cli/src/store.rs index e813cedd4ee..bf3e44123b4 100644 --- a/lib/cli/src/store.rs +++ b/lib/cli/src/store.rs @@ -119,8 +119,7 @@ impl CompilerOptions { let features = self.get_features(compiler_config.default_features_for_target(&target))?; let engine: Engine = wasmer_compiler::EngineBuilder::new(compiler_config) .set_features(Some(features)) - // https://github.com/wasmerio/wasmer/issues/3508 - // .set_target(Some(target)) + .set_target(Some(target)) .engine(); Ok(engine) diff --git a/lib/compiler-cranelift/src/translator/unwind.rs b/lib/compiler-cranelift/src/translator/unwind.rs index 1aff474ddce..a9627c05f41 100644 --- a/lib/compiler-cranelift/src/translator/unwind.rs +++ b/lib/compiler-cranelift/src/translator/unwind.rs @@ -47,11 +47,13 @@ pub(crate) fn compiled_function_unwind_info( .map_err(|error| CompileError::Codegen(pretty_error(&context.func, error)))?; match unwind_info { - Some(UnwindInfo::WindowsX64(unwind)) => { - let size = unwind.emit_size(); - let mut data: Vec = vec![0; size]; - unwind.emit(&mut data[..]); - Ok(CraneliftUnwindInfo::WindowsX64(data)) + Some(UnwindInfo::WindowsX64(_unwind)) => { + // https://github.com/wasmerio/wasmer/issues/3508 + Ok(CraneliftUnwindInfo::None) + // let size = unwind.emit_size(); + // let mut data: Vec = vec![0; size]; + // unwind.emit(&mut data[..]); + // Ok(CraneliftUnwindInfo::WindowsX64(data)) } Some(UnwindInfo::SystemV(unwind)) => Ok(CraneliftUnwindInfo::Fde(unwind)), Some(_) | None => Ok(CraneliftUnwindInfo::None), diff --git a/lib/compiler-singlepass/src/codegen.rs b/lib/compiler-singlepass/src/codegen.rs index 9b24e3be68f..1ec7b923938 100644 --- a/lib/compiler-singlepass/src/codegen.rs +++ b/lib/compiler-singlepass/src/codegen.rs @@ -6661,10 +6661,12 @@ impl<'a, M: Machine> FuncGen<'a, M> { } } CallingConvention::WindowsFastcall => { - let unwind = self.machine.gen_windows_unwind_info(body_len); - if let Some(unwind) = unwind { - unwind_info = Some(CompiledFunctionUnwindInfo::WindowsX64(unwind)); - } + // https://github.com/wasmerio/wasmer/issues/3508 + // + // let unwind = self.machine.gen_windows_unwind_info(body_len); + // if let Some(unwind) = unwind { + // unwind_info = Some(CompiledFunctionUnwindInfo::WindowsX64(unwind)); + // } } _ => (), }; From 4c770dd1576ee6eaef1481bfaa45ac264196f977 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=BCtt?= Date: Thu, 19 Jan 2023 16:35:03 +0100 Subject: [PATCH 35/55] Add comments to explain IndexMap --- lib/cli/src/commands/run.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/cli/src/commands/run.rs b/lib/cli/src/commands/run.rs index 285ade969e6..41705044c11 100644 --- a/lib/cli/src/commands/run.rs +++ b/lib/cli/src/commands/run.rs @@ -120,6 +120,11 @@ impl RunWithPathBuf { #[cfg(feature = "wasi")] { + // 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() { From f57716448942b354aa9e23feaf9450ab25be6af7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=BCtt?= Date: Thu, 19 Jan 2023 16:43:22 +0100 Subject: [PATCH 36/55] Revert "Enable set_target() again, but disable unwind info" This reverts commit 6398b068658b0d3d6ec7a33c833f0fa8c6001f25. --- lib/cli/src/store.rs | 3 ++- lib/compiler-cranelift/src/translator/unwind.rs | 12 +++++------- lib/compiler-singlepass/src/codegen.rs | 10 ++++------ 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/lib/cli/src/store.rs b/lib/cli/src/store.rs index bf3e44123b4..e813cedd4ee 100644 --- a/lib/cli/src/store.rs +++ b/lib/cli/src/store.rs @@ -119,7 +119,8 @@ impl CompilerOptions { let features = self.get_features(compiler_config.default_features_for_target(&target))?; let engine: Engine = wasmer_compiler::EngineBuilder::new(compiler_config) .set_features(Some(features)) - .set_target(Some(target)) + // https://github.com/wasmerio/wasmer/issues/3508 + // .set_target(Some(target)) .engine(); Ok(engine) diff --git a/lib/compiler-cranelift/src/translator/unwind.rs b/lib/compiler-cranelift/src/translator/unwind.rs index a9627c05f41..1aff474ddce 100644 --- a/lib/compiler-cranelift/src/translator/unwind.rs +++ b/lib/compiler-cranelift/src/translator/unwind.rs @@ -47,13 +47,11 @@ pub(crate) fn compiled_function_unwind_info( .map_err(|error| CompileError::Codegen(pretty_error(&context.func, error)))?; match unwind_info { - Some(UnwindInfo::WindowsX64(_unwind)) => { - // https://github.com/wasmerio/wasmer/issues/3508 - Ok(CraneliftUnwindInfo::None) - // let size = unwind.emit_size(); - // let mut data: Vec = vec![0; size]; - // unwind.emit(&mut data[..]); - // Ok(CraneliftUnwindInfo::WindowsX64(data)) + Some(UnwindInfo::WindowsX64(unwind)) => { + let size = unwind.emit_size(); + let mut data: Vec = vec![0; size]; + unwind.emit(&mut data[..]); + Ok(CraneliftUnwindInfo::WindowsX64(data)) } Some(UnwindInfo::SystemV(unwind)) => Ok(CraneliftUnwindInfo::Fde(unwind)), Some(_) | None => Ok(CraneliftUnwindInfo::None), diff --git a/lib/compiler-singlepass/src/codegen.rs b/lib/compiler-singlepass/src/codegen.rs index 1ec7b923938..9b24e3be68f 100644 --- a/lib/compiler-singlepass/src/codegen.rs +++ b/lib/compiler-singlepass/src/codegen.rs @@ -6661,12 +6661,10 @@ impl<'a, M: Machine> FuncGen<'a, M> { } } CallingConvention::WindowsFastcall => { - // https://github.com/wasmerio/wasmer/issues/3508 - // - // let unwind = self.machine.gen_windows_unwind_info(body_len); - // if let Some(unwind) = unwind { - // unwind_info = Some(CompiledFunctionUnwindInfo::WindowsX64(unwind)); - // } + let unwind = self.machine.gen_windows_unwind_info(body_len); + if let Some(unwind) = unwind { + unwind_info = Some(CompiledFunctionUnwindInfo::WindowsX64(unwind)); + } } _ => (), }; From e112604ef7c80e5a0e655866fb4db2b06d937973 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=BCtt?= Date: Thu, 19 Jan 2023 16:43:34 +0100 Subject: [PATCH 37/55] Revert "Disable set_target(Some(target)) for Engine builder" This reverts commit 32fbfc338c314e54d74ed713fa5598b0238e9431. --- lib/cli/src/store.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/cli/src/store.rs b/lib/cli/src/store.rs index e813cedd4ee..bf3e44123b4 100644 --- a/lib/cli/src/store.rs +++ b/lib/cli/src/store.rs @@ -119,8 +119,7 @@ impl CompilerOptions { let features = self.get_features(compiler_config.default_features_for_target(&target))?; let engine: Engine = wasmer_compiler::EngineBuilder::new(compiler_config) .set_features(Some(features)) - // https://github.com/wasmerio/wasmer/issues/3508 - // .set_target(Some(target)) + .set_target(Some(target)) .engine(); Ok(engine) From 17943e5e1129e72f3946f6948c013c3803b23495 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=BCtt?= Date: Thu, 19 Jan 2023 17:24:44 +0100 Subject: [PATCH 38/55] Refactor Artifact::new into separate sub-functions --- lib/cli/src/commands/create_exe.rs | 11 +++++++---- lib/compiler/src/engine/artifact.rs | 24 +++++++++++++++++++++++- 2 files changed, 30 insertions(+), 5 deletions(-) diff --git a/lib/cli/src/commands/create_exe.rs b/lib/cli/src/commands/create_exe.rs index 9144d21e3ad..a6c465df222 100644 --- a/lib/cli/src/commands/create_exe.rs +++ b/lib/cli/src/commands/create_exe.rs @@ -971,15 +971,18 @@ fn get_module_infos( let mut module_infos = BTreeMap::new(); for (atom_name, atom_bytes) in atoms { - let module = Module::from_binary(store, atom_bytes.as_slice()) - .map_err(|e| anyhow::anyhow!("could not deserialize module {atom_name}: {e}"))?; + let tunables = BaseTunables::for_target(store.engine().target()); + let module_info = + Artifact::get_module_info(store.engine(), atom_bytes.as_slice(), &tunables) + .map_err(|e| anyhow::anyhow!("could not compile module {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()); } } diff --git a/lib/compiler/src/engine/artifact.rs b/lib/compiler/src/engine/artifact.rs index e60a86142ed..4bddbe11e4c 100644 --- a/lib/compiler/src/engine/artifact.rs +++ b/lib/compiler/src/engine/artifact.rs @@ -56,6 +56,17 @@ impl Artifact { data: &[u8], tunables: &dyn Tunables, ) -> Result { + let artifact = Self::get_artifact_build(engine, data, tunables)?; + let mut inner_engine = engine.inner_mut(); + Self::from_parts(&mut inner_engine, artifact) + } + + #[cfg(feature = "compiler")] + fn get_artifact_build( + engine: &Engine, + data: &[u8], + tunables: &dyn Tunables, + ) -> Result { let environ = ModuleEnvironment::new(); let mut inner_engine = engine.inner_mut(); let translation = environ.translate(data).map_err(CompileError::Wasm)?; @@ -79,7 +90,18 @@ impl Artifact { table_styles, )?; - Self::from_parts(&mut inner_engine, artifact) + Ok(artifact) + } + + /// Compile a data buffer into a `ArtifactBuild`, which may then be instantiated. + #[cfg(feature = "compiler")] + pub fn get_module_info( + engine: &Engine, + data: &[u8], + tunables: &dyn Tunables, + ) -> Result { + let artifact = Self::get_artifact_build(engine, data, tunables)?; + Ok(artifact.create_module_info()) } /// Compile a data buffer into a `ArtifactBuild`, which may then be instantiated. From a33cb20c3b3ccd13989911d6d7cca1ebb5153b0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=BCtt?= Date: Thu, 19 Jan 2023 17:32:20 +0100 Subject: [PATCH 39/55] Fix make lint --- lib/cli/src/commands/run.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cli/src/commands/run.rs b/lib/cli/src/commands/run.rs index 41705044c11..0d6bef5a641 100644 --- a/lib/cli/src/commands/run.rs +++ b/lib/cli/src/commands/run.rs @@ -120,7 +120,7 @@ impl RunWithPathBuf { #[cfg(feature = "wasi")] { - // See https://github.com/wasmerio/wasmer/issues/3492 - + // 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 From 32b39e80efc5e51410d69348a4cabdb00aad2e22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=BCtt?= Date: Thu, 19 Jan 2023 19:13:28 +0100 Subject: [PATCH 40/55] Remove unnecessary printlns --- lib/cli/src/commands/create_exe.rs | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/lib/cli/src/commands/create_exe.rs b/lib/cli/src/commands/create_exe.rs index a6c465df222..80d72eb5690 100644 --- a/lib/cli/src/commands/create_exe.rs +++ b/lib/cli/src/commands/create_exe.rs @@ -1285,20 +1285,16 @@ fn link_exe_from_dir( cmd.args(files_winsdk); } - println!("running cmd: {cmd:?}"); + 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 @@ -1308,7 +1304,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())), From af67c8662123d92403972b2810f06f04071752cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=BCtt?= Date: Thu, 19 Jan 2023 19:33:01 +0100 Subject: [PATCH 41/55] Fix wrong documentation --- lib/wasi/src/runners/emscripten.rs | 2 +- lib/wasi/src/runners/wasi.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/wasi/src/runners/emscripten.rs b/lib/wasi/src/runners/emscripten.rs index fd92bbb74f9..168f109c5c9 100644 --- a/lib/wasi/src/runners/emscripten.rs +++ b/lib/wasi/src/runners/emscripten.rs @@ -21,7 +21,7 @@ pub struct EmscriptenRunner { } impl EmscriptenRunner { - /// Constructs a new `EmscriptenRunner` given an `Engine` + /// Constructs a new `EmscriptenRunner` given an `Store` pub fn new(store: Store) -> Self { Self { args: Vec::new(), diff --git a/lib/wasi/src/runners/wasi.rs b/lib/wasi/src/runners/wasi.rs index e010a51406a..52b02fcbf99 100644 --- a/lib/wasi/src/runners/wasi.rs +++ b/lib/wasi/src/runners/wasi.rs @@ -19,7 +19,7 @@ pub struct WasiRunner { } impl WasiRunner { - /// Constructs a new `WasiRunner` given an `Engine` + /// Constructs a new `WasiRunner` given an `Store` pub fn new(store: Store) -> Self { Self { args: Vec::new(), From b26b48794cc7b00bb5f939dfdf40bba94e9ba86c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=BCtt?= Date: Thu, 19 Jan 2023 19:43:01 +0100 Subject: [PATCH 42/55] Move get_module_info into the Engine --- lib/cli/src/commands/create_exe.rs | 11 ++++------- lib/compiler/src/engine/artifact.rs | 24 +----------------------- lib/compiler/src/engine/inner.rs | 9 +++++++++ 3 files changed, 14 insertions(+), 30 deletions(-) diff --git a/lib/cli/src/commands/create_exe.rs b/lib/cli/src/commands/create_exe.rs index 80d72eb5690..7eb6f0362e2 100644 --- a/lib/cli/src/commands/create_exe.rs +++ b/lib/cli/src/commands/create_exe.rs @@ -224,7 +224,7 @@ impl CreateExe { return Err(anyhow::anyhow!("input path cannot be a directory")); } - let (store, compiler_type) = self.compiler.get_store_for_target(target.clone())?; + let (_, compiler_type) = self.compiler.get_store_for_target(target.clone())?; println!("Compiler: {}", compiler_type.to_string()); println!("Target: {}", target.triple()); @@ -273,7 +273,7 @@ impl CreateExe { ) }?; - get_module_infos(&tempdir, &atoms, object_format, &store)?; + get_module_infos(&tempdir, &atoms, object_format)?; let mut entrypoint = get_entrypoint(&tempdir)?; create_header_files_in_dir(&tempdir, &mut entrypoint, &atoms, &self.precompiled_atom)?; link_exe_from_dir( @@ -964,17 +964,14 @@ fn get_module_infos( directory: &Path, atoms: &[(String, Vec)], object_format: ObjectFormat, - store: &Store, ) -> Result, anyhow::Error> { let mut entrypoint = get_entrypoint(directory).with_context(|| anyhow::anyhow!("get module infos"))?; let mut module_infos = BTreeMap::new(); for (atom_name, atom_bytes) in atoms { - let tunables = BaseTunables::for_target(store.engine().target()); - let module_info = - Artifact::get_module_info(store.engine(), atom_bytes.as_slice(), &tunables) - .map_err(|e| anyhow::anyhow!("could not compile 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 diff --git a/lib/compiler/src/engine/artifact.rs b/lib/compiler/src/engine/artifact.rs index 4bddbe11e4c..2c917475273 100644 --- a/lib/compiler/src/engine/artifact.rs +++ b/lib/compiler/src/engine/artifact.rs @@ -56,19 +56,8 @@ impl Artifact { data: &[u8], tunables: &dyn Tunables, ) -> Result { - let artifact = Self::get_artifact_build(engine, data, tunables)?; let mut inner_engine = engine.inner_mut(); - Self::from_parts(&mut inner_engine, artifact) - } - - #[cfg(feature = "compiler")] - fn get_artifact_build( - engine: &Engine, - data: &[u8], - tunables: &dyn Tunables, - ) -> Result { let environ = ModuleEnvironment::new(); - let mut inner_engine = engine.inner_mut(); let translation = environ.translate(data).map_err(CompileError::Wasm)?; let module = translation.module; let memory_styles: PrimaryMap = module @@ -90,18 +79,7 @@ impl Artifact { table_styles, )?; - Ok(artifact) - } - - /// Compile a data buffer into a `ArtifactBuild`, which may then be instantiated. - #[cfg(feature = "compiler")] - pub fn get_module_info( - engine: &Engine, - data: &[u8], - tunables: &dyn Tunables, - ) -> Result { - let artifact = Self::get_artifact_build(engine, data, tunables)?; - Ok(artifact.create_module_info()) + Self::from_parts(&mut inner_engine, artifact) } /// Compile a data buffer into a `ArtifactBuild`, which may then be instantiated. diff --git a/lib/compiler/src/engine/inner.rs b/lib/compiler/src/engine/inner.rs index 3abe6f6cd0e..d1c979d80af 100644 --- a/lib/compiler/src/engine/inner.rs +++ b/lib/compiler/src/engine/inner.rs @@ -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 { + // 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() From 54f0f0cbe9aa4eea1afaf2bfd29b7053b2b51325 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=BCtt?= Date: Thu, 19 Jan 2023 19:45:14 +0100 Subject: [PATCH 43/55] Undo Store::new_with_tunables debugging code --- lib/cli/src/store.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/cli/src/store.rs b/lib/cli/src/store.rs index bf3e44123b4..1d2c55904cb 100644 --- a/lib/cli/src/store.rs +++ b/lib/cli/src/store.rs @@ -105,8 +105,7 @@ impl CompilerOptions { pub fn get_store_for_target(&self, target: Target) -> Result<(Store, CompilerType)> { let (compiler_config, compiler_type) = self.get_compiler_config()?; let engine = self.get_engine(target, compiler_config)?; - let tunables = BaseTunables::for_target(engine.target()); - let store = Store::new_with_tunables(&engine, tunables); + let store = Store::new(engine); Ok((store, compiler_type)) } @@ -314,8 +313,7 @@ impl StoreOptions { pub fn get_store_for_target(&self, target: Target) -> Result<(Store, CompilerType)> { let (compiler_config, compiler_type) = self.compiler.get_compiler_config()?; let engine = self.get_engine_with_compiler(target, compiler_config)?; - let tunables = BaseTunables::for_target(engine.target()); - let store = Store::new_with_tunables(&engine, tunables); + let store = Store::new(engine); Ok((store, compiler_type)) } From c1fec2f32e2c872c4d05e52e628804e8b6b094de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=BCtt?= Date: Thu, 19 Jan 2023 19:54:23 +0100 Subject: [PATCH 44/55] Always import ModuleInfo --- lib/compiler/src/engine/inner.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/compiler/src/engine/inner.rs b/lib/compiler/src/engine/inner.rs index d1c979d80af..240ef19c87d 100644 --- a/lib/compiler/src/engine/inner.rs +++ b/lib/compiler/src/engine/inner.rs @@ -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"))] From ff11cbd7059c0b138067cefb644713b584e1777c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=BCtt?= Date: Thu, 19 Jan 2023 19:59:03 +0100 Subject: [PATCH 45/55] Make CompilerOptions flags private again --- lib/cli/src/store.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/cli/src/store.rs b/lib/cli/src/store.rs index 1d2c55904cb..49b897c7bc3 100644 --- a/lib/cli/src/store.rs +++ b/lib/cli/src/store.rs @@ -30,15 +30,15 @@ pub struct StoreOptions { pub struct CompilerOptions { /// Use Singlepass compiler. #[clap(long, conflicts_with_all = &["cranelift", "llvm"])] - pub singlepass: bool, + singlepass: bool, /// Use Cranelift compiler. #[clap(long, conflicts_with_all = &["singlepass", "llvm"])] - pub cranelift: bool, + cranelift: bool, /// Use LLVM compiler. #[clap(long, conflicts_with_all = &["singlepass", "cranelift"])] - pub llvm: bool, + llvm: bool, /// Enable compiler internal verification. #[clap(long)] From 31eb80ac02773001a1d6d25355f7055cdf0fd0bc Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Fri, 20 Jan 2023 14:14:06 +0100 Subject: [PATCH 46/55] Incremented CURRENT_VERSION, so all cache will be invalidate and be rebuilt with the 3.2 version --- lib/types/src/serialize.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/types/src/serialize.rs b/lib/types/src/serialize.rs index cab04942438..44d051b6418 100644 --- a/lib/types/src/serialize.rs +++ b/lib/types/src/serialize.rs @@ -178,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"; From 97ae242d63eb7b16c2b14ef9a41c58535171ff4e Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Fri, 20 Jan 2023 14:35:18 +0100 Subject: [PATCH 47/55] Ignore trap_pretty_print test on Windows as eh_frame has been disabled (linked to #3508) --- tests/ignores.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/ignores.txt b/tests/ignores.txt index 39978d01cd9..e541163ae5c 100644 --- a/tests/ignores.txt +++ b/tests/ignores.txt @@ -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 From 253e7209d4d3e0765f66f2da6c35e3c67267b547 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=BCtt?= Date: Fri, 20 Jan 2023 16:53:55 +0100 Subject: [PATCH 48/55] Disable tests for the 3.2.0-alpha release (re-enable them later again) See issue https://github.com/wasmerio/wasmer/issues/3513 --- tests/integration/cli/tests/create_exe.rs | 46 +++++++++++++++++++---- 1 file changed, 39 insertions(+), 7 deletions(-) diff --git a/tests/integration/cli/tests/create_exe.rs b/tests/integration/cli/tests/create_exe.rs index 25edb4617a9..449aaca635f 100644 --- a/tests/integration/cli/tests/create_exe.rs +++ b/tests/integration/cli/tests/create_exe.rs @@ -257,8 +257,12 @@ 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. +#[ignore] fn create_exe_works() -> anyhow::Result<()> { let temp_dir = tempfile::tempdir()?; let operating_dir: PathBuf = temp_dir.path().to_owned(); @@ -295,8 +299,12 @@ 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. +#[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 +369,12 @@ 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. +#[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 +430,12 @@ 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. +#[ignore] fn create_exe_works_with_file() -> anyhow::Result<()> { let temp_dir = tempfile::tempdir()?; let operating_dir: PathBuf = temp_dir.path().to_owned(); @@ -485,6 +501,10 @@ fn create_exe_works_with_file() -> anyhow::Result<()> { // see https://github.com/wasmerio/wasmer/issues/3459 #[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. +#[ignore] fn create_exe_serialized_works() -> anyhow::Result<()> { let temp_dir = tempfile::tempdir()?; let operating_dir: PathBuf = temp_dir.path().to_owned(); @@ -667,24 +687,36 @@ fn create_exe_with_object_input(args: Vec) -> 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. +#[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. +#[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)] +// #[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. +#[ignore] fn create_exe_with_object_input_serialized() -> anyhow::Result<()> { create_exe_with_object_input(vec![ "--object-format".to_string(), From b830fc0631b5dc82565542eeafe650ebc021bf28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=BCtt?= Date: Fri, 20 Jan 2023 16:58:00 +0100 Subject: [PATCH 49/55] Add link to GitHub issue to remember to re-enable tests after release --- tests/integration/cli/tests/create_exe.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/integration/cli/tests/create_exe.rs b/tests/integration/cli/tests/create_exe.rs index 449aaca635f..0da0d1b5471 100644 --- a/tests/integration/cli/tests/create_exe.rs +++ b/tests/integration/cli/tests/create_exe.rs @@ -262,6 +262,8 @@ fn test_create_exe_with_precompiled_works_1() { // 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()?; @@ -304,6 +306,8 @@ fn create_exe_works() -> anyhow::Result<()> { // 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()?; @@ -374,6 +378,8 @@ fn create_exe_works_multi_command_args_handling() -> anyhow::Result<()> { // 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()?; @@ -435,6 +441,8 @@ fn create_exe_works_multi_command() -> anyhow::Result<()> { // 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()?; @@ -504,6 +512,8 @@ fn create_exe_works_with_file() -> anyhow::Result<()> { // 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()?; @@ -692,6 +702,8 @@ fn create_exe_with_object_input(args: Vec) -> anyhow::Result<()> { // 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![]) @@ -704,6 +716,8 @@ fn create_exe_with_object_input_default() -> anyhow::Result<()> { // 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()]) @@ -716,6 +730,8 @@ fn create_exe_with_object_input_symbols() -> anyhow::Result<()> { // 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![ From 5ed4f58ecf67666b74811b5f17dd26e6b20eca74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=BCtt?= Date: Mon, 23 Jan 2023 12:52:38 +0100 Subject: [PATCH 50/55] Update CHANGELOG --- CHANGELOG.md | 2220 +++++++++++++++++++++++++------------------------- 1 file changed, 1131 insertions(+), 1089 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e84a53782bc..9da4f118d81 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,1089 +1,1131 @@ -# Changelog - -*The format is based on [Keep a Changelog].* - -[Keep a Changelog]: http://keepachangelog.com/en/1.0.0/ - -Looking for changes that affect our C API? See the [C API Changelog](lib/c-api/CHANGELOG.md). - - -## **Unreleased** - -## Fixed - - - [#3439](https://github.com/wasmerio/wasmer/pull/3439) Use GNU/Linux frame registration code for FreeBSD too - -## 3.1.0 - 12/12/2022 - -## Added - - - [#3403](https://github.com/wasmerio/wasmer/pull/3403) Add wasm_importtype_copy to C API - -## Changed - - - [#3416](https://github.com/wasmerio/wasmer/pull/3416) Download and install packages via .tar.gz URLs and improve installation error message - - [#3402](https://github.com/wasmerio/wasmer/pull/3402) Do not run first command of wapm file and print all commands instead - - [#3400](https://github.com/wasmerio/wasmer/pull/3400) Use the wasm_bindgen_downcast crate for downcasting JsValues - - [#3363](https://github.com/wasmerio/wasmer/pull/3363) Store Used CpuFeature in Artifact instead of Present CpuFeatures for Singlepass - - [#3378](https://github.com/wasmerio/wasmer/pull/3378) Introduced EngineRef and AsEngineRef trait - - [#3386](https://github.com/wasmerio/wasmer/pull/3386) Restore Support For All Wasi Clock Types - - [#3153](https://github.com/wasmerio/wasmer/pull/3153) SharedMemory & Atomics - -## Fixed - - - [#3415](https://github.com/wasmerio/wasmer/pull/3415) Fix singlepass for Aarch64 - - [#3395](https://github.com/wasmerio/wasmer/pull/3395) Fix create-exe to be able to cross-compile on Windows - - [#3396](https://github.com/wasmerio/wasmer/pull/3396) Fix build doc and minimum-sys build - -## 3.0.2 - 25/11/2022 - -## Added - - - [#3364](https://github.com/wasmerio/wasmer/pull/3364) Added the actual LZCNT / TZCNT implementation - -## Changed - - - [#3365](https://github.com/wasmerio/wasmer/pull/3365) Improve FreeBSD support - - [#3368](https://github.com/wasmerio/wasmer/pull/3368) Remove wasi conditional compilation from wasmer-registry - - [#3367](https://github.com/wasmerio/wasmer/pull/3367) Change LLVM detection in Makefile - -## Fixed - - - [#3370](https://github.com/wasmerio/wasmer/pull/3370) Fix wasmer run not interpreting URLs correctly + display fixes - - [#3371](https://github.com/wasmerio/wasmer/pull/3371) Fix cargo binstall - - -## 3.0.1 - 23/11/2022 - -## Added - - - [#3361](https://github.com/wasmerio/wasmer/pull/3361) Give users feedback when they are running "wasmer add ..." - -## Changed - - - [#3360](https://github.com/wasmerio/wasmer/pull/3360) Introduce a "wasmer_registry::queries" module with all GraphQL queries - - [#3355](https://github.com/wasmerio/wasmer/pull/3355) Fetch the pirita download URL - - [#3344](https://github.com/wasmerio/wasmer/pull/3344) Revert #3145 - - [#3302](https://github.com/wasmerio/wasmer/pull/3302) Some Refactor of Singlepass compiler to have better error and cpu features handling - - [#3296](https://github.com/wasmerio/wasmer/pull/3296) Use the right collection when parsing type section - - [#3292](https://github.com/wasmerio/wasmer/pull/3292) Precompute offsets in VMOffsets - - [#3290](https://github.com/wasmerio/wasmer/pull/3290) Limit the use of clone when handling Compilation object - - [#3316](https://github.com/wasmerio/wasmer/pull/3316) Implement wasmer whoami - - [#3341](https://github.com/wasmerio/wasmer/pull/3341) Update CHANGELOG.md - -## Fixed - - - [#3342](https://github.com/wasmerio/wasmer/pull/3342) Fixes for 3.0.0 release - -## 3.0.0 - 20/11/2022 - -## Added - - - [#3339](https://github.com/wasmerio/wasmer/pull/3339) Fixes for wasmer login / wasmer add - - [#3337](https://github.com/wasmerio/wasmer/pull/3337) Add automation script to automate deploying releases on GitHub - - [#3338](https://github.com/wasmerio/wasmer/pull/3338) Re-add codecov to get coverage reports - -## Changed - - - [#3295](https://github.com/wasmerio/wasmer/pull/3295) Implement wasmer run {url} - -## Fixed - - -## 3.0.0-rc.3 - 2022/11/18 - -## Added - - - [#3314](https://github.com/wasmerio/wasmer/pull/3314) Add windows-gnu workflow - -## Changed - - - [#3317](https://github.com/wasmerio/wasmer/pull/3317) Port "wapm install" to Wasmer - - [#3318](https://github.com/wasmerio/wasmer/pull/3318) Bump the MSRV to 1.63 - - [#3319](https://github.com/wasmerio/wasmer/pull/3319) Disable 'Test integration CLI' on CI for the Windows platform as it's not working at all - - [#3297](https://github.com/wasmerio/wasmer/pull/3297) Implement wasmer login - - [#3311](https://github.com/wasmerio/wasmer/pull/3311) Export Module::IoCompileError as it's an error returned by an exported function - - [#2800](https://github.com/wasmerio/wasmer/pull/2800) RISC-V support - - [#3293](https://github.com/wasmerio/wasmer/pull/3293) Removed call to to_vec() on assembler.finalise() - - [#3288](https://github.com/wasmerio/wasmer/pull/3288) Rollback all the TARGET_DIR changes - - [#3284](https://github.com/wasmerio/wasmer/pull/3284) Makefile now handle TARGET_DIR env. var. for build too - - [#3276](https://github.com/wasmerio/wasmer/pull/3276) Remove unnecessary checks to test internet connection - - [#3266](https://github.com/wasmerio/wasmer/pull/3266) Return ENotCapable error when accessing unknown files on root (for #3263 and #3264) - - [#3275](https://github.com/wasmerio/wasmer/pull/3275) Disable printing "local package ... not found" in release mode - - [#3273](https://github.com/wasmerio/wasmer/pull/3273) Undo Makefile commit - -## Fixed - - - [#3299](https://github.com/wasmerio/wasmer/pull/3299) Fix "create-exe" for windows-x86_64 target - - [#3294](https://github.com/wasmerio/wasmer/pull/3294) Fix test sys yaml syntax - - [#3287](https://github.com/wasmerio/wasmer/pull/3287) Fix Makefile with TARGET_DIR end with release folder, removing it - - [#3286](https://github.com/wasmerio/wasmer/pull/3286) Fix Makefile with TARGET_DIR end with release folder - - [#3285](https://github.com/wasmerio/wasmer/pull/3285) Fix CI to setup TARGET_DIR to target/release directly - - [#3277](https://github.com/wasmerio/wasmer/pull/3277) Fix red CI on master - - -## 3.0.0-rc.2 - 2022/11/02 - -## Added - - -## Changed - - - [#3258](https://github.com/wasmerio/wasmer/pull/3258) Migrate pirita / native executables feature from wasmer-private - -## Fixed - - - [#3268](https://github.com/wasmerio/wasmer/pull/3268) Fix fd_right nightly test to avoid foo.txt file leftover - - [#3260](https://github.com/wasmerio/wasmer/pull/3260) Fix bug in wasmer run - - [#3257](https://github.com/wasmerio/wasmer/pull/3257) Fix linux-aarch64 build - - -## 3.0.0-rc.1 - 2022/10/25 - -## Added - - - [#3222](https://github.com/wasmerio/wasmer/pull/3222) Add function to retrieve function name from wasm_frame_t - - [#3240](https://github.com/wasmerio/wasmer/pull/3240) Fix filesystem rights on WASI, add integration test for file permissions - - [#3238](https://github.com/wasmerio/wasmer/pull/3238) Fixed main README ocaml homepage link and added ocaml in other language README - - [#3145](https://github.com/wasmerio/wasmer/pull/3145) C-API: add functions to overwrite stdin / stdout / stderr handlers - -## Changed - - - [#3215](https://github.com/wasmerio/wasmer/pull/3215) Update wasmer --version logic, integrate wapm-cli - - [#3248](https://github.com/wasmerio/wasmer/pull/3248) Move loupe CHANGELOG entry from 2.3.0 to 3.x - - [#3230](https://github.com/wasmerio/wasmer/pull/3230) Remove test if dest file exist on path_rename wasi syscall (for #3228) - - [#3061](https://github.com/wasmerio/wasmer/pull/3061) Removed trailing zero in WASI::fd_prestat_dir_name name return (for #3025) - - [#3223](https://github.com/wasmerio/wasmer/pull/3223) Delete lib/wasi-types-generated directory - - [#3178](https://github.com/wasmerio/wasmer/pull/3178) Feat enhanced tinytunable test - - [#3177](https://github.com/wasmerio/wasmer/pull/3177) Auto-generate wasi-types from .wit files - - [#3218](https://github.com/wasmerio/wasmer/pull/3218) Seal `HostFunctionKind` - -## Fixed - - - [#3221](https://github.com/wasmerio/wasmer/pull/3221) Fix #3197 - - [#3229](https://github.com/wasmerio/wasmer/pull/3229) Fixed version to nightly-2022-10-09 for the CI build Minimal Wasmer Headless again - - [#3227](https://github.com/wasmerio/wasmer/pull/3227) Fixed version to nightly-2022-10-09 for the CI build Minimal Wasmer Headless - - [#3226](https://github.com/wasmerio/wasmer/pull/3226) Fixed version to nightly-2002-10-09 for the CI build Minimal Wasmer Headless - - [#3211](https://github.com/wasmerio/wasmer/pull/3211) fix popcnt for aarch64 - - [#3204](https://github.com/wasmerio/wasmer/pull/3204) Fixed a typo in README - - -## 3.0.0-beta.2 - 2022/09/26 - -## Added - - - [#3176](https://github.com/wasmerio/wasmer/pull/3176) Add support for `cargo-binstall` - - [#3141](https://github.com/wasmerio/wasmer/pull/3141) The API breaking changes from future WASIX/Network/Threading addition - - [#3119](https://github.com/wasmerio/wasmer/pull/3119) Added LinearMemory trait - - [#3117](https://github.com/wasmerio/wasmer/pull/3117) Add tests for wasmer-cli create-{exe,obj} commands - - [#3101](https://github.com/wasmerio/wasmer/pull/3101) CI/build.yaml: add libwasmer headless in default distribution - - [#3090](https://github.com/wasmerio/wasmer/pull/3090) Added version to the wasmer cli - - [#3089](https://github.com/wasmerio/wasmer/pull/3089) Add wasi_* C-API function changes in migration guide for 3.0.0 - - [#3076](https://github.com/wasmerio/wasmer/pull/3076) Add support for cross-compiling in create-exe with zig cc WIP - - [#3072](https://github.com/wasmerio/wasmer/pull/3072) Add back `Function::*_with_env(…)` - - [#3048](https://github.com/wasmerio/wasmer/pull/3048) Add cloudcompiler.yaml - - [#3068](https://github.com/wasmerio/wasmer/pull/3068) create-{exe,obj}: add documentations and header file generation for create-obj - - [#3065](https://github.com/wasmerio/wasmer/pull/3065) Added '.' and '..' special folder t WASI fd_readdir return (for #3033) - -## Changed - - - [#3184](https://github.com/wasmerio/wasmer/pull/3184) Test libwasmer.dll on Windows - - [#3164](https://github.com/wasmerio/wasmer/pull/3164) Synchronize between -sys and -js tests - - [#3165](https://github.com/wasmerio/wasmer/pull/3165) Initial port of make test-js-core (port wasmer API to core) - - [#3138](https://github.com/wasmerio/wasmer/pull/3138) Js imports revamp - - [#3142](https://github.com/wasmerio/wasmer/pull/3142) Bump rust toolchain - - [#3116](https://github.com/wasmerio/wasmer/pull/3116) Multithreading, full networking and RPC for WebAssembly - - [#3130](https://github.com/wasmerio/wasmer/pull/3130) Remove panics from Artifact::deserialize - - [#3134](https://github.com/wasmerio/wasmer/pull/3134) Bring libwasmer-headless.a from 22MiB to 7.2MiB (on my machine) - - [#3131](https://github.com/wasmerio/wasmer/pull/3131) Update for migration-to-3.0.0 for MemoryView changes - - [#3123](https://github.com/wasmerio/wasmer/pull/3123) Lower libwasmer headless size - - [#3132](https://github.com/wasmerio/wasmer/pull/3132) Revert "Lower libwasmer headless size" - - [#3128](https://github.com/wasmerio/wasmer/pull/3128) scripts/publish.py: validate crates version before publishing - - [#3126](https://github.com/wasmerio/wasmer/pull/3126) scripts/publish.py: replace toposort dependency with python std graphlib module - - [#3122](https://github.com/wasmerio/wasmer/pull/3122) Update Cargo.lock dependencies - - [#3118](https://github.com/wasmerio/wasmer/pull/3118) Refactor Artifact enum into a struct - - [#3114](https://github.com/wasmerio/wasmer/pull/3114) Implemented shared memory for Wasmer in preparation for multithreading - - [#3104](https://github.com/wasmerio/wasmer/pull/3104) Re-enabled ExternRef tests - - [#3103](https://github.com/wasmerio/wasmer/pull/3103) create-exe: prefer libwasmer headless when cross-compiling - - [#3097](https://github.com/wasmerio/wasmer/pull/3097) MemoryView lifetime tied to memory and not StoreRef - - [#3095](https://github.com/wasmerio/wasmer/pull/3095) create-exe: list supported cross-compilation target triples in help … - - [#3096](https://github.com/wasmerio/wasmer/pull/3096) create-exe: use cached wasmer tarballs for network fetches - - [#3083](https://github.com/wasmerio/wasmer/pull/3083) Disable wasm build in build CI - - [#3081](https://github.com/wasmerio/wasmer/pull/3081) 3.0.0-beta release - - [#3079](https://github.com/wasmerio/wasmer/pull/3079) Migrate to clap from structopt - - [#3075](https://github.com/wasmerio/wasmer/pull/3075) Remove __wbindgen_thread_id - - [#3074](https://github.com/wasmerio/wasmer/pull/3074) Update chrono to 0.4.20, avoiding RUSTSEC-2020-0159 - - [#3070](https://github.com/wasmerio/wasmer/pull/3070) wasmer-cli: Allow create-exe to receive a static object as input - - [#3069](https://github.com/wasmerio/wasmer/pull/3069) Remove native feature entry from docs.rs metadata - - [#3057](https://github.com/wasmerio/wasmer/pull/3057) wasmer-cli: create-obj command - - [#3060](https://github.com/wasmerio/wasmer/pull/3060) CI: Unset rustup override after usage instead of setting it to stable - -## Fixed - - - [#3192](https://github.com/wasmerio/wasmer/pull/3192) fix the typos - - [#3185](https://github.com/wasmerio/wasmer/pull/3185) Fix `wasmer compile` command for non-x86 target - - [#3129](https://github.com/wasmerio/wasmer/pull/3129) Fix differences between -sys and -js API - - [#3137](https://github.com/wasmerio/wasmer/pull/3137) Fix cache path not being present during installation of cross-tarball - - [#3115](https://github.com/wasmerio/wasmer/pull/3115) Fix static object signature deserialization - - [#3093](https://github.com/wasmerio/wasmer/pull/3093) Fixed a potential issue when renaming a file - - [#3088](https://github.com/wasmerio/wasmer/pull/3088) Fixed an issue when renaming a file from a preopened dir directly (for 3084) - - [#3078](https://github.com/wasmerio/wasmer/pull/3078) Fix errors from "make lint" - - [#3052](https://github.com/wasmerio/wasmer/pull/3052) Fixed a memory corruption issue with JS memory operations that were r… - - [#3058](https://github.com/wasmerio/wasmer/pull/3058) Fix trap tracking - - -## 3.0.0-alpha.4 - 2022/07/28 - -## Added - - - [#3035](https://github.com/wasmerio/wasmer/pull/3035) Added a simple divide by zero trap wast test (for #1899) - - [#3008](https://github.com/wasmerio/wasmer/pull/3008) Add check-public-api.yaml workflow - - [#3021](https://github.com/wasmerio/wasmer/pull/3021) Added back some needed relocation for arm64 llvm compiler - - [#2982](https://github.com/wasmerio/wasmer/pull/2982) Add a `rustfmt.toml` file to the repository - - [#2953](https://github.com/wasmerio/wasmer/pull/2953) Makefile: add `check` target - - [#2952](https://github.com/wasmerio/wasmer/pull/2952) CI: add make build-wasmer-wasm test - -## Changed - - - [#3051](https://github.com/wasmerio/wasmer/pull/3051) Updated Crenelift to v0.86.1 - - [#3038](https://github.com/wasmerio/wasmer/pull/3038) Re-introduce create-exe to wasmer-cli v3.0 - - [#3049](https://github.com/wasmerio/wasmer/pull/3049) Disable traps::trap_display_multi_module test for Windows+singlepass - - [#3047](https://github.com/wasmerio/wasmer/pull/3047) Improved EngineBuilder API - - [#3046](https://github.com/wasmerio/wasmer/pull/3046) Merge Backend into EngineBuilder and refactor feature flags - - [#3039](https://github.com/wasmerio/wasmer/pull/3039) Improved hashing/ids of function envs - - [#3029](https://github.com/wasmerio/wasmer/pull/3029) Remove Engine, Artifact traits, merge all Engines into one, make everything rkyv serialazable - - [#2892](https://github.com/wasmerio/wasmer/pull/2892) Implement new Context API for Wasmer 3.0 - - [#3031](https://github.com/wasmerio/wasmer/pull/3031) Update docs/migration_to_3.0.0.md - - [#3030](https://github.com/wasmerio/wasmer/pull/3030) Remove cranelift dependency from wasmer-wasi - - [#3028](https://github.com/wasmerio/wasmer/pull/3028) Ctx store rename - - [#3023](https://github.com/wasmerio/wasmer/pull/3023) Changed CI rust install action to dtolnay one - - [#3013](https://github.com/wasmerio/wasmer/pull/3013) Context api refactor - - [#2999](https://github.com/wasmerio/wasmer/pull/2999) Support --invoke option for emscripten files without _start function - - [#3003](https://github.com/wasmerio/wasmer/pull/3003) Remove RuntimeError::raise from public API - - [#3000](https://github.com/wasmerio/wasmer/pull/3000) Allow debugging of EXC_BAD_INSTRUCTION on macOS - - [#2946](https://github.com/wasmerio/wasmer/pull/2946) Removing dylib and staticlib engines in favor of a single Universal Engine - - [#2996](https://github.com/wasmerio/wasmer/pull/2996) Migrated al examples to new Context API - - [#2973](https://github.com/wasmerio/wasmer/pull/2973) Port C API to new Context API - - [#2974](https://github.com/wasmerio/wasmer/pull/2974) Context api tests - - [#2988](https://github.com/wasmerio/wasmer/pull/2988) Have make targets install-capi-lib,install-pkgconfig work without building the wasmer binary - - [#2976](https://github.com/wasmerio/wasmer/pull/2976) Upgrade enumset minimum version to one that compiles - - [#2969](https://github.com/wasmerio/wasmer/pull/2969) Port JS API to new Context API - - [#2966](https://github.com/wasmerio/wasmer/pull/2966) Singlepass nopanic - - [#2949](https://github.com/wasmerio/wasmer/pull/2949) Switch back to using custom LLVM builds on CI - - [#2963](https://github.com/wasmerio/wasmer/pull/2963) Remove libxcb and libwayland dependencies from wasmer-cli release build - - [#2957](https://github.com/wasmerio/wasmer/pull/2957) Enable multi-value handling in Singlepass compiler - - [#2941](https://github.com/wasmerio/wasmer/pull/2941) Implementation of WASIX and a fully networking for Web Assembly - - [#2947](https://github.com/wasmerio/wasmer/pull/2947) - Converted the WASI js test into a generic stdio test that works for… - - [#2940](https://github.com/wasmerio/wasmer/pull/2940) Merge `wasmer3` back to `master` branch - - [#2939](https://github.com/wasmerio/wasmer/pull/2939) Rename NativeFunc to TypedFunction - -## Fixed - - - [#3045](https://github.com/wasmerio/wasmer/pull/3045) Fixed WASI fd_read syscall when reading multiple iovs and read is partial (for #2904) - - [#2997](https://github.com/wasmerio/wasmer/pull/2997) Fix "run --invoke [function]" to behave the same as "run" - - [#3027](https://github.com/wasmerio/wasmer/pull/3027) Fixed residual package-doc issues - - [#3026](https://github.com/wasmerio/wasmer/pull/3026) test-js.yaml: fix typo - - [#3017](https://github.com/wasmerio/wasmer/pull/3017) Fixed translation in README.md - - [#3001](https://github.com/wasmerio/wasmer/pull/3001) Fix context capi ci errors - - [#2967](https://github.com/wasmerio/wasmer/pull/2967) Fix singlepass on arm64 that was trying to emit a sub opcode with a constant as destination (for #2959) - - [#2954](https://github.com/wasmerio/wasmer/pull/2954) Some fixes to x86_64 Singlepass compiler, when using atomics - - [#2950](https://github.com/wasmerio/wasmer/pull/2950) compiler-cranelift: Fix typo in enum variant - - [#2948](https://github.com/wasmerio/wasmer/pull/2948) Fix regression on gen_import_call_trampoline_arm64() - - [#2943](https://github.com/wasmerio/wasmer/pull/2943) Fix build error on some archs by using c_char instead of i8 - - [#2944](https://github.com/wasmerio/wasmer/pull/2944) Fix duplicate entries in the CHANGELOG - - [#2942](https://github.com/wasmerio/wasmer/pull/2942) Fix clippy lints - -## 2.3.0 - 2022/06/06 - -### Added -- [#2862](https://github.com/wasmerio/wasmer/pull/2862) Added CI builds for linux-aarch64 target. -- [#2811](https://github.com/wasmerio/wasmer/pull/2811) Added support for EH Frames in singlepass -- [#2851](https://github.com/wasmerio/wasmer/pull/2851) Allow Wasmer to compile to Wasm/WASI - -### Changed -- [#2807](https://github.com/wasmerio/wasmer/pull/2807) Run Wasm code in a separate stack -- [#2802](https://github.com/wasmerio/wasmer/pull/2802) Support Dylib engine with Singlepass -- [#2836](https://github.com/wasmerio/wasmer/pull/2836) Improve TrapInformation data stored at runtime -- [#2864](https://github.com/wasmerio/wasmer/pull/2864) `wasmer-cli`: remove wasi-experimental-io-devices from default builds -- [#2933](https://github.com/wasmerio/wasmer/pull/2933) Rename NativeFunc to TypedFunction. - -### Fixed -- [#2829](https://github.com/wasmerio/wasmer/pull/2829) Improve error message oriented from JS object. -- [#2828](https://github.com/wasmerio/wasmer/pull/2828) Fix JsImportObject resolver. -- [#2872](https://github.com/wasmerio/wasmer/pull/2872) Fix `WasmerEnv` finalizer -- [#2821](https://github.com/wasmerio/wasmer/pull/2821) Opt in `sys` feature - -## 2.2.1 - 2022/03/15 - -### Fixed -- [#2812](https://github.com/wasmerio/wasmer/pull/2812) Fixed another panic due to incorrect drop ordering. - -## 2.2.0 - 2022/02/28 - -### Added -- [#2775](https://github.com/wasmerio/wasmer/pull/2775) Added support for SSE 4.2 in the Singlepass compiler as an alternative to AVX. -- [#2805](https://github.com/wasmerio/wasmer/pull/2805) Enabled WASI experimental I/O devices by default in releases. - -### Fixed -- [#2795](https://github.com/wasmerio/wasmer/pull/2795) Fixed a bug in the Singlepass compiler introduced in #2775. -- [#2806](https://github.com/wasmerio/wasmer/pull/2806) Fixed a panic due to incorrect drop ordering of `Module` fields. - -## 2.2.0-rc2 - 2022/02/15 - -### Fixed -- [#2778](https://github.com/wasmerio/wasmer/pull/2778) Fixed f32_load/f64_load in Singlepass. Also fixed issues with out-of-range conditional branches. -- [#2786](https://github.com/wasmerio/wasmer/pull/2786) Fixed a potential integer overflow in WasmPtr memory access methods. -- [#2787](https://github.com/wasmerio/wasmer/pull/2787) Fixed a codegen regression in the Singlepass compiler due to non-determinism of `HashSet` iteration. - -## 2.2.0-rc1 - 2022/01/28 - -### Added -- [#2750](https://github.com/wasmerio/wasmer/pull/2750) Added Aarch64 support to Singlepass (both Linux and macOS). -- [#2753](https://github.com/wasmerio/wasmer/pull/2753) Re-add "dylib" to the list of default features. - -### Changed -- [#2747](https://github.com/wasmerio/wasmer/pull/2747) Use a standard header for metadata in all serialized modules. -- [#2759](https://github.com/wasmerio/wasmer/pull/2759) Use exact version for Wasmer crate dependencies. - -### Fixed -- [#2769](https://github.com/wasmerio/wasmer/pull/2769) Fixed deadlock in emscripten dynamic calls. -- [#2742](https://github.com/wasmerio/wasmer/pull/2742) Fixed WASMER_METADATA alignment in the dylib engine. -- [#2746](https://github.com/wasmerio/wasmer/pull/2746) Fixed invoking `wasmer binfmt register` from `$PATH`. -- [#2748](https://github.com/wasmerio/wasmer/pull/2748) Use trampolines for all libcalls in engine-universal and engine-dylib. -- [#2766](https://github.com/wasmerio/wasmer/pull/2766) Remove an attempt to reserve a GPR when no GPR clobbering is occurring. -- [#2768](https://github.com/wasmerio/wasmer/pull/2768) Fixed serialization of FrameInfo on Dylib engine. - -## 2.1.1 - 2021/12/20 - -### Added -- [#2726](https://github.com/wasmerio/wasmer/pull/2726) Added `externs_vec` method to `ImportObject`. -- [#2724](https://github.com/wasmerio/wasmer/pull/2724) Added access to the raw `Instance` JS object in Wsasmer-js. - -### CHanged -- [#2711](https://github.com/wasmerio/wasmer/pull/2711) Make C-API and Wasi dependencies more lean -- [#2706](https://github.com/wasmerio/wasmer/pull/2706) Refactored the Singlepass compiler in preparation for AArch64 support (no user visible changes). -### Fixed -- [#2717](https://github.com/wasmerio/wasmer/pull/2717) Allow `Exports` to be modified after being cloned. -- [#2719](https://github.com/wasmerio/wasmer/pull/2719) Fixed `wasm_importtype_new`'s Rust signature to not assume boxed vectors. -- [#2723](https://github.com/wasmerio/wasmer/pull/2723) Fixed a bug in parameter passing in the Singlepass compiler. -- [#2768](https://github.com/wasmerio/wasmer/pull/2768) Fixed issue with Frame Info on dylib engine. - -## 2.1.0 - 2021/11/30 - -### Added -- [#2574](https://github.com/wasmerio/wasmer/pull/2574) Added Windows support to Singlepass. -- [#2535](https://github.com/wasmerio/wasmer/pull/2435) Added iOS support for Wasmer. This relies on the `dylib-engine`. -- [#2460](https://github.com/wasmerio/wasmer/pull/2460) Wasmer can now compile to Javascript via `wasm-bindgen`. Use the `js-default` (and no default features) feature to try it!. -- [#2491](https://github.com/wasmerio/wasmer/pull/2491) Added support for WASI to Wasmer-js. -- [#2436](https://github.com/wasmerio/wasmer/pull/2436) Added the x86-32 bit variant support to LLVM compiler. -- [#2499](https://github.com/wasmerio/wasmer/pull/2499) Added a subcommand to linux wasmer-cli to register wasmer with binfmt_misc -- [#2511](https://github.com/wasmerio/wasmer/pull/2511) Added support for calling dynamic functions defined on the host -- [#2491](https://github.com/wasmerio/wasmer/pull/2491) Added support for WASI in Wasmer-js -- [#2592](https://github.com/wasmerio/wasmer/pull/2592) Added `ImportObject::get_namespace_exports` to allow modifying the contents of an existing namespace in an `ImportObject`. -- [#2694](https://github.com/wasmerio/wasmer/pull/2694) wasmer-js: Allow an `ImportObject` to be extended with a JS object. -- [#2698](https://github.com/wasmerio/wasmer/pull/2698) Provide WASI imports when invoking an explicit export from the CLI. -- [#2701](https://github.com/wasmerio/wasmer/pull/2701) Improved VFS API for usage from JS - -### Changed -- [#2460](https://github.com/wasmerio/wasmer/pull/2460) **breaking change** `wasmer` API usage with `no-default-features` requires now the `sys` feature to preserve old behavior. -- [#2476](https://github.com/wasmerio/wasmer/pull/2476) Removed unncessary abstraction `ModuleInfoTranslate` from `wasmer-compiler`. -- [#2442](https://github.com/wasmerio/wasmer/pull/2442) **breaking change** Improved `WasmPtr`, added `WasmCell` for host/guest interaction. `WasmPtr::deref` will now return `WasmCell<'a, T>` instead of `&'a Cell`, `WasmPtr::deref_mut` is now deleted from the API. -- [#2427](https://github.com/wasmerio/wasmer/pull/2427) Update `loupe` to 0.1.3. -- [#2685](https://github.com/wasmerio/wasmer/pull/2685) The minimum LLVM version for the LLVM compiler is now 12. LLVM 13 is used by default. -- [#2569](https://github.com/wasmerio/wasmer/pull/2569) Add `Send` and `Sync` to uses of the `LikeNamespace` trait object. -- [#2692](https://github.com/wasmerio/wasmer/pull/2692) Made module serialization deterministic. -- [#2693](https://github.com/wasmerio/wasmer/pull/2693) Validate CPU features when loading a deserialized module. - -### Fixed -- [#2599](https://github.com/wasmerio/wasmer/pull/2599) Fixed Universal engine for Linux/Aarch64 target. -- [#2587](https://github.com/wasmerio/wasmer/pull/2587) Fixed deriving `WasmerEnv` when aliasing `Result`. -- [#2518](https://github.com/wasmerio/wasmer/pull/2518) Remove temporary file used to creating an artifact when creating a Dylib engine artifact. -- [#2494](https://github.com/wasmerio/wasmer/pull/2494) Fixed `WasmerEnv` access when using `call_indirect` with the Singlepass compiler. -- [#2479](https://github.com/wasmerio/wasmer/pull/2479) Improved `wasmer validate` error message on non-wasm inputs. -- [#2454](https://github.com/wasmerio/wasmer/issues/2454) Won't set `WASMER_CACHE_DIR` for Windows. -- [#2426](https://github.com/wasmerio/wasmer/pull/2426) Fix the `wax` script generation. -- [#2635](https://github.com/wasmerio/wasmer/pull/2635) Fix cross-compilation for singlepass. -- [#2672](https://github.com/wasmerio/wasmer/pull/2672) Use `ENOENT` instead of `EINVAL` in some WASI syscalls for a non-existent file -- [#2547](https://github.com/wasmerio/wasmer/pull/2547) Delete temporary files created by the dylib engine. -- [#2548](https://github.com/wasmerio/wasmer/pull/2548) Fix stack probing on x86_64 linux with the cranelift compiler. -- [#2557](https://github.com/wasmerio/wasmer/pull/2557) [#2559](https://github.com/wasmerio/wasmer/pull/2559) Fix WASI dir path renaming. -- [#2560](https://github.com/wasmerio/wasmer/pull/2560) Fix signal handling on M1 MacOS. -- [#2474](https://github.com/wasmerio/wasmer/pull/2474) Fix permissions on `WASMER_CACHE_DIR` on Windows. -- [#2528](https://github.com/wasmerio/wasmer/pull/2528) [#2525](https://github.com/wasmerio/wasmer/pull/2525) [#2523](https://github.com/wasmerio/wasmer/pull/2523) [#2522](https://github.com/wasmerio/wasmer/pull/2522) [#2545](https://github.com/wasmerio/wasmer/pull/2545) [#2550](https://github.com/wasmerio/wasmer/pull/2550) [#2551](https://github.com/wasmerio/wasmer/pull/2551) Fix various bugs in the new VFS implementation. -- [#2552](https://github.com/wasmerio/wasmer/pull/2552) Fix stack guard handling on Windows. -- [#2585](https://github.com/wasmerio/wasmer/pull/2585) Fix build with 64-bit MinGW toolchain. -- [#2587](https://github.com/wasmerio/wasmer/pull/2587) Fix absolute import of `Result` in derive. -- [#2599](https://github.com/wasmerio/wasmer/pull/2599) Fix AArch64 support in the LLVM compiler. -- [#2655](https://github.com/wasmerio/wasmer/pull/2655) Fix argument parsing of `--dir` and `--mapdir`. -- [#2666](https://github.com/wasmerio/wasmer/pull/2666) Fix performance on Windows by using static memories by default. -- [#2667](https://github.com/wasmerio/wasmer/pull/2667) Fix error code for path_rename of a non-existant file -- [#2672](https://github.com/wasmerio/wasmer/pull/2672) Fix error code returned by some wasi fs syscalls for a non-existent file -- [#2673](https://github.com/wasmerio/wasmer/pull/2673) Fix BrTable codegen on the LLVM compiler -- [#2674](https://github.com/wasmerio/wasmer/pull/2674) Add missing `__WASI_RIGHT_FD_DATASYNC` for preopened directories -- [#2677](https://github.com/wasmerio/wasmer/pull/2677) Support 32-bit memories with 65536 pages -- [#2681](https://github.com/wasmerio/wasmer/pull/2681) Fix slow compilation in singlepass by using dynasm's `VecAssembler`. -- [#2690](https://github.com/wasmerio/wasmer/pull/2690) Fix memory leak when obtaining the stack bounds of a thread -- [#2699](https://github.com/wasmerio/wasmer/pull/2699) Partially fix unbounded memory leak from the FuncDataRegistry - -## 2.0.0 - 2021/06/16 - -### Added -- [#2411](https://github.com/wasmerio/wasmer/pull/2411) Extract types from `wasi` to a new `wasi-types` crate. -- [#2390](https://github.com/wasmerio/wasmer/pull/2390) Make `wasmer-vm` to compile on Windows 32bits. -- [#2402](https://github.com/wasmerio/wasmer/pull/2402) Add more examples and more doctests for `wasmer-middlewares`. - -### Changed -- [#2399](https://github.com/wasmerio/wasmer/pull/2399) Add the Dart integration in the `README.md`. - -### Fixed -- [#2386](https://github.com/wasmerio/wasmer/pull/2386) Handle properly when a module has no exported functions in the CLI. - -## 2.0.0-rc2 - 2021/06/03 - -### Fixed -- [#2383](https://github.com/wasmerio/wasmer/pull/2383) Fix bugs in the Wasmer CLI tool with the way `--version` and the name of the CLI tool itself were printed. - -## 2.0.0-rc1 - 2021/06/02 - -### Added -- [#2348](https://github.com/wasmerio/wasmer/pull/2348) Make Wasmer available on `aarch64-linux-android`. -- [#2315](https://github.com/wasmerio/wasmer/pull/2315) Make the Cranelift compiler working with the Native engine. -- [#2306](https://github.com/wasmerio/wasmer/pull/2306) Add support for the latest version of the Wasm SIMD proposal to compiler LLVM. -- [#2296](https://github.com/wasmerio/wasmer/pull/2296) Add support for the bulk memory proposal in compiler Singlepass and compiler LLVM. -- [#2291](https://github.com/wasmerio/wasmer/pull/2291) Type check tables when importing. -- [#2262](https://github.com/wasmerio/wasmer/pull/2262) Make parallelism optional for the Singlepass compiler. -- [#2249](https://github.com/wasmerio/wasmer/pull/2249) Make Cranelift unwind feature optional. -- [#2208](https://github.com/wasmerio/wasmer/pull/2208) Add a new CHANGELOG.md specific to our C API to make it easier for users primarily consuming our C API to keep up to date with changes that affect them. -- [#2154](https://github.com/wasmerio/wasmer/pull/2154) Implement Reference Types in the LLVM compiler. -- [#2003](https://github.com/wasmerio/wasmer/pull/2003) Wasmer works with musl, and is built, tested and packaged for musl. -- [#2250](https://github.com/wasmerio/wasmer/pull/2250) Use `rkyv` for the JIT/Universal engine. -- [#2190](https://github.com/wasmerio/wasmer/pull/2190) Use `rkyv` to read native `Module` artifact. -- [#2186](https://github.com/wasmerio/wasmer/pull/2186) Update and improve the Fuzz Testing infrastructure. -- [#2161](https://github.com/wasmerio/wasmer/pull/2161) Make NaN canonicalization configurable. -- [#2116](https://github.com/wasmerio/wasmer/pull/2116) Add a package for Windows that is not an installer, but all the `lib` and `include` files as for macOS and Linux. -- [#2123](https://github.com/wasmerio/wasmer/pull/2123) Use `ENABLE_{{compiler_name}}=(0|1)` to resp. force to disable or enable a compiler when running the `Makefile`, e.g. `ENABLE_LLVM=1 make build-wasmer`. -- [#2123](https://github.com/wasmerio/wasmer/pull/2123) `libwasmer` comes with all available compilers per target instead of Cranelift only. -- [#2135](https://github.com/wasmerio/wasmer/pull/2135) [Documentation](./PACKAGING.md) for Linux distribution maintainers -- [#2104](https://github.com/wasmerio/wasmer/pull/2104) Update WAsm core spectests and wasmparser. - -### Changed -- [#2369](https://github.com/wasmerio/wasmer/pull/2369) Remove the deprecated `--backend` option in the CLI. -- [#2368](https://github.com/wasmerio/wasmer/pull/2368) Remove the deprecated code in the `wasmer-wasi` crate. -- [#2367](https://github.com/wasmerio/wasmer/pull/2367) Remove the `deprecated` features and associated code in the `wasmer` crate. -- [#2366](https://github.com/wasmerio/wasmer/pull/2366) Remove the deprecated crates. -- [#2364](https://github.com/wasmerio/wasmer/pull/2364) Rename `wasmer-engine-object-file` to `wasmer-engine-staticlib`. -- [#2356](https://github.com/wasmerio/wasmer/pull/2356) Rename `wasmer-engine-native` to `wasmer-engine-dylib`. -- [#2340](https://github.com/wasmerio/wasmer/pull/2340) Rename `wasmer-engine-jit` to `wasmer-engine-universal`. -- [#2307](https://github.com/wasmerio/wasmer/pull/2307) Update Cranelift, implement low hanging fruit SIMD opcodes. -- [#2305](https://github.com/wasmerio/wasmer/pull/2305) Clean up and improve the trap API, more deterministic errors etc. -- [#2299](https://github.com/wasmerio/wasmer/pull/2299) Unused trap codes (due to Wasm spec changes), `HeapSetterOutOfBounds` and `TableSetterOutOfBounds` were removed from `wasmer_vm::TrapCode` and the numbering of the remaining variants has been adjusted. -- [#2293](https://github.com/wasmerio/wasmer/pull/2293) The `Memory::ty` trait method now returns `MemoryType` by value. `wasmer_vm::LinearMemory` now recomputes `MemoryType`'s `minimum` field when accessing its type. This behavior is what's expected by the latest spectests. `wasmer::Memory::ty` has also been updated to follow suit, it now returns `MemoryType` by value. -- [#2286](https://github.com/wasmerio/wasmer/pull/2286) Replace the `goblin` crate by the `object` crate. -- [#2281](https://github.com/wasmerio/wasmer/pull/2281) Refactor the `wasmer_vm` crate to remove unnecessary structs, reuse data when available etc. -- [#2251](https://github.com/wasmerio/wasmer/pull/2251) Wasmer CLI will now execute WASI modules with multiple WASI namespaces in them by default. Use `--allow-multiple-wasi-versions` to suppress the warning and use `--deny-multiple-wasi-versions` to make it an error. -- [#2201](https://github.com/wasmerio/wasmer/pull/2201) Implement `loupe::MemoryUsage` for `wasmer::Instance`. -- [#2200](https://github.com/wasmerio/wasmer/pull/2200) Implement `loupe::MemoryUsage` for `wasmer::Module`. -- [#2199](https://github.com/wasmerio/wasmer/pull/2199) Implement `loupe::MemoryUsage` for `wasmer::Store`. -- [#2195](https://github.com/wasmerio/wasmer/pull/2195) Remove dependency to `cranelift-entity`. -- [#2140](https://github.com/wasmerio/wasmer/pull/2140) Reduce the number of dependencies in the `wasmer.dll` shared library by statically compiling CRT. -- [#2113](https://github.com/wasmerio/wasmer/pull/2113) Bump minimum supported Rust version to 1.49 -- [#2144](https://github.com/wasmerio/wasmer/pull/2144) Bump cranelift version to 0.70 -- [#2149](https://github.com/wasmerio/wasmer/pull/2144) `wasmer-engine-native` looks for clang-11 instead of clang-10. -- [#2157](https://github.com/wasmerio/wasmer/pull/2157) Simplify the code behind `WasmPtr` - -### Fixed -- [#2397](https://github.com/wasmerio/wasmer/pull/2397) Fix WASI rename temporary file issue. -- [#2391](https://github.com/wasmerio/wasmer/pull/2391) Fix Singlepass emit bug, [#2347](https://github.com/wasmerio/wasmer/issues/2347) and [#2159](https://github.com/wasmerio/wasmer/issues/2159) -- [#2327](https://github.com/wasmerio/wasmer/pull/2327) Fix memory leak preventing internal instance memory from being freed when a WasmerEnv contained an exported extern (e.g. Memory, etc.). -- [#2247](https://github.com/wasmerio/wasmer/pull/2247) Internal WasiFS logic updated to be closer to what WASI libc does when finding a preopened fd for a path. -- [#2241](https://github.com/wasmerio/wasmer/pull/2241) Fix Undefined Behavior in setting memory in emscripten `EmEnv`. -- [#2224](https://github.com/wasmerio/wasmer/pull/2224) Enable SIMD based on actual Wasm features in the Cranelift compiler. -- [#2217](https://github.com/wasmerio/wasmer/pull/2217) Fix bug in `i64.rotr X 0` in the LLVM compiler. -- [#2290](https://github.com/wasmerio/wasmer/pull/2290) Handle Wasm modules with no imports in the CLI. -- [#2108](https://github.com/wasmerio/wasmer/pull/2108) The Object Native Engine generates code that now compiles correctly with C++. -- [#2125](https://github.com/wasmerio/wasmer/pull/2125) Fix RUSTSEC-2021-0023. -- [#2155](https://github.com/wasmerio/wasmer/pull/2155) Fix the implementation of shift and rotate in the LLVM compiler. -- [#2101](https://github.com/wasmerio/wasmer/pull/2101) cflags emitted by `wasmer config --pkg-config` are now correct. - -## 1.0.2 - 2021-02-04 - -### Added -- [#2053](https://github.com/wasmerio/wasmer/pull/2053) Implement the non-standard `wasi_get_unordered_imports` function in the C API. -- [#2072](https://github.com/wasmerio/wasmer/pull/2072) Add `wasm_config_set_target`, along with `wasm_target_t`, `wasm_triple_t` and `wasm_cpu_features_t` in the unstable C API. -- [#2059](https://github.com/wasmerio/wasmer/pull/2059) Ability to capture `stdout` and `stderr` with WASI in the C API. -- [#2040](https://github.com/wasmerio/wasmer/pull/2040) Add `InstanceHandle::vmoffsets` to expose the offsets of the `vmctx` region. -- [#2026](https://github.com/wasmerio/wasmer/pull/2026) Expose trap code of a `RuntimeError`, if it's a `Trap`. -- [#2054](https://github.com/wasmerio/wasmer/pull/2054) Add `wasm_config_delete` to the Wasm C API. -- [#2072](https://github.com/wasmerio/wasmer/pull/2072) Added cross-compilation to Wasm C API. - -### Changed -- [#2085](https://github.com/wasmerio/wasmer/pull/2085) Update to latest inkwell and LLVM 11. -- [#2037](https://github.com/wasmerio/wasmer/pull/2037) Improved parallelism of LLVM with the Native/Object engine -- [#2012](https://github.com/wasmerio/wasmer/pull/2012) Refactor Singlepass init stack assembly (more performant now) -- [#2036](https://github.com/wasmerio/wasmer/pull/2036) Optimize memory allocated for Function type definitions -- [#2083](https://github.com/wasmerio/wasmer/pull/2083) Mark `wasi_env_set_instance` and `wasi_env_set_memory` as deprecated. You may simply remove the calls with no side-effect. -- [#2056](https://github.com/wasmerio/wasmer/pull/2056) Change back to depend on the `enumset` crate instead of `wasmer_enumset` - -### Fixed -- [#2066](https://github.com/wasmerio/wasmer/pull/2066) Include 'extern "C"' in our C headers when included by C++ code. -- [#2090](https://github.com/wasmerio/wasmer/pull/2090) `wasi_env_t` needs to be freed with `wasi_env_delete` in the C API. -- [#2084](https://github.com/wasmerio/wasmer/pull/2084) Avoid calling the function environment finalizer more than once when the environment has been cloned in the C API. -- [#2069](https://github.com/wasmerio/wasmer/pull/2069) Use the new documentation for `include/README.md` in the Wasmer package. -- [#2042](https://github.com/wasmerio/wasmer/pull/2042) Parse more exotic environment variables in `wasmer run`. -- [#2041](https://github.com/wasmerio/wasmer/pull/2041) Documentation diagrams now have a solid white background rather than a transparent background. -- [#2070](https://github.com/wasmerio/wasmer/pull/2070) Do not drain the entire captured stream at first read with `wasi_env_read_stdout` or `_stderr` in the C API. -- [#2058](https://github.com/wasmerio/wasmer/pull/2058) Expose WASI versions to C correctly. -- [#2044](https://github.com/wasmerio/wasmer/pull/2044) Do not build C headers on docs.rs. - -## 1.0.1 - 2021-01-12 - -This release includes a breaking change in the API (changing the trait `enumset::EnumsetType` to `wasmer_enumset::EnumSetType` and changing `enumset::EnumSet` in signatures to `wasmer_enumset::EnumSet` to work around a breaking change introduced by `syn`) but is being released as a minor version because `1.0.0` is also in a broken state due to a breaking change introduced by `syn` which affects `enumset` and thus `wasmer`. - -This change is unlikely to affect any users of `wasmer`, but if it does please change uses of the `enumset` crate to the `wasmer_enumset` crate where possible. - -### Added -- [#2010](https://github.com/wasmerio/wasmer/pull/2010) A new, experimental, minified build of `wasmer` called `wasmer-headless` will now be included with releases. `wasmer-headless` is the `wasmer` VM without any compilers attached, so it can only run precompiled Wasm modules. -- [#2005](https://github.com/wasmerio/wasmer/pull/2005) Added the arguments `alias` and `optional` to `WasmerEnv` derive's `export` attribute. - -### Changed -- [#2006](https://github.com/wasmerio/wasmer/pull/2006) Use `wasmer_enumset`, a fork of the `enumset` crate to work around a breaking change in `syn` -- [#1985](https://github.com/wasmerio/wasmer/pull/1985) Bump minimum supported Rust version to 1.48 - -### Fixed -- [#2007](https://github.com/wasmerio/wasmer/pull/2007) Fix packaging of wapm on Windows -- [#2005](https://github.com/wasmerio/wasmer/pull/2005) Emscripten is now working again. - -## 1.0.0 - 2021-01-05 - -### Added - -- [#1969](https://github.com/wasmerio/wasmer/pull/1969) Added D integration to the README - -### Changed -- [#1979](https://github.com/wasmerio/wasmer/pull/1979) `WasmPtr::get_utf8_string` was renamed to `WasmPtr::get_utf8_str` and made `unsafe`. - -### Fixed -- [#1979](https://github.com/wasmerio/wasmer/pull/1979) `WasmPtr::get_utf8_string` now returns a `String`, fixing a soundness issue in certain circumstances. The old functionality is available under a new `unsafe` function, `WasmPtr::get_utf8_str`. - -## 1.0.0-rc1 - 2020-12-23 - -### Added - -* [#1894](https://github.com/wasmerio/wasmer/pull/1894) Added exports `wasmer::{CraneliftOptLevel, LLVMOptLevel}` to allow using `Cranelift::opt_level` and `LLVM::opt_level` directly via the `wasmer` crate - -### Changed - -* [#1941](https://github.com/wasmerio/wasmer/pull/1941) Turn `get_remaining_points`/`set_remaining_points` of the `Metering` middleware into free functions to allow using them in an ahead-of-time compilation setup -* [#1955](https://github.com/wasmerio/wasmer/pull/1955) Set `jit` as a default feature of the `wasmer-wasm-c-api` crate -* [#1944](https://github.com/wasmerio/wasmer/pull/1944) Require `WasmerEnv` to be `Send + Sync` even in dynamic functions. -* [#1963](https://github.com/wasmerio/wasmer/pull/1963) Removed `to_wasm_error` in favour of `impl From for WasmError` -* [#1962](https://github.com/wasmerio/wasmer/pull/1962) Replace `wasmparser::Result<()>` with `Result<(), MiddlewareError>` in middleware, allowing implementors to return errors in `FunctionMiddleware::feed` - -### Fixed - -- [#1949](https://github.com/wasmerio/wasmer/pull/1949) `wasm__vec_delete` functions no longer crash when the given vector is uninitialized, in the Wasmer C API -- [#1949](https://github.com/wasmerio/wasmer/pull/1949) The `wasm_frame_vec_t`, `wasm_functype_vec_t`, `wasm_globaltype_vec_t`, `wasm_memorytype_vec_t`, and `wasm_tabletype_vec_t` are now boxed vectors in the Wasmer C API - -## 1.0.0-beta2 - 2020-12-16 - -### Added - -* [#1916](https://github.com/wasmerio/wasmer/pull/1916) Add the `WASMER_VERSION*` constants with the `wasmer_version*` functions in the Wasmer C API -* [#1867](https://github.com/wasmerio/wasmer/pull/1867) Added `Metering::get_remaining_points` and `Metering::set_remaining_points` -* [#1881](https://github.com/wasmerio/wasmer/pull/1881) Added `UnsupportedTarget` error to `CompileError` -* [#1908](https://github.com/wasmerio/wasmer/pull/1908) Implemented `TryFrom>` for `i32`/`u32`/`i64`/`u64`/`f32`/`f64` -* [#1927](https://github.com/wasmerio/wasmer/pull/1927) Added mmap support in `Engine::deserialize_from_file` to speed up artifact loading -* [#1911](https://github.com/wasmerio/wasmer/pull/1911) Generalized signature type in `Function::new` and `Function::new_with_env` to accept owned and reference `FunctionType` as well as array pairs. This allows users to define signatures as constants. Implemented `From<([Type; $N], [Type; $M])>` for `FunctionType` to support this. - -### Changed - -- [#1865](https://github.com/wasmerio/wasmer/pull/1865) Require that implementors of `WasmerEnv` also implement `Send`, `Sync`, and `Clone`. -- [#1851](https://github.com/wasmerio/wasmer/pull/1851) Improve test suite and documentation of the Wasmer C API -- [#1874](https://github.com/wasmerio/wasmer/pull/1874) Set `CompilerConfig` to be owned (following wasm-c-api) -- [#1880](https://github.com/wasmerio/wasmer/pull/1880) Remove cmake dependency for tests -- [#1924](https://github.com/wasmerio/wasmer/pull/1924) Rename reference implementation `wasmer::Tunables` to `wasmer::BaseTunables`. Export trait `wasmer_engine::Tunables` as `wasmer::Tunables`. - -### Fixed - -- [#1865](https://github.com/wasmerio/wasmer/pull/1865) Fix memory leaks with host function environments. -- [#1870](https://github.com/wasmerio/wasmer/pull/1870) Fixed Trap instruction address maps in Singlepass -* [#1914](https://github.com/wasmerio/wasmer/pull/1914) Implemented `TryFrom for Pages` instead of `From for Pages` to properly handle overflow errors - -## 1.0.0-beta1 - 2020-12-01 - -### Added - -- [#1839](https://github.com/wasmerio/wasmer/pull/1839) Added support for Metering Middleware -- [#1837](https://github.com/wasmerio/wasmer/pull/1837) It is now possible to use exports of an `Instance` even after the `Instance` has been freed -- [#1831](https://github.com/wasmerio/wasmer/pull/1831) Added support for Apple Silicon chips (`arm64-apple-darwin`) -- [#1739](https://github.com/wasmerio/wasmer/pull/1739) Improved function environment setup via `WasmerEnv` proc macro. -- [#1649](https://github.com/wasmerio/wasmer/pull/1649) Add outline of migration to 1.0.0 docs. - -### Changed - -- [#1739](https://github.com/wasmerio/wasmer/pull/1739) Environments passed to host function- must now implement the `WasmerEnv` trait. You can implement it on your existing type with `#[derive(WasmerEnv)]`. -- [#1838](https://github.com/wasmerio/wasmer/pull/1838) Deprecate `WasiEnv::state_mut`: prefer `WasiEnv::state` instead. -- [#1663](https://github.com/wasmerio/wasmer/pull/1663) Function environments passed to host functions now must be passed by `&` instead of `&mut`. This is a breaking change. This change fixes a race condition when a host function is called from multiple threads. If you need mutability in your environment, consider using `std::sync::Mutex` or other synchronization primitives. -- [#1830](https://github.com/wasmerio/wasmer/pull/1830) Minimum supported Rust version bumped to 1.47.0 -- [#1810](https://github.com/wasmerio/wasmer/pull/1810) Make the `state` field of `WasiEnv` public - -### Fixed - -- [#1857](https://github.com/wasmerio/wasmer/pull/1857) Fix dynamic function with new Environment API -- [#1855](https://github.com/wasmerio/wasmer/pull/1855) Fix memory leak when using `wat2wasm` in the C API, the function now takes its output parameter by pointer rather than returning an allocated `wasm_byte_vec_t`. -- [#1841](https://github.com/wasmerio/wasmer/pull/1841) We will now panic when attempting to use a native function with a captured env as a host function. Previously this would silently do the wrong thing. See [#1840](https://github.com/wasmerio/wasmer/pull/1840) for info about Wasmer's support of closures as host functions. -- [#1764](https://github.com/wasmerio/wasmer/pull/1764) Fix bug in WASI `path_rename` allowing renamed files to be 1 directory below a preopened directory. - -## 1.0.0-alpha5 - 2020-11-06 - -### Added - -- [#1761](https://github.com/wasmerio/wasmer/pull/1761) Implement the `wasm_trap_t**` argument of `wasm_instance_new` in the Wasm C API. -- [#1687](https://github.com/wasmerio/wasmer/pull/1687) Add basic table example; fix ownership of local memory and local table metadata in the VM. -- [#1751](https://github.com/wasmerio/wasmer/pull/1751) Implement `wasm_trap_t` inside a function declared with `wasm_func_new_with_env` in the Wasm C API. -- [#1741](https://github.com/wasmerio/wasmer/pull/1741) Implement `wasm_memory_type` in the Wasm C API. -- [#1736](https://github.com/wasmerio/wasmer/pull/1736) Implement `wasm_global_type` in the Wasm C API. -- [#1699](https://github.com/wasmerio/wasmer/pull/1699) Update `wasm.h` to its latest version. -- [#1685](https://github.com/wasmerio/wasmer/pull/1685) Implement `wasm_exporttype_delete` in the Wasm C API. -- [#1725](https://github.com/wasmerio/wasmer/pull/1725) Implement `wasm_func_type` in the Wasm C API. -- [#1715](https://github.com/wasmerio/wasmer/pull/1715) Register errors from `wasm_module_serialize` in the Wasm C API. -- [#1709](https://github.com/wasmerio/wasmer/pull/1709) Implement `wasm_module_name` and `wasm_module_set_name` in the Wasm(er) C API. -- [#1700](https://github.com/wasmerio/wasmer/pull/1700) Implement `wasm_externtype_copy` in the Wasm C API. -- [#1785](https://github.com/wasmerio/wasmer/pull/1785) Add more examples on the Rust API. -- [#1783](https://github.com/wasmerio/wasmer/pull/1783) Handle initialized but empty results in `wasm_func_call` in the Wasm C API. -- [#1780](https://github.com/wasmerio/wasmer/pull/1780) Implement new SIMD zero-extend loads in compiler-llvm. -- [#1754](https://github.com/wasmerio/wasmer/pull/1754) Implement aarch64 ABI for compiler-llvm. -- [#1693](https://github.com/wasmerio/wasmer/pull/1693) Add `wasmer create-exe` subcommand. - -### Changed - -- [#1772](https://github.com/wasmerio/wasmer/pull/1772) Remove lifetime parameter from `NativeFunc`. -- [#1762](https://github.com/wasmerio/wasmer/pull/1762) Allow the `=` sign in a WASI environment variable value. -- [#1710](https://github.com/wasmerio/wasmer/pull/1710) Memory for function call trampolines is now owned by the Artifact. -- [#1781](https://github.com/wasmerio/wasmer/pull/1781) Cranelift upgrade to 0.67. -- [#1777](https://github.com/wasmerio/wasmer/pull/1777) Wasmparser update to 0.65. -- [#1775](https://github.com/wasmerio/wasmer/pull/1775) Improve LimitingTunables implementation. -- [#1720](https://github.com/wasmerio/wasmer/pull/1720) Autodetect llvm regardless of architecture. - -### Fixed - -- [#1718](https://github.com/wasmerio/wasmer/pull/1718) Fix panic in the API in some situations when the memory's min bound was greater than the memory's max bound. -- [#1731](https://github.com/wasmerio/wasmer/pull/1731) In compiler-llvm always load before store, to trigger any traps before any bytes are written. - -## 1.0.0-alpha4 - 2020-10-08 - -### Added -- [#1635](https://github.com/wasmerio/wasmer/pull/1635) Implement `wat2wasm` in the Wasm C API. -- [#1636](https://github.com/wasmerio/wasmer/pull/1636) Implement `wasm_module_validate` in the Wasm C API. -- [#1657](https://github.com/wasmerio/wasmer/pull/1657) Implement `wasm_trap_t` and `wasm_frame_t` for Wasm C API; add examples in Rust and C of exiting early with a host function. - -### Fixed -- [#1690](https://github.com/wasmerio/wasmer/pull/1690) Fix `wasm_memorytype_limits` where `min` and `max` represents pages, not bytes. Additionally, fixes the max limit sentinel value. -- [#1671](https://github.com/wasmerio/wasmer/pull/1671) Fix probestack firing inappropriately, and sometimes over/under allocating stack. -- [#1660](https://github.com/wasmerio/wasmer/pull/1660) Fix issue preventing map-dir aliases starting with `/` from working properly. -- [#1624](https://github.com/wasmerio/wasmer/pull/1624) Add Value::I32/Value::I64 converters from unsigned ints. - -### Changed -- [#1682](https://github.com/wasmerio/wasmer/pull/1682) Improve error reporting when making a memory with invalid settings. -- [#1691](https://github.com/wasmerio/wasmer/pull/1691) Bump minimum supported Rust version to 1.46.0 -- [#1645](https://github.com/wasmerio/wasmer/pull/1645) Move the install script to https://github.com/wasmerio/wasmer-install - -## 1.0.0-alpha3 - 2020-09-14 - -### Fixed - -- [#1620](https://github.com/wasmerio/wasmer/pull/1620) Fix bug causing the Wapm binary to not be packaged with the release -- [#1619](https://github.com/wasmerio/wasmer/pull/1619) Improve error message in engine-native when C compiler is missing - -## 1.0.0-alpha02.0 - 2020-09-11 - -### Added - -- [#1566](https://github.com/wasmerio/wasmer/pull/1566) Add support for opening special Unix files to the WASI FS - -### Fixed - -- [#1602](https://github.com/wasmerio/wasmer/pull/1602) Fix panic when calling host functions with negative numbers in certain situations -- [#1590](https://github.com/wasmerio/wasmer/pull/1590) Fix soundness issue in API of vm::Global - -## TODO: 1.0.0-alpha01.0 - -- Wasmer refactor lands - -## 0.17.1 - 2020-06-24 - -### Changed -- [#1439](https://github.com/wasmerio/wasmer/pull/1439) Move `wasmer-interface-types` into its own repository - -### Fixed - -- [#1554](https://github.com/wasmerio/wasmer/pull/1554) Update supported stable Rust version to 1.45.2. -- [#1552](https://github.com/wasmerio/wasmer/pull/1552) Disable `sigint` handler by default. - -## 0.17.0 - 2020-05-11 - -### Added -- [#1331](https://github.com/wasmerio/wasmer/pull/1331) Implement the `record` type and instrutions for WIT -- [#1345](https://github.com/wasmerio/wasmer/pull/1345) Adding ARM testing in Azure Pipelines -- [#1329](https://github.com/wasmerio/wasmer/pull/1329) New numbers and strings instructions for WIT -- [#1285](https://github.com/wasmerio/wasmer/pull/1285) Greatly improve errors in `wasmer-interface-types` -- [#1303](https://github.com/wasmerio/wasmer/pull/1303) NaN canonicalization for singlepass backend. -- [#1313](https://github.com/wasmerio/wasmer/pull/1313) Add new high-level public API through `wasmer` crate. Includes many updates including: - - Minor improvement: `imports!` macro now handles no trailing comma as well as a trailing comma in namespaces and between namespaces. - - New methods on `Module`: `exports`, `imports`, and `custom_sections`. - - New way to get exports from an instance with `let func_name: Func = instance.exports.get("func_name");`. - - Improved `Table` APIs including `set` which now allows setting functions directly. TODO: update this more if `Table::get` gets made public in this PR - - TODO: finish the list of changes here -- [#1305](https://github.com/wasmerio/wasmer/pull/1305) Handle panics from DynamicFunc. -- [#1300](https://github.com/wasmerio/wasmer/pull/1300) Add support for multiple versions of WASI tests: wasitests now test all versions of WASI. -- [#1292](https://github.com/wasmerio/wasmer/pull/1292) Experimental Support for Android (x86_64 and AArch64) - -### Fixed -- [#1283](https://github.com/wasmerio/wasmer/pull/1283) Workaround for floating point arguments and return values in `DynamicFunc`s. - -### Changed -- [#1401](https://github.com/wasmerio/wasmer/pull/1401) Make breaking change to `RuntimeError`: `RuntimeError` is now more explicit about its possible error values allowing for better insight into why a call into Wasm failed. -- [#1382](https://github.com/wasmerio/wasmer/pull/1382) Refactored test infranstructure (part 2) -- [#1380](https://github.com/wasmerio/wasmer/pull/1380) Refactored test infranstructure (part 1) -- [#1357](https://github.com/wasmerio/wasmer/pull/1357) Refactored bin commands into separate files -- [#1335](https://github.com/wasmerio/wasmer/pull/1335) Change mutability of `memory` to `const` in `wasmer_memory_data_length` in the C API -- [#1332](https://github.com/wasmerio/wasmer/pull/1332) Add option to `CompilerConfig` to force compiler IR verification off even when `debug_assertions` are enabled. This can be used to make debug builds faster, which may be important if you're creating a library that wraps Wasmer and depend on the speed of debug builds. -- [#1320](https://github.com/wasmerio/wasmer/pull/1320) Change `custom_sections` field in `ModuleInfo` to be more standards compliant by allowing multiple custom sections with the same name. To get the old behavior with the new API, you can add `.last().unwrap()` to accesses. For example, `module_info.custom_sections["custom_section_name"].last().unwrap()`. -- [#1301](https://github.com/wasmerio/wasmer/pull/1301) Update supported stable Rust version to 1.41.1. - -## 0.16.2 - 2020-03-11 - -### Fixed - -- [#1294](https://github.com/wasmerio/wasmer/pull/1294) Fix bug related to system calls in WASI that rely on reading from WasmPtrs as arrays of length 0. `WasmPtr` will now succeed on length 0 arrays again. - -## 0.16.1 - 2020-03-11 - -### Fixed - -- [#1291](https://github.com/wasmerio/wasmer/pull/1291) Fix installation packaging script to package the `wax` command. - -## 0.16.0 - 2020-03-11 - -### Added -- [#1286](https://github.com/wasmerio/wasmer/pull/1286) Updated Windows Wasmer icons. Add wax -- [#1284](https://github.com/wasmerio/wasmer/pull/1284) Implement string and memory instructions in `wasmer-interface-types` - -### Fixed -- [#1272](https://github.com/wasmerio/wasmer/pull/1272) Fix off-by-one error bug when accessing memory with a `WasmPtr` that contains the last valid byte of memory. Also changes the behavior of `WasmPtr` with a length of 0 and `WasmPtr` where `std::mem::size_of::()` is 0 to always return `None` - -## 0.15.0 - 2020-03-04 - -- [#1263](https://github.com/wasmerio/wasmer/pull/1263) Changed the behavior of some WASI syscalls to now handle preopened directories more properly. Changed default `--debug` logging to only show Wasmer-related messages. -- [#1217](https://github.com/wasmerio/wasmer/pull/1217) Polymorphic host functions based on dynamic trampoline generation. -- [#1252](https://github.com/wasmerio/wasmer/pull/1252) Allow `/` in wasi `--mapdir` wasm path. -- [#1212](https://github.com/wasmerio/wasmer/pull/1212) Add support for GDB JIT debugging: - - Add `--generate-debug-info` and `-g` flags to `wasmer run` to generate debug information during compilation. The debug info is passed via the GDB JIT interface to a debugger to allow source-level debugging of Wasm files. Currently only available on clif-backend. - - Break public middleware APIs: there is now a `source_loc` parameter that should be passed through if applicable. - - Break compiler trait methods such as `feed_local`, `feed_event` as well as `ModuleCodeGenerator::finalize`. - -## 0.14.1 - 2020-02-24 - -- [#1245](https://github.com/wasmerio/wasmer/pull/1245) Use Ubuntu 16.04 in CI so that we use an earlier version of GLIBC. -- [#1234](https://github.com/wasmerio/wasmer/pull/1234) Check for unused excluded spectest failures. -- [#1232](https://github.com/wasmerio/wasmer/pull/1232) `wasmer-interface-types` has a WAT decoder. - -## 0.14.0 - 2020-02-20 - -- [#1233](https://github.com/wasmerio/wasmer/pull/1233) Improved Wasmer C API release artifacts. -- [#1216](https://github.com/wasmerio/wasmer/pull/1216) `wasmer-interface-types` receives a binary encoder. -- [#1228](https://github.com/wasmerio/wasmer/pull/1228) Singlepass cleanup: Resolve several FIXMEs and remove protect_unix. -- [#1218](https://github.com/wasmerio/wasmer/pull/1218) Enable Cranelift verifier in debug mode. Fix bug with table indices being the wrong type. -- [#787](https://github.com/wasmerio/wasmer/pull/787) New crate `wasmer-interface-types` to implement WebAssembly Interface Types. -- [#1213](https://github.com/wasmerio/wasmer/pull/1213) Fixed WASI `fdstat` to detect `isatty` properly. -- [#1192](https://github.com/wasmerio/wasmer/pull/1192) Use `ExceptionCode` for error representation. -- [#1191](https://github.com/wasmerio/wasmer/pull/1191) Fix singlepass miscompilation on `Operator::CallIndirect`. -- [#1180](https://github.com/wasmerio/wasmer/pull/1180) Fix compilation for target `x86_64-unknown-linux-musl`. -- [#1170](https://github.com/wasmerio/wasmer/pull/1170) Improve the WasiFs builder API with convenience methods for overriding stdin, stdout, and stderr as well as a new sub-builder for controlling the permissions and properties of preopened directories. Also breaks that implementations of `WasiFile` must be `Send` -- please file an issue if this change causes you any issues. -- [#1161](https://github.com/wasmerio/wasmer/pull/1161) Require imported functions to be `Send`. This is a breaking change that fixes a soundness issue in the API. -- [#1140](https://github.com/wasmerio/wasmer/pull/1140) Use [`blake3`](https://github.com/BLAKE3-team/BLAKE3) as default hashing algorithm for caching. -- [#1129](https://github.com/wasmerio/wasmer/pull/1129) Standard exception types for singlepass backend. - -## 0.13.1 - 2020-01-16 -- Fix bug in wapm related to the `package.wasmer_extra_flags` entry in the manifest - -## 0.13.0 - 2020-01-15 - -Special thanks to [@repi](https://github.com/repi) and [@srenatus](https://github.com/srenatus) for their contributions! - -- [#1153](https://github.com/wasmerio/wasmer/pull/1153) Added Wasmex, an Elixir language integration, to the README -- [#1133](https://github.com/wasmerio/wasmer/pull/1133) New `wasmer_trap` function in the C API, to properly error from within a host function -- [#1147](https://github.com/wasmerio/wasmer/pull/1147) Remove `log` and `trace` macros from `wasmer-runtime-core`, remove `debug` and `trace` features from `wasmer-*` crates, use the `log` crate for logging and use `fern` in the Wasmer CLI binary to output log messages. Colorized output will be enabled automatically if printing to a terminal, to force colorization on or off, set the `WASMER_COLOR` environment variable to `true` or `false`. -- [#1128](https://github.com/wasmerio/wasmer/pull/1128) Fix a crash when a host function is missing and the `allow_missing_functions` flag is enabled -- [#1099](https://github.com/wasmerio/wasmer/pull/1099) Remove `backend::Backend` from `wasmer_runtime_core` -- [#1097](https://github.com/wasmerio/wasmer/pull/1097) Move inline breakpoint outside of runtime backend -- [#1095](https://github.com/wasmerio/wasmer/pull/1095) Update to cranelift 0.52. -- [#1092](https://github.com/wasmerio/wasmer/pull/1092) Add `get_utf8_string_with_nul` to `WasmPtr` to read nul-terminated strings from memory. -- [#1071](https://github.com/wasmerio/wasmer/pull/1071) Add support for non-trapping float-to-int conversions, enabled by default. - -## 0.12.0 - 2019-12-18 - -Special thanks to [@ethanfrey](https://github.com/ethanfrey), [@AdamSLevy](https://github.com/AdamSLevy), [@Jasper-Bekkers](https://github.com/Jasper-Bekkers), [@srenatus](https://github.com/srenatus) for their contributions! - -- [#1078](https://github.com/wasmerio/wasmer/pull/1078) Increase the maximum number of parameters `Func` can take -- [#1062](https://github.com/wasmerio/wasmer/pull/1062) Expose some opt-in Emscripten functions to the C API -- [#1032](https://github.com/wasmerio/wasmer/pull/1032) Change the signature of the Emscripten `abort` function to work with Emscripten 1.38.30 -- [#1060](https://github.com/wasmerio/wasmer/pull/1060) Test the capi with all the backends -- [#1069](https://github.com/wasmerio/wasmer/pull/1069) Add function `get_memory_and_data` to `Ctx` to help prevent undefined behavior and mutable aliasing. It allows accessing memory while borrowing data mutably for the `Ctx` lifetime. This new function is now being used in `wasmer-wasi`. -- [#1058](https://github.com/wasmerio/wasmer/pull/1058) Fix minor panic issue when `wasmer::compile_with` called with llvm backend. -- [#858](https://github.com/wasmerio/wasmer/pull/858) Minor panic fix when wasmer binary with `loader` option run a module without exported `_start` function. -- [#1056](https://github.com/wasmerio/wasmer/pull/1056) Improved `--invoke` args parsing (supporting `i32`, `i64`, `f32` and `f32`) in Wasmer CLI -- [#1054](https://github.com/wasmerio/wasmer/pull/1054) Improve `--invoke` output in Wasmer CLI -- [#1053](https://github.com/wasmerio/wasmer/pull/1053) For RuntimeError and breakpoints, use Box instead of Box. -- [#1052](https://github.com/wasmerio/wasmer/pull/1052) Fix minor panic and improve Error handling in singlepass backend. -- [#1050](https://github.com/wasmerio/wasmer/pull/1050) Attach C & C++ headers to releases. -- [#1033](https://github.com/wasmerio/wasmer/pull/1033) Set cranelift backend as default compiler backend again, require at least one backend to be enabled for Wasmer CLI -- [#1044](https://github.com/wasmerio/wasmer/pull/1044) Enable AArch64 support in the LLVM backend. -- [#1030](https://github.com/wasmerio/wasmer/pull/1030) Ability to generate `ImportObject` for a specific version WASI version with the C API. -- [#1028](https://github.com/wasmerio/wasmer/pull/1028) Introduce strict/non-strict modes for `get_wasi_version` -- [#1029](https://github.com/wasmerio/wasmer/pull/1029) Add the “floating” `WasiVersion::Latest` version. -- [#1006](https://github.com/wasmerio/wasmer/pull/1006) Fix minor panic issue when `wasmer::compile_with` called with llvm backend -- [#1009](https://github.com/wasmerio/wasmer/pull/1009) Enable LLVM verifier for all tests, add new llvm-backend-tests crate. -- [#1022](https://github.com/wasmerio/wasmer/pull/1022) Add caching support for Singlepass backend. -- [#1004](https://github.com/wasmerio/wasmer/pull/1004) Add the Auto backend to enable to adapt backend usage depending on wasm file executed. -- [#1068](https://github.com/wasmerio/wasmer/pull/1068) Various cleanups for the singlepass backend on AArch64. - -## 0.11.0 - 2019-11-22 - -- [#713](https://github.com/wasmerio/wasmer/pull/713) Add AArch64 support for singlepass. -- [#995](https://github.com/wasmerio/wasmer/pull/995) Detect when a global is read without being initialized (emit a proper error instead of panicking) -- [#996](https://github.com/wasmerio/wasmer/pull/997) Refactored spectests, emtests and wasitests to use default compiler logic -- [#992](https://github.com/wasmerio/wasmer/pull/992) Updates WAPM version to 0.4.1, fix arguments issue introduced in #990 -- [#990](https://github.com/wasmerio/wasmer/pull/990) Default wasmer CLI to `run`. Wasmer will now attempt to parse unrecognized command line options as if they were applied to the run command: `wasmer mywasm.wasm --dir=.` now works! -- [#987](https://github.com/wasmerio/wasmer/pull/987) Fix `runtime-c-api` header files when compiled by gnuc. -- [#957](https://github.com/wasmerio/wasmer/pull/957) Change the meaning of `wasmer_wasi::is_wasi_module` to detect any type of WASI module, add support for new wasi snapshot_preview1 -- [#934](https://github.com/wasmerio/wasmer/pull/934) Simplify float expressions in the LLVM backend. - -## 0.10.2 - 2019-11-18 - -- [#968](https://github.com/wasmerio/wasmer/pull/968) Added `--invoke` option to the command -- [#964](https://github.com/wasmerio/wasmer/pull/964) Enable cross-compilation for specific target -- [#971](https://github.com/wasmerio/wasmer/pull/971) In LLVM backend, use unaligned loads and stores for non-atomic accesses to wasmer memory. -- [#960](https://github.com/wasmerio/wasmer/pull/960) Fix `runtime-c-api` header files when compiled by clang. -- [#925](https://github.com/wasmerio/wasmer/pull/925) Host functions can be closures with a captured environment. -- [#917](https://github.com/wasmerio/wasmer/pull/917) Host functions (aka imported functions) may not have `&mut vm::Ctx` as first argument, i.e. the presence of the `&mut vm::Ctx` argument is optional. -- [#915](https://github.com/wasmerio/wasmer/pull/915) All backends share the same definition of `Trampoline` (defined in `wasmer-runtime-core`). - -## 0.10.1 - 2019-11-11 - -- [#952](https://github.com/wasmerio/wasmer/pull/952) Use C preprocessor to properly hide trampoline functions on Windows and non-x86_64 targets. - -## 0.10.0 - 2019-11-11 - -Special thanks to [@newpavlov](https://github.com/newpavlov) and [@Maxgy](https://github.com/Maxgy) for their contributions! - -- [#942](https://github.com/wasmerio/wasmer/pull/942) Deny missing docs in runtime core and add missing docs -- [#939](https://github.com/wasmerio/wasmer/pull/939) Fix bug causing attempts to append to files with WASI to delete the contents of the file -- [#940](https://github.com/wasmerio/wasmer/pull/940) Update supported Rust version to 1.38+ -- [#923](https://github.com/wasmerio/wasmer/pull/923) Fix memory leak in the C API caused by an incorrect cast in `wasmer_trampoline_buffer_destroy` -- [#921](https://github.com/wasmerio/wasmer/pull/921) In LLVM backend, annotate all memory accesses with TBAA metadata. -- [#883](https://github.com/wasmerio/wasmer/pull/883) Allow floating point operations to have arbitrary inputs, even including SNaNs. -- [#856](https://github.com/wasmerio/wasmer/pull/856) Expose methods in the runtime C API to get a WASI import object - -## 0.9.0 - 2019-10-23 - -Special thanks to @alocquet for their contributions! - -- [#898](https://github.com/wasmerio/wasmer/pull/898) State tracking is now disabled by default in the LLVM backend. It can be enabled with `--track-state`. -- [#861](https://github.com/wasmerio/wasmer/pull/861) Add descriptions to `unimplemented!` macro in various places -- [#897](https://github.com/wasmerio/wasmer/pull/897) Removes special casing of stdin, stdout, and stderr in WASI. Closing these files now works. Removes `stdin`, `stdout`, and `stderr` from `WasiFS`, replaced by the methods `stdout`, `stdout_mut`, and so on. -- [#863](https://github.com/wasmerio/wasmer/pull/863) Fix min and max for cases involving NaN and negative zero when using the LLVM backend. - -## 0.8.0 - 2019-10-02 - -Special thanks to @jdanford for their contributions! - -- [#850](https://github.com/wasmerio/wasmer/pull/850) New `WasiStateBuilder` API. small, add misc. breaking changes to existing API (for example, changing the preopen dirs arg on `wasi::generate_import_object` from `Vec` to `Vec`) -- [#852](https://github.com/wasmerio/wasmer/pull/852) Make minor grammar/capitalization fixes to README.md -- [#841](https://github.com/wasmerio/wasmer/pull/841) Slightly improve rustdoc documentation and small updates to outdated info in readme files -- [#836](https://github.com/wasmerio/wasmer/pull/836) Update Cranelift fork version to `0.44.0` -- [#839](https://github.com/wasmerio/wasmer/pull/839) Change supported version to stable Rust 1.37+ -- [#834](https://github.com/wasmerio/wasmer/pull/834) Fix panic when unwraping `wasmer` arguments -- [#835](https://github.com/wasmerio/wasmer/pull/835) Add parallel execution example (independent instances created from the same `ImportObject` and `Module` run with rayon) -- [#834](https://github.com/wasmerio/wasmer/pull/834) Fix panic when parsing numerical arguments for no-ABI targets run with the wasmer binary -- [#833](https://github.com/wasmerio/wasmer/pull/833) Add doc example of using ImportObject's new `maybe_with_namespace` method -- [#832](https://github.com/wasmerio/wasmer/pull/832) Delete unused runtime ABI -- [#809](https://github.com/wasmerio/wasmer/pull/809) Fix bugs leading to panics in `LocalBacking`. -- [#831](https://github.com/wasmerio/wasmer/pull/831) Add support for atomic operations, excluding wait and notify, to singlepass. -- [#822](https://github.com/wasmerio/wasmer/pull/822) Update Cranelift fork version to `0.43.1` -- [#829](https://github.com/wasmerio/wasmer/pull/829) Fix deps on `make bench-*` commands; benchmarks don't compile other backends now -- [#807](https://github.com/wasmerio/wasmer/pull/807) Implement Send for `Instance`, breaking change on `ImportObject`, remove method `get_namespace` replaced with `with_namespace` and `maybe_with_namespace` -- [#817](https://github.com/wasmerio/wasmer/pull/817) Add document for tracking features across backends and language integrations, [docs/feature_matrix.md] -- [#823](https://github.com/wasmerio/wasmer/issues/823) Improved Emscripten / WASI integration -- [#821](https://github.com/wasmerio/wasmer/issues/821) Remove patch version on most deps Cargo manifests. This gives Wasmer library users more control over which versions of the deps they use. -- [#820](https://github.com/wasmerio/wasmer/issues/820) Remove null-pointer checks in `WasmPtr` from runtime-core, re-add them in Emscripten -- [#803](https://github.com/wasmerio/wasmer/issues/803) Add method to `Ctx` to invoke functions by their `TableIndex` -- [#790](https://github.com/wasmerio/wasmer/pull/790) Fix flaky test failure with LLVM, switch to large code model. -- [#788](https://github.com/wasmerio/wasmer/pull/788) Use union merge on the changelog file. -- [#785](https://github.com/wasmerio/wasmer/pull/785) Include Apache license file for spectests. -- [#786](https://github.com/wasmerio/wasmer/pull/786) In the LLVM backend, lower atomic wasm operations to atomic machine instructions. -- [#784](https://github.com/wasmerio/wasmer/pull/784) Fix help string for wasmer run. - -## 0.7.0 - 2019-09-12 - -Special thanks to @YaronWittenstein @penberg for their contributions. - -- [#776](https://github.com/wasmerio/wasmer/issues/776) Allow WASI preopened fds to be closed -- [#774](https://github.com/wasmerio/wasmer/issues/774) Add more methods to the `WasiFile` trait -- [#772](https://github.com/wasmerio/wasmer/issues/772) [#770](https://github.com/wasmerio/wasmer/issues/770) Handle more internal failures by passing back errors -- [#756](https://github.com/wasmerio/wasmer/issues/756) Allow NULL parameter and 0 arity in `wasmer_export_func_call` C API -- [#747](https://github.com/wasmerio/wasmer/issues/747) Return error instead of panicking on traps when using the Wasmer binary -- [#741](https://github.com/wasmerio/wasmer/issues/741) Add validate Wasm fuzz target -- [#733](https://github.com/wasmerio/wasmer/issues/733) Remove dependency on compiler backends for `middleware-common` -- [#732](https://github.com/wasmerio/wasmer/issues/732) [#731](https://github.com/wasmerio/wasmer/issues/731) WASI bug fixes and improvements -- [#726](https://github.com/wasmerio/wasmer/issues/726) Add serialization and deserialization for Wasi State -- [#716](https://github.com/wasmerio/wasmer/issues/716) Improve portability of install script -- [#714](https://github.com/wasmerio/wasmer/issues/714) Add Code of Conduct -- [#708](https://github.com/wasmerio/wasmer/issues/708) Remove unconditional dependency on Cranelift in the C API -- [#703](https://github.com/wasmerio/wasmer/issues/703) Fix compilation on AArch64 Linux -- [#702](https://github.com/wasmerio/wasmer/issues/702) Add SharedMemory to Wasmer. Add `--enable-threads` flag, add partial implementation of atomics to LLVM backend. -- [#698](https://github.com/wasmerio/wasmer/issues/698) [#690](https://github.com/wasmerio/wasmer/issues/690) [#687](https://github.com/wasmerio/wasmer/issues/690) Fix panics in Emscripten -- [#689](https://github.com/wasmerio/wasmer/issues/689) Replace `wasmer_runtime_code::memory::Atomic` with `std::sync::atomic` atomics, changing its interface -- [#680](https://github.com/wasmerio/wasmer/issues/680) [#673](https://github.com/wasmerio/wasmer/issues/673) [#669](https://github.com/wasmerio/wasmer/issues/669) [#660](https://github.com/wasmerio/wasmer/issues/660) [#659](https://github.com/wasmerio/wasmer/issues/659) Misc. runtime and singlepass fixes -- [#677](https://github.com/wasmerio/wasmer/issues/677) [#675](https://github.com/wasmerio/wasmer/issues/675) [#674](https://github.com/wasmerio/wasmer/issues/674) LLVM backend fixes and improvements -- [#671](https://github.com/wasmerio/wasmer/issues/671) Implement fs polling in `wasi::poll_oneoff` for Unix-like platforms -- [#656](https://github.com/wasmerio/wasmer/issues/656) Move CI to Azure Pipelines -- [#650](https://github.com/wasmerio/wasmer/issues/650) Implement `wasi::path_rename`, improve WASI FS public api, and allow open files to exist even when the underlying file is deleted -- [#643](https://github.com/wasmerio/wasmer/issues/643) Implement `wasi::path_symlink` and improve WASI FS public api IO error reporting -- [#608](https://github.com/wasmerio/wasmer/issues/608) Implement wasi syscalls `fd_allocate`, `fd_sync`, `fd_pread`, `path_link`, `path_filestat_set_times`; update WASI fs API in a WIP way; reduce coupling of WASI code to host filesystem; make debug messages from WASI more readable; improve rights-checking when calling syscalls; implement reference counting on inodes; misc bug fixes and improvements -- [#616](https://github.com/wasmerio/wasmer/issues/616) Create the import object separately from instance instantiation in `runtime-c-api` -- [#620](https://github.com/wasmerio/wasmer/issues/620) Replace one `throw()` with `noexcept` in llvm backend -- [#618](https://github.com/wasmerio/wasmer/issues/618) Implement `InternalEvent::Breakpoint` in the llvm backend to allow metering in llvm -- [#615](https://github.com/wasmerio/wasmer/issues/615) Eliminate `FunctionEnvironment` construction in `feed_event()` speeding up to 70% of compilation in clif -- [#609](https://github.com/wasmerio/wasmer/issues/609) Update dependencies -- [#602](https://github.com/wasmerio/wasmer/issues/602) C api extract instance context from instance -- [#590](https://github.com/wasmerio/wasmer/issues/590) Error visibility changes in wasmer-c-api -- [#589](https://github.com/wasmerio/wasmer/issues/589) Make `wasmer_byte_array` fields `public` in wasmer-c-api - -## 0.6.0 - 2019-07-31 -- [#603](https://github.com/wasmerio/wasmer/pull/603) Update Wapm-cli, bump version numbers -- [#595](https://github.com/wasmerio/wasmer/pull/595) Add unstable public API for interfacing with the WASI file system in plugin-like usecases -- [#598](https://github.com/wasmerio/wasmer/pull/598) LLVM Backend is now supported in Windows -- [#599](https://github.com/wasmerio/wasmer/pull/599) Fix llvm backend failures in fat spec tests and simd_binaryen spec test. -- [#579](https://github.com/wasmerio/wasmer/pull/579) Fix bug in caching with LLVM and Singlepass backends. - Add `default-backend-singlepass`, `default-backend-llvm`, and `default-backend-cranelift` features to `wasmer-runtime` - to control the `default_compiler()` function (this is a breaking change). Add `compiler_for_backend` function in `wasmer-runtime` -- [#561](https://github.com/wasmerio/wasmer/pull/561) Call the `data_finalizer` field on the `Ctx` -- [#576](https://github.com/wasmerio/wasmer/pull/576) fix `Drop` of uninit `Ctx` -- [#542](https://github.com/wasmerio/wasmer/pull/542) Add SIMD support to Wasmer (LLVM backend only) - - Updates LLVM to version 8.0 - -## 0.5.7 - 2019-07-23 -- [#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 misc. improvements to most syscalls touching the filesystem - -## 0.5.6 - 2019-07-16 -- [#565](https://github.com/wasmerio/wasmer/pull/565) Update wapm and bump version to 0.5.6 -- [#563](https://github.com/wasmerio/wasmer/pull/563) Improve wasi testing infrastructure - - fixes arg parsing from comments & fixes the mapdir test to have the native code doing the same thing as the WASI code - - makes wasitests-generate output stdout/stderr by default & adds function to print stdout and stderr for a command if it fails - - compiles wasm with size optimizations & strips generated wasm with wasm-strip -- [#554](https://github.com/wasmerio/wasmer/pull/554) Finish implementation of `wasi::fd_seek`, fix bug in filestat -- [#550](https://github.com/wasmerio/wasmer/pull/550) Fix singlepass compilation error with `imul` instruction - - -## 0.5.5 - 2019-07-10 -- [#541](https://github.com/wasmerio/wasmer/pull/541) Fix dependency graph by making separate test crates; ABI implementations should not depend on compilers. Add Cranelift fork as git submodule of clif-backend -- [#537](https://github.com/wasmerio/wasmer/pull/537) Add hidden flag (`--cache-key`) to use prehashed key into the compiled wasm cache and change compiler backend-specific caching to use directories -- [#536](https://github.com/wasmerio/wasmer/pull/536) ~Update cache to use compiler backend name in cache key~ - -## 0.5.4 - 2019-07-06 -- [#529](https://github.com/wasmerio/wasmer/pull/529) Updates the Wasm Interface library, which is used by wapm, with bug fixes and error message improvements - -## 0.5.3 - 2019-07-03 -- [#523](https://github.com/wasmerio/wasmer/pull/523) Update wapm version to fix bug related to signed packages in the global namespace and locally-stored public keys - -## 0.5.2 - 2019-07-02 -- [#516](https://github.com/wasmerio/wasmer/pull/516) Add workaround for singlepass miscompilation on GetLocal -- [#521](https://github.com/wasmerio/wasmer/pull/521) Update Wapm-cli, bump version numbers -- [#518](https://github.com/wasmerio/wasmer/pull/518) Update Cranelift and WasmParser -- [#514](https://github.com/wasmerio/wasmer/pull/514) [#519](https://github.com/wasmerio/wasmer/pull/519) Improved Emscripten network related calls, added a null check to `WasmPtr` -- [#515](https://github.com/wasmerio/wasmer/pull/515) Improved Emscripten dyncalls -- [#513](https://github.com/wasmerio/wasmer/pull/513) Fix emscripten lseek implementation. -- [#510](https://github.com/wasmerio/wasmer/pull/510) Simplify construction of floating point constants in LLVM backend. Fix LLVM assertion failure due to definition of %ctx. - -## 0.5.1 - 2019-06-24 -- [#508](https://github.com/wasmerio/wasmer/pull/508) Update wapm version, includes bug fixes - -## 0.5.0 - 2019-06-17 - -- [#471](https://github.com/wasmerio/wasmer/pull/471) Added missing functions to run Python. Improved Emscripten bindings -- [#494](https://github.com/wasmerio/wasmer/pull/494) Remove deprecated type aliases from libc in the runtime C API -- [#493](https://github.com/wasmerio/wasmer/pull/493) `wasmer_module_instantiate` has better error messages in the runtime C API -- [#474](https://github.com/wasmerio/wasmer/pull/474) Set the install name of the dylib to `@rpath` -- [#490](https://github.com/wasmerio/wasmer/pull/490) Add MiddlewareChain and StreamingCompiler to runtime -- [#487](https://github.com/wasmerio/wasmer/pull/487) Fix stack offset check in singlepass backend -- [#450](https://github.com/wasmerio/wasmer/pull/450) Added Metering -- [#481](https://github.com/wasmerio/wasmer/pull/481) Added context trampoline into runtime -- [#484](https://github.com/wasmerio/wasmer/pull/484) Fix bugs in emscripten socket syscalls -- [#476](https://github.com/wasmerio/wasmer/pull/476) Fix bug with wasi::environ_get, fix off by one error in wasi::environ_sizes_get -- [#470](https://github.com/wasmerio/wasmer/pull/470) Add mapdir support to Emscripten, implement getdents for Unix -- [#467](https://github.com/wasmerio/wasmer/pull/467) `wasmer_instantiate` returns better error messages in the runtime C API -- [#463](https://github.com/wasmerio/wasmer/pull/463) Fix bug in WASI path_open allowing one level above preopened dir to be accessed -- [#461](https://github.com/wasmerio/wasmer/pull/461) Prevent passing negative lengths in various places in the runtime C API -- [#459](https://github.com/wasmerio/wasmer/pull/459) Add monotonic and real time clocks for wasi on windows -- [#447](https://github.com/wasmerio/wasmer/pull/447) Add trace macro (`--features trace`) for more verbose debug statements -- [#451](https://github.com/wasmerio/wasmer/pull/451) Add `--mapdir=src:dest` flag to rename host directories in the guest context -- [#457](https://github.com/wasmerio/wasmer/pull/457) Implement file metadata for WASI, fix bugs in WASI clock code for Unix platforms - -## 0.4.2 - 2019-05-16 - -- [#416](https://github.com/wasmerio/wasmer/pull/416) Remote code loading framework -- [#449](https://github.com/wasmerio/wasmer/pull/449) Fix bugs: opening host files in filestat and opening with write permissions unconditionally in path_open -- [#442](https://github.com/wasmerio/wasmer/pull/442) Misc. WASI FS fixes and implement readdir -- [#440](https://github.com/wasmerio/wasmer/pull/440) Fix type mismatch between `wasmer_instance_call` and `wasmer_export_func_*_arity` functions in the runtime C API. -- [#269](https://github.com/wasmerio/wasmer/pull/269) Add better runtime docs -- [#432](https://github.com/wasmerio/wasmer/pull/432) Fix returned value of `wasmer_last_error_message` in the runtime C API -- [#429](https://github.com/wasmerio/wasmer/pull/429) Get wasi::path_filestat_get working for some programs; misc. minor WASI FS improvements -- [#413](https://github.com/wasmerio/wasmer/pull/413) Update LLVM backend to use new parser codegen traits - -## 0.4.1 - 2019-05-06 - -- [#426](https://github.com/wasmerio/wasmer/pull/426) Update wapm-cli submodule, bump version to 0.4.1 -- [#422](https://github.com/wasmerio/wasmer/pull/422) Improved Emscripten functions to run optipng and pngquant compiled to wasm -- [#409](https://github.com/wasmerio/wasmer/pull/409) Improved Emscripten functions to run JavascriptCore compiled to wasm -- [#399](https://github.com/wasmerio/wasmer/pull/399) Add example of using a plugin extended from WASI -- [#397](https://github.com/wasmerio/wasmer/pull/397) Fix WASI fs abstraction to work on Windows -- [#390](https://github.com/wasmerio/wasmer/pull/390) Pin released wapm version and add it as a git submodule -- [#408](https://github.com/wasmerio/wasmer/pull/408) Add images to windows installer and update installer to add wapm bin directory to path - -## 0.4.0 - 2019-04-23 - -- [#383](https://github.com/wasmerio/wasmer/pull/383) Hook up wasi exit code to wasmer cli. -- [#382](https://github.com/wasmerio/wasmer/pull/382) Improve error message on `--backend` flag to only suggest currently enabled backends -- [#381](https://github.com/wasmerio/wasmer/pull/381) Allow retrieving propagated user errors. -- [#379](https://github.com/wasmerio/wasmer/pull/379) Fix small return types from imported functions. -- [#371](https://github.com/wasmerio/wasmer/pull/371) Add more Debug impl for WASI types -- [#368](https://github.com/wasmerio/wasmer/pull/368) Fix issue with write buffering -- [#343](https://github.com/wasmerio/wasmer/pull/343) Implement preopened files for WASI and fix aligment issue when accessing WASI memory -- [#367](https://github.com/wasmerio/wasmer/pull/367) Add caching support to the LLVM backend. -- [#366](https://github.com/wasmerio/wasmer/pull/366) Remove `UserTrapper` trait to fix [#365](https://github.com/wasmerio/wasmer/issues/365). -- [#348](https://github.com/wasmerio/wasmer/pull/348) Refactor internal runtime ↔️ backend abstraction. -- [#355](https://github.com/wasmerio/wasmer/pull/355) Misc changes to `Cargo.toml`s for publishing -- [#352](https://github.com/wasmerio/wasmer/pull/352) Bump version numbers to 0.3.0 -- [#351](https://github.com/wasmerio/wasmer/pull/351) Add hidden option to specify wasm program name (can be used to improve error messages) -- [#350](https://github.com/wasmerio/wasmer/pull/350) Enforce that CHANGELOG.md is updated through CI. -- [#349](https://github.com/wasmerio/wasmer/pull/349) Add [CHANGELOG.md](https://github.com/wasmerio/wasmer/blob/master/CHANGELOG.md). - -## 0.3.0 - 2019-04-12 - -- [#276](https://github.com/wasmerio/wasmer/pull/276) [#288](https://github.com/wasmerio/wasmer/pull/288) [#344](https://github.com/wasmerio/wasmer/pull/344) Use new singlepass backend (with the `--backend=singlepass` when running Wasmer) -- [#338](https://github.com/wasmerio/wasmer/pull/338) Actually catch traps/panics/etc when using a typed func. -- [#325](https://github.com/wasmerio/wasmer/pull/325) Fixed func_index in debug mode -- [#323](https://github.com/wasmerio/wasmer/pull/323) Add validate subcommand to validate Wasm files -- [#321](https://github.com/wasmerio/wasmer/pull/321) Upgrade to Cranelift 0.3.0 -- [#319](https://github.com/wasmerio/wasmer/pull/319) Add Export and GlobalDescriptor to Runtime API -- [#310](https://github.com/wasmerio/wasmer/pull/310) Cleanup warnings -- [#299](https://github.com/wasmerio/wasmer/pull/299) [#300](https://github.com/wasmerio/wasmer/pull/300) [#301](https://github.com/wasmerio/wasmer/pull/301) [#303](https://github.com/wasmerio/wasmer/pull/303) [#304](https://github.com/wasmerio/wasmer/pull/304) [#305](https://github.com/wasmerio/wasmer/pull/305) [#306](https://github.com/wasmerio/wasmer/pull/306) [#307](https://github.com/wasmerio/wasmer/pull/307) Add support for WASI 🎉 -- [#286](https://github.com/wasmerio/wasmer/pull/286) Add extend to imports -- [#278](https://github.com/wasmerio/wasmer/pull/278) Add versioning to cache -- [#250](https://github.com/wasmerio/wasmer/pull/250) Setup bors +# Changelog + +*The format is based on [Keep a Changelog].* + +[Keep a Changelog]: http://keepachangelog.com/en/1.0.0/ + +Looking for changes that affect our C API? See the [C API Changelog](lib/c-api/CHANGELOG.md). + + +## **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 + +## 3.1.0 - 12/12/2022 + +## Added + + - [#3403](https://github.com/wasmerio/wasmer/pull/3403) Add wasm_importtype_copy to C API + +## Changed + + - [#3416](https://github.com/wasmerio/wasmer/pull/3416) Download and install packages via .tar.gz URLs and improve installation error message + - [#3402](https://github.com/wasmerio/wasmer/pull/3402) Do not run first command of wapm file and print all commands instead + - [#3400](https://github.com/wasmerio/wasmer/pull/3400) Use the wasm_bindgen_downcast crate for downcasting JsValues + - [#3363](https://github.com/wasmerio/wasmer/pull/3363) Store Used CpuFeature in Artifact instead of Present CpuFeatures for Singlepass + - [#3378](https://github.com/wasmerio/wasmer/pull/3378) Introduced EngineRef and AsEngineRef trait + - [#3386](https://github.com/wasmerio/wasmer/pull/3386) Restore Support For All Wasi Clock Types + - [#3153](https://github.com/wasmerio/wasmer/pull/3153) SharedMemory & Atomics + +## Fixed + + - [#3415](https://github.com/wasmerio/wasmer/pull/3415) Fix singlepass for Aarch64 + - [#3395](https://github.com/wasmerio/wasmer/pull/3395) Fix create-exe to be able to cross-compile on Windows + - [#3396](https://github.com/wasmerio/wasmer/pull/3396) Fix build doc and minimum-sys build + +## 3.0.2 - 25/11/2022 + +## Added + + - [#3364](https://github.com/wasmerio/wasmer/pull/3364) Added the actual LZCNT / TZCNT implementation + +## Changed + + - [#3365](https://github.com/wasmerio/wasmer/pull/3365) Improve FreeBSD support + - [#3368](https://github.com/wasmerio/wasmer/pull/3368) Remove wasi conditional compilation from wasmer-registry + - [#3367](https://github.com/wasmerio/wasmer/pull/3367) Change LLVM detection in Makefile + +## Fixed + + - [#3370](https://github.com/wasmerio/wasmer/pull/3370) Fix wasmer run not interpreting URLs correctly + display fixes + - [#3371](https://github.com/wasmerio/wasmer/pull/3371) Fix cargo binstall + + +## 3.0.1 - 23/11/2022 + +## Added + + - [#3361](https://github.com/wasmerio/wasmer/pull/3361) Give users feedback when they are running "wasmer add ..." + +## Changed + + - [#3360](https://github.com/wasmerio/wasmer/pull/3360) Introduce a "wasmer_registry::queries" module with all GraphQL queries + - [#3355](https://github.com/wasmerio/wasmer/pull/3355) Fetch the pirita download URL + - [#3344](https://github.com/wasmerio/wasmer/pull/3344) Revert #3145 + - [#3302](https://github.com/wasmerio/wasmer/pull/3302) Some Refactor of Singlepass compiler to have better error and cpu features handling + - [#3296](https://github.com/wasmerio/wasmer/pull/3296) Use the right collection when parsing type section + - [#3292](https://github.com/wasmerio/wasmer/pull/3292) Precompute offsets in VMOffsets + - [#3290](https://github.com/wasmerio/wasmer/pull/3290) Limit the use of clone when handling Compilation object + - [#3316](https://github.com/wasmerio/wasmer/pull/3316) Implement wasmer whoami + - [#3341](https://github.com/wasmerio/wasmer/pull/3341) Update CHANGELOG.md + +## Fixed + + - [#3342](https://github.com/wasmerio/wasmer/pull/3342) Fixes for 3.0.0 release + +## 3.0.0 - 20/11/2022 + +## Added + + - [#3339](https://github.com/wasmerio/wasmer/pull/3339) Fixes for wasmer login / wasmer add + - [#3337](https://github.com/wasmerio/wasmer/pull/3337) Add automation script to automate deploying releases on GitHub + - [#3338](https://github.com/wasmerio/wasmer/pull/3338) Re-add codecov to get coverage reports + +## Changed + + - [#3295](https://github.com/wasmerio/wasmer/pull/3295) Implement wasmer run {url} + +## Fixed + + +## 3.0.0-rc.3 - 2022/11/18 + +## Added + + - [#3314](https://github.com/wasmerio/wasmer/pull/3314) Add windows-gnu workflow + +## Changed + + - [#3317](https://github.com/wasmerio/wasmer/pull/3317) Port "wapm install" to Wasmer + - [#3318](https://github.com/wasmerio/wasmer/pull/3318) Bump the MSRV to 1.63 + - [#3319](https://github.com/wasmerio/wasmer/pull/3319) Disable 'Test integration CLI' on CI for the Windows platform as it's not working at all + - [#3297](https://github.com/wasmerio/wasmer/pull/3297) Implement wasmer login + - [#3311](https://github.com/wasmerio/wasmer/pull/3311) Export Module::IoCompileError as it's an error returned by an exported function + - [#2800](https://github.com/wasmerio/wasmer/pull/2800) RISC-V support + - [#3293](https://github.com/wasmerio/wasmer/pull/3293) Removed call to to_vec() on assembler.finalise() + - [#3288](https://github.com/wasmerio/wasmer/pull/3288) Rollback all the TARGET_DIR changes + - [#3284](https://github.com/wasmerio/wasmer/pull/3284) Makefile now handle TARGET_DIR env. var. for build too + - [#3276](https://github.com/wasmerio/wasmer/pull/3276) Remove unnecessary checks to test internet connection + - [#3266](https://github.com/wasmerio/wasmer/pull/3266) Return ENotCapable error when accessing unknown files on root (for #3263 and #3264) + - [#3275](https://github.com/wasmerio/wasmer/pull/3275) Disable printing "local package ... not found" in release mode + - [#3273](https://github.com/wasmerio/wasmer/pull/3273) Undo Makefile commit + +## Fixed + + - [#3299](https://github.com/wasmerio/wasmer/pull/3299) Fix "create-exe" for windows-x86_64 target + - [#3294](https://github.com/wasmerio/wasmer/pull/3294) Fix test sys yaml syntax + - [#3287](https://github.com/wasmerio/wasmer/pull/3287) Fix Makefile with TARGET_DIR end with release folder, removing it + - [#3286](https://github.com/wasmerio/wasmer/pull/3286) Fix Makefile with TARGET_DIR end with release folder + - [#3285](https://github.com/wasmerio/wasmer/pull/3285) Fix CI to setup TARGET_DIR to target/release directly + - [#3277](https://github.com/wasmerio/wasmer/pull/3277) Fix red CI on master + + +## 3.0.0-rc.2 - 2022/11/02 + +## Added + + +## Changed + + - [#3258](https://github.com/wasmerio/wasmer/pull/3258) Migrate pirita / native executables feature from wasmer-private + +## Fixed + + - [#3268](https://github.com/wasmerio/wasmer/pull/3268) Fix fd_right nightly test to avoid foo.txt file leftover + - [#3260](https://github.com/wasmerio/wasmer/pull/3260) Fix bug in wasmer run + - [#3257](https://github.com/wasmerio/wasmer/pull/3257) Fix linux-aarch64 build + + +## 3.0.0-rc.1 - 2022/10/25 + +## Added + + - [#3222](https://github.com/wasmerio/wasmer/pull/3222) Add function to retrieve function name from wasm_frame_t + - [#3240](https://github.com/wasmerio/wasmer/pull/3240) Fix filesystem rights on WASI, add integration test for file permissions + - [#3238](https://github.com/wasmerio/wasmer/pull/3238) Fixed main README ocaml homepage link and added ocaml in other language README + - [#3145](https://github.com/wasmerio/wasmer/pull/3145) C-API: add functions to overwrite stdin / stdout / stderr handlers + +## Changed + + - [#3215](https://github.com/wasmerio/wasmer/pull/3215) Update wasmer --version logic, integrate wapm-cli + - [#3248](https://github.com/wasmerio/wasmer/pull/3248) Move loupe CHANGELOG entry from 2.3.0 to 3.x + - [#3230](https://github.com/wasmerio/wasmer/pull/3230) Remove test if dest file exist on path_rename wasi syscall (for #3228) + - [#3061](https://github.com/wasmerio/wasmer/pull/3061) Removed trailing zero in WASI::fd_prestat_dir_name name return (for #3025) + - [#3223](https://github.com/wasmerio/wasmer/pull/3223) Delete lib/wasi-types-generated directory + - [#3178](https://github.com/wasmerio/wasmer/pull/3178) Feat enhanced tinytunable test + - [#3177](https://github.com/wasmerio/wasmer/pull/3177) Auto-generate wasi-types from .wit files + - [#3218](https://github.com/wasmerio/wasmer/pull/3218) Seal `HostFunctionKind` + +## Fixed + + - [#3221](https://github.com/wasmerio/wasmer/pull/3221) Fix #3197 + - [#3229](https://github.com/wasmerio/wasmer/pull/3229) Fixed version to nightly-2022-10-09 for the CI build Minimal Wasmer Headless again + - [#3227](https://github.com/wasmerio/wasmer/pull/3227) Fixed version to nightly-2022-10-09 for the CI build Minimal Wasmer Headless + - [#3226](https://github.com/wasmerio/wasmer/pull/3226) Fixed version to nightly-2002-10-09 for the CI build Minimal Wasmer Headless + - [#3211](https://github.com/wasmerio/wasmer/pull/3211) fix popcnt for aarch64 + - [#3204](https://github.com/wasmerio/wasmer/pull/3204) Fixed a typo in README + + +## 3.0.0-beta.2 - 2022/09/26 + +## Added + + - [#3176](https://github.com/wasmerio/wasmer/pull/3176) Add support for `cargo-binstall` + - [#3141](https://github.com/wasmerio/wasmer/pull/3141) The API breaking changes from future WASIX/Network/Threading addition + - [#3119](https://github.com/wasmerio/wasmer/pull/3119) Added LinearMemory trait + - [#3117](https://github.com/wasmerio/wasmer/pull/3117) Add tests for wasmer-cli create-{exe,obj} commands + - [#3101](https://github.com/wasmerio/wasmer/pull/3101) CI/build.yaml: add libwasmer headless in default distribution + - [#3090](https://github.com/wasmerio/wasmer/pull/3090) Added version to the wasmer cli + - [#3089](https://github.com/wasmerio/wasmer/pull/3089) Add wasi_* C-API function changes in migration guide for 3.0.0 + - [#3076](https://github.com/wasmerio/wasmer/pull/3076) Add support for cross-compiling in create-exe with zig cc WIP + - [#3072](https://github.com/wasmerio/wasmer/pull/3072) Add back `Function::*_with_env(…)` + - [#3048](https://github.com/wasmerio/wasmer/pull/3048) Add cloudcompiler.yaml + - [#3068](https://github.com/wasmerio/wasmer/pull/3068) create-{exe,obj}: add documentations and header file generation for create-obj + - [#3065](https://github.com/wasmerio/wasmer/pull/3065) Added '.' and '..' special folder t WASI fd_readdir return (for #3033) + +## Changed + + - [#3184](https://github.com/wasmerio/wasmer/pull/3184) Test libwasmer.dll on Windows + - [#3164](https://github.com/wasmerio/wasmer/pull/3164) Synchronize between -sys and -js tests + - [#3165](https://github.com/wasmerio/wasmer/pull/3165) Initial port of make test-js-core (port wasmer API to core) + - [#3138](https://github.com/wasmerio/wasmer/pull/3138) Js imports revamp + - [#3142](https://github.com/wasmerio/wasmer/pull/3142) Bump rust toolchain + - [#3116](https://github.com/wasmerio/wasmer/pull/3116) Multithreading, full networking and RPC for WebAssembly + - [#3130](https://github.com/wasmerio/wasmer/pull/3130) Remove panics from Artifact::deserialize + - [#3134](https://github.com/wasmerio/wasmer/pull/3134) Bring libwasmer-headless.a from 22MiB to 7.2MiB (on my machine) + - [#3131](https://github.com/wasmerio/wasmer/pull/3131) Update for migration-to-3.0.0 for MemoryView changes + - [#3123](https://github.com/wasmerio/wasmer/pull/3123) Lower libwasmer headless size + - [#3132](https://github.com/wasmerio/wasmer/pull/3132) Revert "Lower libwasmer headless size" + - [#3128](https://github.com/wasmerio/wasmer/pull/3128) scripts/publish.py: validate crates version before publishing + - [#3126](https://github.com/wasmerio/wasmer/pull/3126) scripts/publish.py: replace toposort dependency with python std graphlib module + - [#3122](https://github.com/wasmerio/wasmer/pull/3122) Update Cargo.lock dependencies + - [#3118](https://github.com/wasmerio/wasmer/pull/3118) Refactor Artifact enum into a struct + - [#3114](https://github.com/wasmerio/wasmer/pull/3114) Implemented shared memory for Wasmer in preparation for multithreading + - [#3104](https://github.com/wasmerio/wasmer/pull/3104) Re-enabled ExternRef tests + - [#3103](https://github.com/wasmerio/wasmer/pull/3103) create-exe: prefer libwasmer headless when cross-compiling + - [#3097](https://github.com/wasmerio/wasmer/pull/3097) MemoryView lifetime tied to memory and not StoreRef + - [#3095](https://github.com/wasmerio/wasmer/pull/3095) create-exe: list supported cross-compilation target triples in help … + - [#3096](https://github.com/wasmerio/wasmer/pull/3096) create-exe: use cached wasmer tarballs for network fetches + - [#3083](https://github.com/wasmerio/wasmer/pull/3083) Disable wasm build in build CI + - [#3081](https://github.com/wasmerio/wasmer/pull/3081) 3.0.0-beta release + - [#3079](https://github.com/wasmerio/wasmer/pull/3079) Migrate to clap from structopt + - [#3075](https://github.com/wasmerio/wasmer/pull/3075) Remove __wbindgen_thread_id + - [#3074](https://github.com/wasmerio/wasmer/pull/3074) Update chrono to 0.4.20, avoiding RUSTSEC-2020-0159 + - [#3070](https://github.com/wasmerio/wasmer/pull/3070) wasmer-cli: Allow create-exe to receive a static object as input + - [#3069](https://github.com/wasmerio/wasmer/pull/3069) Remove native feature entry from docs.rs metadata + - [#3057](https://github.com/wasmerio/wasmer/pull/3057) wasmer-cli: create-obj command + - [#3060](https://github.com/wasmerio/wasmer/pull/3060) CI: Unset rustup override after usage instead of setting it to stable + +## Fixed + + - [#3192](https://github.com/wasmerio/wasmer/pull/3192) fix the typos + - [#3185](https://github.com/wasmerio/wasmer/pull/3185) Fix `wasmer compile` command for non-x86 target + - [#3129](https://github.com/wasmerio/wasmer/pull/3129) Fix differences between -sys and -js API + - [#3137](https://github.com/wasmerio/wasmer/pull/3137) Fix cache path not being present during installation of cross-tarball + - [#3115](https://github.com/wasmerio/wasmer/pull/3115) Fix static object signature deserialization + - [#3093](https://github.com/wasmerio/wasmer/pull/3093) Fixed a potential issue when renaming a file + - [#3088](https://github.com/wasmerio/wasmer/pull/3088) Fixed an issue when renaming a file from a preopened dir directly (for 3084) + - [#3078](https://github.com/wasmerio/wasmer/pull/3078) Fix errors from "make lint" + - [#3052](https://github.com/wasmerio/wasmer/pull/3052) Fixed a memory corruption issue with JS memory operations that were r… + - [#3058](https://github.com/wasmerio/wasmer/pull/3058) Fix trap tracking + + +## 3.0.0-alpha.4 - 2022/07/28 + +## Added + + - [#3035](https://github.com/wasmerio/wasmer/pull/3035) Added a simple divide by zero trap wast test (for #1899) + - [#3008](https://github.com/wasmerio/wasmer/pull/3008) Add check-public-api.yaml workflow + - [#3021](https://github.com/wasmerio/wasmer/pull/3021) Added back some needed relocation for arm64 llvm compiler + - [#2982](https://github.com/wasmerio/wasmer/pull/2982) Add a `rustfmt.toml` file to the repository + - [#2953](https://github.com/wasmerio/wasmer/pull/2953) Makefile: add `check` target + - [#2952](https://github.com/wasmerio/wasmer/pull/2952) CI: add make build-wasmer-wasm test + +## Changed + + - [#3051](https://github.com/wasmerio/wasmer/pull/3051) Updated Crenelift to v0.86.1 + - [#3038](https://github.com/wasmerio/wasmer/pull/3038) Re-introduce create-exe to wasmer-cli v3.0 + - [#3049](https://github.com/wasmerio/wasmer/pull/3049) Disable traps::trap_display_multi_module test for Windows+singlepass + - [#3047](https://github.com/wasmerio/wasmer/pull/3047) Improved EngineBuilder API + - [#3046](https://github.com/wasmerio/wasmer/pull/3046) Merge Backend into EngineBuilder and refactor feature flags + - [#3039](https://github.com/wasmerio/wasmer/pull/3039) Improved hashing/ids of function envs + - [#3029](https://github.com/wasmerio/wasmer/pull/3029) Remove Engine, Artifact traits, merge all Engines into one, make everything rkyv serialazable + - [#2892](https://github.com/wasmerio/wasmer/pull/2892) Implement new Context API for Wasmer 3.0 + - [#3031](https://github.com/wasmerio/wasmer/pull/3031) Update docs/migration_to_3.0.0.md + - [#3030](https://github.com/wasmerio/wasmer/pull/3030) Remove cranelift dependency from wasmer-wasi + - [#3028](https://github.com/wasmerio/wasmer/pull/3028) Ctx store rename + - [#3023](https://github.com/wasmerio/wasmer/pull/3023) Changed CI rust install action to dtolnay one + - [#3013](https://github.com/wasmerio/wasmer/pull/3013) Context api refactor + - [#2999](https://github.com/wasmerio/wasmer/pull/2999) Support --invoke option for emscripten files without _start function + - [#3003](https://github.com/wasmerio/wasmer/pull/3003) Remove RuntimeError::raise from public API + - [#3000](https://github.com/wasmerio/wasmer/pull/3000) Allow debugging of EXC_BAD_INSTRUCTION on macOS + - [#2946](https://github.com/wasmerio/wasmer/pull/2946) Removing dylib and staticlib engines in favor of a single Universal Engine + - [#2996](https://github.com/wasmerio/wasmer/pull/2996) Migrated al examples to new Context API + - [#2973](https://github.com/wasmerio/wasmer/pull/2973) Port C API to new Context API + - [#2974](https://github.com/wasmerio/wasmer/pull/2974) Context api tests + - [#2988](https://github.com/wasmerio/wasmer/pull/2988) Have make targets install-capi-lib,install-pkgconfig work without building the wasmer binary + - [#2976](https://github.com/wasmerio/wasmer/pull/2976) Upgrade enumset minimum version to one that compiles + - [#2969](https://github.com/wasmerio/wasmer/pull/2969) Port JS API to new Context API + - [#2966](https://github.com/wasmerio/wasmer/pull/2966) Singlepass nopanic + - [#2949](https://github.com/wasmerio/wasmer/pull/2949) Switch back to using custom LLVM builds on CI + - [#2963](https://github.com/wasmerio/wasmer/pull/2963) Remove libxcb and libwayland dependencies from wasmer-cli release build + - [#2957](https://github.com/wasmerio/wasmer/pull/2957) Enable multi-value handling in Singlepass compiler + - [#2941](https://github.com/wasmerio/wasmer/pull/2941) Implementation of WASIX and a fully networking for Web Assembly + - [#2947](https://github.com/wasmerio/wasmer/pull/2947) - Converted the WASI js test into a generic stdio test that works for… + - [#2940](https://github.com/wasmerio/wasmer/pull/2940) Merge `wasmer3` back to `master` branch + - [#2939](https://github.com/wasmerio/wasmer/pull/2939) Rename NativeFunc to TypedFunction + +## Fixed + + - [#3045](https://github.com/wasmerio/wasmer/pull/3045) Fixed WASI fd_read syscall when reading multiple iovs and read is partial (for #2904) + - [#2997](https://github.com/wasmerio/wasmer/pull/2997) Fix "run --invoke [function]" to behave the same as "run" + - [#3027](https://github.com/wasmerio/wasmer/pull/3027) Fixed residual package-doc issues + - [#3026](https://github.com/wasmerio/wasmer/pull/3026) test-js.yaml: fix typo + - [#3017](https://github.com/wasmerio/wasmer/pull/3017) Fixed translation in README.md + - [#3001](https://github.com/wasmerio/wasmer/pull/3001) Fix context capi ci errors + - [#2967](https://github.com/wasmerio/wasmer/pull/2967) Fix singlepass on arm64 that was trying to emit a sub opcode with a constant as destination (for #2959) + - [#2954](https://github.com/wasmerio/wasmer/pull/2954) Some fixes to x86_64 Singlepass compiler, when using atomics + - [#2950](https://github.com/wasmerio/wasmer/pull/2950) compiler-cranelift: Fix typo in enum variant + - [#2948](https://github.com/wasmerio/wasmer/pull/2948) Fix regression on gen_import_call_trampoline_arm64() + - [#2943](https://github.com/wasmerio/wasmer/pull/2943) Fix build error on some archs by using c_char instead of i8 + - [#2944](https://github.com/wasmerio/wasmer/pull/2944) Fix duplicate entries in the CHANGELOG + - [#2942](https://github.com/wasmerio/wasmer/pull/2942) Fix clippy lints + +## 2.3.0 - 2022/06/06 + +### Added +- [#2862](https://github.com/wasmerio/wasmer/pull/2862) Added CI builds for linux-aarch64 target. +- [#2811](https://github.com/wasmerio/wasmer/pull/2811) Added support for EH Frames in singlepass +- [#2851](https://github.com/wasmerio/wasmer/pull/2851) Allow Wasmer to compile to Wasm/WASI + +### Changed +- [#2807](https://github.com/wasmerio/wasmer/pull/2807) Run Wasm code in a separate stack +- [#2802](https://github.com/wasmerio/wasmer/pull/2802) Support Dylib engine with Singlepass +- [#2836](https://github.com/wasmerio/wasmer/pull/2836) Improve TrapInformation data stored at runtime +- [#2864](https://github.com/wasmerio/wasmer/pull/2864) `wasmer-cli`: remove wasi-experimental-io-devices from default builds +- [#2933](https://github.com/wasmerio/wasmer/pull/2933) Rename NativeFunc to TypedFunction. + +### Fixed +- [#2829](https://github.com/wasmerio/wasmer/pull/2829) Improve error message oriented from JS object. +- [#2828](https://github.com/wasmerio/wasmer/pull/2828) Fix JsImportObject resolver. +- [#2872](https://github.com/wasmerio/wasmer/pull/2872) Fix `WasmerEnv` finalizer +- [#2821](https://github.com/wasmerio/wasmer/pull/2821) Opt in `sys` feature + +## 2.2.1 - 2022/03/15 + +### Fixed +- [#2812](https://github.com/wasmerio/wasmer/pull/2812) Fixed another panic due to incorrect drop ordering. + +## 2.2.0 - 2022/02/28 + +### Added +- [#2775](https://github.com/wasmerio/wasmer/pull/2775) Added support for SSE 4.2 in the Singlepass compiler as an alternative to AVX. +- [#2805](https://github.com/wasmerio/wasmer/pull/2805) Enabled WASI experimental I/O devices by default in releases. + +### Fixed +- [#2795](https://github.com/wasmerio/wasmer/pull/2795) Fixed a bug in the Singlepass compiler introduced in #2775. +- [#2806](https://github.com/wasmerio/wasmer/pull/2806) Fixed a panic due to incorrect drop ordering of `Module` fields. + +## 2.2.0-rc2 - 2022/02/15 + +### Fixed +- [#2778](https://github.com/wasmerio/wasmer/pull/2778) Fixed f32_load/f64_load in Singlepass. Also fixed issues with out-of-range conditional branches. +- [#2786](https://github.com/wasmerio/wasmer/pull/2786) Fixed a potential integer overflow in WasmPtr memory access methods. +- [#2787](https://github.com/wasmerio/wasmer/pull/2787) Fixed a codegen regression in the Singlepass compiler due to non-determinism of `HashSet` iteration. + +## 2.2.0-rc1 - 2022/01/28 + +### Added +- [#2750](https://github.com/wasmerio/wasmer/pull/2750) Added Aarch64 support to Singlepass (both Linux and macOS). +- [#2753](https://github.com/wasmerio/wasmer/pull/2753) Re-add "dylib" to the list of default features. + +### Changed +- [#2747](https://github.com/wasmerio/wasmer/pull/2747) Use a standard header for metadata in all serialized modules. +- [#2759](https://github.com/wasmerio/wasmer/pull/2759) Use exact version for Wasmer crate dependencies. + +### Fixed +- [#2769](https://github.com/wasmerio/wasmer/pull/2769) Fixed deadlock in emscripten dynamic calls. +- [#2742](https://github.com/wasmerio/wasmer/pull/2742) Fixed WASMER_METADATA alignment in the dylib engine. +- [#2746](https://github.com/wasmerio/wasmer/pull/2746) Fixed invoking `wasmer binfmt register` from `$PATH`. +- [#2748](https://github.com/wasmerio/wasmer/pull/2748) Use trampolines for all libcalls in engine-universal and engine-dylib. +- [#2766](https://github.com/wasmerio/wasmer/pull/2766) Remove an attempt to reserve a GPR when no GPR clobbering is occurring. +- [#2768](https://github.com/wasmerio/wasmer/pull/2768) Fixed serialization of FrameInfo on Dylib engine. + +## 2.1.1 - 2021/12/20 + +### Added +- [#2726](https://github.com/wasmerio/wasmer/pull/2726) Added `externs_vec` method to `ImportObject`. +- [#2724](https://github.com/wasmerio/wasmer/pull/2724) Added access to the raw `Instance` JS object in Wsasmer-js. + +### CHanged +- [#2711](https://github.com/wasmerio/wasmer/pull/2711) Make C-API and Wasi dependencies more lean +- [#2706](https://github.com/wasmerio/wasmer/pull/2706) Refactored the Singlepass compiler in preparation for AArch64 support (no user visible changes). +### Fixed +- [#2717](https://github.com/wasmerio/wasmer/pull/2717) Allow `Exports` to be modified after being cloned. +- [#2719](https://github.com/wasmerio/wasmer/pull/2719) Fixed `wasm_importtype_new`'s Rust signature to not assume boxed vectors. +- [#2723](https://github.com/wasmerio/wasmer/pull/2723) Fixed a bug in parameter passing in the Singlepass compiler. +- [#2768](https://github.com/wasmerio/wasmer/pull/2768) Fixed issue with Frame Info on dylib engine. + +## 2.1.0 - 2021/11/30 + +### Added +- [#2574](https://github.com/wasmerio/wasmer/pull/2574) Added Windows support to Singlepass. +- [#2535](https://github.com/wasmerio/wasmer/pull/2435) Added iOS support for Wasmer. This relies on the `dylib-engine`. +- [#2460](https://github.com/wasmerio/wasmer/pull/2460) Wasmer can now compile to Javascript via `wasm-bindgen`. Use the `js-default` (and no default features) feature to try it!. +- [#2491](https://github.com/wasmerio/wasmer/pull/2491) Added support for WASI to Wasmer-js. +- [#2436](https://github.com/wasmerio/wasmer/pull/2436) Added the x86-32 bit variant support to LLVM compiler. +- [#2499](https://github.com/wasmerio/wasmer/pull/2499) Added a subcommand to linux wasmer-cli to register wasmer with binfmt_misc +- [#2511](https://github.com/wasmerio/wasmer/pull/2511) Added support for calling dynamic functions defined on the host +- [#2491](https://github.com/wasmerio/wasmer/pull/2491) Added support for WASI in Wasmer-js +- [#2592](https://github.com/wasmerio/wasmer/pull/2592) Added `ImportObject::get_namespace_exports` to allow modifying the contents of an existing namespace in an `ImportObject`. +- [#2694](https://github.com/wasmerio/wasmer/pull/2694) wasmer-js: Allow an `ImportObject` to be extended with a JS object. +- [#2698](https://github.com/wasmerio/wasmer/pull/2698) Provide WASI imports when invoking an explicit export from the CLI. +- [#2701](https://github.com/wasmerio/wasmer/pull/2701) Improved VFS API for usage from JS + +### Changed +- [#2460](https://github.com/wasmerio/wasmer/pull/2460) **breaking change** `wasmer` API usage with `no-default-features` requires now the `sys` feature to preserve old behavior. +- [#2476](https://github.com/wasmerio/wasmer/pull/2476) Removed unncessary abstraction `ModuleInfoTranslate` from `wasmer-compiler`. +- [#2442](https://github.com/wasmerio/wasmer/pull/2442) **breaking change** Improved `WasmPtr`, added `WasmCell` for host/guest interaction. `WasmPtr::deref` will now return `WasmCell<'a, T>` instead of `&'a Cell`, `WasmPtr::deref_mut` is now deleted from the API. +- [#2427](https://github.com/wasmerio/wasmer/pull/2427) Update `loupe` to 0.1.3. +- [#2685](https://github.com/wasmerio/wasmer/pull/2685) The minimum LLVM version for the LLVM compiler is now 12. LLVM 13 is used by default. +- [#2569](https://github.com/wasmerio/wasmer/pull/2569) Add `Send` and `Sync` to uses of the `LikeNamespace` trait object. +- [#2692](https://github.com/wasmerio/wasmer/pull/2692) Made module serialization deterministic. +- [#2693](https://github.com/wasmerio/wasmer/pull/2693) Validate CPU features when loading a deserialized module. + +### Fixed +- [#2599](https://github.com/wasmerio/wasmer/pull/2599) Fixed Universal engine for Linux/Aarch64 target. +- [#2587](https://github.com/wasmerio/wasmer/pull/2587) Fixed deriving `WasmerEnv` when aliasing `Result`. +- [#2518](https://github.com/wasmerio/wasmer/pull/2518) Remove temporary file used to creating an artifact when creating a Dylib engine artifact. +- [#2494](https://github.com/wasmerio/wasmer/pull/2494) Fixed `WasmerEnv` access when using `call_indirect` with the Singlepass compiler. +- [#2479](https://github.com/wasmerio/wasmer/pull/2479) Improved `wasmer validate` error message on non-wasm inputs. +- [#2454](https://github.com/wasmerio/wasmer/issues/2454) Won't set `WASMER_CACHE_DIR` for Windows. +- [#2426](https://github.com/wasmerio/wasmer/pull/2426) Fix the `wax` script generation. +- [#2635](https://github.com/wasmerio/wasmer/pull/2635) Fix cross-compilation for singlepass. +- [#2672](https://github.com/wasmerio/wasmer/pull/2672) Use `ENOENT` instead of `EINVAL` in some WASI syscalls for a non-existent file +- [#2547](https://github.com/wasmerio/wasmer/pull/2547) Delete temporary files created by the dylib engine. +- [#2548](https://github.com/wasmerio/wasmer/pull/2548) Fix stack probing on x86_64 linux with the cranelift compiler. +- [#2557](https://github.com/wasmerio/wasmer/pull/2557) [#2559](https://github.com/wasmerio/wasmer/pull/2559) Fix WASI dir path renaming. +- [#2560](https://github.com/wasmerio/wasmer/pull/2560) Fix signal handling on M1 MacOS. +- [#2474](https://github.com/wasmerio/wasmer/pull/2474) Fix permissions on `WASMER_CACHE_DIR` on Windows. +- [#2528](https://github.com/wasmerio/wasmer/pull/2528) [#2525](https://github.com/wasmerio/wasmer/pull/2525) [#2523](https://github.com/wasmerio/wasmer/pull/2523) [#2522](https://github.com/wasmerio/wasmer/pull/2522) [#2545](https://github.com/wasmerio/wasmer/pull/2545) [#2550](https://github.com/wasmerio/wasmer/pull/2550) [#2551](https://github.com/wasmerio/wasmer/pull/2551) Fix various bugs in the new VFS implementation. +- [#2552](https://github.com/wasmerio/wasmer/pull/2552) Fix stack guard handling on Windows. +- [#2585](https://github.com/wasmerio/wasmer/pull/2585) Fix build with 64-bit MinGW toolchain. +- [#2587](https://github.com/wasmerio/wasmer/pull/2587) Fix absolute import of `Result` in derive. +- [#2599](https://github.com/wasmerio/wasmer/pull/2599) Fix AArch64 support in the LLVM compiler. +- [#2655](https://github.com/wasmerio/wasmer/pull/2655) Fix argument parsing of `--dir` and `--mapdir`. +- [#2666](https://github.com/wasmerio/wasmer/pull/2666) Fix performance on Windows by using static memories by default. +- [#2667](https://github.com/wasmerio/wasmer/pull/2667) Fix error code for path_rename of a non-existant file +- [#2672](https://github.com/wasmerio/wasmer/pull/2672) Fix error code returned by some wasi fs syscalls for a non-existent file +- [#2673](https://github.com/wasmerio/wasmer/pull/2673) Fix BrTable codegen on the LLVM compiler +- [#2674](https://github.com/wasmerio/wasmer/pull/2674) Add missing `__WASI_RIGHT_FD_DATASYNC` for preopened directories +- [#2677](https://github.com/wasmerio/wasmer/pull/2677) Support 32-bit memories with 65536 pages +- [#2681](https://github.com/wasmerio/wasmer/pull/2681) Fix slow compilation in singlepass by using dynasm's `VecAssembler`. +- [#2690](https://github.com/wasmerio/wasmer/pull/2690) Fix memory leak when obtaining the stack bounds of a thread +- [#2699](https://github.com/wasmerio/wasmer/pull/2699) Partially fix unbounded memory leak from the FuncDataRegistry + +## 2.0.0 - 2021/06/16 + +### Added +- [#2411](https://github.com/wasmerio/wasmer/pull/2411) Extract types from `wasi` to a new `wasi-types` crate. +- [#2390](https://github.com/wasmerio/wasmer/pull/2390) Make `wasmer-vm` to compile on Windows 32bits. +- [#2402](https://github.com/wasmerio/wasmer/pull/2402) Add more examples and more doctests for `wasmer-middlewares`. + +### Changed +- [#2399](https://github.com/wasmerio/wasmer/pull/2399) Add the Dart integration in the `README.md`. + +### Fixed +- [#2386](https://github.com/wasmerio/wasmer/pull/2386) Handle properly when a module has no exported functions in the CLI. + +## 2.0.0-rc2 - 2021/06/03 + +### Fixed +- [#2383](https://github.com/wasmerio/wasmer/pull/2383) Fix bugs in the Wasmer CLI tool with the way `--version` and the name of the CLI tool itself were printed. + +## 2.0.0-rc1 - 2021/06/02 + +### Added +- [#2348](https://github.com/wasmerio/wasmer/pull/2348) Make Wasmer available on `aarch64-linux-android`. +- [#2315](https://github.com/wasmerio/wasmer/pull/2315) Make the Cranelift compiler working with the Native engine. +- [#2306](https://github.com/wasmerio/wasmer/pull/2306) Add support for the latest version of the Wasm SIMD proposal to compiler LLVM. +- [#2296](https://github.com/wasmerio/wasmer/pull/2296) Add support for the bulk memory proposal in compiler Singlepass and compiler LLVM. +- [#2291](https://github.com/wasmerio/wasmer/pull/2291) Type check tables when importing. +- [#2262](https://github.com/wasmerio/wasmer/pull/2262) Make parallelism optional for the Singlepass compiler. +- [#2249](https://github.com/wasmerio/wasmer/pull/2249) Make Cranelift unwind feature optional. +- [#2208](https://github.com/wasmerio/wasmer/pull/2208) Add a new CHANGELOG.md specific to our C API to make it easier for users primarily consuming our C API to keep up to date with changes that affect them. +- [#2154](https://github.com/wasmerio/wasmer/pull/2154) Implement Reference Types in the LLVM compiler. +- [#2003](https://github.com/wasmerio/wasmer/pull/2003) Wasmer works with musl, and is built, tested and packaged for musl. +- [#2250](https://github.com/wasmerio/wasmer/pull/2250) Use `rkyv` for the JIT/Universal engine. +- [#2190](https://github.com/wasmerio/wasmer/pull/2190) Use `rkyv` to read native `Module` artifact. +- [#2186](https://github.com/wasmerio/wasmer/pull/2186) Update and improve the Fuzz Testing infrastructure. +- [#2161](https://github.com/wasmerio/wasmer/pull/2161) Make NaN canonicalization configurable. +- [#2116](https://github.com/wasmerio/wasmer/pull/2116) Add a package for Windows that is not an installer, but all the `lib` and `include` files as for macOS and Linux. +- [#2123](https://github.com/wasmerio/wasmer/pull/2123) Use `ENABLE_{{compiler_name}}=(0|1)` to resp. force to disable or enable a compiler when running the `Makefile`, e.g. `ENABLE_LLVM=1 make build-wasmer`. +- [#2123](https://github.com/wasmerio/wasmer/pull/2123) `libwasmer` comes with all available compilers per target instead of Cranelift only. +- [#2135](https://github.com/wasmerio/wasmer/pull/2135) [Documentation](./PACKAGING.md) for Linux distribution maintainers +- [#2104](https://github.com/wasmerio/wasmer/pull/2104) Update WAsm core spectests and wasmparser. + +### Changed +- [#2369](https://github.com/wasmerio/wasmer/pull/2369) Remove the deprecated `--backend` option in the CLI. +- [#2368](https://github.com/wasmerio/wasmer/pull/2368) Remove the deprecated code in the `wasmer-wasi` crate. +- [#2367](https://github.com/wasmerio/wasmer/pull/2367) Remove the `deprecated` features and associated code in the `wasmer` crate. +- [#2366](https://github.com/wasmerio/wasmer/pull/2366) Remove the deprecated crates. +- [#2364](https://github.com/wasmerio/wasmer/pull/2364) Rename `wasmer-engine-object-file` to `wasmer-engine-staticlib`. +- [#2356](https://github.com/wasmerio/wasmer/pull/2356) Rename `wasmer-engine-native` to `wasmer-engine-dylib`. +- [#2340](https://github.com/wasmerio/wasmer/pull/2340) Rename `wasmer-engine-jit` to `wasmer-engine-universal`. +- [#2307](https://github.com/wasmerio/wasmer/pull/2307) Update Cranelift, implement low hanging fruit SIMD opcodes. +- [#2305](https://github.com/wasmerio/wasmer/pull/2305) Clean up and improve the trap API, more deterministic errors etc. +- [#2299](https://github.com/wasmerio/wasmer/pull/2299) Unused trap codes (due to Wasm spec changes), `HeapSetterOutOfBounds` and `TableSetterOutOfBounds` were removed from `wasmer_vm::TrapCode` and the numbering of the remaining variants has been adjusted. +- [#2293](https://github.com/wasmerio/wasmer/pull/2293) The `Memory::ty` trait method now returns `MemoryType` by value. `wasmer_vm::LinearMemory` now recomputes `MemoryType`'s `minimum` field when accessing its type. This behavior is what's expected by the latest spectests. `wasmer::Memory::ty` has also been updated to follow suit, it now returns `MemoryType` by value. +- [#2286](https://github.com/wasmerio/wasmer/pull/2286) Replace the `goblin` crate by the `object` crate. +- [#2281](https://github.com/wasmerio/wasmer/pull/2281) Refactor the `wasmer_vm` crate to remove unnecessary structs, reuse data when available etc. +- [#2251](https://github.com/wasmerio/wasmer/pull/2251) Wasmer CLI will now execute WASI modules with multiple WASI namespaces in them by default. Use `--allow-multiple-wasi-versions` to suppress the warning and use `--deny-multiple-wasi-versions` to make it an error. +- [#2201](https://github.com/wasmerio/wasmer/pull/2201) Implement `loupe::MemoryUsage` for `wasmer::Instance`. +- [#2200](https://github.com/wasmerio/wasmer/pull/2200) Implement `loupe::MemoryUsage` for `wasmer::Module`. +- [#2199](https://github.com/wasmerio/wasmer/pull/2199) Implement `loupe::MemoryUsage` for `wasmer::Store`. +- [#2195](https://github.com/wasmerio/wasmer/pull/2195) Remove dependency to `cranelift-entity`. +- [#2140](https://github.com/wasmerio/wasmer/pull/2140) Reduce the number of dependencies in the `wasmer.dll` shared library by statically compiling CRT. +- [#2113](https://github.com/wasmerio/wasmer/pull/2113) Bump minimum supported Rust version to 1.49 +- [#2144](https://github.com/wasmerio/wasmer/pull/2144) Bump cranelift version to 0.70 +- [#2149](https://github.com/wasmerio/wasmer/pull/2144) `wasmer-engine-native` looks for clang-11 instead of clang-10. +- [#2157](https://github.com/wasmerio/wasmer/pull/2157) Simplify the code behind `WasmPtr` + +### Fixed +- [#2397](https://github.com/wasmerio/wasmer/pull/2397) Fix WASI rename temporary file issue. +- [#2391](https://github.com/wasmerio/wasmer/pull/2391) Fix Singlepass emit bug, [#2347](https://github.com/wasmerio/wasmer/issues/2347) and [#2159](https://github.com/wasmerio/wasmer/issues/2159) +- [#2327](https://github.com/wasmerio/wasmer/pull/2327) Fix memory leak preventing internal instance memory from being freed when a WasmerEnv contained an exported extern (e.g. Memory, etc.). +- [#2247](https://github.com/wasmerio/wasmer/pull/2247) Internal WasiFS logic updated to be closer to what WASI libc does when finding a preopened fd for a path. +- [#2241](https://github.com/wasmerio/wasmer/pull/2241) Fix Undefined Behavior in setting memory in emscripten `EmEnv`. +- [#2224](https://github.com/wasmerio/wasmer/pull/2224) Enable SIMD based on actual Wasm features in the Cranelift compiler. +- [#2217](https://github.com/wasmerio/wasmer/pull/2217) Fix bug in `i64.rotr X 0` in the LLVM compiler. +- [#2290](https://github.com/wasmerio/wasmer/pull/2290) Handle Wasm modules with no imports in the CLI. +- [#2108](https://github.com/wasmerio/wasmer/pull/2108) The Object Native Engine generates code that now compiles correctly with C++. +- [#2125](https://github.com/wasmerio/wasmer/pull/2125) Fix RUSTSEC-2021-0023. +- [#2155](https://github.com/wasmerio/wasmer/pull/2155) Fix the implementation of shift and rotate in the LLVM compiler. +- [#2101](https://github.com/wasmerio/wasmer/pull/2101) cflags emitted by `wasmer config --pkg-config` are now correct. + +## 1.0.2 - 2021-02-04 + +### Added +- [#2053](https://github.com/wasmerio/wasmer/pull/2053) Implement the non-standard `wasi_get_unordered_imports` function in the C API. +- [#2072](https://github.com/wasmerio/wasmer/pull/2072) Add `wasm_config_set_target`, along with `wasm_target_t`, `wasm_triple_t` and `wasm_cpu_features_t` in the unstable C API. +- [#2059](https://github.com/wasmerio/wasmer/pull/2059) Ability to capture `stdout` and `stderr` with WASI in the C API. +- [#2040](https://github.com/wasmerio/wasmer/pull/2040) Add `InstanceHandle::vmoffsets` to expose the offsets of the `vmctx` region. +- [#2026](https://github.com/wasmerio/wasmer/pull/2026) Expose trap code of a `RuntimeError`, if it's a `Trap`. +- [#2054](https://github.com/wasmerio/wasmer/pull/2054) Add `wasm_config_delete` to the Wasm C API. +- [#2072](https://github.com/wasmerio/wasmer/pull/2072) Added cross-compilation to Wasm C API. + +### Changed +- [#2085](https://github.com/wasmerio/wasmer/pull/2085) Update to latest inkwell and LLVM 11. +- [#2037](https://github.com/wasmerio/wasmer/pull/2037) Improved parallelism of LLVM with the Native/Object engine +- [#2012](https://github.com/wasmerio/wasmer/pull/2012) Refactor Singlepass init stack assembly (more performant now) +- [#2036](https://github.com/wasmerio/wasmer/pull/2036) Optimize memory allocated for Function type definitions +- [#2083](https://github.com/wasmerio/wasmer/pull/2083) Mark `wasi_env_set_instance` and `wasi_env_set_memory` as deprecated. You may simply remove the calls with no side-effect. +- [#2056](https://github.com/wasmerio/wasmer/pull/2056) Change back to depend on the `enumset` crate instead of `wasmer_enumset` + +### Fixed +- [#2066](https://github.com/wasmerio/wasmer/pull/2066) Include 'extern "C"' in our C headers when included by C++ code. +- [#2090](https://github.com/wasmerio/wasmer/pull/2090) `wasi_env_t` needs to be freed with `wasi_env_delete` in the C API. +- [#2084](https://github.com/wasmerio/wasmer/pull/2084) Avoid calling the function environment finalizer more than once when the environment has been cloned in the C API. +- [#2069](https://github.com/wasmerio/wasmer/pull/2069) Use the new documentation for `include/README.md` in the Wasmer package. +- [#2042](https://github.com/wasmerio/wasmer/pull/2042) Parse more exotic environment variables in `wasmer run`. +- [#2041](https://github.com/wasmerio/wasmer/pull/2041) Documentation diagrams now have a solid white background rather than a transparent background. +- [#2070](https://github.com/wasmerio/wasmer/pull/2070) Do not drain the entire captured stream at first read with `wasi_env_read_stdout` or `_stderr` in the C API. +- [#2058](https://github.com/wasmerio/wasmer/pull/2058) Expose WASI versions to C correctly. +- [#2044](https://github.com/wasmerio/wasmer/pull/2044) Do not build C headers on docs.rs. + +## 1.0.1 - 2021-01-12 + +This release includes a breaking change in the API (changing the trait `enumset::EnumsetType` to `wasmer_enumset::EnumSetType` and changing `enumset::EnumSet` in signatures to `wasmer_enumset::EnumSet` to work around a breaking change introduced by `syn`) but is being released as a minor version because `1.0.0` is also in a broken state due to a breaking change introduced by `syn` which affects `enumset` and thus `wasmer`. + +This change is unlikely to affect any users of `wasmer`, but if it does please change uses of the `enumset` crate to the `wasmer_enumset` crate where possible. + +### Added +- [#2010](https://github.com/wasmerio/wasmer/pull/2010) A new, experimental, minified build of `wasmer` called `wasmer-headless` will now be included with releases. `wasmer-headless` is the `wasmer` VM without any compilers attached, so it can only run precompiled Wasm modules. +- [#2005](https://github.com/wasmerio/wasmer/pull/2005) Added the arguments `alias` and `optional` to `WasmerEnv` derive's `export` attribute. + +### Changed +- [#2006](https://github.com/wasmerio/wasmer/pull/2006) Use `wasmer_enumset`, a fork of the `enumset` crate to work around a breaking change in `syn` +- [#1985](https://github.com/wasmerio/wasmer/pull/1985) Bump minimum supported Rust version to 1.48 + +### Fixed +- [#2007](https://github.com/wasmerio/wasmer/pull/2007) Fix packaging of wapm on Windows +- [#2005](https://github.com/wasmerio/wasmer/pull/2005) Emscripten is now working again. + +## 1.0.0 - 2021-01-05 + +### Added + +- [#1969](https://github.com/wasmerio/wasmer/pull/1969) Added D integration to the README + +### Changed +- [#1979](https://github.com/wasmerio/wasmer/pull/1979) `WasmPtr::get_utf8_string` was renamed to `WasmPtr::get_utf8_str` and made `unsafe`. + +### Fixed +- [#1979](https://github.com/wasmerio/wasmer/pull/1979) `WasmPtr::get_utf8_string` now returns a `String`, fixing a soundness issue in certain circumstances. The old functionality is available under a new `unsafe` function, `WasmPtr::get_utf8_str`. + +## 1.0.0-rc1 - 2020-12-23 + +### Added + +* [#1894](https://github.com/wasmerio/wasmer/pull/1894) Added exports `wasmer::{CraneliftOptLevel, LLVMOptLevel}` to allow using `Cranelift::opt_level` and `LLVM::opt_level` directly via the `wasmer` crate + +### Changed + +* [#1941](https://github.com/wasmerio/wasmer/pull/1941) Turn `get_remaining_points`/`set_remaining_points` of the `Metering` middleware into free functions to allow using them in an ahead-of-time compilation setup +* [#1955](https://github.com/wasmerio/wasmer/pull/1955) Set `jit` as a default feature of the `wasmer-wasm-c-api` crate +* [#1944](https://github.com/wasmerio/wasmer/pull/1944) Require `WasmerEnv` to be `Send + Sync` even in dynamic functions. +* [#1963](https://github.com/wasmerio/wasmer/pull/1963) Removed `to_wasm_error` in favour of `impl From for WasmError` +* [#1962](https://github.com/wasmerio/wasmer/pull/1962) Replace `wasmparser::Result<()>` with `Result<(), MiddlewareError>` in middleware, allowing implementors to return errors in `FunctionMiddleware::feed` + +### Fixed + +- [#1949](https://github.com/wasmerio/wasmer/pull/1949) `wasm__vec_delete` functions no longer crash when the given vector is uninitialized, in the Wasmer C API +- [#1949](https://github.com/wasmerio/wasmer/pull/1949) The `wasm_frame_vec_t`, `wasm_functype_vec_t`, `wasm_globaltype_vec_t`, `wasm_memorytype_vec_t`, and `wasm_tabletype_vec_t` are now boxed vectors in the Wasmer C API + +## 1.0.0-beta2 - 2020-12-16 + +### Added + +* [#1916](https://github.com/wasmerio/wasmer/pull/1916) Add the `WASMER_VERSION*` constants with the `wasmer_version*` functions in the Wasmer C API +* [#1867](https://github.com/wasmerio/wasmer/pull/1867) Added `Metering::get_remaining_points` and `Metering::set_remaining_points` +* [#1881](https://github.com/wasmerio/wasmer/pull/1881) Added `UnsupportedTarget` error to `CompileError` +* [#1908](https://github.com/wasmerio/wasmer/pull/1908) Implemented `TryFrom>` for `i32`/`u32`/`i64`/`u64`/`f32`/`f64` +* [#1927](https://github.com/wasmerio/wasmer/pull/1927) Added mmap support in `Engine::deserialize_from_file` to speed up artifact loading +* [#1911](https://github.com/wasmerio/wasmer/pull/1911) Generalized signature type in `Function::new` and `Function::new_with_env` to accept owned and reference `FunctionType` as well as array pairs. This allows users to define signatures as constants. Implemented `From<([Type; $N], [Type; $M])>` for `FunctionType` to support this. + +### Changed + +- [#1865](https://github.com/wasmerio/wasmer/pull/1865) Require that implementors of `WasmerEnv` also implement `Send`, `Sync`, and `Clone`. +- [#1851](https://github.com/wasmerio/wasmer/pull/1851) Improve test suite and documentation of the Wasmer C API +- [#1874](https://github.com/wasmerio/wasmer/pull/1874) Set `CompilerConfig` to be owned (following wasm-c-api) +- [#1880](https://github.com/wasmerio/wasmer/pull/1880) Remove cmake dependency for tests +- [#1924](https://github.com/wasmerio/wasmer/pull/1924) Rename reference implementation `wasmer::Tunables` to `wasmer::BaseTunables`. Export trait `wasmer_engine::Tunables` as `wasmer::Tunables`. + +### Fixed + +- [#1865](https://github.com/wasmerio/wasmer/pull/1865) Fix memory leaks with host function environments. +- [#1870](https://github.com/wasmerio/wasmer/pull/1870) Fixed Trap instruction address maps in Singlepass +* [#1914](https://github.com/wasmerio/wasmer/pull/1914) Implemented `TryFrom for Pages` instead of `From for Pages` to properly handle overflow errors + +## 1.0.0-beta1 - 2020-12-01 + +### Added + +- [#1839](https://github.com/wasmerio/wasmer/pull/1839) Added support for Metering Middleware +- [#1837](https://github.com/wasmerio/wasmer/pull/1837) It is now possible to use exports of an `Instance` even after the `Instance` has been freed +- [#1831](https://github.com/wasmerio/wasmer/pull/1831) Added support for Apple Silicon chips (`arm64-apple-darwin`) +- [#1739](https://github.com/wasmerio/wasmer/pull/1739) Improved function environment setup via `WasmerEnv` proc macro. +- [#1649](https://github.com/wasmerio/wasmer/pull/1649) Add outline of migration to 1.0.0 docs. + +### Changed + +- [#1739](https://github.com/wasmerio/wasmer/pull/1739) Environments passed to host function- must now implement the `WasmerEnv` trait. You can implement it on your existing type with `#[derive(WasmerEnv)]`. +- [#1838](https://github.com/wasmerio/wasmer/pull/1838) Deprecate `WasiEnv::state_mut`: prefer `WasiEnv::state` instead. +- [#1663](https://github.com/wasmerio/wasmer/pull/1663) Function environments passed to host functions now must be passed by `&` instead of `&mut`. This is a breaking change. This change fixes a race condition when a host function is called from multiple threads. If you need mutability in your environment, consider using `std::sync::Mutex` or other synchronization primitives. +- [#1830](https://github.com/wasmerio/wasmer/pull/1830) Minimum supported Rust version bumped to 1.47.0 +- [#1810](https://github.com/wasmerio/wasmer/pull/1810) Make the `state` field of `WasiEnv` public + +### Fixed + +- [#1857](https://github.com/wasmerio/wasmer/pull/1857) Fix dynamic function with new Environment API +- [#1855](https://github.com/wasmerio/wasmer/pull/1855) Fix memory leak when using `wat2wasm` in the C API, the function now takes its output parameter by pointer rather than returning an allocated `wasm_byte_vec_t`. +- [#1841](https://github.com/wasmerio/wasmer/pull/1841) We will now panic when attempting to use a native function with a captured env as a host function. Previously this would silently do the wrong thing. See [#1840](https://github.com/wasmerio/wasmer/pull/1840) for info about Wasmer's support of closures as host functions. +- [#1764](https://github.com/wasmerio/wasmer/pull/1764) Fix bug in WASI `path_rename` allowing renamed files to be 1 directory below a preopened directory. + +## 1.0.0-alpha5 - 2020-11-06 + +### Added + +- [#1761](https://github.com/wasmerio/wasmer/pull/1761) Implement the `wasm_trap_t**` argument of `wasm_instance_new` in the Wasm C API. +- [#1687](https://github.com/wasmerio/wasmer/pull/1687) Add basic table example; fix ownership of local memory and local table metadata in the VM. +- [#1751](https://github.com/wasmerio/wasmer/pull/1751) Implement `wasm_trap_t` inside a function declared with `wasm_func_new_with_env` in the Wasm C API. +- [#1741](https://github.com/wasmerio/wasmer/pull/1741) Implement `wasm_memory_type` in the Wasm C API. +- [#1736](https://github.com/wasmerio/wasmer/pull/1736) Implement `wasm_global_type` in the Wasm C API. +- [#1699](https://github.com/wasmerio/wasmer/pull/1699) Update `wasm.h` to its latest version. +- [#1685](https://github.com/wasmerio/wasmer/pull/1685) Implement `wasm_exporttype_delete` in the Wasm C API. +- [#1725](https://github.com/wasmerio/wasmer/pull/1725) Implement `wasm_func_type` in the Wasm C API. +- [#1715](https://github.com/wasmerio/wasmer/pull/1715) Register errors from `wasm_module_serialize` in the Wasm C API. +- [#1709](https://github.com/wasmerio/wasmer/pull/1709) Implement `wasm_module_name` and `wasm_module_set_name` in the Wasm(er) C API. +- [#1700](https://github.com/wasmerio/wasmer/pull/1700) Implement `wasm_externtype_copy` in the Wasm C API. +- [#1785](https://github.com/wasmerio/wasmer/pull/1785) Add more examples on the Rust API. +- [#1783](https://github.com/wasmerio/wasmer/pull/1783) Handle initialized but empty results in `wasm_func_call` in the Wasm C API. +- [#1780](https://github.com/wasmerio/wasmer/pull/1780) Implement new SIMD zero-extend loads in compiler-llvm. +- [#1754](https://github.com/wasmerio/wasmer/pull/1754) Implement aarch64 ABI for compiler-llvm. +- [#1693](https://github.com/wasmerio/wasmer/pull/1693) Add `wasmer create-exe` subcommand. + +### Changed + +- [#1772](https://github.com/wasmerio/wasmer/pull/1772) Remove lifetime parameter from `NativeFunc`. +- [#1762](https://github.com/wasmerio/wasmer/pull/1762) Allow the `=` sign in a WASI environment variable value. +- [#1710](https://github.com/wasmerio/wasmer/pull/1710) Memory for function call trampolines is now owned by the Artifact. +- [#1781](https://github.com/wasmerio/wasmer/pull/1781) Cranelift upgrade to 0.67. +- [#1777](https://github.com/wasmerio/wasmer/pull/1777) Wasmparser update to 0.65. +- [#1775](https://github.com/wasmerio/wasmer/pull/1775) Improve LimitingTunables implementation. +- [#1720](https://github.com/wasmerio/wasmer/pull/1720) Autodetect llvm regardless of architecture. + +### Fixed + +- [#1718](https://github.com/wasmerio/wasmer/pull/1718) Fix panic in the API in some situations when the memory's min bound was greater than the memory's max bound. +- [#1731](https://github.com/wasmerio/wasmer/pull/1731) In compiler-llvm always load before store, to trigger any traps before any bytes are written. + +## 1.0.0-alpha4 - 2020-10-08 + +### Added +- [#1635](https://github.com/wasmerio/wasmer/pull/1635) Implement `wat2wasm` in the Wasm C API. +- [#1636](https://github.com/wasmerio/wasmer/pull/1636) Implement `wasm_module_validate` in the Wasm C API. +- [#1657](https://github.com/wasmerio/wasmer/pull/1657) Implement `wasm_trap_t` and `wasm_frame_t` for Wasm C API; add examples in Rust and C of exiting early with a host function. + +### Fixed +- [#1690](https://github.com/wasmerio/wasmer/pull/1690) Fix `wasm_memorytype_limits` where `min` and `max` represents pages, not bytes. Additionally, fixes the max limit sentinel value. +- [#1671](https://github.com/wasmerio/wasmer/pull/1671) Fix probestack firing inappropriately, and sometimes over/under allocating stack. +- [#1660](https://github.com/wasmerio/wasmer/pull/1660) Fix issue preventing map-dir aliases starting with `/` from working properly. +- [#1624](https://github.com/wasmerio/wasmer/pull/1624) Add Value::I32/Value::I64 converters from unsigned ints. + +### Changed +- [#1682](https://github.com/wasmerio/wasmer/pull/1682) Improve error reporting when making a memory with invalid settings. +- [#1691](https://github.com/wasmerio/wasmer/pull/1691) Bump minimum supported Rust version to 1.46.0 +- [#1645](https://github.com/wasmerio/wasmer/pull/1645) Move the install script to https://github.com/wasmerio/wasmer-install + +## 1.0.0-alpha3 - 2020-09-14 + +### Fixed + +- [#1620](https://github.com/wasmerio/wasmer/pull/1620) Fix bug causing the Wapm binary to not be packaged with the release +- [#1619](https://github.com/wasmerio/wasmer/pull/1619) Improve error message in engine-native when C compiler is missing + +## 1.0.0-alpha02.0 - 2020-09-11 + +### Added + +- [#1566](https://github.com/wasmerio/wasmer/pull/1566) Add support for opening special Unix files to the WASI FS + +### Fixed + +- [#1602](https://github.com/wasmerio/wasmer/pull/1602) Fix panic when calling host functions with negative numbers in certain situations +- [#1590](https://github.com/wasmerio/wasmer/pull/1590) Fix soundness issue in API of vm::Global + +## TODO: 1.0.0-alpha01.0 + +- Wasmer refactor lands + +## 0.17.1 - 2020-06-24 + +### Changed +- [#1439](https://github.com/wasmerio/wasmer/pull/1439) Move `wasmer-interface-types` into its own repository + +### Fixed + +- [#1554](https://github.com/wasmerio/wasmer/pull/1554) Update supported stable Rust version to 1.45.2. +- [#1552](https://github.com/wasmerio/wasmer/pull/1552) Disable `sigint` handler by default. + +## 0.17.0 - 2020-05-11 + +### Added +- [#1331](https://github.com/wasmerio/wasmer/pull/1331) Implement the `record` type and instrutions for WIT +- [#1345](https://github.com/wasmerio/wasmer/pull/1345) Adding ARM testing in Azure Pipelines +- [#1329](https://github.com/wasmerio/wasmer/pull/1329) New numbers and strings instructions for WIT +- [#1285](https://github.com/wasmerio/wasmer/pull/1285) Greatly improve errors in `wasmer-interface-types` +- [#1303](https://github.com/wasmerio/wasmer/pull/1303) NaN canonicalization for singlepass backend. +- [#1313](https://github.com/wasmerio/wasmer/pull/1313) Add new high-level public API through `wasmer` crate. Includes many updates including: + - Minor improvement: `imports!` macro now handles no trailing comma as well as a trailing comma in namespaces and between namespaces. + - New methods on `Module`: `exports`, `imports`, and `custom_sections`. + - New way to get exports from an instance with `let func_name: Func = instance.exports.get("func_name");`. + - Improved `Table` APIs including `set` which now allows setting functions directly. TODO: update this more if `Table::get` gets made public in this PR + - TODO: finish the list of changes here +- [#1305](https://github.com/wasmerio/wasmer/pull/1305) Handle panics from DynamicFunc. +- [#1300](https://github.com/wasmerio/wasmer/pull/1300) Add support for multiple versions of WASI tests: wasitests now test all versions of WASI. +- [#1292](https://github.com/wasmerio/wasmer/pull/1292) Experimental Support for Android (x86_64 and AArch64) + +### Fixed +- [#1283](https://github.com/wasmerio/wasmer/pull/1283) Workaround for floating point arguments and return values in `DynamicFunc`s. + +### Changed +- [#1401](https://github.com/wasmerio/wasmer/pull/1401) Make breaking change to `RuntimeError`: `RuntimeError` is now more explicit about its possible error values allowing for better insight into why a call into Wasm failed. +- [#1382](https://github.com/wasmerio/wasmer/pull/1382) Refactored test infranstructure (part 2) +- [#1380](https://github.com/wasmerio/wasmer/pull/1380) Refactored test infranstructure (part 1) +- [#1357](https://github.com/wasmerio/wasmer/pull/1357) Refactored bin commands into separate files +- [#1335](https://github.com/wasmerio/wasmer/pull/1335) Change mutability of `memory` to `const` in `wasmer_memory_data_length` in the C API +- [#1332](https://github.com/wasmerio/wasmer/pull/1332) Add option to `CompilerConfig` to force compiler IR verification off even when `debug_assertions` are enabled. This can be used to make debug builds faster, which may be important if you're creating a library that wraps Wasmer and depend on the speed of debug builds. +- [#1320](https://github.com/wasmerio/wasmer/pull/1320) Change `custom_sections` field in `ModuleInfo` to be more standards compliant by allowing multiple custom sections with the same name. To get the old behavior with the new API, you can add `.last().unwrap()` to accesses. For example, `module_info.custom_sections["custom_section_name"].last().unwrap()`. +- [#1301](https://github.com/wasmerio/wasmer/pull/1301) Update supported stable Rust version to 1.41.1. + +## 0.16.2 - 2020-03-11 + +### Fixed + +- [#1294](https://github.com/wasmerio/wasmer/pull/1294) Fix bug related to system calls in WASI that rely on reading from WasmPtrs as arrays of length 0. `WasmPtr` will now succeed on length 0 arrays again. + +## 0.16.1 - 2020-03-11 + +### Fixed + +- [#1291](https://github.com/wasmerio/wasmer/pull/1291) Fix installation packaging script to package the `wax` command. + +## 0.16.0 - 2020-03-11 + +### Added +- [#1286](https://github.com/wasmerio/wasmer/pull/1286) Updated Windows Wasmer icons. Add wax +- [#1284](https://github.com/wasmerio/wasmer/pull/1284) Implement string and memory instructions in `wasmer-interface-types` + +### Fixed +- [#1272](https://github.com/wasmerio/wasmer/pull/1272) Fix off-by-one error bug when accessing memory with a `WasmPtr` that contains the last valid byte of memory. Also changes the behavior of `WasmPtr` with a length of 0 and `WasmPtr` where `std::mem::size_of::()` is 0 to always return `None` + +## 0.15.0 - 2020-03-04 + +- [#1263](https://github.com/wasmerio/wasmer/pull/1263) Changed the behavior of some WASI syscalls to now handle preopened directories more properly. Changed default `--debug` logging to only show Wasmer-related messages. +- [#1217](https://github.com/wasmerio/wasmer/pull/1217) Polymorphic host functions based on dynamic trampoline generation. +- [#1252](https://github.com/wasmerio/wasmer/pull/1252) Allow `/` in wasi `--mapdir` wasm path. +- [#1212](https://github.com/wasmerio/wasmer/pull/1212) Add support for GDB JIT debugging: + - Add `--generate-debug-info` and `-g` flags to `wasmer run` to generate debug information during compilation. The debug info is passed via the GDB JIT interface to a debugger to allow source-level debugging of Wasm files. Currently only available on clif-backend. + - Break public middleware APIs: there is now a `source_loc` parameter that should be passed through if applicable. + - Break compiler trait methods such as `feed_local`, `feed_event` as well as `ModuleCodeGenerator::finalize`. + +## 0.14.1 - 2020-02-24 + +- [#1245](https://github.com/wasmerio/wasmer/pull/1245) Use Ubuntu 16.04 in CI so that we use an earlier version of GLIBC. +- [#1234](https://github.com/wasmerio/wasmer/pull/1234) Check for unused excluded spectest failures. +- [#1232](https://github.com/wasmerio/wasmer/pull/1232) `wasmer-interface-types` has a WAT decoder. + +## 0.14.0 - 2020-02-20 + +- [#1233](https://github.com/wasmerio/wasmer/pull/1233) Improved Wasmer C API release artifacts. +- [#1216](https://github.com/wasmerio/wasmer/pull/1216) `wasmer-interface-types` receives a binary encoder. +- [#1228](https://github.com/wasmerio/wasmer/pull/1228) Singlepass cleanup: Resolve several FIXMEs and remove protect_unix. +- [#1218](https://github.com/wasmerio/wasmer/pull/1218) Enable Cranelift verifier in debug mode. Fix bug with table indices being the wrong type. +- [#787](https://github.com/wasmerio/wasmer/pull/787) New crate `wasmer-interface-types` to implement WebAssembly Interface Types. +- [#1213](https://github.com/wasmerio/wasmer/pull/1213) Fixed WASI `fdstat` to detect `isatty` properly. +- [#1192](https://github.com/wasmerio/wasmer/pull/1192) Use `ExceptionCode` for error representation. +- [#1191](https://github.com/wasmerio/wasmer/pull/1191) Fix singlepass miscompilation on `Operator::CallIndirect`. +- [#1180](https://github.com/wasmerio/wasmer/pull/1180) Fix compilation for target `x86_64-unknown-linux-musl`. +- [#1170](https://github.com/wasmerio/wasmer/pull/1170) Improve the WasiFs builder API with convenience methods for overriding stdin, stdout, and stderr as well as a new sub-builder for controlling the permissions and properties of preopened directories. Also breaks that implementations of `WasiFile` must be `Send` -- please file an issue if this change causes you any issues. +- [#1161](https://github.com/wasmerio/wasmer/pull/1161) Require imported functions to be `Send`. This is a breaking change that fixes a soundness issue in the API. +- [#1140](https://github.com/wasmerio/wasmer/pull/1140) Use [`blake3`](https://github.com/BLAKE3-team/BLAKE3) as default hashing algorithm for caching. +- [#1129](https://github.com/wasmerio/wasmer/pull/1129) Standard exception types for singlepass backend. + +## 0.13.1 - 2020-01-16 +- Fix bug in wapm related to the `package.wasmer_extra_flags` entry in the manifest + +## 0.13.0 - 2020-01-15 + +Special thanks to [@repi](https://github.com/repi) and [@srenatus](https://github.com/srenatus) for their contributions! + +- [#1153](https://github.com/wasmerio/wasmer/pull/1153) Added Wasmex, an Elixir language integration, to the README +- [#1133](https://github.com/wasmerio/wasmer/pull/1133) New `wasmer_trap` function in the C API, to properly error from within a host function +- [#1147](https://github.com/wasmerio/wasmer/pull/1147) Remove `log` and `trace` macros from `wasmer-runtime-core`, remove `debug` and `trace` features from `wasmer-*` crates, use the `log` crate for logging and use `fern` in the Wasmer CLI binary to output log messages. Colorized output will be enabled automatically if printing to a terminal, to force colorization on or off, set the `WASMER_COLOR` environment variable to `true` or `false`. +- [#1128](https://github.com/wasmerio/wasmer/pull/1128) Fix a crash when a host function is missing and the `allow_missing_functions` flag is enabled +- [#1099](https://github.com/wasmerio/wasmer/pull/1099) Remove `backend::Backend` from `wasmer_runtime_core` +- [#1097](https://github.com/wasmerio/wasmer/pull/1097) Move inline breakpoint outside of runtime backend +- [#1095](https://github.com/wasmerio/wasmer/pull/1095) Update to cranelift 0.52. +- [#1092](https://github.com/wasmerio/wasmer/pull/1092) Add `get_utf8_string_with_nul` to `WasmPtr` to read nul-terminated strings from memory. +- [#1071](https://github.com/wasmerio/wasmer/pull/1071) Add support for non-trapping float-to-int conversions, enabled by default. + +## 0.12.0 - 2019-12-18 + +Special thanks to [@ethanfrey](https://github.com/ethanfrey), [@AdamSLevy](https://github.com/AdamSLevy), [@Jasper-Bekkers](https://github.com/Jasper-Bekkers), [@srenatus](https://github.com/srenatus) for their contributions! + +- [#1078](https://github.com/wasmerio/wasmer/pull/1078) Increase the maximum number of parameters `Func` can take +- [#1062](https://github.com/wasmerio/wasmer/pull/1062) Expose some opt-in Emscripten functions to the C API +- [#1032](https://github.com/wasmerio/wasmer/pull/1032) Change the signature of the Emscripten `abort` function to work with Emscripten 1.38.30 +- [#1060](https://github.com/wasmerio/wasmer/pull/1060) Test the capi with all the backends +- [#1069](https://github.com/wasmerio/wasmer/pull/1069) Add function `get_memory_and_data` to `Ctx` to help prevent undefined behavior and mutable aliasing. It allows accessing memory while borrowing data mutably for the `Ctx` lifetime. This new function is now being used in `wasmer-wasi`. +- [#1058](https://github.com/wasmerio/wasmer/pull/1058) Fix minor panic issue when `wasmer::compile_with` called with llvm backend. +- [#858](https://github.com/wasmerio/wasmer/pull/858) Minor panic fix when wasmer binary with `loader` option run a module without exported `_start` function. +- [#1056](https://github.com/wasmerio/wasmer/pull/1056) Improved `--invoke` args parsing (supporting `i32`, `i64`, `f32` and `f32`) in Wasmer CLI +- [#1054](https://github.com/wasmerio/wasmer/pull/1054) Improve `--invoke` output in Wasmer CLI +- [#1053](https://github.com/wasmerio/wasmer/pull/1053) For RuntimeError and breakpoints, use Box instead of Box. +- [#1052](https://github.com/wasmerio/wasmer/pull/1052) Fix minor panic and improve Error handling in singlepass backend. +- [#1050](https://github.com/wasmerio/wasmer/pull/1050) Attach C & C++ headers to releases. +- [#1033](https://github.com/wasmerio/wasmer/pull/1033) Set cranelift backend as default compiler backend again, require at least one backend to be enabled for Wasmer CLI +- [#1044](https://github.com/wasmerio/wasmer/pull/1044) Enable AArch64 support in the LLVM backend. +- [#1030](https://github.com/wasmerio/wasmer/pull/1030) Ability to generate `ImportObject` for a specific version WASI version with the C API. +- [#1028](https://github.com/wasmerio/wasmer/pull/1028) Introduce strict/non-strict modes for `get_wasi_version` +- [#1029](https://github.com/wasmerio/wasmer/pull/1029) Add the “floating” `WasiVersion::Latest` version. +- [#1006](https://github.com/wasmerio/wasmer/pull/1006) Fix minor panic issue when `wasmer::compile_with` called with llvm backend +- [#1009](https://github.com/wasmerio/wasmer/pull/1009) Enable LLVM verifier for all tests, add new llvm-backend-tests crate. +- [#1022](https://github.com/wasmerio/wasmer/pull/1022) Add caching support for Singlepass backend. +- [#1004](https://github.com/wasmerio/wasmer/pull/1004) Add the Auto backend to enable to adapt backend usage depending on wasm file executed. +- [#1068](https://github.com/wasmerio/wasmer/pull/1068) Various cleanups for the singlepass backend on AArch64. + +## 0.11.0 - 2019-11-22 + +- [#713](https://github.com/wasmerio/wasmer/pull/713) Add AArch64 support for singlepass. +- [#995](https://github.com/wasmerio/wasmer/pull/995) Detect when a global is read without being initialized (emit a proper error instead of panicking) +- [#996](https://github.com/wasmerio/wasmer/pull/997) Refactored spectests, emtests and wasitests to use default compiler logic +- [#992](https://github.com/wasmerio/wasmer/pull/992) Updates WAPM version to 0.4.1, fix arguments issue introduced in #990 +- [#990](https://github.com/wasmerio/wasmer/pull/990) Default wasmer CLI to `run`. Wasmer will now attempt to parse unrecognized command line options as if they were applied to the run command: `wasmer mywasm.wasm --dir=.` now works! +- [#987](https://github.com/wasmerio/wasmer/pull/987) Fix `runtime-c-api` header files when compiled by gnuc. +- [#957](https://github.com/wasmerio/wasmer/pull/957) Change the meaning of `wasmer_wasi::is_wasi_module` to detect any type of WASI module, add support for new wasi snapshot_preview1 +- [#934](https://github.com/wasmerio/wasmer/pull/934) Simplify float expressions in the LLVM backend. + +## 0.10.2 - 2019-11-18 + +- [#968](https://github.com/wasmerio/wasmer/pull/968) Added `--invoke` option to the command +- [#964](https://github.com/wasmerio/wasmer/pull/964) Enable cross-compilation for specific target +- [#971](https://github.com/wasmerio/wasmer/pull/971) In LLVM backend, use unaligned loads and stores for non-atomic accesses to wasmer memory. +- [#960](https://github.com/wasmerio/wasmer/pull/960) Fix `runtime-c-api` header files when compiled by clang. +- [#925](https://github.com/wasmerio/wasmer/pull/925) Host functions can be closures with a captured environment. +- [#917](https://github.com/wasmerio/wasmer/pull/917) Host functions (aka imported functions) may not have `&mut vm::Ctx` as first argument, i.e. the presence of the `&mut vm::Ctx` argument is optional. +- [#915](https://github.com/wasmerio/wasmer/pull/915) All backends share the same definition of `Trampoline` (defined in `wasmer-runtime-core`). + +## 0.10.1 - 2019-11-11 + +- [#952](https://github.com/wasmerio/wasmer/pull/952) Use C preprocessor to properly hide trampoline functions on Windows and non-x86_64 targets. + +## 0.10.0 - 2019-11-11 + +Special thanks to [@newpavlov](https://github.com/newpavlov) and [@Maxgy](https://github.com/Maxgy) for their contributions! + +- [#942](https://github.com/wasmerio/wasmer/pull/942) Deny missing docs in runtime core and add missing docs +- [#939](https://github.com/wasmerio/wasmer/pull/939) Fix bug causing attempts to append to files with WASI to delete the contents of the file +- [#940](https://github.com/wasmerio/wasmer/pull/940) Update supported Rust version to 1.38+ +- [#923](https://github.com/wasmerio/wasmer/pull/923) Fix memory leak in the C API caused by an incorrect cast in `wasmer_trampoline_buffer_destroy` +- [#921](https://github.com/wasmerio/wasmer/pull/921) In LLVM backend, annotate all memory accesses with TBAA metadata. +- [#883](https://github.com/wasmerio/wasmer/pull/883) Allow floating point operations to have arbitrary inputs, even including SNaNs. +- [#856](https://github.com/wasmerio/wasmer/pull/856) Expose methods in the runtime C API to get a WASI import object + +## 0.9.0 - 2019-10-23 + +Special thanks to @alocquet for their contributions! + +- [#898](https://github.com/wasmerio/wasmer/pull/898) State tracking is now disabled by default in the LLVM backend. It can be enabled with `--track-state`. +- [#861](https://github.com/wasmerio/wasmer/pull/861) Add descriptions to `unimplemented!` macro in various places +- [#897](https://github.com/wasmerio/wasmer/pull/897) Removes special casing of stdin, stdout, and stderr in WASI. Closing these files now works. Removes `stdin`, `stdout`, and `stderr` from `WasiFS`, replaced by the methods `stdout`, `stdout_mut`, and so on. +- [#863](https://github.com/wasmerio/wasmer/pull/863) Fix min and max for cases involving NaN and negative zero when using the LLVM backend. + +## 0.8.0 - 2019-10-02 + +Special thanks to @jdanford for their contributions! + +- [#850](https://github.com/wasmerio/wasmer/pull/850) New `WasiStateBuilder` API. small, add misc. breaking changes to existing API (for example, changing the preopen dirs arg on `wasi::generate_import_object` from `Vec` to `Vec`) +- [#852](https://github.com/wasmerio/wasmer/pull/852) Make minor grammar/capitalization fixes to README.md +- [#841](https://github.com/wasmerio/wasmer/pull/841) Slightly improve rustdoc documentation and small updates to outdated info in readme files +- [#836](https://github.com/wasmerio/wasmer/pull/836) Update Cranelift fork version to `0.44.0` +- [#839](https://github.com/wasmerio/wasmer/pull/839) Change supported version to stable Rust 1.37+ +- [#834](https://github.com/wasmerio/wasmer/pull/834) Fix panic when unwraping `wasmer` arguments +- [#835](https://github.com/wasmerio/wasmer/pull/835) Add parallel execution example (independent instances created from the same `ImportObject` and `Module` run with rayon) +- [#834](https://github.com/wasmerio/wasmer/pull/834) Fix panic when parsing numerical arguments for no-ABI targets run with the wasmer binary +- [#833](https://github.com/wasmerio/wasmer/pull/833) Add doc example of using ImportObject's new `maybe_with_namespace` method +- [#832](https://github.com/wasmerio/wasmer/pull/832) Delete unused runtime ABI +- [#809](https://github.com/wasmerio/wasmer/pull/809) Fix bugs leading to panics in `LocalBacking`. +- [#831](https://github.com/wasmerio/wasmer/pull/831) Add support for atomic operations, excluding wait and notify, to singlepass. +- [#822](https://github.com/wasmerio/wasmer/pull/822) Update Cranelift fork version to `0.43.1` +- [#829](https://github.com/wasmerio/wasmer/pull/829) Fix deps on `make bench-*` commands; benchmarks don't compile other backends now +- [#807](https://github.com/wasmerio/wasmer/pull/807) Implement Send for `Instance`, breaking change on `ImportObject`, remove method `get_namespace` replaced with `with_namespace` and `maybe_with_namespace` +- [#817](https://github.com/wasmerio/wasmer/pull/817) Add document for tracking features across backends and language integrations, [docs/feature_matrix.md] +- [#823](https://github.com/wasmerio/wasmer/issues/823) Improved Emscripten / WASI integration +- [#821](https://github.com/wasmerio/wasmer/issues/821) Remove patch version on most deps Cargo manifests. This gives Wasmer library users more control over which versions of the deps they use. +- [#820](https://github.com/wasmerio/wasmer/issues/820) Remove null-pointer checks in `WasmPtr` from runtime-core, re-add them in Emscripten +- [#803](https://github.com/wasmerio/wasmer/issues/803) Add method to `Ctx` to invoke functions by their `TableIndex` +- [#790](https://github.com/wasmerio/wasmer/pull/790) Fix flaky test failure with LLVM, switch to large code model. +- [#788](https://github.com/wasmerio/wasmer/pull/788) Use union merge on the changelog file. +- [#785](https://github.com/wasmerio/wasmer/pull/785) Include Apache license file for spectests. +- [#786](https://github.com/wasmerio/wasmer/pull/786) In the LLVM backend, lower atomic wasm operations to atomic machine instructions. +- [#784](https://github.com/wasmerio/wasmer/pull/784) Fix help string for wasmer run. + +## 0.7.0 - 2019-09-12 + +Special thanks to @YaronWittenstein @penberg for their contributions. + +- [#776](https://github.com/wasmerio/wasmer/issues/776) Allow WASI preopened fds to be closed +- [#774](https://github.com/wasmerio/wasmer/issues/774) Add more methods to the `WasiFile` trait +- [#772](https://github.com/wasmerio/wasmer/issues/772) [#770](https://github.com/wasmerio/wasmer/issues/770) Handle more internal failures by passing back errors +- [#756](https://github.com/wasmerio/wasmer/issues/756) Allow NULL parameter and 0 arity in `wasmer_export_func_call` C API +- [#747](https://github.com/wasmerio/wasmer/issues/747) Return error instead of panicking on traps when using the Wasmer binary +- [#741](https://github.com/wasmerio/wasmer/issues/741) Add validate Wasm fuzz target +- [#733](https://github.com/wasmerio/wasmer/issues/733) Remove dependency on compiler backends for `middleware-common` +- [#732](https://github.com/wasmerio/wasmer/issues/732) [#731](https://github.com/wasmerio/wasmer/issues/731) WASI bug fixes and improvements +- [#726](https://github.com/wasmerio/wasmer/issues/726) Add serialization and deserialization for Wasi State +- [#716](https://github.com/wasmerio/wasmer/issues/716) Improve portability of install script +- [#714](https://github.com/wasmerio/wasmer/issues/714) Add Code of Conduct +- [#708](https://github.com/wasmerio/wasmer/issues/708) Remove unconditional dependency on Cranelift in the C API +- [#703](https://github.com/wasmerio/wasmer/issues/703) Fix compilation on AArch64 Linux +- [#702](https://github.com/wasmerio/wasmer/issues/702) Add SharedMemory to Wasmer. Add `--enable-threads` flag, add partial implementation of atomics to LLVM backend. +- [#698](https://github.com/wasmerio/wasmer/issues/698) [#690](https://github.com/wasmerio/wasmer/issues/690) [#687](https://github.com/wasmerio/wasmer/issues/690) Fix panics in Emscripten +- [#689](https://github.com/wasmerio/wasmer/issues/689) Replace `wasmer_runtime_code::memory::Atomic` with `std::sync::atomic` atomics, changing its interface +- [#680](https://github.com/wasmerio/wasmer/issues/680) [#673](https://github.com/wasmerio/wasmer/issues/673) [#669](https://github.com/wasmerio/wasmer/issues/669) [#660](https://github.com/wasmerio/wasmer/issues/660) [#659](https://github.com/wasmerio/wasmer/issues/659) Misc. runtime and singlepass fixes +- [#677](https://github.com/wasmerio/wasmer/issues/677) [#675](https://github.com/wasmerio/wasmer/issues/675) [#674](https://github.com/wasmerio/wasmer/issues/674) LLVM backend fixes and improvements +- [#671](https://github.com/wasmerio/wasmer/issues/671) Implement fs polling in `wasi::poll_oneoff` for Unix-like platforms +- [#656](https://github.com/wasmerio/wasmer/issues/656) Move CI to Azure Pipelines +- [#650](https://github.com/wasmerio/wasmer/issues/650) Implement `wasi::path_rename`, improve WASI FS public api, and allow open files to exist even when the underlying file is deleted +- [#643](https://github.com/wasmerio/wasmer/issues/643) Implement `wasi::path_symlink` and improve WASI FS public api IO error reporting +- [#608](https://github.com/wasmerio/wasmer/issues/608) Implement wasi syscalls `fd_allocate`, `fd_sync`, `fd_pread`, `path_link`, `path_filestat_set_times`; update WASI fs API in a WIP way; reduce coupling of WASI code to host filesystem; make debug messages from WASI more readable; improve rights-checking when calling syscalls; implement reference counting on inodes; misc bug fixes and improvements +- [#616](https://github.com/wasmerio/wasmer/issues/616) Create the import object separately from instance instantiation in `runtime-c-api` +- [#620](https://github.com/wasmerio/wasmer/issues/620) Replace one `throw()` with `noexcept` in llvm backend +- [#618](https://github.com/wasmerio/wasmer/issues/618) Implement `InternalEvent::Breakpoint` in the llvm backend to allow metering in llvm +- [#615](https://github.com/wasmerio/wasmer/issues/615) Eliminate `FunctionEnvironment` construction in `feed_event()` speeding up to 70% of compilation in clif +- [#609](https://github.com/wasmerio/wasmer/issues/609) Update dependencies +- [#602](https://github.com/wasmerio/wasmer/issues/602) C api extract instance context from instance +- [#590](https://github.com/wasmerio/wasmer/issues/590) Error visibility changes in wasmer-c-api +- [#589](https://github.com/wasmerio/wasmer/issues/589) Make `wasmer_byte_array` fields `public` in wasmer-c-api + +## 0.6.0 - 2019-07-31 +- [#603](https://github.com/wasmerio/wasmer/pull/603) Update Wapm-cli, bump version numbers +- [#595](https://github.com/wasmerio/wasmer/pull/595) Add unstable public API for interfacing with the WASI file system in plugin-like usecases +- [#598](https://github.com/wasmerio/wasmer/pull/598) LLVM Backend is now supported in Windows +- [#599](https://github.com/wasmerio/wasmer/pull/599) Fix llvm backend failures in fat spec tests and simd_binaryen spec test. +- [#579](https://github.com/wasmerio/wasmer/pull/579) Fix bug in caching with LLVM and Singlepass backends. + Add `default-backend-singlepass`, `default-backend-llvm`, and `default-backend-cranelift` features to `wasmer-runtime` + to control the `default_compiler()` function (this is a breaking change). Add `compiler_for_backend` function in `wasmer-runtime` +- [#561](https://github.com/wasmerio/wasmer/pull/561) Call the `data_finalizer` field on the `Ctx` +- [#576](https://github.com/wasmerio/wasmer/pull/576) fix `Drop` of uninit `Ctx` +- [#542](https://github.com/wasmerio/wasmer/pull/542) Add SIMD support to Wasmer (LLVM backend only) + - Updates LLVM to version 8.0 + +## 0.5.7 - 2019-07-23 +- [#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 misc. improvements to most syscalls touching the filesystem + +## 0.5.6 - 2019-07-16 +- [#565](https://github.com/wasmerio/wasmer/pull/565) Update wapm and bump version to 0.5.6 +- [#563](https://github.com/wasmerio/wasmer/pull/563) Improve wasi testing infrastructure + - fixes arg parsing from comments & fixes the mapdir test to have the native code doing the same thing as the WASI code + - makes wasitests-generate output stdout/stderr by default & adds function to print stdout and stderr for a command if it fails + - compiles wasm with size optimizations & strips generated wasm with wasm-strip +- [#554](https://github.com/wasmerio/wasmer/pull/554) Finish implementation of `wasi::fd_seek`, fix bug in filestat +- [#550](https://github.com/wasmerio/wasmer/pull/550) Fix singlepass compilation error with `imul` instruction + + +## 0.5.5 - 2019-07-10 +- [#541](https://github.com/wasmerio/wasmer/pull/541) Fix dependency graph by making separate test crates; ABI implementations should not depend on compilers. Add Cranelift fork as git submodule of clif-backend +- [#537](https://github.com/wasmerio/wasmer/pull/537) Add hidden flag (`--cache-key`) to use prehashed key into the compiled wasm cache and change compiler backend-specific caching to use directories +- [#536](https://github.com/wasmerio/wasmer/pull/536) ~Update cache to use compiler backend name in cache key~ + +## 0.5.4 - 2019-07-06 +- [#529](https://github.com/wasmerio/wasmer/pull/529) Updates the Wasm Interface library, which is used by wapm, with bug fixes and error message improvements + +## 0.5.3 - 2019-07-03 +- [#523](https://github.com/wasmerio/wasmer/pull/523) Update wapm version to fix bug related to signed packages in the global namespace and locally-stored public keys + +## 0.5.2 - 2019-07-02 +- [#516](https://github.com/wasmerio/wasmer/pull/516) Add workaround for singlepass miscompilation on GetLocal +- [#521](https://github.com/wasmerio/wasmer/pull/521) Update Wapm-cli, bump version numbers +- [#518](https://github.com/wasmerio/wasmer/pull/518) Update Cranelift and WasmParser +- [#514](https://github.com/wasmerio/wasmer/pull/514) [#519](https://github.com/wasmerio/wasmer/pull/519) Improved Emscripten network related calls, added a null check to `WasmPtr` +- [#515](https://github.com/wasmerio/wasmer/pull/515) Improved Emscripten dyncalls +- [#513](https://github.com/wasmerio/wasmer/pull/513) Fix emscripten lseek implementation. +- [#510](https://github.com/wasmerio/wasmer/pull/510) Simplify construction of floating point constants in LLVM backend. Fix LLVM assertion failure due to definition of %ctx. + +## 0.5.1 - 2019-06-24 +- [#508](https://github.com/wasmerio/wasmer/pull/508) Update wapm version, includes bug fixes + +## 0.5.0 - 2019-06-17 + +- [#471](https://github.com/wasmerio/wasmer/pull/471) Added missing functions to run Python. Improved Emscripten bindings +- [#494](https://github.com/wasmerio/wasmer/pull/494) Remove deprecated type aliases from libc in the runtime C API +- [#493](https://github.com/wasmerio/wasmer/pull/493) `wasmer_module_instantiate` has better error messages in the runtime C API +- [#474](https://github.com/wasmerio/wasmer/pull/474) Set the install name of the dylib to `@rpath` +- [#490](https://github.com/wasmerio/wasmer/pull/490) Add MiddlewareChain and StreamingCompiler to runtime +- [#487](https://github.com/wasmerio/wasmer/pull/487) Fix stack offset check in singlepass backend +- [#450](https://github.com/wasmerio/wasmer/pull/450) Added Metering +- [#481](https://github.com/wasmerio/wasmer/pull/481) Added context trampoline into runtime +- [#484](https://github.com/wasmerio/wasmer/pull/484) Fix bugs in emscripten socket syscalls +- [#476](https://github.com/wasmerio/wasmer/pull/476) Fix bug with wasi::environ_get, fix off by one error in wasi::environ_sizes_get +- [#470](https://github.com/wasmerio/wasmer/pull/470) Add mapdir support to Emscripten, implement getdents for Unix +- [#467](https://github.com/wasmerio/wasmer/pull/467) `wasmer_instantiate` returns better error messages in the runtime C API +- [#463](https://github.com/wasmerio/wasmer/pull/463) Fix bug in WASI path_open allowing one level above preopened dir to be accessed +- [#461](https://github.com/wasmerio/wasmer/pull/461) Prevent passing negative lengths in various places in the runtime C API +- [#459](https://github.com/wasmerio/wasmer/pull/459) Add monotonic and real time clocks for wasi on windows +- [#447](https://github.com/wasmerio/wasmer/pull/447) Add trace macro (`--features trace`) for more verbose debug statements +- [#451](https://github.com/wasmerio/wasmer/pull/451) Add `--mapdir=src:dest` flag to rename host directories in the guest context +- [#457](https://github.com/wasmerio/wasmer/pull/457) Implement file metadata for WASI, fix bugs in WASI clock code for Unix platforms + +## 0.4.2 - 2019-05-16 + +- [#416](https://github.com/wasmerio/wasmer/pull/416) Remote code loading framework +- [#449](https://github.com/wasmerio/wasmer/pull/449) Fix bugs: opening host files in filestat and opening with write permissions unconditionally in path_open +- [#442](https://github.com/wasmerio/wasmer/pull/442) Misc. WASI FS fixes and implement readdir +- [#440](https://github.com/wasmerio/wasmer/pull/440) Fix type mismatch between `wasmer_instance_call` and `wasmer_export_func_*_arity` functions in the runtime C API. +- [#269](https://github.com/wasmerio/wasmer/pull/269) Add better runtime docs +- [#432](https://github.com/wasmerio/wasmer/pull/432) Fix returned value of `wasmer_last_error_message` in the runtime C API +- [#429](https://github.com/wasmerio/wasmer/pull/429) Get wasi::path_filestat_get working for some programs; misc. minor WASI FS improvements +- [#413](https://github.com/wasmerio/wasmer/pull/413) Update LLVM backend to use new parser codegen traits + +## 0.4.1 - 2019-05-06 + +- [#426](https://github.com/wasmerio/wasmer/pull/426) Update wapm-cli submodule, bump version to 0.4.1 +- [#422](https://github.com/wasmerio/wasmer/pull/422) Improved Emscripten functions to run optipng and pngquant compiled to wasm +- [#409](https://github.com/wasmerio/wasmer/pull/409) Improved Emscripten functions to run JavascriptCore compiled to wasm +- [#399](https://github.com/wasmerio/wasmer/pull/399) Add example of using a plugin extended from WASI +- [#397](https://github.com/wasmerio/wasmer/pull/397) Fix WASI fs abstraction to work on Windows +- [#390](https://github.com/wasmerio/wasmer/pull/390) Pin released wapm version and add it as a git submodule +- [#408](https://github.com/wasmerio/wasmer/pull/408) Add images to windows installer and update installer to add wapm bin directory to path + +## 0.4.0 - 2019-04-23 + +- [#383](https://github.com/wasmerio/wasmer/pull/383) Hook up wasi exit code to wasmer cli. +- [#382](https://github.com/wasmerio/wasmer/pull/382) Improve error message on `--backend` flag to only suggest currently enabled backends +- [#381](https://github.com/wasmerio/wasmer/pull/381) Allow retrieving propagated user errors. +- [#379](https://github.com/wasmerio/wasmer/pull/379) Fix small return types from imported functions. +- [#371](https://github.com/wasmerio/wasmer/pull/371) Add more Debug impl for WASI types +- [#368](https://github.com/wasmerio/wasmer/pull/368) Fix issue with write buffering +- [#343](https://github.com/wasmerio/wasmer/pull/343) Implement preopened files for WASI and fix aligment issue when accessing WASI memory +- [#367](https://github.com/wasmerio/wasmer/pull/367) Add caching support to the LLVM backend. +- [#366](https://github.com/wasmerio/wasmer/pull/366) Remove `UserTrapper` trait to fix [#365](https://github.com/wasmerio/wasmer/issues/365). +- [#348](https://github.com/wasmerio/wasmer/pull/348) Refactor internal runtime ↔️ backend abstraction. +- [#355](https://github.com/wasmerio/wasmer/pull/355) Misc changes to `Cargo.toml`s for publishing +- [#352](https://github.com/wasmerio/wasmer/pull/352) Bump version numbers to 0.3.0 +- [#351](https://github.com/wasmerio/wasmer/pull/351) Add hidden option to specify wasm program name (can be used to improve error messages) +- [#350](https://github.com/wasmerio/wasmer/pull/350) Enforce that CHANGELOG.md is updated through CI. +- [#349](https://github.com/wasmerio/wasmer/pull/349) Add [CHANGELOG.md](https://github.com/wasmerio/wasmer/blob/master/CHANGELOG.md). + +## 0.3.0 - 2019-04-12 + +- [#276](https://github.com/wasmerio/wasmer/pull/276) [#288](https://github.com/wasmerio/wasmer/pull/288) [#344](https://github.com/wasmerio/wasmer/pull/344) Use new singlepass backend (with the `--backend=singlepass` when running Wasmer) +- [#338](https://github.com/wasmerio/wasmer/pull/338) Actually catch traps/panics/etc when using a typed func. +- [#325](https://github.com/wasmerio/wasmer/pull/325) Fixed func_index in debug mode +- [#323](https://github.com/wasmerio/wasmer/pull/323) Add validate subcommand to validate Wasm files +- [#321](https://github.com/wasmerio/wasmer/pull/321) Upgrade to Cranelift 0.3.0 +- [#319](https://github.com/wasmerio/wasmer/pull/319) Add Export and GlobalDescriptor to Runtime API +- [#310](https://github.com/wasmerio/wasmer/pull/310) Cleanup warnings +- [#299](https://github.com/wasmerio/wasmer/pull/299) [#300](https://github.com/wasmerio/wasmer/pull/300) [#301](https://github.com/wasmerio/wasmer/pull/301) [#303](https://github.com/wasmerio/wasmer/pull/303) [#304](https://github.com/wasmerio/wasmer/pull/304) [#305](https://github.com/wasmerio/wasmer/pull/305) [#306](https://github.com/wasmerio/wasmer/pull/306) [#307](https://github.com/wasmerio/wasmer/pull/307) Add support for WASI 🎉 +- [#286](https://github.com/wasmerio/wasmer/pull/286) Add extend to imports +- [#278](https://github.com/wasmerio/wasmer/pull/278) Add versioning to cache +- [#250](https://github.com/wasmerio/wasmer/pull/250) Setup bors From 4b9389cdaac357f2a80056c2111f3cca2fc392b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=BCtt?= Date: Mon, 23 Jan 2023 12:52:43 +0100 Subject: [PATCH 51/55] Release 3.2.0-alpha.1 --- Cargo.lock | 521 +++++++++--------- Cargo.toml | 28 +- lib/api/Cargo.toml | 24 +- .../macro-wasmer-universal-test/Cargo.toml | 2 +- lib/c-api/Cargo.toml | 22 +- .../wasmer-capi-examples-runner/Cargo.toml | 2 +- .../tests/wasmer-c-api-test-runner/Cargo.toml | 2 +- lib/cache/Cargo.toml | 6 +- lib/cli-compiler/Cargo.toml | 14 +- lib/cli/Cargo.toml | 32 +- lib/compiler-cranelift/Cargo.toml | 6 +- lib/compiler-llvm/Cargo.toml | 8 +- lib/compiler-singlepass/Cargo.toml | 6 +- lib/compiler/Cargo.toml | 8 +- lib/derive/Cargo.toml | 2 +- lib/emscripten/Cargo.toml | 6 +- lib/middlewares/Cargo.toml | 10 +- lib/object/Cargo.toml | 4 +- lib/types/Cargo.toml | 2 +- lib/vbus/Cargo.toml | 4 +- lib/vfs/Cargo.toml | 2 +- lib/vm/Cargo.toml | 4 +- lib/vnet/Cargo.toml | 4 +- lib/wasi-experimental-io-devices/Cargo.toml | 4 +- lib/wasi-local-networking/Cargo.toml | 6 +- lib/wasi-types/Cargo.toml | 8 +- lib/wasi/Cargo.toml | 16 +- lib/wasm-interface/Cargo.toml | 2 +- scripts/update-version.py | 4 +- scripts/windows-installer/wasmer.iss | 2 +- tests/integration/cli/Cargo.toml | 2 +- tests/integration/ios/Cargo.toml | 2 +- tests/lib/wast/Cargo.toml | 8 +- tests/wasi-wast/Cargo.toml | 2 +- 34 files changed, 394 insertions(+), 381 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index fc933c28285..6ce7ebaecdd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,11 +4,11 @@ version = 3 [[package]] name = "addr2line" -version = "0.17.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ecd88a8c8378ca913a680cd98f0f13ac67383d35993f86c90a70e3f137816b" +checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" dependencies = [ - "gimli", + "gimli 0.27.1", ] [[package]] @@ -54,15 +54,15 @@ checksum = "70033777eb8b5124a81a1889416543dddef2de240019b674c81285a2635a7e1e" [[package]] name = "anyhow" -version = "1.0.66" +version = "1.0.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "216261ddc8289130e551ddcd5ce8a064710c0d064a4d2895c67151c92b5443f6" +checksum = "2cb2f989d18dd141ab8ae82f64d1a8cdd37e0840f73a406896cf5e99502fab61" [[package]] name = "arbitrary" -version = "1.2.0" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29d47fbf90d5149a107494b15a7dc8d69b351be2db3bb9691740e88ec17fd880" +checksum = "b0224938f92e7aef515fac2ff2d18bd1115c1394ddf4a092e0c87e8be9499ee5" dependencies = [ "derive_arbitrary", ] @@ -107,9 +107,9 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.59" +version = "0.1.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6e93155431f3931513b243d371981bb2770112b370c82745a1d19d2f99364" +checksum = "eff18d764974428cf3a9328e23fc5c986f5fbed46e6cd4cdf42544df5d297ec1" dependencies = [ "proc-macro2", "quote", @@ -122,7 +122,7 @@ version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ - "hermit-abi", + "hermit-abi 0.1.19", "libc", "winapi", ] @@ -135,16 +135,16 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" -version = "0.3.66" +version = "0.3.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cab84319d616cfb654d03394f38ab7e6f0919e181b1b57e1fd15e7fb4077d9a7" +checksum = "233d376d6d185f2a3093e58f283f60f880315b6c60075b01f36b3b85154564ca" dependencies = [ "addr2line", "cc", "cfg-if 1.0.0", "libc", - "miniz_oxide 0.5.4", - "object 0.29.0", + "miniz_oxide", + "object 0.30.3", "rustc-demangle", ] @@ -160,6 +160,12 @@ version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" +[[package]] +name = "base64" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a" + [[package]] name = "bincode" version = "1.3.3" @@ -227,9 +233,9 @@ checksum = "b4ae4235e6dac0694637c763029ecea1a2ec9e4e06ec2729bd21ba4d9c863eb7" [[package]] name = "bumpalo" -version = "3.11.1" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba" +checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" [[package]] name = "bytecheck" @@ -272,9 +278,9 @@ checksum = "6c58ec36aac5066d5ca17df51b3e70279f5670a72102f5752cb7e7c856adfc70" [[package]] name = "camino" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ad0e1e3e88dd237a156ab9f571021b8a158caa0ae44b1968a241efb5144c1e" +checksum = "c77df041dc383319cc661b428b6961a005db4d6808d5e12536931b1ca9556055" dependencies = [ "serde", ] @@ -296,7 +302,7 @@ checksum = "982a0cf6a99c350d7246035613882e376d58cebe571785abc5da4f648d53ac0a" dependencies = [ "camino", "cargo-platform", - "semver 1.0.14", + "semver 1.0.16", "serde", "serde_json", "thiserror", @@ -329,9 +335,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.77" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9f73505338f7d905b19d18738976aae232eb46b8efc15554ffc56deb5d9ebe4" +checksum = "a20104e2335ce8a659d6dd92a51a767a0c062599c73b343fd152cb401e828c3d" dependencies = [ "jobserver", ] @@ -511,16 +517,15 @@ dependencies = [ [[package]] name = "console" -version = "0.15.2" +version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c050367d967ced717c04b65d8c619d863ef9292ce0c5760028655a2fb298718c" +checksum = "c3d79fbe8970a77e3e34151cc13d3b3e248aa0faaecb9f6091fa07ebefe5ad60" dependencies = [ "encode_unicode 0.3.6", "lazy_static", "libc", - "terminal_size", "unicode-width", - "winapi", + "windows-sys 0.42.0", ] [[package]] @@ -593,7 +598,7 @@ dependencies = [ "cranelift-codegen-shared", "cranelift-entity", "cranelift-isle", - "gimli", + "gimli 0.26.2", "hashbrown 0.11.2", "log", "regalloc2", @@ -788,9 +793,9 @@ checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35" [[package]] name = "cxx" -version = "1.0.83" +version = "1.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdf07d07d6531bfcdbe9b8b739b104610c6508dcc4d63b410585faf338241daf" +checksum = "b61a7545f753a88bcbe0a70de1fcc0221e10bfc752f576754fa91e663db1622e" dependencies = [ "cc", "cxxbridge-flags", @@ -800,9 +805,9 @@ dependencies = [ [[package]] name = "cxx-build" -version = "1.0.83" +version = "1.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2eb5b96ecdc99f72657332953d4d9c50135af1bac34277801cc3937906ebd39" +checksum = "f464457d494b5ed6905c63b0c4704842aba319084a0a3561cdc1359536b53200" dependencies = [ "cc", "codespan-reporting", @@ -815,15 +820,15 @@ dependencies = [ [[package]] name = "cxxbridge-flags" -version = "1.0.83" +version = "1.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac040a39517fd1674e0f32177648334b0f4074625b5588a64519804ba0553b12" +checksum = "43c7119ce3a3701ed81aca8410b9acf6fc399d2629d057b87e2efa4e63a3aaea" [[package]] name = "cxxbridge-macro" -version = "1.0.83" +version = "1.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1362b0ddcfc4eb0a1f57b68bd77dd99f0e826958a96abd0ae9bd092e114ffed6" +checksum = "65e07508b90551e610910fa648a1878991d367064997a596135b86df30daf07e" dependencies = [ "proc-macro2", "quote", @@ -877,9 +882,9 @@ dependencies = [ [[package]] name = "derive_arbitrary" -version = "1.2.1" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8a16495aeb28047bb1185fca837baf755e7d71ed3aeed7f8504654ffa927208" +checksum = "cf460bbff5f571bfc762da5102729f59f338be7db17a21fade44c5c4f5005350" dependencies = [ "proc-macro2", "quote", @@ -888,11 +893,12 @@ dependencies = [ [[package]] name = "dialoguer" -version = "0.10.2" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a92e7e37ecef6857fdc0c0c5d42fd5b0938e46590c2183cc92dd310a6d078eb1" +checksum = "af3c796f3b0b408d9fd581611b47fa850821fcb84aa640b83a3c1a5be2d691f2" dependencies = [ "console", + "shell-words", "tempfile", "zeroize", ] @@ -1090,9 +1096,9 @@ dependencies = [ [[package]] name = "erased-serde" -version = "0.3.23" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54558e0ba96fbe24280072642eceb9d7d442e32c7ec0ea9e7ecd7b4ea2cf4e11" +checksum = "e4ca605381c017ec7a5fef5e548f1cfaa419ed0f6df6367339300db74c92aa7d" dependencies = [ "serde", ] @@ -1157,7 +1163,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8a2db397cb1c8772f31494cb8917e48cd1e64f0fa7efac59fbd741a0a8ce841" dependencies = [ "crc32fast", - "miniz_oxide 0.6.2", + "miniz_oxide", ] [[package]] @@ -1338,9 +1344,9 @@ dependencies = [ [[package]] name = "ghost" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb19fe8de3ea0920d282f7b77dd4227aea6b8b999b42cdf0ca41b2472b14443a" +checksum = "41973d4c45f7a35af8753ba3457cc99d406d863941fd7f52663cff54a5ab99b3" dependencies = [ "proc-macro2", "quote", @@ -1358,11 +1364,17 @@ dependencies = [ "stable_deref_trait", ] +[[package]] +name = "gimli" +version = "0.27.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "221996f774192f0f718773def8201c4ae31f02616a54ccfc2d358bb0e5cefdec" + [[package]] name = "glob" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "graphql-introspection-query" @@ -1518,6 +1530,15 @@ dependencies = [ "libc", ] +[[package]] +name = "hermit-abi" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" +dependencies = [ + "libc", +] + [[package]] name = "hex" version = "0.4.3" @@ -1541,7 +1562,7 @@ checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" dependencies = [ "bytes", "fnv", - "itoa 1.0.4", + "itoa 1.0.5", ] [[package]] @@ -1594,7 +1615,7 @@ dependencies = [ "http-body", "httparse", "httpdate", - "itoa 1.0.4", + "itoa 1.0.5", "pin-project-lite", "socket2", "tokio", @@ -1611,7 +1632,7 @@ checksum = "1788965e61b367cd03a62950836d5cd41560c3577d90e40e0819373194d1661c" dependencies = [ "http", "hyper", - "rustls 0.20.7", + "rustls 0.20.8", "tokio", "tokio-rustls", ] @@ -1686,9 +1707,9 @@ dependencies = [ [[package]] name = "indicatif" -version = "0.17.2" +version = "0.17.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4295cbb7573c16d310e99e713cf9e75101eb190ab31fccd35f2d2691b4352b19" +checksum = "cef509aa9bc73864d6756f0d34d35504af3cf0844373afe9b8669a5b8005a729" dependencies = [ "console", "number_prefix", @@ -1783,9 +1804,9 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.7.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11b0d96e660696543b251e58030cf9787df56da39dab19ad60eae7353040917e" +checksum = "30e22bd8629359895450b59ea7a776c850561b96a3b1d31321c1949d9e6c9146" [[package]] name = "isatty" @@ -1816,9 +1837,9 @@ checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" [[package]] name = "itoa" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4217ad341ebadf8d8e724e264f13e593e0648f5b3e94b3896a5df283be015ecc" +checksum = "fad582f4b9e86b6caa621cabeb0963332d92eea04729ab12892c2533951e6440" [[package]] name = "jobserver" @@ -1874,9 +1895,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.138" +version = "0.2.139" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db6d7e329c562c5dfab7a46a2afabc8b987ab9a4834c9d1ca04dc54c1546cef8" +checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" [[package]] name = "libfuzzer-sys" @@ -1912,9 +1933,9 @@ dependencies = [ [[package]] name = "link-cplusplus" -version = "1.0.7" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9272ab7b96c9046fbc5bc56c06c117cb639fe2d509df0c421cad82d2915cf369" +checksum = "ecd207c9c713c34f95a097a5b029ac2ce6010530c7b49d7fea24d977dede04f5" dependencies = [ "cc", ] @@ -1972,7 +1993,7 @@ dependencies = [ [[package]] name = "macro-wasmer-universal-test" -version = "3.1.0" +version = "3.2.0-alpha.1" dependencies = [ "proc-macro2", "proc-quote", @@ -1997,9 +2018,9 @@ dependencies = [ [[package]] name = "matches" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" +checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" [[package]] name = "memchr" @@ -2093,15 +2114,6 @@ dependencies = [ "scrypt", ] -[[package]] -name = "miniz_oxide" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96590ba8f175222643a85693f33d26e9c8a015f599c216509b1a6894af675d34" -dependencies = [ - "adler", -] - [[package]] name = "miniz_oxide" version = "0.6.2" @@ -2177,9 +2189,9 @@ dependencies = [ [[package]] name = "nom" -version = "7.1.1" +version = "7.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8903e5a29a317527874d0402f867152a3d21c908bb0b933e416c65e301d4c36" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" dependencies = [ "memchr", "minimal-lexical", @@ -2218,11 +2230,11 @@ dependencies = [ [[package]] name = "num_cpus" -version = "1.14.0" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6058e64324c71e02bc2b150e4f3bc8286db6c83092132ffa3f6b1eab0f9def5" +checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" dependencies = [ - "hermit-abi", + "hermit-abi 0.2.6", "libc", ] @@ -2246,18 +2258,9 @@ dependencies = [ [[package]] name = "object" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21158b2c33aa6d4561f1c0a6ea283ca92bc54802a93b263e910746d679a7eb53" -dependencies = [ - "memchr", -] - -[[package]] -name = "object" -version = "0.30.0" +version = "0.30.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "239da7f290cfa979f43f85a8efeee9a8a76d0827c356d37f9d3d7254d6b537fb" +checksum = "ea86265d3d3dcb6a27fc51bd29a4bf387fae9d2986b823079d4986af253eb439" dependencies = [ "flate2", "memchr", @@ -2265,9 +2268,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.16.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860" +checksum = "6f61fba1741ea2b3d6a1e3178721804bb716a68a6aeba1149b5d52e3d464ea66" [[package]] name = "oorandom" @@ -2319,9 +2322,9 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" +checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" dependencies = [ "cfg-if 1.0.0", "instant", @@ -2333,9 +2336,9 @@ dependencies = [ [[package]] name = "paste" -version = "1.0.9" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1de2e551fb905ac83f73f7aedf2f0cb4a0da7e35efa24a202a936269f1f18e1" +checksum = "d01a5bd0424d00070b0098dd17ebca6f961a959dead1dbcbbbc1d1cd8d3deeba" [[package]] name = "path-clean" @@ -2366,9 +2369,9 @@ checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" [[package]] name = "pest" -version = "2.5.1" +version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc8bed3549e0f9b0a2a78bf7c0018237a2cdf085eecbbc048e52612438e4e9d0" +checksum = "4257b4a04d91f7e9e6290be5d3da4804dd5784fafde3a497d73eb2b4a158c30a" dependencies = [ "thiserror", "ucd-trie", @@ -2422,9 +2425,9 @@ dependencies = [ [[package]] name = "portable-atomic" -version = "0.3.16" +version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac662b3a6490de378b0ee15cf2dfff7127aebfe0b19acc65e7fbca3d299c3788" +checksum = "26f6a7b87c2e435a3241addceeeff740ff8b7e76b74c13bf9acb17fa454ea00b" [[package]] name = "ppv-lite86" @@ -2434,9 +2437,9 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "predicates" -version = "2.1.4" +version = "2.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f54fc5dc63ed3bbf19494623db4f3af16842c0d975818e469022d09e53f0aa05" +checksum = "59230a63c37f3e18569bdb90e4a89cbf5bf8b06fea0b84e65ea10cc4df47addd" dependencies = [ "difflib", "float-cmp", @@ -2514,15 +2517,15 @@ dependencies = [ [[package]] name = "proc-macro-hack" -version = "0.5.19" +version = "0.5.20+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" +checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" [[package]] name = "proc-macro2" -version = "1.0.47" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" +checksum = "6ef7d57beacfaf2d8aee5937dab7b7f28de3cb8b1828479bb5de2a7106f2bae2" dependencies = [ "unicode-ident", ] @@ -2584,9 +2587,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.21" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" +checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" dependencies = [ "proc-macro2", ] @@ -2680,9 +2683,9 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.10.1" +version = "1.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cac410af5d00ab6884528b4ab69d1e8e146e8d471201800fa1b4524126de6ad3" +checksum = "356a0625f1954f730c0201cdab48611198dc6ce21f4acff55089b5a78e6e835b" dependencies = [ "crossbeam-channel", "crossbeam-deque", @@ -2745,9 +2748,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.7.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e076559ef8e241f2ae3479e36f97bd5741c0330689e217ad51ce2c76808b868a" +checksum = "48aaa5748ba571fb95cd2c85c09f629215d3a6ece942baa100950af03a34f733" dependencies = [ "aho-corasick", "memchr", @@ -2801,11 +2804,11 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.11.13" +version = "0.11.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68cc60575865c7831548863cc02356512e3f1dc2f3f82cb837d7fc4cc8f3c97c" +checksum = "21eed90ec8570952d53b772ecf8f206aa1ec9a3d76b2521c56c42973f2d91ee9" dependencies = [ - "base64", + "base64 0.21.0", "bytes", "encoding_rs", "futures-core", @@ -2823,7 +2826,7 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls 0.20.7", + "rustls 0.20.8", "rustls-pemfile", "serde", "serde_json", @@ -2835,6 +2838,7 @@ dependencies = [ "url", "wasm-bindgen", "wasm-bindgen-futures", + "wasm-streams", "web-sys", "webpki-roots 0.22.6", "winreg", @@ -2946,7 +2950,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.14", + "semver 1.0.16", ] [[package]] @@ -2967,7 +2971,7 @@ version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" dependencies = [ - "base64", + "base64 0.13.1", "log", "ring", "sct 0.6.1", @@ -2976,9 +2980,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.20.7" +version = "0.20.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "539a2bfe908f471bfa933876bd1eb6a19cf2176d375f82ef7f99530a40e48c2c" +checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" dependencies = [ "log", "ring", @@ -2988,24 +2992,24 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0864aeff53f8c05aa08d86e5ef839d3dfcf07aeba2db32f12db0ef716e87bd55" +checksum = "d194b56d58803a43635bdc398cd17e383d6f71f9182b9a192c127ca42494a59b" dependencies = [ - "base64", + "base64 0.21.0", ] [[package]] name = "rustversion" -version = "1.0.9" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97477e48b4cf8603ad5f7aaf897467cf42ab4218a38ef76fb14c2d6773a6d6a8" +checksum = "5583e89e108996506031660fe09baa5011b9dd0341b89029313006d1fb508d70" [[package]] name = "ryu" -version = "1.0.11" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" +checksum = "7b4b9743ed687d4b4bcedf9ff5eaa7398495ae14e61cba0a295704edbc7decde" [[package]] name = "salsa20" @@ -3039,9 +3043,9 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "scratch" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8132065adcfd6e02db789d9285a0deb2f3fcb04002865ab67d5fb103533898" +checksum = "ddccb15bcce173023b3fedd9436f882a0739b8dfb45e4f6b6002bee5929f61b2" [[package]] name = "scrypt" @@ -3126,9 +3130,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.14" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e25dfac463d778e353db5be2449d1cce89bd6fd23c9f1ea21310ce6e5a1b29c4" +checksum = "58bc9567378fc7690d6b2addae4e60ac2eeea07becb2c64b9f218b53865cba2a" dependencies = [ "serde", ] @@ -3150,9 +3154,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.150" +version = "1.0.152" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e326c9ec8042f1b5da33252c8a37e9ffbd2c9bef0155215b6e6c80c790e05f91" +checksum = "bb7d1f0d3021d347a83e556fc4683dea2ea09d87bccdf88ff5c12545d89d5efb" dependencies = [ "serde_derive", ] @@ -3170,9 +3174,9 @@ dependencies = [ [[package]] name = "serde_bytes" -version = "0.11.7" +version = "0.11.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfc50e8183eeeb6178dcb167ae34a8051d63535023ae38b5d8d12beae193d37b" +checksum = "718dc5fff5b36f99093fc49b280cfc96ce6fc824317783bff5a1fed0c7a64819" dependencies = [ "serde", ] @@ -3189,9 +3193,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.150" +version = "1.0.152" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42a3df25b0713732468deadad63ab9da1f1fd75a48a15024b50363f128db627e" +checksum = "af487d118eecd09402d70a5d72551860e788df87b464af30e5ea6a38c75c541e" dependencies = [ "proc-macro2", "quote", @@ -3200,11 +3204,11 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.89" +version = "1.0.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "020ff22c755c2ed3f8cf162dbb41a7268d934702f3ed3631656ea597e08fc3db" +checksum = "877c235533714907a8c2464236f5c4b2a17262ef1bd71f38f35ea592c8da6883" dependencies = [ - "itoa 1.0.4", + "itoa 1.0.5", "ryu", "serde", ] @@ -3216,19 +3220,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ "form_urlencoded", - "itoa 1.0.4", + "itoa 1.0.5", "ryu", "serde", ] [[package]] name = "serde_yaml" -version = "0.9.14" +version = "0.9.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d232d893b10de3eb7258ff01974d6ee20663d8e833263c99409d4b13a0209da" +checksum = "8fb06d4b6cdaef0e0c51fa881acb721bed3c924cfaa71d9c94a3b771dfdf6567" dependencies = [ "indexmap", - "itoa 1.0.4", + "itoa 1.0.5", "ryu", "serde", "unsafe-libyaml", @@ -3291,6 +3295,12 @@ dependencies = [ "lazy_static", ] +[[package]] +name = "shell-words" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" + [[package]] name = "slab" version = "0.4.7" @@ -3446,9 +3456,9 @@ checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "syn" -version = "1.0.105" +version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60b9b43d45702de4c839cb9b51d9f529c5dd26a4aff255b42b1ebc03e88ee908" +checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5" dependencies = [ "proc-macro2", "quote", @@ -3515,23 +3525,13 @@ dependencies = [ [[package]] name = "termcolor" -version = "1.1.3" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" +checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" dependencies = [ "winapi-util", ] -[[package]] -name = "terminal_size" -version = "0.1.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "633c1a546cee861a1a6d0dc69ebeca693bf4296661ba7852b9d21d159e0506df" -dependencies = [ - "libc", - "winapi", -] - [[package]] name = "termtree" version = "0.4.0" @@ -3587,18 +3587,18 @@ checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" [[package]] name = "thiserror" -version = "1.0.37" +version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10deb33631e3c9018b9baf9dcbbc4f737320d2b576bac10f6aefa048fa407e3e" +checksum = "6a9cd18aa97d5c45c6603caea1da6628790b37f7a34b6ca89522331c5180fed0" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.37" +version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb" +checksum = "1fb327af4685e4d03fa8cbcf1716380da910eeb2bb8be417e7f9fd3fb164f36f" dependencies = [ "proc-macro2", "quote", @@ -3635,7 +3635,7 @@ version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a561bf4617eebd33bca6434b988f39ed798e527f51a1e797d0ee4f61c0a38376" dependencies = [ - "itoa 1.0.4", + "itoa 1.0.5", "serde", "time-core", "time-macros 0.2.6", @@ -3720,9 +3720,9 @@ dependencies = [ [[package]] name = "tokio" -version = "1.23.0" +version = "1.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eab6d665857cc6ca78d6e80303a02cea7a7851e85dfbd77cbdc09bd129f1ef46" +checksum = "597a12a59981d9e3c38d216785b0c37399f6e415e8d0712047620f189371b0bb" dependencies = [ "autocfg", "bytes", @@ -3741,7 +3741,7 @@ version = "0.23.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" dependencies = [ - "rustls 0.20.7", + "rustls 0.20.8", "tokio", "webpki 0.22.0", ] @@ -3762,9 +3762,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.5.9" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d82e1a7758622a465f8cee077614c73484dac5b836c02ff6a40d5d1010324d7" +checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" dependencies = [ "serde", ] @@ -3836,15 +3836,15 @@ dependencies = [ [[package]] name = "try-lock" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" +checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" [[package]] name = "trybuild" -version = "1.0.72" +version = "1.0.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db29f438342820400f2d9acfec0d363e987a38b2950bdb50a7069ed17b2148ee" +checksum = "6ed2c57956f91546d4d33614265a85d55c8e1ab91484853a10335894786d7db6" dependencies = [ "glob", "once_cell", @@ -3902,15 +3902,15 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.8" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" +checksum = "d54675592c1dbefd78cbd98db9bacd89886e1ca50692a0692baefffdeb92dd58" [[package]] name = "unicode-ident" -version = "1.0.5" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3" +checksum = "84a22b9f218b40614adcb3f4ff08b703773ad44fa9423e4e0d346d5db86e4ebc" [[package]] name = "unicode-normalization" @@ -3956,9 +3956,9 @@ dependencies = [ [[package]] name = "unsafe-libyaml" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1e5fa573d8ac5f1a856f8d7be41d390ee973daf97c806b2c1a465e4e1406e68" +checksum = "bc7ed8ba44ca06be78ea1ad2c3682a43349126c8818054231ee6f4748012aed2" [[package]] name = "untrusted" @@ -4040,7 +4040,7 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasi-test-generator" -version = "3.1.0" +version = "3.2.0-alpha.1" dependencies = [ "glob", "gumdrop", @@ -4174,9 +4174,9 @@ dependencies = [ [[package]] name = "wasm-encoder" -version = "0.20.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05632e0a66a6ed8cca593c24223aabd6262f256c3693ad9822c315285f010614" +checksum = "ef126be0e14bdf355ac1a8b41afc89195289e5c7179f80118e3abddb472f0810" dependencies = [ "leb128", ] @@ -4193,9 +4193,22 @@ dependencies = [ "wasm-encoder 0.4.1", ] +[[package]] +name = "wasm-streams" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bbae3363c08332cadccd13b67db371814cd214c2524020932f0804b8cf7c078" +dependencies = [ + "futures-util", + "js-sys", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + [[package]] name = "wasmer" -version = "3.1.0" +version = "3.2.0-alpha.1" dependencies = [ "anyhow", "bytes", @@ -4245,7 +4258,7 @@ dependencies = [ [[package]] name = "wasmer-c-api" -version = "3.1.0" +version = "3.2.0-alpha.1" dependencies = [ "cbindgen", "cfg-if 1.0.0", @@ -4273,7 +4286,7 @@ dependencies = [ [[package]] name = "wasmer-c-api-test-runner" -version = "3.1.0" +version = "3.2.0-alpha.1" dependencies = [ "cc", "regex", @@ -4283,7 +4296,7 @@ dependencies = [ [[package]] name = "wasmer-cache" -version = "3.1.0" +version = "3.2.0-alpha.1" dependencies = [ "blake3", "criterion", @@ -4297,7 +4310,7 @@ dependencies = [ [[package]] name = "wasmer-capi-examples-runner" -version = "3.1.0" +version = "3.2.0-alpha.1" dependencies = [ "cc", "regex", @@ -4307,7 +4320,7 @@ dependencies = [ [[package]] name = "wasmer-cli" -version = "3.1.0" +version = "3.2.0-alpha.1" dependencies = [ "anyhow", "atty", @@ -4330,14 +4343,14 @@ dependencies = [ "log", "minisign", "nuke-dir", - "object 0.30.0", + "object 0.30.3", "pathdiff", "prettytable-rs", "regex", "reqwest", "rpassword", "rusqlite", - "semver 1.0.14", + "semver 1.0.16", "serde", "serde_json", "sha2", @@ -4376,7 +4389,7 @@ dependencies = [ [[package]] name = "wasmer-compiler" -version = "3.1.0" +version = "3.2.0-alpha.1" dependencies = [ "backtrace", "cfg-if 1.0.0", @@ -4402,7 +4415,7 @@ dependencies = [ [[package]] name = "wasmer-compiler-cli" -version = "3.1.0" +version = "3.2.0-alpha.1" dependencies = [ "anyhow", "atty", @@ -4424,12 +4437,12 @@ dependencies = [ [[package]] name = "wasmer-compiler-cranelift" -version = "3.1.0" +version = "3.2.0-alpha.1" dependencies = [ "cranelift-codegen", "cranelift-entity", "cranelift-frontend", - "gimli", + "gimli 0.26.2", "hashbrown 0.11.2", "lazy_static", "more-asserts", @@ -4443,7 +4456,7 @@ dependencies = [ [[package]] name = "wasmer-compiler-llvm" -version = "3.1.0" +version = "3.2.0-alpha.1" dependencies = [ "byteorder", "cc", @@ -4455,7 +4468,7 @@ dependencies = [ "rayon", "regex", "rustc_version 0.4.0", - "semver 1.0.14", + "semver 1.0.16", "smallvec", "target-lexicon 0.12.5", "wasmer-compiler", @@ -4465,13 +4478,13 @@ dependencies = [ [[package]] name = "wasmer-compiler-singlepass" -version = "3.1.0" +version = "3.2.0-alpha.1" dependencies = [ "byteorder", "dynasm", "dynasmrt", "enumset", - "gimli", + "gimli 0.26.2", "hashbrown 0.11.2", "lazy_static", "more-asserts", @@ -4484,7 +4497,7 @@ dependencies = [ [[package]] name = "wasmer-derive" -version = "3.1.0" +version = "3.2.0-alpha.1" dependencies = [ "compiletest_rs", "proc-macro-error", @@ -4496,7 +4509,7 @@ dependencies = [ [[package]] name = "wasmer-emscripten" -version = "3.1.0" +version = "3.2.0-alpha.1" dependencies = [ "byteorder", "getrandom", @@ -4538,11 +4551,11 @@ dependencies = [ [[package]] name = "wasmer-integration-tests-cli" -version = "3.1.0" +version = "3.2.0-alpha.1" dependencies = [ "anyhow", "flate2", - "object 0.30.0", + "object 0.30.3", "pretty_assertions", "rand 0.8.5", "tar", @@ -4552,11 +4565,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", @@ -4565,7 +4578,7 @@ dependencies = [ [[package]] name = "wasmer-object" -version = "3.1.0" +version = "3.2.0-alpha.1" dependencies = [ "object 0.28.4", "thiserror", @@ -4592,7 +4605,7 @@ dependencies = [ "rand 0.8.5", "regex", "reqwest", - "semver 1.0.14", + "semver 1.0.16", "serde", "serde_json", "tar", @@ -4615,7 +4628,7 @@ checksum = "4232db0aff83ed6208d541ddcf1bf72730673528be8c4fe13c6369060f6e05a7" dependencies = [ "anyhow", "indexmap", - "semver 1.0.14", + "semver 1.0.16", "serde", "serde_cbor", "serde_json", @@ -4626,7 +4639,7 @@ dependencies = [ [[package]] name = "wasmer-types" -version = "3.1.0" +version = "3.2.0-alpha.1" dependencies = [ "enum-iterator", "enumset", @@ -4642,7 +4655,7 @@ dependencies = [ [[package]] name = "wasmer-vbus" -version = "3.1.0" +version = "3.2.0-alpha.1" dependencies = [ "thiserror", "wasmer-vfs", @@ -4650,7 +4663,7 @@ dependencies = [ [[package]] name = "wasmer-vfs" -version = "3.1.0" +version = "3.2.0-alpha.1" dependencies = [ "anyhow", "libc", @@ -4664,7 +4677,7 @@ dependencies = [ [[package]] name = "wasmer-vm" -version = "3.1.0" +version = "3.2.0-alpha.1" dependencies = [ "backtrace", "cc", @@ -4689,7 +4702,7 @@ dependencies = [ [[package]] name = "wasmer-vnet" -version = "3.1.0" +version = "3.2.0-alpha.1" dependencies = [ "bytes", "thiserror", @@ -4698,7 +4711,7 @@ dependencies = [ [[package]] name = "wasmer-wasi" -version = "3.1.0" +version = "3.2.0-alpha.1" dependencies = [ "anyhow", "bincode", @@ -4730,7 +4743,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", @@ -4743,7 +4756,7 @@ dependencies = [ [[package]] name = "wasmer-wasi-local-networking" -version = "3.1.0" +version = "3.2.0-alpha.1" dependencies = [ "bytes", "tracing", @@ -4753,7 +4766,7 @@ dependencies = [ [[package]] name = "wasmer-wasi-types" -version = "3.1.0" +version = "3.2.0-alpha.1" dependencies = [ "byteorder", "pretty_assertions", @@ -4770,7 +4783,7 @@ dependencies = [ [[package]] name = "wasmer-wasm-interface" -version = "3.1.0" +version = "3.2.0-alpha.1" dependencies = [ "bincode", "either", @@ -4782,7 +4795,7 @@ dependencies = [ [[package]] name = "wasmer-wast" -version = "3.1.0" +version = "3.2.0-alpha.1" dependencies = [ "anyhow", "serde", @@ -4863,7 +4876,7 @@ dependencies = [ [[package]] name = "wasmer-workspace" -version = "3.1.0" +version = "3.2.0-alpha.1" dependencies = [ "anyhow", "build-deps", @@ -4907,9 +4920,9 @@ checksum = "718ed7c55c2add6548cca3ddd6383d738cd73b892df400e96b9aa876f0141d7a" [[package]] name = "wasmparser" -version = "0.95.0" +version = "0.98.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2ea896273ea99b15132414be1da01ab0d8836415083298ecaffbe308eaac87a" +checksum = "8724c724dc595495979c055f4bd8b7ed9fab1069623178a28016ae43a9666f36" dependencies = [ "indexmap", "url", @@ -4917,12 +4930,12 @@ dependencies = [ [[package]] name = "wasmprinter" -version = "0.2.44" +version = "0.2.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae24500f9cc27a4b2b338e66693ff53c08b17cf920bdc81e402a09fe7a204eea" +checksum = "322949f382cd5e4bad4330e144bf2124b3182846194ac01e2423c07a6a15ba85" dependencies = [ "anyhow", - "wasmparser 0.95.0", + "wasmparser 0.98.1", ] [[package]] @@ -4945,23 +4958,23 @@ dependencies = [ [[package]] name = "wast" -version = "50.0.0" +version = "52.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2cbb59d4ac799842791fe7e806fa5dbbf6b5554d538e51cc8e176db6ff0ae34" +checksum = "829fb867c8e82d21557a2c6c5b3ed8e8f7cdd534ea782b9ecf68bede5607fe4b" dependencies = [ "leb128", "memchr", "unicode-width", - "wasm-encoder 0.20.0", + "wasm-encoder 0.22.0", ] [[package]] name = "wat" -version = "1.0.52" +version = "1.0.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "584aaf7a1ecf4d383bbe1a25eeab0cbb8ff96acc6796707ff65cde48f4632f15" +checksum = "3493e7c82d8e9a75e69ecbfe6f324ca1c4e2ae89f67ccbb22f92282e2e27bb23" dependencies = [ - "wast 50.0.0", + "wast 52.0.1", ] [[package]] @@ -5049,12 +5062,13 @@ dependencies = [ [[package]] name = "webc" -version = "4.0.0" +version = "4.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b44d4d5ad9ecc7392210891a8a9207c04f6984a594be82075f5e7abe9271fcc" +checksum = "e4af0f2f0b6bf2e4366375c3cd6635aef1a2eb66cd02454d79525aa7eecf0751" dependencies = [ "anyhow", - "base64", + "base64 0.13.1", + "byteorder", "indexmap", "leb128", "lexical-sort", @@ -5110,11 +5124,10 @@ dependencies = [ [[package]] name = "whoami" -version = "1.2.3" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6631b6a2fd59b1841b622e8f1a7ad241ef0a46f2d580464ce8140ac94cbd571" +checksum = "45dbc71f0cdca27dc261a9bd37ddec174e4a0af2b900b890f378460f745426e3" dependencies = [ - "bumpalo", "wasm-bindgen", "web-sys", ] @@ -5170,19 +5183,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" dependencies = [ "windows_aarch64_gnullvm", - "windows_aarch64_msvc 0.42.0", - "windows_i686_gnu 0.42.0", - "windows_i686_msvc 0.42.0", - "windows_x86_64_gnu 0.42.0", + "windows_aarch64_msvc 0.42.1", + "windows_i686_gnu 0.42.1", + "windows_i686_msvc 0.42.1", + "windows_x86_64_gnu 0.42.1", "windows_x86_64_gnullvm", - "windows_x86_64_msvc 0.42.0", + "windows_x86_64_msvc 0.42.1", ] [[package]] name = "windows_aarch64_gnullvm" -version = "0.42.0" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41d2aa71f6f0cbe00ae5167d90ef3cfe66527d6f613ca78ac8024c3ccab9a19e" +checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608" [[package]] name = "windows_aarch64_msvc" @@ -5192,9 +5205,9 @@ checksum = "cd761fd3eb9ab8cc1ed81e56e567f02dd82c4c837e48ac3b2181b9ffc5060807" [[package]] name = "windows_aarch64_msvc" -version = "0.42.0" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd0f252f5a35cac83d6311b2e795981f5ee6e67eb1f9a7f64eb4500fbc4dcdb4" +checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7" [[package]] name = "windows_i686_gnu" @@ -5204,9 +5217,9 @@ checksum = "cab0cf703a96bab2dc0c02c0fa748491294bf9b7feb27e1f4f96340f208ada0e" [[package]] name = "windows_i686_gnu" -version = "0.42.0" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbeae19f6716841636c28d695375df17562ca208b2b7d0dc47635a50ae6c5de7" +checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640" [[package]] name = "windows_i686_msvc" @@ -5216,9 +5229,9 @@ checksum = "8cfdbe89cc9ad7ce618ba34abc34bbb6c36d99e96cae2245b7943cd75ee773d0" [[package]] name = "windows_i686_msvc" -version = "0.42.0" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84c12f65daa39dd2babe6e442988fc329d6243fdce47d7d2d155b8d874862246" +checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605" [[package]] name = "windows_x86_64_gnu" @@ -5228,15 +5241,15 @@ checksum = "b4dd9b0c0e9ece7bb22e84d70d01b71c6d6248b81a3c60d11869451b4cb24784" [[package]] name = "windows_x86_64_gnu" -version = "0.42.0" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf7b1b21b5362cbc318f686150e5bcea75ecedc74dd157d874d754a2ca44b0ed" +checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45" [[package]] name = "windows_x86_64_gnullvm" -version = "0.42.0" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09d525d2ba30eeb3297665bd434a54297e4170c7f1a44cad4ef58095b4cd2028" +checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463" [[package]] name = "windows_x86_64_msvc" @@ -5246,9 +5259,9 @@ checksum = "ff1e4aa646495048ec7f3ffddc411e1d829c026a2ec62b39da15c1055e406eaa" [[package]] name = "windows_x86_64_msvc" -version = "0.42.0" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5" +checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" [[package]] name = "winreg" @@ -5261,12 +5274,12 @@ dependencies = [ [[package]] name = "x11-dl" -version = "2.20.1" +version = "2.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1536d6965a5d4e573c7ef73a2c15ebcd0b2de3347bdf526c34c297c00ac40f0" +checksum = "38735924fedd5314a6e548792904ed8c6de6636285cb9fec04d5b1db85c1516f" dependencies = [ - "lazy_static", "libc", + "once_cell", "pkg-config", ] @@ -5285,7 +5298,7 @@ version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "463705a63313cd4301184381c5e8042f0a7e9b4bb63653f216311d4ae74690b7" dependencies = [ - "nom 7.1.1", + "nom 7.1.3", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 25dbdf20a83..0b693d68e89 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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 "] 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] @@ -69,7 +69,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" diff --git a/lib/api/Cargo.toml b/lib/api/Cargo.toml index 7e1939737b9..a08f8d87fb3 100644 --- a/lib/api/Cargo.toml +++ b/lib/api/Cargo.toml @@ -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`. # diff --git a/lib/api/macro-wasmer-universal-test/Cargo.toml b/lib/api/macro-wasmer-universal-test/Cargo.toml index dc8601ced28..0b9c381797c 100644 --- a/lib/api/macro-wasmer-universal-test/Cargo.toml +++ b/lib/api/macro-wasmer-universal-test/Cargo.toml @@ -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" diff --git a/lib/c-api/Cargo.toml b/lib/c-api/Cargo.toml index 6f5190fa317..cf3fa3a9aeb 100644 --- a/lib/c-api/Cargo.toml +++ b/lib/c-api/Cargo.toml @@ -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" diff --git a/lib/c-api/examples/wasmer-capi-examples-runner/Cargo.toml b/lib/c-api/examples/wasmer-capi-examples-runner/Cargo.toml index 7eedc2ee48b..842293f6873 100644 --- a/lib/c-api/examples/wasmer-capi-examples-runner/Cargo.toml +++ b/lib/c-api/examples/wasmer-capi-examples-runner/Cargo.toml @@ -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" diff --git a/lib/c-api/tests/wasmer-c-api-test-runner/Cargo.toml b/lib/c-api/tests/wasmer-c-api-test-runner/Cargo.toml index dad6642e4a7..5299cc18845 100644 --- a/lib/c-api/tests/wasmer-c-api-test-runner/Cargo.toml +++ b/lib/c-api/tests/wasmer-c-api-test-runner/Cargo.toml @@ -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" diff --git a/lib/cache/Cargo.toml b/lib/cache/Cargo.toml index ef8e1d6f3c0..9c40a57712e 100644 --- a/lib/cache/Cargo.toml +++ b/lib/cache/Cargo.toml @@ -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"] diff --git a/lib/cli-compiler/Cargo.toml b/lib/cli-compiler/Cargo.toml index 3a1daf42d9c..49b39bb080e 100644 --- a/lib/cli-compiler/Cargo.toml +++ b/lib/cli-compiler/Cargo.toml @@ -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" diff --git a/lib/cli/Cargo.toml b/lib/cli/Cargo.toml index 49d4fad8aa8..a1c3549dff3 100644 --- a/lib/cli/Cargo.toml +++ b/lib/cli/Cargo.toml @@ -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" diff --git a/lib/compiler-cranelift/Cargo.toml b/lib/compiler-cranelift/Cargo.toml index ca3a4b52230..9e5a3a49207 100644 --- a/lib/compiler-cranelift/Cargo.toml +++ b/lib/compiler-cranelift/Cargo.toml @@ -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 } diff --git a/lib/compiler-llvm/Cargo.toml b/lib/compiler-llvm/Cargo.toml index 1f0330c0ff8..c7e36216ea4 100644 --- a/lib/compiler-llvm/Cargo.toml +++ b/lib/compiler-llvm/Cargo.toml @@ -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"] } diff --git a/lib/compiler-singlepass/Cargo.toml b/lib/compiler-singlepass/Cargo.toml index 7f146863f3b..936813b0fde 100644 --- a/lib/compiler-singlepass/Cargo.toml +++ b/lib/compiler-singlepass/Cargo.toml @@ -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" diff --git a/lib/compiler/Cargo.toml b/lib/compiler/Cargo.toml index a528eaa75ca..9dd4601a32b 100644 --- a/lib/compiler/Cargo.toml +++ b/lib/compiler/Cargo.toml @@ -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] diff --git a/lib/derive/Cargo.toml b/lib/derive/Cargo.toml index 154dbd31076..9a0db978163 100644 --- a/lib/derive/Cargo.toml +++ b/lib/derive/Cargo.toml @@ -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 "] repository = "https://github.com/wasmerio/wasmer" diff --git a/lib/emscripten/Cargo.toml b/lib/emscripten/Cargo.toml index 08e9994cb2b..7c971ed0f2c 100644 --- a/lib/emscripten/Cargo.toml +++ b/lib/emscripten/Cargo.toml @@ -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" diff --git a/lib/middlewares/Cargo.toml b/lib/middlewares/Cargo.toml index 727447f8eb2..3d3278c2c3a 100644 --- a/lib/middlewares/Cargo.toml +++ b/lib/middlewares/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmer-middlewares" -version = "3.1.0" +version = "3.2.0-alpha.1" authors = ["Wasmer Engineering Team "] description = "A collection of various useful middlewares" license = "MIT OR Apache-2.0 WITH LLVM-exception" @@ -11,12 +11,12 @@ readme = "README.md" edition = "2018" [dependencies] -wasmer = { path = "../api", version = "=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" } diff --git a/lib/object/Cargo.toml b/lib/object/Cargo.toml index 74a5a2b589f..f325ab9a85e 100644 --- a/lib/object/Cargo.toml +++ b/lib/object/Cargo.toml @@ -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" diff --git a/lib/types/Cargo.toml b/lib/types/Cargo.toml index 74a64c6b6d5..089e23cbafc 100644 --- a/lib/types/Cargo.toml +++ b/lib/types/Cargo.toml @@ -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"] diff --git a/lib/vbus/Cargo.toml b/lib/vbus/Cargo.toml index cf19f13a55c..2f53fe5de69 100644 --- a/lib/vbus/Cargo.toml +++ b/lib/vbus/Cargo.toml @@ -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 "] 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 } [features] default = ["mem_fs"] diff --git a/lib/vfs/Cargo.toml b/lib/vfs/Cargo.toml index 25ce6cc62fe..7b86d39a237 100644 --- a/lib/vfs/Cargo.toml +++ b/lib/vfs/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmer-vfs" -version = "3.1.0" +version = "3.2.0-alpha.1" description = "Wasmer Virtual FileSystem" authors = ["Wasmer Engineering Team "] license = "MIT" diff --git a/lib/vm/Cargo.toml b/lib/vm/Cargo.toml index 7a03b76cb2b..eb2aaaab5e8 100644 --- a/lib/vm/Cargo.toml +++ b/lib/vm/Cargo.toml @@ -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" } diff --git a/lib/vnet/Cargo.toml b/lib/vnet/Cargo.toml index d4d54db717a..94f140709b9 100644 --- a/lib/vnet/Cargo.toml +++ b/lib/vnet/Cargo.toml @@ -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 "] 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" [features] diff --git a/lib/wasi-experimental-io-devices/Cargo.toml b/lib/wasi-experimental-io-devices/Cargo.toml index 2d867fe0f22..b924ae2288c 100644 --- a/lib/wasi-experimental-io-devices/Cargo.toml +++ b/lib/wasi-experimental-io-devices/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmer-wasi-experimental-io-devices" -version = "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" diff --git a/lib/wasi-local-networking/Cargo.toml b/lib/wasi-local-networking/Cargo.toml index d3024d54cfb..127ac18f92d 100644 --- a/lib/wasi-local-networking/Cargo.toml +++ b/lib/wasi-local-networking/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmer-wasi-local-networking" -version = "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" diff --git a/lib/wasi-types/Cargo.toml b/lib/wasi-types/Cargo.toml index 59a8d2b0356..b13888545e8 100644 --- a/lib/wasi-types/Cargo.toml +++ b/lib/wasi-types/Cargo.toml @@ -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"] @@ -17,9 +17,9 @@ wit-bindgen-rust = { package = "wasmer-wit-bindgen-rust", version = "0.1.1" } wit-bindgen-rust-wasm = { package = "wasmer-wit-bindgen-gen-rust-wasm", version = "0.1.1" } wit-bindgen-core = { package = "wasmer-wit-bindgen-gen-core", version = "0.1.1" } wit-parser = { package = "wasmer-wit-parser", version = "0.1.1" } -wasmer-types = { path = "../types", version = "=3.1.0" } -wasmer-derive = { path = "../derive", version = "=3.1.0" } -wasmer = { path = "../api", version = "=3.1.0", default-features=false } +wasmer-types = { path = "../types", version = "=3.2.0-alpha.1" } +wasmer-derive = { path = "../derive", version = "=3.2.0-alpha.1" } +wasmer = { path = "../api", version = "=3.2.0-alpha.1", default-features=false } serde = { version = "1.0", features = ["derive"], optional = true } byteorder = "1.3" time = "0.2" diff --git a/lib/wasi/Cargo.toml b/lib/wasi/Cargo.toml index 9c0f44e65cf..2d6c8fa6cc2 100644 --- a/lib/wasi/Cargo.toml +++ b/lib/wasi/Cargo.toml @@ -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,12 +16,12 @@ thiserror = "1" generational-arena = { version = "0.2" } tracing = "0.1" getrandom = "0.2" -wasmer-wasi-types = { path = "../wasi-types", version = "=3.1.0" } -wasmer = { path = "../api", version = "=3.1.0", default-features = false } -wasmer-vfs = { path = "../vfs", version = "=3.1.0", default-features = false } -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-wasi-types = { path = "../wasi-types", version = "=3.2.0-alpha.1" } +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-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 } typetag = { version = "0.1", optional = true } serde = { version = "1.0", default-features = false, features = ["derive"], optional = true } bincode = { version = "1.3", optional = true } @@ -31,7 +31,7 @@ bytes = "1" webc = { version = "4.0.0", optional = true, default-features = false, features = ["std", "mmap"] } serde_cbor = { version = "0.11.2", optional = true } anyhow = { version = "1.0.66", optional = true } -wasmer-emscripten = { path = "../emscripten", version = "=3.1.0", optional = true } +wasmer-emscripten = { path = "../emscripten", version = "=3.2.0-alpha.1", optional = true } [target.'cfg(unix)'.dependencies] libc = { version = "^0.2", default-features = false } diff --git a/lib/wasm-interface/Cargo.toml b/lib/wasm-interface/Cargo.toml index 0c780394c0d..d88956e2bd9 100644 --- a/lib/wasm-interface/Cargo.toml +++ b/lib/wasm-interface/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmer-wasm-interface" -version = "3.1.0" +version = "3.2.0-alpha.1" authors = ["The Wasmer Engineering Team "] edition = "2018" repository = "https://github.com/wasmerio/wapm-cli" diff --git a/scripts/update-version.py b/scripts/update-version.py index 73d2961b601..691f94c303a 100644 --- a/scripts/update-version.py +++ b/scripts/update-version.py @@ -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 diff --git a/scripts/windows-installer/wasmer.iss b/scripts/windows-installer/wasmer.iss index 5330188e236..c989dcd0afb 100644 --- a/scripts/windows-installer/wasmer.iss +++ b/scripts/windows-installer/wasmer.iss @@ -1,6 +1,6 @@ [Setup] AppName=Wasmer -AppVersion=3.1.0 +AppVersion=3.2.0-alpha.1 DefaultDirName={pf}\Wasmer DefaultGroupName=Wasmer Compression=lzma2 diff --git a/tests/integration/cli/Cargo.toml b/tests/integration/cli/Cargo.toml index 85a9550eaee..6fd3da57da5 100644 --- a/tests/integration/cli/Cargo.toml +++ b/tests/integration/cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmer-integration-tests-cli" -version = "3.1.0" +version = "3.2.0-alpha.1" authors = ["Wasmer Engineering Team "] description = "CLI integration tests" repository = "https://github.com/wasmerio/wasmer" diff --git a/tests/integration/ios/Cargo.toml b/tests/integration/ios/Cargo.toml index 2debdee51a6..8381ed24396 100644 --- a/tests/integration/ios/Cargo.toml +++ b/tests/integration/ios/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmer-integration-tests-ios" -version = "3.1.0" +version = "3.2.0-alpha.1" authors = ["Wasmer Engineering Team "] description = "iOS integration tests" repository = "https://github.com/wasmerio/wasmer" diff --git a/tests/lib/wast/Cargo.toml b/tests/lib/wast/Cargo.toml index 4d9507ae097..6bea0b70753 100644 --- a/tests/lib/wast/Cargo.toml +++ b/tests/lib/wast/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmer-wast" -version = "3.1.0" +version = "3.2.0-alpha.1" authors = ["Wasmer Engineering Team "] description = "wast testing support for wasmer" license = "MIT OR Apache-2.0 WITH LLVM-exception" @@ -12,9 +12,9 @@ edition = "2018" [dependencies] anyhow = "1.0" -wasmer = { path = "../../../lib/api", version = "=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" diff --git a/tests/wasi-wast/Cargo.toml b/tests/wasi-wast/Cargo.toml index dab510eab4a..c754a520f94 100644 --- a/tests/wasi-wast/Cargo.toml +++ b/tests/wasi-wast/Cargo.toml @@ -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 "] From 52db3183df18a91db15955f6f5df4703ef79694e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=BCtt?= Date: Mon, 23 Jan 2023 12:54:05 +0100 Subject: [PATCH 52/55] Fix line endings in CHANGELOG --- CHANGELOG.md | 2262 +++++++++++++++++++++++++------------------------- 1 file changed, 1131 insertions(+), 1131 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9da4f118d81..cb9c485b35e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,1131 +1,1131 @@ -# Changelog - -*The format is based on [Keep a Changelog].* - -[Keep a Changelog]: http://keepachangelog.com/en/1.0.0/ - -Looking for changes that affect our C API? See the [C API Changelog](lib/c-api/CHANGELOG.md). - - -## **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 - -## 3.1.0 - 12/12/2022 - -## Added - - - [#3403](https://github.com/wasmerio/wasmer/pull/3403) Add wasm_importtype_copy to C API - -## Changed - - - [#3416](https://github.com/wasmerio/wasmer/pull/3416) Download and install packages via .tar.gz URLs and improve installation error message - - [#3402](https://github.com/wasmerio/wasmer/pull/3402) Do not run first command of wapm file and print all commands instead - - [#3400](https://github.com/wasmerio/wasmer/pull/3400) Use the wasm_bindgen_downcast crate for downcasting JsValues - - [#3363](https://github.com/wasmerio/wasmer/pull/3363) Store Used CpuFeature in Artifact instead of Present CpuFeatures for Singlepass - - [#3378](https://github.com/wasmerio/wasmer/pull/3378) Introduced EngineRef and AsEngineRef trait - - [#3386](https://github.com/wasmerio/wasmer/pull/3386) Restore Support For All Wasi Clock Types - - [#3153](https://github.com/wasmerio/wasmer/pull/3153) SharedMemory & Atomics - -## Fixed - - - [#3415](https://github.com/wasmerio/wasmer/pull/3415) Fix singlepass for Aarch64 - - [#3395](https://github.com/wasmerio/wasmer/pull/3395) Fix create-exe to be able to cross-compile on Windows - - [#3396](https://github.com/wasmerio/wasmer/pull/3396) Fix build doc and minimum-sys build - -## 3.0.2 - 25/11/2022 - -## Added - - - [#3364](https://github.com/wasmerio/wasmer/pull/3364) Added the actual LZCNT / TZCNT implementation - -## Changed - - - [#3365](https://github.com/wasmerio/wasmer/pull/3365) Improve FreeBSD support - - [#3368](https://github.com/wasmerio/wasmer/pull/3368) Remove wasi conditional compilation from wasmer-registry - - [#3367](https://github.com/wasmerio/wasmer/pull/3367) Change LLVM detection in Makefile - -## Fixed - - - [#3370](https://github.com/wasmerio/wasmer/pull/3370) Fix wasmer run not interpreting URLs correctly + display fixes - - [#3371](https://github.com/wasmerio/wasmer/pull/3371) Fix cargo binstall - - -## 3.0.1 - 23/11/2022 - -## Added - - - [#3361](https://github.com/wasmerio/wasmer/pull/3361) Give users feedback when they are running "wasmer add ..." - -## Changed - - - [#3360](https://github.com/wasmerio/wasmer/pull/3360) Introduce a "wasmer_registry::queries" module with all GraphQL queries - - [#3355](https://github.com/wasmerio/wasmer/pull/3355) Fetch the pirita download URL - - [#3344](https://github.com/wasmerio/wasmer/pull/3344) Revert #3145 - - [#3302](https://github.com/wasmerio/wasmer/pull/3302) Some Refactor of Singlepass compiler to have better error and cpu features handling - - [#3296](https://github.com/wasmerio/wasmer/pull/3296) Use the right collection when parsing type section - - [#3292](https://github.com/wasmerio/wasmer/pull/3292) Precompute offsets in VMOffsets - - [#3290](https://github.com/wasmerio/wasmer/pull/3290) Limit the use of clone when handling Compilation object - - [#3316](https://github.com/wasmerio/wasmer/pull/3316) Implement wasmer whoami - - [#3341](https://github.com/wasmerio/wasmer/pull/3341) Update CHANGELOG.md - -## Fixed - - - [#3342](https://github.com/wasmerio/wasmer/pull/3342) Fixes for 3.0.0 release - -## 3.0.0 - 20/11/2022 - -## Added - - - [#3339](https://github.com/wasmerio/wasmer/pull/3339) Fixes for wasmer login / wasmer add - - [#3337](https://github.com/wasmerio/wasmer/pull/3337) Add automation script to automate deploying releases on GitHub - - [#3338](https://github.com/wasmerio/wasmer/pull/3338) Re-add codecov to get coverage reports - -## Changed - - - [#3295](https://github.com/wasmerio/wasmer/pull/3295) Implement wasmer run {url} - -## Fixed - - -## 3.0.0-rc.3 - 2022/11/18 - -## Added - - - [#3314](https://github.com/wasmerio/wasmer/pull/3314) Add windows-gnu workflow - -## Changed - - - [#3317](https://github.com/wasmerio/wasmer/pull/3317) Port "wapm install" to Wasmer - - [#3318](https://github.com/wasmerio/wasmer/pull/3318) Bump the MSRV to 1.63 - - [#3319](https://github.com/wasmerio/wasmer/pull/3319) Disable 'Test integration CLI' on CI for the Windows platform as it's not working at all - - [#3297](https://github.com/wasmerio/wasmer/pull/3297) Implement wasmer login - - [#3311](https://github.com/wasmerio/wasmer/pull/3311) Export Module::IoCompileError as it's an error returned by an exported function - - [#2800](https://github.com/wasmerio/wasmer/pull/2800) RISC-V support - - [#3293](https://github.com/wasmerio/wasmer/pull/3293) Removed call to to_vec() on assembler.finalise() - - [#3288](https://github.com/wasmerio/wasmer/pull/3288) Rollback all the TARGET_DIR changes - - [#3284](https://github.com/wasmerio/wasmer/pull/3284) Makefile now handle TARGET_DIR env. var. for build too - - [#3276](https://github.com/wasmerio/wasmer/pull/3276) Remove unnecessary checks to test internet connection - - [#3266](https://github.com/wasmerio/wasmer/pull/3266) Return ENotCapable error when accessing unknown files on root (for #3263 and #3264) - - [#3275](https://github.com/wasmerio/wasmer/pull/3275) Disable printing "local package ... not found" in release mode - - [#3273](https://github.com/wasmerio/wasmer/pull/3273) Undo Makefile commit - -## Fixed - - - [#3299](https://github.com/wasmerio/wasmer/pull/3299) Fix "create-exe" for windows-x86_64 target - - [#3294](https://github.com/wasmerio/wasmer/pull/3294) Fix test sys yaml syntax - - [#3287](https://github.com/wasmerio/wasmer/pull/3287) Fix Makefile with TARGET_DIR end with release folder, removing it - - [#3286](https://github.com/wasmerio/wasmer/pull/3286) Fix Makefile with TARGET_DIR end with release folder - - [#3285](https://github.com/wasmerio/wasmer/pull/3285) Fix CI to setup TARGET_DIR to target/release directly - - [#3277](https://github.com/wasmerio/wasmer/pull/3277) Fix red CI on master - - -## 3.0.0-rc.2 - 2022/11/02 - -## Added - - -## Changed - - - [#3258](https://github.com/wasmerio/wasmer/pull/3258) Migrate pirita / native executables feature from wasmer-private - -## Fixed - - - [#3268](https://github.com/wasmerio/wasmer/pull/3268) Fix fd_right nightly test to avoid foo.txt file leftover - - [#3260](https://github.com/wasmerio/wasmer/pull/3260) Fix bug in wasmer run - - [#3257](https://github.com/wasmerio/wasmer/pull/3257) Fix linux-aarch64 build - - -## 3.0.0-rc.1 - 2022/10/25 - -## Added - - - [#3222](https://github.com/wasmerio/wasmer/pull/3222) Add function to retrieve function name from wasm_frame_t - - [#3240](https://github.com/wasmerio/wasmer/pull/3240) Fix filesystem rights on WASI, add integration test for file permissions - - [#3238](https://github.com/wasmerio/wasmer/pull/3238) Fixed main README ocaml homepage link and added ocaml in other language README - - [#3145](https://github.com/wasmerio/wasmer/pull/3145) C-API: add functions to overwrite stdin / stdout / stderr handlers - -## Changed - - - [#3215](https://github.com/wasmerio/wasmer/pull/3215) Update wasmer --version logic, integrate wapm-cli - - [#3248](https://github.com/wasmerio/wasmer/pull/3248) Move loupe CHANGELOG entry from 2.3.0 to 3.x - - [#3230](https://github.com/wasmerio/wasmer/pull/3230) Remove test if dest file exist on path_rename wasi syscall (for #3228) - - [#3061](https://github.com/wasmerio/wasmer/pull/3061) Removed trailing zero in WASI::fd_prestat_dir_name name return (for #3025) - - [#3223](https://github.com/wasmerio/wasmer/pull/3223) Delete lib/wasi-types-generated directory - - [#3178](https://github.com/wasmerio/wasmer/pull/3178) Feat enhanced tinytunable test - - [#3177](https://github.com/wasmerio/wasmer/pull/3177) Auto-generate wasi-types from .wit files - - [#3218](https://github.com/wasmerio/wasmer/pull/3218) Seal `HostFunctionKind` - -## Fixed - - - [#3221](https://github.com/wasmerio/wasmer/pull/3221) Fix #3197 - - [#3229](https://github.com/wasmerio/wasmer/pull/3229) Fixed version to nightly-2022-10-09 for the CI build Minimal Wasmer Headless again - - [#3227](https://github.com/wasmerio/wasmer/pull/3227) Fixed version to nightly-2022-10-09 for the CI build Minimal Wasmer Headless - - [#3226](https://github.com/wasmerio/wasmer/pull/3226) Fixed version to nightly-2002-10-09 for the CI build Minimal Wasmer Headless - - [#3211](https://github.com/wasmerio/wasmer/pull/3211) fix popcnt for aarch64 - - [#3204](https://github.com/wasmerio/wasmer/pull/3204) Fixed a typo in README - - -## 3.0.0-beta.2 - 2022/09/26 - -## Added - - - [#3176](https://github.com/wasmerio/wasmer/pull/3176) Add support for `cargo-binstall` - - [#3141](https://github.com/wasmerio/wasmer/pull/3141) The API breaking changes from future WASIX/Network/Threading addition - - [#3119](https://github.com/wasmerio/wasmer/pull/3119) Added LinearMemory trait - - [#3117](https://github.com/wasmerio/wasmer/pull/3117) Add tests for wasmer-cli create-{exe,obj} commands - - [#3101](https://github.com/wasmerio/wasmer/pull/3101) CI/build.yaml: add libwasmer headless in default distribution - - [#3090](https://github.com/wasmerio/wasmer/pull/3090) Added version to the wasmer cli - - [#3089](https://github.com/wasmerio/wasmer/pull/3089) Add wasi_* C-API function changes in migration guide for 3.0.0 - - [#3076](https://github.com/wasmerio/wasmer/pull/3076) Add support for cross-compiling in create-exe with zig cc WIP - - [#3072](https://github.com/wasmerio/wasmer/pull/3072) Add back `Function::*_with_env(…)` - - [#3048](https://github.com/wasmerio/wasmer/pull/3048) Add cloudcompiler.yaml - - [#3068](https://github.com/wasmerio/wasmer/pull/3068) create-{exe,obj}: add documentations and header file generation for create-obj - - [#3065](https://github.com/wasmerio/wasmer/pull/3065) Added '.' and '..' special folder t WASI fd_readdir return (for #3033) - -## Changed - - - [#3184](https://github.com/wasmerio/wasmer/pull/3184) Test libwasmer.dll on Windows - - [#3164](https://github.com/wasmerio/wasmer/pull/3164) Synchronize between -sys and -js tests - - [#3165](https://github.com/wasmerio/wasmer/pull/3165) Initial port of make test-js-core (port wasmer API to core) - - [#3138](https://github.com/wasmerio/wasmer/pull/3138) Js imports revamp - - [#3142](https://github.com/wasmerio/wasmer/pull/3142) Bump rust toolchain - - [#3116](https://github.com/wasmerio/wasmer/pull/3116) Multithreading, full networking and RPC for WebAssembly - - [#3130](https://github.com/wasmerio/wasmer/pull/3130) Remove panics from Artifact::deserialize - - [#3134](https://github.com/wasmerio/wasmer/pull/3134) Bring libwasmer-headless.a from 22MiB to 7.2MiB (on my machine) - - [#3131](https://github.com/wasmerio/wasmer/pull/3131) Update for migration-to-3.0.0 for MemoryView changes - - [#3123](https://github.com/wasmerio/wasmer/pull/3123) Lower libwasmer headless size - - [#3132](https://github.com/wasmerio/wasmer/pull/3132) Revert "Lower libwasmer headless size" - - [#3128](https://github.com/wasmerio/wasmer/pull/3128) scripts/publish.py: validate crates version before publishing - - [#3126](https://github.com/wasmerio/wasmer/pull/3126) scripts/publish.py: replace toposort dependency with python std graphlib module - - [#3122](https://github.com/wasmerio/wasmer/pull/3122) Update Cargo.lock dependencies - - [#3118](https://github.com/wasmerio/wasmer/pull/3118) Refactor Artifact enum into a struct - - [#3114](https://github.com/wasmerio/wasmer/pull/3114) Implemented shared memory for Wasmer in preparation for multithreading - - [#3104](https://github.com/wasmerio/wasmer/pull/3104) Re-enabled ExternRef tests - - [#3103](https://github.com/wasmerio/wasmer/pull/3103) create-exe: prefer libwasmer headless when cross-compiling - - [#3097](https://github.com/wasmerio/wasmer/pull/3097) MemoryView lifetime tied to memory and not StoreRef - - [#3095](https://github.com/wasmerio/wasmer/pull/3095) create-exe: list supported cross-compilation target triples in help … - - [#3096](https://github.com/wasmerio/wasmer/pull/3096) create-exe: use cached wasmer tarballs for network fetches - - [#3083](https://github.com/wasmerio/wasmer/pull/3083) Disable wasm build in build CI - - [#3081](https://github.com/wasmerio/wasmer/pull/3081) 3.0.0-beta release - - [#3079](https://github.com/wasmerio/wasmer/pull/3079) Migrate to clap from structopt - - [#3075](https://github.com/wasmerio/wasmer/pull/3075) Remove __wbindgen_thread_id - - [#3074](https://github.com/wasmerio/wasmer/pull/3074) Update chrono to 0.4.20, avoiding RUSTSEC-2020-0159 - - [#3070](https://github.com/wasmerio/wasmer/pull/3070) wasmer-cli: Allow create-exe to receive a static object as input - - [#3069](https://github.com/wasmerio/wasmer/pull/3069) Remove native feature entry from docs.rs metadata - - [#3057](https://github.com/wasmerio/wasmer/pull/3057) wasmer-cli: create-obj command - - [#3060](https://github.com/wasmerio/wasmer/pull/3060) CI: Unset rustup override after usage instead of setting it to stable - -## Fixed - - - [#3192](https://github.com/wasmerio/wasmer/pull/3192) fix the typos - - [#3185](https://github.com/wasmerio/wasmer/pull/3185) Fix `wasmer compile` command for non-x86 target - - [#3129](https://github.com/wasmerio/wasmer/pull/3129) Fix differences between -sys and -js API - - [#3137](https://github.com/wasmerio/wasmer/pull/3137) Fix cache path not being present during installation of cross-tarball - - [#3115](https://github.com/wasmerio/wasmer/pull/3115) Fix static object signature deserialization - - [#3093](https://github.com/wasmerio/wasmer/pull/3093) Fixed a potential issue when renaming a file - - [#3088](https://github.com/wasmerio/wasmer/pull/3088) Fixed an issue when renaming a file from a preopened dir directly (for 3084) - - [#3078](https://github.com/wasmerio/wasmer/pull/3078) Fix errors from "make lint" - - [#3052](https://github.com/wasmerio/wasmer/pull/3052) Fixed a memory corruption issue with JS memory operations that were r… - - [#3058](https://github.com/wasmerio/wasmer/pull/3058) Fix trap tracking - - -## 3.0.0-alpha.4 - 2022/07/28 - -## Added - - - [#3035](https://github.com/wasmerio/wasmer/pull/3035) Added a simple divide by zero trap wast test (for #1899) - - [#3008](https://github.com/wasmerio/wasmer/pull/3008) Add check-public-api.yaml workflow - - [#3021](https://github.com/wasmerio/wasmer/pull/3021) Added back some needed relocation for arm64 llvm compiler - - [#2982](https://github.com/wasmerio/wasmer/pull/2982) Add a `rustfmt.toml` file to the repository - - [#2953](https://github.com/wasmerio/wasmer/pull/2953) Makefile: add `check` target - - [#2952](https://github.com/wasmerio/wasmer/pull/2952) CI: add make build-wasmer-wasm test - -## Changed - - - [#3051](https://github.com/wasmerio/wasmer/pull/3051) Updated Crenelift to v0.86.1 - - [#3038](https://github.com/wasmerio/wasmer/pull/3038) Re-introduce create-exe to wasmer-cli v3.0 - - [#3049](https://github.com/wasmerio/wasmer/pull/3049) Disable traps::trap_display_multi_module test for Windows+singlepass - - [#3047](https://github.com/wasmerio/wasmer/pull/3047) Improved EngineBuilder API - - [#3046](https://github.com/wasmerio/wasmer/pull/3046) Merge Backend into EngineBuilder and refactor feature flags - - [#3039](https://github.com/wasmerio/wasmer/pull/3039) Improved hashing/ids of function envs - - [#3029](https://github.com/wasmerio/wasmer/pull/3029) Remove Engine, Artifact traits, merge all Engines into one, make everything rkyv serialazable - - [#2892](https://github.com/wasmerio/wasmer/pull/2892) Implement new Context API for Wasmer 3.0 - - [#3031](https://github.com/wasmerio/wasmer/pull/3031) Update docs/migration_to_3.0.0.md - - [#3030](https://github.com/wasmerio/wasmer/pull/3030) Remove cranelift dependency from wasmer-wasi - - [#3028](https://github.com/wasmerio/wasmer/pull/3028) Ctx store rename - - [#3023](https://github.com/wasmerio/wasmer/pull/3023) Changed CI rust install action to dtolnay one - - [#3013](https://github.com/wasmerio/wasmer/pull/3013) Context api refactor - - [#2999](https://github.com/wasmerio/wasmer/pull/2999) Support --invoke option for emscripten files without _start function - - [#3003](https://github.com/wasmerio/wasmer/pull/3003) Remove RuntimeError::raise from public API - - [#3000](https://github.com/wasmerio/wasmer/pull/3000) Allow debugging of EXC_BAD_INSTRUCTION on macOS - - [#2946](https://github.com/wasmerio/wasmer/pull/2946) Removing dylib and staticlib engines in favor of a single Universal Engine - - [#2996](https://github.com/wasmerio/wasmer/pull/2996) Migrated al examples to new Context API - - [#2973](https://github.com/wasmerio/wasmer/pull/2973) Port C API to new Context API - - [#2974](https://github.com/wasmerio/wasmer/pull/2974) Context api tests - - [#2988](https://github.com/wasmerio/wasmer/pull/2988) Have make targets install-capi-lib,install-pkgconfig work without building the wasmer binary - - [#2976](https://github.com/wasmerio/wasmer/pull/2976) Upgrade enumset minimum version to one that compiles - - [#2969](https://github.com/wasmerio/wasmer/pull/2969) Port JS API to new Context API - - [#2966](https://github.com/wasmerio/wasmer/pull/2966) Singlepass nopanic - - [#2949](https://github.com/wasmerio/wasmer/pull/2949) Switch back to using custom LLVM builds on CI - - [#2963](https://github.com/wasmerio/wasmer/pull/2963) Remove libxcb and libwayland dependencies from wasmer-cli release build - - [#2957](https://github.com/wasmerio/wasmer/pull/2957) Enable multi-value handling in Singlepass compiler - - [#2941](https://github.com/wasmerio/wasmer/pull/2941) Implementation of WASIX and a fully networking for Web Assembly - - [#2947](https://github.com/wasmerio/wasmer/pull/2947) - Converted the WASI js test into a generic stdio test that works for… - - [#2940](https://github.com/wasmerio/wasmer/pull/2940) Merge `wasmer3` back to `master` branch - - [#2939](https://github.com/wasmerio/wasmer/pull/2939) Rename NativeFunc to TypedFunction - -## Fixed - - - [#3045](https://github.com/wasmerio/wasmer/pull/3045) Fixed WASI fd_read syscall when reading multiple iovs and read is partial (for #2904) - - [#2997](https://github.com/wasmerio/wasmer/pull/2997) Fix "run --invoke [function]" to behave the same as "run" - - [#3027](https://github.com/wasmerio/wasmer/pull/3027) Fixed residual package-doc issues - - [#3026](https://github.com/wasmerio/wasmer/pull/3026) test-js.yaml: fix typo - - [#3017](https://github.com/wasmerio/wasmer/pull/3017) Fixed translation in README.md - - [#3001](https://github.com/wasmerio/wasmer/pull/3001) Fix context capi ci errors - - [#2967](https://github.com/wasmerio/wasmer/pull/2967) Fix singlepass on arm64 that was trying to emit a sub opcode with a constant as destination (for #2959) - - [#2954](https://github.com/wasmerio/wasmer/pull/2954) Some fixes to x86_64 Singlepass compiler, when using atomics - - [#2950](https://github.com/wasmerio/wasmer/pull/2950) compiler-cranelift: Fix typo in enum variant - - [#2948](https://github.com/wasmerio/wasmer/pull/2948) Fix regression on gen_import_call_trampoline_arm64() - - [#2943](https://github.com/wasmerio/wasmer/pull/2943) Fix build error on some archs by using c_char instead of i8 - - [#2944](https://github.com/wasmerio/wasmer/pull/2944) Fix duplicate entries in the CHANGELOG - - [#2942](https://github.com/wasmerio/wasmer/pull/2942) Fix clippy lints - -## 2.3.0 - 2022/06/06 - -### Added -- [#2862](https://github.com/wasmerio/wasmer/pull/2862) Added CI builds for linux-aarch64 target. -- [#2811](https://github.com/wasmerio/wasmer/pull/2811) Added support for EH Frames in singlepass -- [#2851](https://github.com/wasmerio/wasmer/pull/2851) Allow Wasmer to compile to Wasm/WASI - -### Changed -- [#2807](https://github.com/wasmerio/wasmer/pull/2807) Run Wasm code in a separate stack -- [#2802](https://github.com/wasmerio/wasmer/pull/2802) Support Dylib engine with Singlepass -- [#2836](https://github.com/wasmerio/wasmer/pull/2836) Improve TrapInformation data stored at runtime -- [#2864](https://github.com/wasmerio/wasmer/pull/2864) `wasmer-cli`: remove wasi-experimental-io-devices from default builds -- [#2933](https://github.com/wasmerio/wasmer/pull/2933) Rename NativeFunc to TypedFunction. - -### Fixed -- [#2829](https://github.com/wasmerio/wasmer/pull/2829) Improve error message oriented from JS object. -- [#2828](https://github.com/wasmerio/wasmer/pull/2828) Fix JsImportObject resolver. -- [#2872](https://github.com/wasmerio/wasmer/pull/2872) Fix `WasmerEnv` finalizer -- [#2821](https://github.com/wasmerio/wasmer/pull/2821) Opt in `sys` feature - -## 2.2.1 - 2022/03/15 - -### Fixed -- [#2812](https://github.com/wasmerio/wasmer/pull/2812) Fixed another panic due to incorrect drop ordering. - -## 2.2.0 - 2022/02/28 - -### Added -- [#2775](https://github.com/wasmerio/wasmer/pull/2775) Added support for SSE 4.2 in the Singlepass compiler as an alternative to AVX. -- [#2805](https://github.com/wasmerio/wasmer/pull/2805) Enabled WASI experimental I/O devices by default in releases. - -### Fixed -- [#2795](https://github.com/wasmerio/wasmer/pull/2795) Fixed a bug in the Singlepass compiler introduced in #2775. -- [#2806](https://github.com/wasmerio/wasmer/pull/2806) Fixed a panic due to incorrect drop ordering of `Module` fields. - -## 2.2.0-rc2 - 2022/02/15 - -### Fixed -- [#2778](https://github.com/wasmerio/wasmer/pull/2778) Fixed f32_load/f64_load in Singlepass. Also fixed issues with out-of-range conditional branches. -- [#2786](https://github.com/wasmerio/wasmer/pull/2786) Fixed a potential integer overflow in WasmPtr memory access methods. -- [#2787](https://github.com/wasmerio/wasmer/pull/2787) Fixed a codegen regression in the Singlepass compiler due to non-determinism of `HashSet` iteration. - -## 2.2.0-rc1 - 2022/01/28 - -### Added -- [#2750](https://github.com/wasmerio/wasmer/pull/2750) Added Aarch64 support to Singlepass (both Linux and macOS). -- [#2753](https://github.com/wasmerio/wasmer/pull/2753) Re-add "dylib" to the list of default features. - -### Changed -- [#2747](https://github.com/wasmerio/wasmer/pull/2747) Use a standard header for metadata in all serialized modules. -- [#2759](https://github.com/wasmerio/wasmer/pull/2759) Use exact version for Wasmer crate dependencies. - -### Fixed -- [#2769](https://github.com/wasmerio/wasmer/pull/2769) Fixed deadlock in emscripten dynamic calls. -- [#2742](https://github.com/wasmerio/wasmer/pull/2742) Fixed WASMER_METADATA alignment in the dylib engine. -- [#2746](https://github.com/wasmerio/wasmer/pull/2746) Fixed invoking `wasmer binfmt register` from `$PATH`. -- [#2748](https://github.com/wasmerio/wasmer/pull/2748) Use trampolines for all libcalls in engine-universal and engine-dylib. -- [#2766](https://github.com/wasmerio/wasmer/pull/2766) Remove an attempt to reserve a GPR when no GPR clobbering is occurring. -- [#2768](https://github.com/wasmerio/wasmer/pull/2768) Fixed serialization of FrameInfo on Dylib engine. - -## 2.1.1 - 2021/12/20 - -### Added -- [#2726](https://github.com/wasmerio/wasmer/pull/2726) Added `externs_vec` method to `ImportObject`. -- [#2724](https://github.com/wasmerio/wasmer/pull/2724) Added access to the raw `Instance` JS object in Wsasmer-js. - -### CHanged -- [#2711](https://github.com/wasmerio/wasmer/pull/2711) Make C-API and Wasi dependencies more lean -- [#2706](https://github.com/wasmerio/wasmer/pull/2706) Refactored the Singlepass compiler in preparation for AArch64 support (no user visible changes). -### Fixed -- [#2717](https://github.com/wasmerio/wasmer/pull/2717) Allow `Exports` to be modified after being cloned. -- [#2719](https://github.com/wasmerio/wasmer/pull/2719) Fixed `wasm_importtype_new`'s Rust signature to not assume boxed vectors. -- [#2723](https://github.com/wasmerio/wasmer/pull/2723) Fixed a bug in parameter passing in the Singlepass compiler. -- [#2768](https://github.com/wasmerio/wasmer/pull/2768) Fixed issue with Frame Info on dylib engine. - -## 2.1.0 - 2021/11/30 - -### Added -- [#2574](https://github.com/wasmerio/wasmer/pull/2574) Added Windows support to Singlepass. -- [#2535](https://github.com/wasmerio/wasmer/pull/2435) Added iOS support for Wasmer. This relies on the `dylib-engine`. -- [#2460](https://github.com/wasmerio/wasmer/pull/2460) Wasmer can now compile to Javascript via `wasm-bindgen`. Use the `js-default` (and no default features) feature to try it!. -- [#2491](https://github.com/wasmerio/wasmer/pull/2491) Added support for WASI to Wasmer-js. -- [#2436](https://github.com/wasmerio/wasmer/pull/2436) Added the x86-32 bit variant support to LLVM compiler. -- [#2499](https://github.com/wasmerio/wasmer/pull/2499) Added a subcommand to linux wasmer-cli to register wasmer with binfmt_misc -- [#2511](https://github.com/wasmerio/wasmer/pull/2511) Added support for calling dynamic functions defined on the host -- [#2491](https://github.com/wasmerio/wasmer/pull/2491) Added support for WASI in Wasmer-js -- [#2592](https://github.com/wasmerio/wasmer/pull/2592) Added `ImportObject::get_namespace_exports` to allow modifying the contents of an existing namespace in an `ImportObject`. -- [#2694](https://github.com/wasmerio/wasmer/pull/2694) wasmer-js: Allow an `ImportObject` to be extended with a JS object. -- [#2698](https://github.com/wasmerio/wasmer/pull/2698) Provide WASI imports when invoking an explicit export from the CLI. -- [#2701](https://github.com/wasmerio/wasmer/pull/2701) Improved VFS API for usage from JS - -### Changed -- [#2460](https://github.com/wasmerio/wasmer/pull/2460) **breaking change** `wasmer` API usage with `no-default-features` requires now the `sys` feature to preserve old behavior. -- [#2476](https://github.com/wasmerio/wasmer/pull/2476) Removed unncessary abstraction `ModuleInfoTranslate` from `wasmer-compiler`. -- [#2442](https://github.com/wasmerio/wasmer/pull/2442) **breaking change** Improved `WasmPtr`, added `WasmCell` for host/guest interaction. `WasmPtr::deref` will now return `WasmCell<'a, T>` instead of `&'a Cell`, `WasmPtr::deref_mut` is now deleted from the API. -- [#2427](https://github.com/wasmerio/wasmer/pull/2427) Update `loupe` to 0.1.3. -- [#2685](https://github.com/wasmerio/wasmer/pull/2685) The minimum LLVM version for the LLVM compiler is now 12. LLVM 13 is used by default. -- [#2569](https://github.com/wasmerio/wasmer/pull/2569) Add `Send` and `Sync` to uses of the `LikeNamespace` trait object. -- [#2692](https://github.com/wasmerio/wasmer/pull/2692) Made module serialization deterministic. -- [#2693](https://github.com/wasmerio/wasmer/pull/2693) Validate CPU features when loading a deserialized module. - -### Fixed -- [#2599](https://github.com/wasmerio/wasmer/pull/2599) Fixed Universal engine for Linux/Aarch64 target. -- [#2587](https://github.com/wasmerio/wasmer/pull/2587) Fixed deriving `WasmerEnv` when aliasing `Result`. -- [#2518](https://github.com/wasmerio/wasmer/pull/2518) Remove temporary file used to creating an artifact when creating a Dylib engine artifact. -- [#2494](https://github.com/wasmerio/wasmer/pull/2494) Fixed `WasmerEnv` access when using `call_indirect` with the Singlepass compiler. -- [#2479](https://github.com/wasmerio/wasmer/pull/2479) Improved `wasmer validate` error message on non-wasm inputs. -- [#2454](https://github.com/wasmerio/wasmer/issues/2454) Won't set `WASMER_CACHE_DIR` for Windows. -- [#2426](https://github.com/wasmerio/wasmer/pull/2426) Fix the `wax` script generation. -- [#2635](https://github.com/wasmerio/wasmer/pull/2635) Fix cross-compilation for singlepass. -- [#2672](https://github.com/wasmerio/wasmer/pull/2672) Use `ENOENT` instead of `EINVAL` in some WASI syscalls for a non-existent file -- [#2547](https://github.com/wasmerio/wasmer/pull/2547) Delete temporary files created by the dylib engine. -- [#2548](https://github.com/wasmerio/wasmer/pull/2548) Fix stack probing on x86_64 linux with the cranelift compiler. -- [#2557](https://github.com/wasmerio/wasmer/pull/2557) [#2559](https://github.com/wasmerio/wasmer/pull/2559) Fix WASI dir path renaming. -- [#2560](https://github.com/wasmerio/wasmer/pull/2560) Fix signal handling on M1 MacOS. -- [#2474](https://github.com/wasmerio/wasmer/pull/2474) Fix permissions on `WASMER_CACHE_DIR` on Windows. -- [#2528](https://github.com/wasmerio/wasmer/pull/2528) [#2525](https://github.com/wasmerio/wasmer/pull/2525) [#2523](https://github.com/wasmerio/wasmer/pull/2523) [#2522](https://github.com/wasmerio/wasmer/pull/2522) [#2545](https://github.com/wasmerio/wasmer/pull/2545) [#2550](https://github.com/wasmerio/wasmer/pull/2550) [#2551](https://github.com/wasmerio/wasmer/pull/2551) Fix various bugs in the new VFS implementation. -- [#2552](https://github.com/wasmerio/wasmer/pull/2552) Fix stack guard handling on Windows. -- [#2585](https://github.com/wasmerio/wasmer/pull/2585) Fix build with 64-bit MinGW toolchain. -- [#2587](https://github.com/wasmerio/wasmer/pull/2587) Fix absolute import of `Result` in derive. -- [#2599](https://github.com/wasmerio/wasmer/pull/2599) Fix AArch64 support in the LLVM compiler. -- [#2655](https://github.com/wasmerio/wasmer/pull/2655) Fix argument parsing of `--dir` and `--mapdir`. -- [#2666](https://github.com/wasmerio/wasmer/pull/2666) Fix performance on Windows by using static memories by default. -- [#2667](https://github.com/wasmerio/wasmer/pull/2667) Fix error code for path_rename of a non-existant file -- [#2672](https://github.com/wasmerio/wasmer/pull/2672) Fix error code returned by some wasi fs syscalls for a non-existent file -- [#2673](https://github.com/wasmerio/wasmer/pull/2673) Fix BrTable codegen on the LLVM compiler -- [#2674](https://github.com/wasmerio/wasmer/pull/2674) Add missing `__WASI_RIGHT_FD_DATASYNC` for preopened directories -- [#2677](https://github.com/wasmerio/wasmer/pull/2677) Support 32-bit memories with 65536 pages -- [#2681](https://github.com/wasmerio/wasmer/pull/2681) Fix slow compilation in singlepass by using dynasm's `VecAssembler`. -- [#2690](https://github.com/wasmerio/wasmer/pull/2690) Fix memory leak when obtaining the stack bounds of a thread -- [#2699](https://github.com/wasmerio/wasmer/pull/2699) Partially fix unbounded memory leak from the FuncDataRegistry - -## 2.0.0 - 2021/06/16 - -### Added -- [#2411](https://github.com/wasmerio/wasmer/pull/2411) Extract types from `wasi` to a new `wasi-types` crate. -- [#2390](https://github.com/wasmerio/wasmer/pull/2390) Make `wasmer-vm` to compile on Windows 32bits. -- [#2402](https://github.com/wasmerio/wasmer/pull/2402) Add more examples and more doctests for `wasmer-middlewares`. - -### Changed -- [#2399](https://github.com/wasmerio/wasmer/pull/2399) Add the Dart integration in the `README.md`. - -### Fixed -- [#2386](https://github.com/wasmerio/wasmer/pull/2386) Handle properly when a module has no exported functions in the CLI. - -## 2.0.0-rc2 - 2021/06/03 - -### Fixed -- [#2383](https://github.com/wasmerio/wasmer/pull/2383) Fix bugs in the Wasmer CLI tool with the way `--version` and the name of the CLI tool itself were printed. - -## 2.0.0-rc1 - 2021/06/02 - -### Added -- [#2348](https://github.com/wasmerio/wasmer/pull/2348) Make Wasmer available on `aarch64-linux-android`. -- [#2315](https://github.com/wasmerio/wasmer/pull/2315) Make the Cranelift compiler working with the Native engine. -- [#2306](https://github.com/wasmerio/wasmer/pull/2306) Add support for the latest version of the Wasm SIMD proposal to compiler LLVM. -- [#2296](https://github.com/wasmerio/wasmer/pull/2296) Add support for the bulk memory proposal in compiler Singlepass and compiler LLVM. -- [#2291](https://github.com/wasmerio/wasmer/pull/2291) Type check tables when importing. -- [#2262](https://github.com/wasmerio/wasmer/pull/2262) Make parallelism optional for the Singlepass compiler. -- [#2249](https://github.com/wasmerio/wasmer/pull/2249) Make Cranelift unwind feature optional. -- [#2208](https://github.com/wasmerio/wasmer/pull/2208) Add a new CHANGELOG.md specific to our C API to make it easier for users primarily consuming our C API to keep up to date with changes that affect them. -- [#2154](https://github.com/wasmerio/wasmer/pull/2154) Implement Reference Types in the LLVM compiler. -- [#2003](https://github.com/wasmerio/wasmer/pull/2003) Wasmer works with musl, and is built, tested and packaged for musl. -- [#2250](https://github.com/wasmerio/wasmer/pull/2250) Use `rkyv` for the JIT/Universal engine. -- [#2190](https://github.com/wasmerio/wasmer/pull/2190) Use `rkyv` to read native `Module` artifact. -- [#2186](https://github.com/wasmerio/wasmer/pull/2186) Update and improve the Fuzz Testing infrastructure. -- [#2161](https://github.com/wasmerio/wasmer/pull/2161) Make NaN canonicalization configurable. -- [#2116](https://github.com/wasmerio/wasmer/pull/2116) Add a package for Windows that is not an installer, but all the `lib` and `include` files as for macOS and Linux. -- [#2123](https://github.com/wasmerio/wasmer/pull/2123) Use `ENABLE_{{compiler_name}}=(0|1)` to resp. force to disable or enable a compiler when running the `Makefile`, e.g. `ENABLE_LLVM=1 make build-wasmer`. -- [#2123](https://github.com/wasmerio/wasmer/pull/2123) `libwasmer` comes with all available compilers per target instead of Cranelift only. -- [#2135](https://github.com/wasmerio/wasmer/pull/2135) [Documentation](./PACKAGING.md) for Linux distribution maintainers -- [#2104](https://github.com/wasmerio/wasmer/pull/2104) Update WAsm core spectests and wasmparser. - -### Changed -- [#2369](https://github.com/wasmerio/wasmer/pull/2369) Remove the deprecated `--backend` option in the CLI. -- [#2368](https://github.com/wasmerio/wasmer/pull/2368) Remove the deprecated code in the `wasmer-wasi` crate. -- [#2367](https://github.com/wasmerio/wasmer/pull/2367) Remove the `deprecated` features and associated code in the `wasmer` crate. -- [#2366](https://github.com/wasmerio/wasmer/pull/2366) Remove the deprecated crates. -- [#2364](https://github.com/wasmerio/wasmer/pull/2364) Rename `wasmer-engine-object-file` to `wasmer-engine-staticlib`. -- [#2356](https://github.com/wasmerio/wasmer/pull/2356) Rename `wasmer-engine-native` to `wasmer-engine-dylib`. -- [#2340](https://github.com/wasmerio/wasmer/pull/2340) Rename `wasmer-engine-jit` to `wasmer-engine-universal`. -- [#2307](https://github.com/wasmerio/wasmer/pull/2307) Update Cranelift, implement low hanging fruit SIMD opcodes. -- [#2305](https://github.com/wasmerio/wasmer/pull/2305) Clean up and improve the trap API, more deterministic errors etc. -- [#2299](https://github.com/wasmerio/wasmer/pull/2299) Unused trap codes (due to Wasm spec changes), `HeapSetterOutOfBounds` and `TableSetterOutOfBounds` were removed from `wasmer_vm::TrapCode` and the numbering of the remaining variants has been adjusted. -- [#2293](https://github.com/wasmerio/wasmer/pull/2293) The `Memory::ty` trait method now returns `MemoryType` by value. `wasmer_vm::LinearMemory` now recomputes `MemoryType`'s `minimum` field when accessing its type. This behavior is what's expected by the latest spectests. `wasmer::Memory::ty` has also been updated to follow suit, it now returns `MemoryType` by value. -- [#2286](https://github.com/wasmerio/wasmer/pull/2286) Replace the `goblin` crate by the `object` crate. -- [#2281](https://github.com/wasmerio/wasmer/pull/2281) Refactor the `wasmer_vm` crate to remove unnecessary structs, reuse data when available etc. -- [#2251](https://github.com/wasmerio/wasmer/pull/2251) Wasmer CLI will now execute WASI modules with multiple WASI namespaces in them by default. Use `--allow-multiple-wasi-versions` to suppress the warning and use `--deny-multiple-wasi-versions` to make it an error. -- [#2201](https://github.com/wasmerio/wasmer/pull/2201) Implement `loupe::MemoryUsage` for `wasmer::Instance`. -- [#2200](https://github.com/wasmerio/wasmer/pull/2200) Implement `loupe::MemoryUsage` for `wasmer::Module`. -- [#2199](https://github.com/wasmerio/wasmer/pull/2199) Implement `loupe::MemoryUsage` for `wasmer::Store`. -- [#2195](https://github.com/wasmerio/wasmer/pull/2195) Remove dependency to `cranelift-entity`. -- [#2140](https://github.com/wasmerio/wasmer/pull/2140) Reduce the number of dependencies in the `wasmer.dll` shared library by statically compiling CRT. -- [#2113](https://github.com/wasmerio/wasmer/pull/2113) Bump minimum supported Rust version to 1.49 -- [#2144](https://github.com/wasmerio/wasmer/pull/2144) Bump cranelift version to 0.70 -- [#2149](https://github.com/wasmerio/wasmer/pull/2144) `wasmer-engine-native` looks for clang-11 instead of clang-10. -- [#2157](https://github.com/wasmerio/wasmer/pull/2157) Simplify the code behind `WasmPtr` - -### Fixed -- [#2397](https://github.com/wasmerio/wasmer/pull/2397) Fix WASI rename temporary file issue. -- [#2391](https://github.com/wasmerio/wasmer/pull/2391) Fix Singlepass emit bug, [#2347](https://github.com/wasmerio/wasmer/issues/2347) and [#2159](https://github.com/wasmerio/wasmer/issues/2159) -- [#2327](https://github.com/wasmerio/wasmer/pull/2327) Fix memory leak preventing internal instance memory from being freed when a WasmerEnv contained an exported extern (e.g. Memory, etc.). -- [#2247](https://github.com/wasmerio/wasmer/pull/2247) Internal WasiFS logic updated to be closer to what WASI libc does when finding a preopened fd for a path. -- [#2241](https://github.com/wasmerio/wasmer/pull/2241) Fix Undefined Behavior in setting memory in emscripten `EmEnv`. -- [#2224](https://github.com/wasmerio/wasmer/pull/2224) Enable SIMD based on actual Wasm features in the Cranelift compiler. -- [#2217](https://github.com/wasmerio/wasmer/pull/2217) Fix bug in `i64.rotr X 0` in the LLVM compiler. -- [#2290](https://github.com/wasmerio/wasmer/pull/2290) Handle Wasm modules with no imports in the CLI. -- [#2108](https://github.com/wasmerio/wasmer/pull/2108) The Object Native Engine generates code that now compiles correctly with C++. -- [#2125](https://github.com/wasmerio/wasmer/pull/2125) Fix RUSTSEC-2021-0023. -- [#2155](https://github.com/wasmerio/wasmer/pull/2155) Fix the implementation of shift and rotate in the LLVM compiler. -- [#2101](https://github.com/wasmerio/wasmer/pull/2101) cflags emitted by `wasmer config --pkg-config` are now correct. - -## 1.0.2 - 2021-02-04 - -### Added -- [#2053](https://github.com/wasmerio/wasmer/pull/2053) Implement the non-standard `wasi_get_unordered_imports` function in the C API. -- [#2072](https://github.com/wasmerio/wasmer/pull/2072) Add `wasm_config_set_target`, along with `wasm_target_t`, `wasm_triple_t` and `wasm_cpu_features_t` in the unstable C API. -- [#2059](https://github.com/wasmerio/wasmer/pull/2059) Ability to capture `stdout` and `stderr` with WASI in the C API. -- [#2040](https://github.com/wasmerio/wasmer/pull/2040) Add `InstanceHandle::vmoffsets` to expose the offsets of the `vmctx` region. -- [#2026](https://github.com/wasmerio/wasmer/pull/2026) Expose trap code of a `RuntimeError`, if it's a `Trap`. -- [#2054](https://github.com/wasmerio/wasmer/pull/2054) Add `wasm_config_delete` to the Wasm C API. -- [#2072](https://github.com/wasmerio/wasmer/pull/2072) Added cross-compilation to Wasm C API. - -### Changed -- [#2085](https://github.com/wasmerio/wasmer/pull/2085) Update to latest inkwell and LLVM 11. -- [#2037](https://github.com/wasmerio/wasmer/pull/2037) Improved parallelism of LLVM with the Native/Object engine -- [#2012](https://github.com/wasmerio/wasmer/pull/2012) Refactor Singlepass init stack assembly (more performant now) -- [#2036](https://github.com/wasmerio/wasmer/pull/2036) Optimize memory allocated for Function type definitions -- [#2083](https://github.com/wasmerio/wasmer/pull/2083) Mark `wasi_env_set_instance` and `wasi_env_set_memory` as deprecated. You may simply remove the calls with no side-effect. -- [#2056](https://github.com/wasmerio/wasmer/pull/2056) Change back to depend on the `enumset` crate instead of `wasmer_enumset` - -### Fixed -- [#2066](https://github.com/wasmerio/wasmer/pull/2066) Include 'extern "C"' in our C headers when included by C++ code. -- [#2090](https://github.com/wasmerio/wasmer/pull/2090) `wasi_env_t` needs to be freed with `wasi_env_delete` in the C API. -- [#2084](https://github.com/wasmerio/wasmer/pull/2084) Avoid calling the function environment finalizer more than once when the environment has been cloned in the C API. -- [#2069](https://github.com/wasmerio/wasmer/pull/2069) Use the new documentation for `include/README.md` in the Wasmer package. -- [#2042](https://github.com/wasmerio/wasmer/pull/2042) Parse more exotic environment variables in `wasmer run`. -- [#2041](https://github.com/wasmerio/wasmer/pull/2041) Documentation diagrams now have a solid white background rather than a transparent background. -- [#2070](https://github.com/wasmerio/wasmer/pull/2070) Do not drain the entire captured stream at first read with `wasi_env_read_stdout` or `_stderr` in the C API. -- [#2058](https://github.com/wasmerio/wasmer/pull/2058) Expose WASI versions to C correctly. -- [#2044](https://github.com/wasmerio/wasmer/pull/2044) Do not build C headers on docs.rs. - -## 1.0.1 - 2021-01-12 - -This release includes a breaking change in the API (changing the trait `enumset::EnumsetType` to `wasmer_enumset::EnumSetType` and changing `enumset::EnumSet` in signatures to `wasmer_enumset::EnumSet` to work around a breaking change introduced by `syn`) but is being released as a minor version because `1.0.0` is also in a broken state due to a breaking change introduced by `syn` which affects `enumset` and thus `wasmer`. - -This change is unlikely to affect any users of `wasmer`, but if it does please change uses of the `enumset` crate to the `wasmer_enumset` crate where possible. - -### Added -- [#2010](https://github.com/wasmerio/wasmer/pull/2010) A new, experimental, minified build of `wasmer` called `wasmer-headless` will now be included with releases. `wasmer-headless` is the `wasmer` VM without any compilers attached, so it can only run precompiled Wasm modules. -- [#2005](https://github.com/wasmerio/wasmer/pull/2005) Added the arguments `alias` and `optional` to `WasmerEnv` derive's `export` attribute. - -### Changed -- [#2006](https://github.com/wasmerio/wasmer/pull/2006) Use `wasmer_enumset`, a fork of the `enumset` crate to work around a breaking change in `syn` -- [#1985](https://github.com/wasmerio/wasmer/pull/1985) Bump minimum supported Rust version to 1.48 - -### Fixed -- [#2007](https://github.com/wasmerio/wasmer/pull/2007) Fix packaging of wapm on Windows -- [#2005](https://github.com/wasmerio/wasmer/pull/2005) Emscripten is now working again. - -## 1.0.0 - 2021-01-05 - -### Added - -- [#1969](https://github.com/wasmerio/wasmer/pull/1969) Added D integration to the README - -### Changed -- [#1979](https://github.com/wasmerio/wasmer/pull/1979) `WasmPtr::get_utf8_string` was renamed to `WasmPtr::get_utf8_str` and made `unsafe`. - -### Fixed -- [#1979](https://github.com/wasmerio/wasmer/pull/1979) `WasmPtr::get_utf8_string` now returns a `String`, fixing a soundness issue in certain circumstances. The old functionality is available under a new `unsafe` function, `WasmPtr::get_utf8_str`. - -## 1.0.0-rc1 - 2020-12-23 - -### Added - -* [#1894](https://github.com/wasmerio/wasmer/pull/1894) Added exports `wasmer::{CraneliftOptLevel, LLVMOptLevel}` to allow using `Cranelift::opt_level` and `LLVM::opt_level` directly via the `wasmer` crate - -### Changed - -* [#1941](https://github.com/wasmerio/wasmer/pull/1941) Turn `get_remaining_points`/`set_remaining_points` of the `Metering` middleware into free functions to allow using them in an ahead-of-time compilation setup -* [#1955](https://github.com/wasmerio/wasmer/pull/1955) Set `jit` as a default feature of the `wasmer-wasm-c-api` crate -* [#1944](https://github.com/wasmerio/wasmer/pull/1944) Require `WasmerEnv` to be `Send + Sync` even in dynamic functions. -* [#1963](https://github.com/wasmerio/wasmer/pull/1963) Removed `to_wasm_error` in favour of `impl From for WasmError` -* [#1962](https://github.com/wasmerio/wasmer/pull/1962) Replace `wasmparser::Result<()>` with `Result<(), MiddlewareError>` in middleware, allowing implementors to return errors in `FunctionMiddleware::feed` - -### Fixed - -- [#1949](https://github.com/wasmerio/wasmer/pull/1949) `wasm__vec_delete` functions no longer crash when the given vector is uninitialized, in the Wasmer C API -- [#1949](https://github.com/wasmerio/wasmer/pull/1949) The `wasm_frame_vec_t`, `wasm_functype_vec_t`, `wasm_globaltype_vec_t`, `wasm_memorytype_vec_t`, and `wasm_tabletype_vec_t` are now boxed vectors in the Wasmer C API - -## 1.0.0-beta2 - 2020-12-16 - -### Added - -* [#1916](https://github.com/wasmerio/wasmer/pull/1916) Add the `WASMER_VERSION*` constants with the `wasmer_version*` functions in the Wasmer C API -* [#1867](https://github.com/wasmerio/wasmer/pull/1867) Added `Metering::get_remaining_points` and `Metering::set_remaining_points` -* [#1881](https://github.com/wasmerio/wasmer/pull/1881) Added `UnsupportedTarget` error to `CompileError` -* [#1908](https://github.com/wasmerio/wasmer/pull/1908) Implemented `TryFrom>` for `i32`/`u32`/`i64`/`u64`/`f32`/`f64` -* [#1927](https://github.com/wasmerio/wasmer/pull/1927) Added mmap support in `Engine::deserialize_from_file` to speed up artifact loading -* [#1911](https://github.com/wasmerio/wasmer/pull/1911) Generalized signature type in `Function::new` and `Function::new_with_env` to accept owned and reference `FunctionType` as well as array pairs. This allows users to define signatures as constants. Implemented `From<([Type; $N], [Type; $M])>` for `FunctionType` to support this. - -### Changed - -- [#1865](https://github.com/wasmerio/wasmer/pull/1865) Require that implementors of `WasmerEnv` also implement `Send`, `Sync`, and `Clone`. -- [#1851](https://github.com/wasmerio/wasmer/pull/1851) Improve test suite and documentation of the Wasmer C API -- [#1874](https://github.com/wasmerio/wasmer/pull/1874) Set `CompilerConfig` to be owned (following wasm-c-api) -- [#1880](https://github.com/wasmerio/wasmer/pull/1880) Remove cmake dependency for tests -- [#1924](https://github.com/wasmerio/wasmer/pull/1924) Rename reference implementation `wasmer::Tunables` to `wasmer::BaseTunables`. Export trait `wasmer_engine::Tunables` as `wasmer::Tunables`. - -### Fixed - -- [#1865](https://github.com/wasmerio/wasmer/pull/1865) Fix memory leaks with host function environments. -- [#1870](https://github.com/wasmerio/wasmer/pull/1870) Fixed Trap instruction address maps in Singlepass -* [#1914](https://github.com/wasmerio/wasmer/pull/1914) Implemented `TryFrom for Pages` instead of `From for Pages` to properly handle overflow errors - -## 1.0.0-beta1 - 2020-12-01 - -### Added - -- [#1839](https://github.com/wasmerio/wasmer/pull/1839) Added support for Metering Middleware -- [#1837](https://github.com/wasmerio/wasmer/pull/1837) It is now possible to use exports of an `Instance` even after the `Instance` has been freed -- [#1831](https://github.com/wasmerio/wasmer/pull/1831) Added support for Apple Silicon chips (`arm64-apple-darwin`) -- [#1739](https://github.com/wasmerio/wasmer/pull/1739) Improved function environment setup via `WasmerEnv` proc macro. -- [#1649](https://github.com/wasmerio/wasmer/pull/1649) Add outline of migration to 1.0.0 docs. - -### Changed - -- [#1739](https://github.com/wasmerio/wasmer/pull/1739) Environments passed to host function- must now implement the `WasmerEnv` trait. You can implement it on your existing type with `#[derive(WasmerEnv)]`. -- [#1838](https://github.com/wasmerio/wasmer/pull/1838) Deprecate `WasiEnv::state_mut`: prefer `WasiEnv::state` instead. -- [#1663](https://github.com/wasmerio/wasmer/pull/1663) Function environments passed to host functions now must be passed by `&` instead of `&mut`. This is a breaking change. This change fixes a race condition when a host function is called from multiple threads. If you need mutability in your environment, consider using `std::sync::Mutex` or other synchronization primitives. -- [#1830](https://github.com/wasmerio/wasmer/pull/1830) Minimum supported Rust version bumped to 1.47.0 -- [#1810](https://github.com/wasmerio/wasmer/pull/1810) Make the `state` field of `WasiEnv` public - -### Fixed - -- [#1857](https://github.com/wasmerio/wasmer/pull/1857) Fix dynamic function with new Environment API -- [#1855](https://github.com/wasmerio/wasmer/pull/1855) Fix memory leak when using `wat2wasm` in the C API, the function now takes its output parameter by pointer rather than returning an allocated `wasm_byte_vec_t`. -- [#1841](https://github.com/wasmerio/wasmer/pull/1841) We will now panic when attempting to use a native function with a captured env as a host function. Previously this would silently do the wrong thing. See [#1840](https://github.com/wasmerio/wasmer/pull/1840) for info about Wasmer's support of closures as host functions. -- [#1764](https://github.com/wasmerio/wasmer/pull/1764) Fix bug in WASI `path_rename` allowing renamed files to be 1 directory below a preopened directory. - -## 1.0.0-alpha5 - 2020-11-06 - -### Added - -- [#1761](https://github.com/wasmerio/wasmer/pull/1761) Implement the `wasm_trap_t**` argument of `wasm_instance_new` in the Wasm C API. -- [#1687](https://github.com/wasmerio/wasmer/pull/1687) Add basic table example; fix ownership of local memory and local table metadata in the VM. -- [#1751](https://github.com/wasmerio/wasmer/pull/1751) Implement `wasm_trap_t` inside a function declared with `wasm_func_new_with_env` in the Wasm C API. -- [#1741](https://github.com/wasmerio/wasmer/pull/1741) Implement `wasm_memory_type` in the Wasm C API. -- [#1736](https://github.com/wasmerio/wasmer/pull/1736) Implement `wasm_global_type` in the Wasm C API. -- [#1699](https://github.com/wasmerio/wasmer/pull/1699) Update `wasm.h` to its latest version. -- [#1685](https://github.com/wasmerio/wasmer/pull/1685) Implement `wasm_exporttype_delete` in the Wasm C API. -- [#1725](https://github.com/wasmerio/wasmer/pull/1725) Implement `wasm_func_type` in the Wasm C API. -- [#1715](https://github.com/wasmerio/wasmer/pull/1715) Register errors from `wasm_module_serialize` in the Wasm C API. -- [#1709](https://github.com/wasmerio/wasmer/pull/1709) Implement `wasm_module_name` and `wasm_module_set_name` in the Wasm(er) C API. -- [#1700](https://github.com/wasmerio/wasmer/pull/1700) Implement `wasm_externtype_copy` in the Wasm C API. -- [#1785](https://github.com/wasmerio/wasmer/pull/1785) Add more examples on the Rust API. -- [#1783](https://github.com/wasmerio/wasmer/pull/1783) Handle initialized but empty results in `wasm_func_call` in the Wasm C API. -- [#1780](https://github.com/wasmerio/wasmer/pull/1780) Implement new SIMD zero-extend loads in compiler-llvm. -- [#1754](https://github.com/wasmerio/wasmer/pull/1754) Implement aarch64 ABI for compiler-llvm. -- [#1693](https://github.com/wasmerio/wasmer/pull/1693) Add `wasmer create-exe` subcommand. - -### Changed - -- [#1772](https://github.com/wasmerio/wasmer/pull/1772) Remove lifetime parameter from `NativeFunc`. -- [#1762](https://github.com/wasmerio/wasmer/pull/1762) Allow the `=` sign in a WASI environment variable value. -- [#1710](https://github.com/wasmerio/wasmer/pull/1710) Memory for function call trampolines is now owned by the Artifact. -- [#1781](https://github.com/wasmerio/wasmer/pull/1781) Cranelift upgrade to 0.67. -- [#1777](https://github.com/wasmerio/wasmer/pull/1777) Wasmparser update to 0.65. -- [#1775](https://github.com/wasmerio/wasmer/pull/1775) Improve LimitingTunables implementation. -- [#1720](https://github.com/wasmerio/wasmer/pull/1720) Autodetect llvm regardless of architecture. - -### Fixed - -- [#1718](https://github.com/wasmerio/wasmer/pull/1718) Fix panic in the API in some situations when the memory's min bound was greater than the memory's max bound. -- [#1731](https://github.com/wasmerio/wasmer/pull/1731) In compiler-llvm always load before store, to trigger any traps before any bytes are written. - -## 1.0.0-alpha4 - 2020-10-08 - -### Added -- [#1635](https://github.com/wasmerio/wasmer/pull/1635) Implement `wat2wasm` in the Wasm C API. -- [#1636](https://github.com/wasmerio/wasmer/pull/1636) Implement `wasm_module_validate` in the Wasm C API. -- [#1657](https://github.com/wasmerio/wasmer/pull/1657) Implement `wasm_trap_t` and `wasm_frame_t` for Wasm C API; add examples in Rust and C of exiting early with a host function. - -### Fixed -- [#1690](https://github.com/wasmerio/wasmer/pull/1690) Fix `wasm_memorytype_limits` where `min` and `max` represents pages, not bytes. Additionally, fixes the max limit sentinel value. -- [#1671](https://github.com/wasmerio/wasmer/pull/1671) Fix probestack firing inappropriately, and sometimes over/under allocating stack. -- [#1660](https://github.com/wasmerio/wasmer/pull/1660) Fix issue preventing map-dir aliases starting with `/` from working properly. -- [#1624](https://github.com/wasmerio/wasmer/pull/1624) Add Value::I32/Value::I64 converters from unsigned ints. - -### Changed -- [#1682](https://github.com/wasmerio/wasmer/pull/1682) Improve error reporting when making a memory with invalid settings. -- [#1691](https://github.com/wasmerio/wasmer/pull/1691) Bump minimum supported Rust version to 1.46.0 -- [#1645](https://github.com/wasmerio/wasmer/pull/1645) Move the install script to https://github.com/wasmerio/wasmer-install - -## 1.0.0-alpha3 - 2020-09-14 - -### Fixed - -- [#1620](https://github.com/wasmerio/wasmer/pull/1620) Fix bug causing the Wapm binary to not be packaged with the release -- [#1619](https://github.com/wasmerio/wasmer/pull/1619) Improve error message in engine-native when C compiler is missing - -## 1.0.0-alpha02.0 - 2020-09-11 - -### Added - -- [#1566](https://github.com/wasmerio/wasmer/pull/1566) Add support for opening special Unix files to the WASI FS - -### Fixed - -- [#1602](https://github.com/wasmerio/wasmer/pull/1602) Fix panic when calling host functions with negative numbers in certain situations -- [#1590](https://github.com/wasmerio/wasmer/pull/1590) Fix soundness issue in API of vm::Global - -## TODO: 1.0.0-alpha01.0 - -- Wasmer refactor lands - -## 0.17.1 - 2020-06-24 - -### Changed -- [#1439](https://github.com/wasmerio/wasmer/pull/1439) Move `wasmer-interface-types` into its own repository - -### Fixed - -- [#1554](https://github.com/wasmerio/wasmer/pull/1554) Update supported stable Rust version to 1.45.2. -- [#1552](https://github.com/wasmerio/wasmer/pull/1552) Disable `sigint` handler by default. - -## 0.17.0 - 2020-05-11 - -### Added -- [#1331](https://github.com/wasmerio/wasmer/pull/1331) Implement the `record` type and instrutions for WIT -- [#1345](https://github.com/wasmerio/wasmer/pull/1345) Adding ARM testing in Azure Pipelines -- [#1329](https://github.com/wasmerio/wasmer/pull/1329) New numbers and strings instructions for WIT -- [#1285](https://github.com/wasmerio/wasmer/pull/1285) Greatly improve errors in `wasmer-interface-types` -- [#1303](https://github.com/wasmerio/wasmer/pull/1303) NaN canonicalization for singlepass backend. -- [#1313](https://github.com/wasmerio/wasmer/pull/1313) Add new high-level public API through `wasmer` crate. Includes many updates including: - - Minor improvement: `imports!` macro now handles no trailing comma as well as a trailing comma in namespaces and between namespaces. - - New methods on `Module`: `exports`, `imports`, and `custom_sections`. - - New way to get exports from an instance with `let func_name: Func = instance.exports.get("func_name");`. - - Improved `Table` APIs including `set` which now allows setting functions directly. TODO: update this more if `Table::get` gets made public in this PR - - TODO: finish the list of changes here -- [#1305](https://github.com/wasmerio/wasmer/pull/1305) Handle panics from DynamicFunc. -- [#1300](https://github.com/wasmerio/wasmer/pull/1300) Add support for multiple versions of WASI tests: wasitests now test all versions of WASI. -- [#1292](https://github.com/wasmerio/wasmer/pull/1292) Experimental Support for Android (x86_64 and AArch64) - -### Fixed -- [#1283](https://github.com/wasmerio/wasmer/pull/1283) Workaround for floating point arguments and return values in `DynamicFunc`s. - -### Changed -- [#1401](https://github.com/wasmerio/wasmer/pull/1401) Make breaking change to `RuntimeError`: `RuntimeError` is now more explicit about its possible error values allowing for better insight into why a call into Wasm failed. -- [#1382](https://github.com/wasmerio/wasmer/pull/1382) Refactored test infranstructure (part 2) -- [#1380](https://github.com/wasmerio/wasmer/pull/1380) Refactored test infranstructure (part 1) -- [#1357](https://github.com/wasmerio/wasmer/pull/1357) Refactored bin commands into separate files -- [#1335](https://github.com/wasmerio/wasmer/pull/1335) Change mutability of `memory` to `const` in `wasmer_memory_data_length` in the C API -- [#1332](https://github.com/wasmerio/wasmer/pull/1332) Add option to `CompilerConfig` to force compiler IR verification off even when `debug_assertions` are enabled. This can be used to make debug builds faster, which may be important if you're creating a library that wraps Wasmer and depend on the speed of debug builds. -- [#1320](https://github.com/wasmerio/wasmer/pull/1320) Change `custom_sections` field in `ModuleInfo` to be more standards compliant by allowing multiple custom sections with the same name. To get the old behavior with the new API, you can add `.last().unwrap()` to accesses. For example, `module_info.custom_sections["custom_section_name"].last().unwrap()`. -- [#1301](https://github.com/wasmerio/wasmer/pull/1301) Update supported stable Rust version to 1.41.1. - -## 0.16.2 - 2020-03-11 - -### Fixed - -- [#1294](https://github.com/wasmerio/wasmer/pull/1294) Fix bug related to system calls in WASI that rely on reading from WasmPtrs as arrays of length 0. `WasmPtr` will now succeed on length 0 arrays again. - -## 0.16.1 - 2020-03-11 - -### Fixed - -- [#1291](https://github.com/wasmerio/wasmer/pull/1291) Fix installation packaging script to package the `wax` command. - -## 0.16.0 - 2020-03-11 - -### Added -- [#1286](https://github.com/wasmerio/wasmer/pull/1286) Updated Windows Wasmer icons. Add wax -- [#1284](https://github.com/wasmerio/wasmer/pull/1284) Implement string and memory instructions in `wasmer-interface-types` - -### Fixed -- [#1272](https://github.com/wasmerio/wasmer/pull/1272) Fix off-by-one error bug when accessing memory with a `WasmPtr` that contains the last valid byte of memory. Also changes the behavior of `WasmPtr` with a length of 0 and `WasmPtr` where `std::mem::size_of::()` is 0 to always return `None` - -## 0.15.0 - 2020-03-04 - -- [#1263](https://github.com/wasmerio/wasmer/pull/1263) Changed the behavior of some WASI syscalls to now handle preopened directories more properly. Changed default `--debug` logging to only show Wasmer-related messages. -- [#1217](https://github.com/wasmerio/wasmer/pull/1217) Polymorphic host functions based on dynamic trampoline generation. -- [#1252](https://github.com/wasmerio/wasmer/pull/1252) Allow `/` in wasi `--mapdir` wasm path. -- [#1212](https://github.com/wasmerio/wasmer/pull/1212) Add support for GDB JIT debugging: - - Add `--generate-debug-info` and `-g` flags to `wasmer run` to generate debug information during compilation. The debug info is passed via the GDB JIT interface to a debugger to allow source-level debugging of Wasm files. Currently only available on clif-backend. - - Break public middleware APIs: there is now a `source_loc` parameter that should be passed through if applicable. - - Break compiler trait methods such as `feed_local`, `feed_event` as well as `ModuleCodeGenerator::finalize`. - -## 0.14.1 - 2020-02-24 - -- [#1245](https://github.com/wasmerio/wasmer/pull/1245) Use Ubuntu 16.04 in CI so that we use an earlier version of GLIBC. -- [#1234](https://github.com/wasmerio/wasmer/pull/1234) Check for unused excluded spectest failures. -- [#1232](https://github.com/wasmerio/wasmer/pull/1232) `wasmer-interface-types` has a WAT decoder. - -## 0.14.0 - 2020-02-20 - -- [#1233](https://github.com/wasmerio/wasmer/pull/1233) Improved Wasmer C API release artifacts. -- [#1216](https://github.com/wasmerio/wasmer/pull/1216) `wasmer-interface-types` receives a binary encoder. -- [#1228](https://github.com/wasmerio/wasmer/pull/1228) Singlepass cleanup: Resolve several FIXMEs and remove protect_unix. -- [#1218](https://github.com/wasmerio/wasmer/pull/1218) Enable Cranelift verifier in debug mode. Fix bug with table indices being the wrong type. -- [#787](https://github.com/wasmerio/wasmer/pull/787) New crate `wasmer-interface-types` to implement WebAssembly Interface Types. -- [#1213](https://github.com/wasmerio/wasmer/pull/1213) Fixed WASI `fdstat` to detect `isatty` properly. -- [#1192](https://github.com/wasmerio/wasmer/pull/1192) Use `ExceptionCode` for error representation. -- [#1191](https://github.com/wasmerio/wasmer/pull/1191) Fix singlepass miscompilation on `Operator::CallIndirect`. -- [#1180](https://github.com/wasmerio/wasmer/pull/1180) Fix compilation for target `x86_64-unknown-linux-musl`. -- [#1170](https://github.com/wasmerio/wasmer/pull/1170) Improve the WasiFs builder API with convenience methods for overriding stdin, stdout, and stderr as well as a new sub-builder for controlling the permissions and properties of preopened directories. Also breaks that implementations of `WasiFile` must be `Send` -- please file an issue if this change causes you any issues. -- [#1161](https://github.com/wasmerio/wasmer/pull/1161) Require imported functions to be `Send`. This is a breaking change that fixes a soundness issue in the API. -- [#1140](https://github.com/wasmerio/wasmer/pull/1140) Use [`blake3`](https://github.com/BLAKE3-team/BLAKE3) as default hashing algorithm for caching. -- [#1129](https://github.com/wasmerio/wasmer/pull/1129) Standard exception types for singlepass backend. - -## 0.13.1 - 2020-01-16 -- Fix bug in wapm related to the `package.wasmer_extra_flags` entry in the manifest - -## 0.13.0 - 2020-01-15 - -Special thanks to [@repi](https://github.com/repi) and [@srenatus](https://github.com/srenatus) for their contributions! - -- [#1153](https://github.com/wasmerio/wasmer/pull/1153) Added Wasmex, an Elixir language integration, to the README -- [#1133](https://github.com/wasmerio/wasmer/pull/1133) New `wasmer_trap` function in the C API, to properly error from within a host function -- [#1147](https://github.com/wasmerio/wasmer/pull/1147) Remove `log` and `trace` macros from `wasmer-runtime-core`, remove `debug` and `trace` features from `wasmer-*` crates, use the `log` crate for logging and use `fern` in the Wasmer CLI binary to output log messages. Colorized output will be enabled automatically if printing to a terminal, to force colorization on or off, set the `WASMER_COLOR` environment variable to `true` or `false`. -- [#1128](https://github.com/wasmerio/wasmer/pull/1128) Fix a crash when a host function is missing and the `allow_missing_functions` flag is enabled -- [#1099](https://github.com/wasmerio/wasmer/pull/1099) Remove `backend::Backend` from `wasmer_runtime_core` -- [#1097](https://github.com/wasmerio/wasmer/pull/1097) Move inline breakpoint outside of runtime backend -- [#1095](https://github.com/wasmerio/wasmer/pull/1095) Update to cranelift 0.52. -- [#1092](https://github.com/wasmerio/wasmer/pull/1092) Add `get_utf8_string_with_nul` to `WasmPtr` to read nul-terminated strings from memory. -- [#1071](https://github.com/wasmerio/wasmer/pull/1071) Add support for non-trapping float-to-int conversions, enabled by default. - -## 0.12.0 - 2019-12-18 - -Special thanks to [@ethanfrey](https://github.com/ethanfrey), [@AdamSLevy](https://github.com/AdamSLevy), [@Jasper-Bekkers](https://github.com/Jasper-Bekkers), [@srenatus](https://github.com/srenatus) for their contributions! - -- [#1078](https://github.com/wasmerio/wasmer/pull/1078) Increase the maximum number of parameters `Func` can take -- [#1062](https://github.com/wasmerio/wasmer/pull/1062) Expose some opt-in Emscripten functions to the C API -- [#1032](https://github.com/wasmerio/wasmer/pull/1032) Change the signature of the Emscripten `abort` function to work with Emscripten 1.38.30 -- [#1060](https://github.com/wasmerio/wasmer/pull/1060) Test the capi with all the backends -- [#1069](https://github.com/wasmerio/wasmer/pull/1069) Add function `get_memory_and_data` to `Ctx` to help prevent undefined behavior and mutable aliasing. It allows accessing memory while borrowing data mutably for the `Ctx` lifetime. This new function is now being used in `wasmer-wasi`. -- [#1058](https://github.com/wasmerio/wasmer/pull/1058) Fix minor panic issue when `wasmer::compile_with` called with llvm backend. -- [#858](https://github.com/wasmerio/wasmer/pull/858) Minor panic fix when wasmer binary with `loader` option run a module without exported `_start` function. -- [#1056](https://github.com/wasmerio/wasmer/pull/1056) Improved `--invoke` args parsing (supporting `i32`, `i64`, `f32` and `f32`) in Wasmer CLI -- [#1054](https://github.com/wasmerio/wasmer/pull/1054) Improve `--invoke` output in Wasmer CLI -- [#1053](https://github.com/wasmerio/wasmer/pull/1053) For RuntimeError and breakpoints, use Box instead of Box. -- [#1052](https://github.com/wasmerio/wasmer/pull/1052) Fix minor panic and improve Error handling in singlepass backend. -- [#1050](https://github.com/wasmerio/wasmer/pull/1050) Attach C & C++ headers to releases. -- [#1033](https://github.com/wasmerio/wasmer/pull/1033) Set cranelift backend as default compiler backend again, require at least one backend to be enabled for Wasmer CLI -- [#1044](https://github.com/wasmerio/wasmer/pull/1044) Enable AArch64 support in the LLVM backend. -- [#1030](https://github.com/wasmerio/wasmer/pull/1030) Ability to generate `ImportObject` for a specific version WASI version with the C API. -- [#1028](https://github.com/wasmerio/wasmer/pull/1028) Introduce strict/non-strict modes for `get_wasi_version` -- [#1029](https://github.com/wasmerio/wasmer/pull/1029) Add the “floating” `WasiVersion::Latest` version. -- [#1006](https://github.com/wasmerio/wasmer/pull/1006) Fix minor panic issue when `wasmer::compile_with` called with llvm backend -- [#1009](https://github.com/wasmerio/wasmer/pull/1009) Enable LLVM verifier for all tests, add new llvm-backend-tests crate. -- [#1022](https://github.com/wasmerio/wasmer/pull/1022) Add caching support for Singlepass backend. -- [#1004](https://github.com/wasmerio/wasmer/pull/1004) Add the Auto backend to enable to adapt backend usage depending on wasm file executed. -- [#1068](https://github.com/wasmerio/wasmer/pull/1068) Various cleanups for the singlepass backend on AArch64. - -## 0.11.0 - 2019-11-22 - -- [#713](https://github.com/wasmerio/wasmer/pull/713) Add AArch64 support for singlepass. -- [#995](https://github.com/wasmerio/wasmer/pull/995) Detect when a global is read without being initialized (emit a proper error instead of panicking) -- [#996](https://github.com/wasmerio/wasmer/pull/997) Refactored spectests, emtests and wasitests to use default compiler logic -- [#992](https://github.com/wasmerio/wasmer/pull/992) Updates WAPM version to 0.4.1, fix arguments issue introduced in #990 -- [#990](https://github.com/wasmerio/wasmer/pull/990) Default wasmer CLI to `run`. Wasmer will now attempt to parse unrecognized command line options as if they were applied to the run command: `wasmer mywasm.wasm --dir=.` now works! -- [#987](https://github.com/wasmerio/wasmer/pull/987) Fix `runtime-c-api` header files when compiled by gnuc. -- [#957](https://github.com/wasmerio/wasmer/pull/957) Change the meaning of `wasmer_wasi::is_wasi_module` to detect any type of WASI module, add support for new wasi snapshot_preview1 -- [#934](https://github.com/wasmerio/wasmer/pull/934) Simplify float expressions in the LLVM backend. - -## 0.10.2 - 2019-11-18 - -- [#968](https://github.com/wasmerio/wasmer/pull/968) Added `--invoke` option to the command -- [#964](https://github.com/wasmerio/wasmer/pull/964) Enable cross-compilation for specific target -- [#971](https://github.com/wasmerio/wasmer/pull/971) In LLVM backend, use unaligned loads and stores for non-atomic accesses to wasmer memory. -- [#960](https://github.com/wasmerio/wasmer/pull/960) Fix `runtime-c-api` header files when compiled by clang. -- [#925](https://github.com/wasmerio/wasmer/pull/925) Host functions can be closures with a captured environment. -- [#917](https://github.com/wasmerio/wasmer/pull/917) Host functions (aka imported functions) may not have `&mut vm::Ctx` as first argument, i.e. the presence of the `&mut vm::Ctx` argument is optional. -- [#915](https://github.com/wasmerio/wasmer/pull/915) All backends share the same definition of `Trampoline` (defined in `wasmer-runtime-core`). - -## 0.10.1 - 2019-11-11 - -- [#952](https://github.com/wasmerio/wasmer/pull/952) Use C preprocessor to properly hide trampoline functions on Windows and non-x86_64 targets. - -## 0.10.0 - 2019-11-11 - -Special thanks to [@newpavlov](https://github.com/newpavlov) and [@Maxgy](https://github.com/Maxgy) for their contributions! - -- [#942](https://github.com/wasmerio/wasmer/pull/942) Deny missing docs in runtime core and add missing docs -- [#939](https://github.com/wasmerio/wasmer/pull/939) Fix bug causing attempts to append to files with WASI to delete the contents of the file -- [#940](https://github.com/wasmerio/wasmer/pull/940) Update supported Rust version to 1.38+ -- [#923](https://github.com/wasmerio/wasmer/pull/923) Fix memory leak in the C API caused by an incorrect cast in `wasmer_trampoline_buffer_destroy` -- [#921](https://github.com/wasmerio/wasmer/pull/921) In LLVM backend, annotate all memory accesses with TBAA metadata. -- [#883](https://github.com/wasmerio/wasmer/pull/883) Allow floating point operations to have arbitrary inputs, even including SNaNs. -- [#856](https://github.com/wasmerio/wasmer/pull/856) Expose methods in the runtime C API to get a WASI import object - -## 0.9.0 - 2019-10-23 - -Special thanks to @alocquet for their contributions! - -- [#898](https://github.com/wasmerio/wasmer/pull/898) State tracking is now disabled by default in the LLVM backend. It can be enabled with `--track-state`. -- [#861](https://github.com/wasmerio/wasmer/pull/861) Add descriptions to `unimplemented!` macro in various places -- [#897](https://github.com/wasmerio/wasmer/pull/897) Removes special casing of stdin, stdout, and stderr in WASI. Closing these files now works. Removes `stdin`, `stdout`, and `stderr` from `WasiFS`, replaced by the methods `stdout`, `stdout_mut`, and so on. -- [#863](https://github.com/wasmerio/wasmer/pull/863) Fix min and max for cases involving NaN and negative zero when using the LLVM backend. - -## 0.8.0 - 2019-10-02 - -Special thanks to @jdanford for their contributions! - -- [#850](https://github.com/wasmerio/wasmer/pull/850) New `WasiStateBuilder` API. small, add misc. breaking changes to existing API (for example, changing the preopen dirs arg on `wasi::generate_import_object` from `Vec` to `Vec`) -- [#852](https://github.com/wasmerio/wasmer/pull/852) Make minor grammar/capitalization fixes to README.md -- [#841](https://github.com/wasmerio/wasmer/pull/841) Slightly improve rustdoc documentation and small updates to outdated info in readme files -- [#836](https://github.com/wasmerio/wasmer/pull/836) Update Cranelift fork version to `0.44.0` -- [#839](https://github.com/wasmerio/wasmer/pull/839) Change supported version to stable Rust 1.37+ -- [#834](https://github.com/wasmerio/wasmer/pull/834) Fix panic when unwraping `wasmer` arguments -- [#835](https://github.com/wasmerio/wasmer/pull/835) Add parallel execution example (independent instances created from the same `ImportObject` and `Module` run with rayon) -- [#834](https://github.com/wasmerio/wasmer/pull/834) Fix panic when parsing numerical arguments for no-ABI targets run with the wasmer binary -- [#833](https://github.com/wasmerio/wasmer/pull/833) Add doc example of using ImportObject's new `maybe_with_namespace` method -- [#832](https://github.com/wasmerio/wasmer/pull/832) Delete unused runtime ABI -- [#809](https://github.com/wasmerio/wasmer/pull/809) Fix bugs leading to panics in `LocalBacking`. -- [#831](https://github.com/wasmerio/wasmer/pull/831) Add support for atomic operations, excluding wait and notify, to singlepass. -- [#822](https://github.com/wasmerio/wasmer/pull/822) Update Cranelift fork version to `0.43.1` -- [#829](https://github.com/wasmerio/wasmer/pull/829) Fix deps on `make bench-*` commands; benchmarks don't compile other backends now -- [#807](https://github.com/wasmerio/wasmer/pull/807) Implement Send for `Instance`, breaking change on `ImportObject`, remove method `get_namespace` replaced with `with_namespace` and `maybe_with_namespace` -- [#817](https://github.com/wasmerio/wasmer/pull/817) Add document for tracking features across backends and language integrations, [docs/feature_matrix.md] -- [#823](https://github.com/wasmerio/wasmer/issues/823) Improved Emscripten / WASI integration -- [#821](https://github.com/wasmerio/wasmer/issues/821) Remove patch version on most deps Cargo manifests. This gives Wasmer library users more control over which versions of the deps they use. -- [#820](https://github.com/wasmerio/wasmer/issues/820) Remove null-pointer checks in `WasmPtr` from runtime-core, re-add them in Emscripten -- [#803](https://github.com/wasmerio/wasmer/issues/803) Add method to `Ctx` to invoke functions by their `TableIndex` -- [#790](https://github.com/wasmerio/wasmer/pull/790) Fix flaky test failure with LLVM, switch to large code model. -- [#788](https://github.com/wasmerio/wasmer/pull/788) Use union merge on the changelog file. -- [#785](https://github.com/wasmerio/wasmer/pull/785) Include Apache license file for spectests. -- [#786](https://github.com/wasmerio/wasmer/pull/786) In the LLVM backend, lower atomic wasm operations to atomic machine instructions. -- [#784](https://github.com/wasmerio/wasmer/pull/784) Fix help string for wasmer run. - -## 0.7.0 - 2019-09-12 - -Special thanks to @YaronWittenstein @penberg for their contributions. - -- [#776](https://github.com/wasmerio/wasmer/issues/776) Allow WASI preopened fds to be closed -- [#774](https://github.com/wasmerio/wasmer/issues/774) Add more methods to the `WasiFile` trait -- [#772](https://github.com/wasmerio/wasmer/issues/772) [#770](https://github.com/wasmerio/wasmer/issues/770) Handle more internal failures by passing back errors -- [#756](https://github.com/wasmerio/wasmer/issues/756) Allow NULL parameter and 0 arity in `wasmer_export_func_call` C API -- [#747](https://github.com/wasmerio/wasmer/issues/747) Return error instead of panicking on traps when using the Wasmer binary -- [#741](https://github.com/wasmerio/wasmer/issues/741) Add validate Wasm fuzz target -- [#733](https://github.com/wasmerio/wasmer/issues/733) Remove dependency on compiler backends for `middleware-common` -- [#732](https://github.com/wasmerio/wasmer/issues/732) [#731](https://github.com/wasmerio/wasmer/issues/731) WASI bug fixes and improvements -- [#726](https://github.com/wasmerio/wasmer/issues/726) Add serialization and deserialization for Wasi State -- [#716](https://github.com/wasmerio/wasmer/issues/716) Improve portability of install script -- [#714](https://github.com/wasmerio/wasmer/issues/714) Add Code of Conduct -- [#708](https://github.com/wasmerio/wasmer/issues/708) Remove unconditional dependency on Cranelift in the C API -- [#703](https://github.com/wasmerio/wasmer/issues/703) Fix compilation on AArch64 Linux -- [#702](https://github.com/wasmerio/wasmer/issues/702) Add SharedMemory to Wasmer. Add `--enable-threads` flag, add partial implementation of atomics to LLVM backend. -- [#698](https://github.com/wasmerio/wasmer/issues/698) [#690](https://github.com/wasmerio/wasmer/issues/690) [#687](https://github.com/wasmerio/wasmer/issues/690) Fix panics in Emscripten -- [#689](https://github.com/wasmerio/wasmer/issues/689) Replace `wasmer_runtime_code::memory::Atomic` with `std::sync::atomic` atomics, changing its interface -- [#680](https://github.com/wasmerio/wasmer/issues/680) [#673](https://github.com/wasmerio/wasmer/issues/673) [#669](https://github.com/wasmerio/wasmer/issues/669) [#660](https://github.com/wasmerio/wasmer/issues/660) [#659](https://github.com/wasmerio/wasmer/issues/659) Misc. runtime and singlepass fixes -- [#677](https://github.com/wasmerio/wasmer/issues/677) [#675](https://github.com/wasmerio/wasmer/issues/675) [#674](https://github.com/wasmerio/wasmer/issues/674) LLVM backend fixes and improvements -- [#671](https://github.com/wasmerio/wasmer/issues/671) Implement fs polling in `wasi::poll_oneoff` for Unix-like platforms -- [#656](https://github.com/wasmerio/wasmer/issues/656) Move CI to Azure Pipelines -- [#650](https://github.com/wasmerio/wasmer/issues/650) Implement `wasi::path_rename`, improve WASI FS public api, and allow open files to exist even when the underlying file is deleted -- [#643](https://github.com/wasmerio/wasmer/issues/643) Implement `wasi::path_symlink` and improve WASI FS public api IO error reporting -- [#608](https://github.com/wasmerio/wasmer/issues/608) Implement wasi syscalls `fd_allocate`, `fd_sync`, `fd_pread`, `path_link`, `path_filestat_set_times`; update WASI fs API in a WIP way; reduce coupling of WASI code to host filesystem; make debug messages from WASI more readable; improve rights-checking when calling syscalls; implement reference counting on inodes; misc bug fixes and improvements -- [#616](https://github.com/wasmerio/wasmer/issues/616) Create the import object separately from instance instantiation in `runtime-c-api` -- [#620](https://github.com/wasmerio/wasmer/issues/620) Replace one `throw()` with `noexcept` in llvm backend -- [#618](https://github.com/wasmerio/wasmer/issues/618) Implement `InternalEvent::Breakpoint` in the llvm backend to allow metering in llvm -- [#615](https://github.com/wasmerio/wasmer/issues/615) Eliminate `FunctionEnvironment` construction in `feed_event()` speeding up to 70% of compilation in clif -- [#609](https://github.com/wasmerio/wasmer/issues/609) Update dependencies -- [#602](https://github.com/wasmerio/wasmer/issues/602) C api extract instance context from instance -- [#590](https://github.com/wasmerio/wasmer/issues/590) Error visibility changes in wasmer-c-api -- [#589](https://github.com/wasmerio/wasmer/issues/589) Make `wasmer_byte_array` fields `public` in wasmer-c-api - -## 0.6.0 - 2019-07-31 -- [#603](https://github.com/wasmerio/wasmer/pull/603) Update Wapm-cli, bump version numbers -- [#595](https://github.com/wasmerio/wasmer/pull/595) Add unstable public API for interfacing with the WASI file system in plugin-like usecases -- [#598](https://github.com/wasmerio/wasmer/pull/598) LLVM Backend is now supported in Windows -- [#599](https://github.com/wasmerio/wasmer/pull/599) Fix llvm backend failures in fat spec tests and simd_binaryen spec test. -- [#579](https://github.com/wasmerio/wasmer/pull/579) Fix bug in caching with LLVM and Singlepass backends. - Add `default-backend-singlepass`, `default-backend-llvm`, and `default-backend-cranelift` features to `wasmer-runtime` - to control the `default_compiler()` function (this is a breaking change). Add `compiler_for_backend` function in `wasmer-runtime` -- [#561](https://github.com/wasmerio/wasmer/pull/561) Call the `data_finalizer` field on the `Ctx` -- [#576](https://github.com/wasmerio/wasmer/pull/576) fix `Drop` of uninit `Ctx` -- [#542](https://github.com/wasmerio/wasmer/pull/542) Add SIMD support to Wasmer (LLVM backend only) - - Updates LLVM to version 8.0 - -## 0.5.7 - 2019-07-23 -- [#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 misc. improvements to most syscalls touching the filesystem - -## 0.5.6 - 2019-07-16 -- [#565](https://github.com/wasmerio/wasmer/pull/565) Update wapm and bump version to 0.5.6 -- [#563](https://github.com/wasmerio/wasmer/pull/563) Improve wasi testing infrastructure - - fixes arg parsing from comments & fixes the mapdir test to have the native code doing the same thing as the WASI code - - makes wasitests-generate output stdout/stderr by default & adds function to print stdout and stderr for a command if it fails - - compiles wasm with size optimizations & strips generated wasm with wasm-strip -- [#554](https://github.com/wasmerio/wasmer/pull/554) Finish implementation of `wasi::fd_seek`, fix bug in filestat -- [#550](https://github.com/wasmerio/wasmer/pull/550) Fix singlepass compilation error with `imul` instruction - - -## 0.5.5 - 2019-07-10 -- [#541](https://github.com/wasmerio/wasmer/pull/541) Fix dependency graph by making separate test crates; ABI implementations should not depend on compilers. Add Cranelift fork as git submodule of clif-backend -- [#537](https://github.com/wasmerio/wasmer/pull/537) Add hidden flag (`--cache-key`) to use prehashed key into the compiled wasm cache and change compiler backend-specific caching to use directories -- [#536](https://github.com/wasmerio/wasmer/pull/536) ~Update cache to use compiler backend name in cache key~ - -## 0.5.4 - 2019-07-06 -- [#529](https://github.com/wasmerio/wasmer/pull/529) Updates the Wasm Interface library, which is used by wapm, with bug fixes and error message improvements - -## 0.5.3 - 2019-07-03 -- [#523](https://github.com/wasmerio/wasmer/pull/523) Update wapm version to fix bug related to signed packages in the global namespace and locally-stored public keys - -## 0.5.2 - 2019-07-02 -- [#516](https://github.com/wasmerio/wasmer/pull/516) Add workaround for singlepass miscompilation on GetLocal -- [#521](https://github.com/wasmerio/wasmer/pull/521) Update Wapm-cli, bump version numbers -- [#518](https://github.com/wasmerio/wasmer/pull/518) Update Cranelift and WasmParser -- [#514](https://github.com/wasmerio/wasmer/pull/514) [#519](https://github.com/wasmerio/wasmer/pull/519) Improved Emscripten network related calls, added a null check to `WasmPtr` -- [#515](https://github.com/wasmerio/wasmer/pull/515) Improved Emscripten dyncalls -- [#513](https://github.com/wasmerio/wasmer/pull/513) Fix emscripten lseek implementation. -- [#510](https://github.com/wasmerio/wasmer/pull/510) Simplify construction of floating point constants in LLVM backend. Fix LLVM assertion failure due to definition of %ctx. - -## 0.5.1 - 2019-06-24 -- [#508](https://github.com/wasmerio/wasmer/pull/508) Update wapm version, includes bug fixes - -## 0.5.0 - 2019-06-17 - -- [#471](https://github.com/wasmerio/wasmer/pull/471) Added missing functions to run Python. Improved Emscripten bindings -- [#494](https://github.com/wasmerio/wasmer/pull/494) Remove deprecated type aliases from libc in the runtime C API -- [#493](https://github.com/wasmerio/wasmer/pull/493) `wasmer_module_instantiate` has better error messages in the runtime C API -- [#474](https://github.com/wasmerio/wasmer/pull/474) Set the install name of the dylib to `@rpath` -- [#490](https://github.com/wasmerio/wasmer/pull/490) Add MiddlewareChain and StreamingCompiler to runtime -- [#487](https://github.com/wasmerio/wasmer/pull/487) Fix stack offset check in singlepass backend -- [#450](https://github.com/wasmerio/wasmer/pull/450) Added Metering -- [#481](https://github.com/wasmerio/wasmer/pull/481) Added context trampoline into runtime -- [#484](https://github.com/wasmerio/wasmer/pull/484) Fix bugs in emscripten socket syscalls -- [#476](https://github.com/wasmerio/wasmer/pull/476) Fix bug with wasi::environ_get, fix off by one error in wasi::environ_sizes_get -- [#470](https://github.com/wasmerio/wasmer/pull/470) Add mapdir support to Emscripten, implement getdents for Unix -- [#467](https://github.com/wasmerio/wasmer/pull/467) `wasmer_instantiate` returns better error messages in the runtime C API -- [#463](https://github.com/wasmerio/wasmer/pull/463) Fix bug in WASI path_open allowing one level above preopened dir to be accessed -- [#461](https://github.com/wasmerio/wasmer/pull/461) Prevent passing negative lengths in various places in the runtime C API -- [#459](https://github.com/wasmerio/wasmer/pull/459) Add monotonic and real time clocks for wasi on windows -- [#447](https://github.com/wasmerio/wasmer/pull/447) Add trace macro (`--features trace`) for more verbose debug statements -- [#451](https://github.com/wasmerio/wasmer/pull/451) Add `--mapdir=src:dest` flag to rename host directories in the guest context -- [#457](https://github.com/wasmerio/wasmer/pull/457) Implement file metadata for WASI, fix bugs in WASI clock code for Unix platforms - -## 0.4.2 - 2019-05-16 - -- [#416](https://github.com/wasmerio/wasmer/pull/416) Remote code loading framework -- [#449](https://github.com/wasmerio/wasmer/pull/449) Fix bugs: opening host files in filestat and opening with write permissions unconditionally in path_open -- [#442](https://github.com/wasmerio/wasmer/pull/442) Misc. WASI FS fixes and implement readdir -- [#440](https://github.com/wasmerio/wasmer/pull/440) Fix type mismatch between `wasmer_instance_call` and `wasmer_export_func_*_arity` functions in the runtime C API. -- [#269](https://github.com/wasmerio/wasmer/pull/269) Add better runtime docs -- [#432](https://github.com/wasmerio/wasmer/pull/432) Fix returned value of `wasmer_last_error_message` in the runtime C API -- [#429](https://github.com/wasmerio/wasmer/pull/429) Get wasi::path_filestat_get working for some programs; misc. minor WASI FS improvements -- [#413](https://github.com/wasmerio/wasmer/pull/413) Update LLVM backend to use new parser codegen traits - -## 0.4.1 - 2019-05-06 - -- [#426](https://github.com/wasmerio/wasmer/pull/426) Update wapm-cli submodule, bump version to 0.4.1 -- [#422](https://github.com/wasmerio/wasmer/pull/422) Improved Emscripten functions to run optipng and pngquant compiled to wasm -- [#409](https://github.com/wasmerio/wasmer/pull/409) Improved Emscripten functions to run JavascriptCore compiled to wasm -- [#399](https://github.com/wasmerio/wasmer/pull/399) Add example of using a plugin extended from WASI -- [#397](https://github.com/wasmerio/wasmer/pull/397) Fix WASI fs abstraction to work on Windows -- [#390](https://github.com/wasmerio/wasmer/pull/390) Pin released wapm version and add it as a git submodule -- [#408](https://github.com/wasmerio/wasmer/pull/408) Add images to windows installer and update installer to add wapm bin directory to path - -## 0.4.0 - 2019-04-23 - -- [#383](https://github.com/wasmerio/wasmer/pull/383) Hook up wasi exit code to wasmer cli. -- [#382](https://github.com/wasmerio/wasmer/pull/382) Improve error message on `--backend` flag to only suggest currently enabled backends -- [#381](https://github.com/wasmerio/wasmer/pull/381) Allow retrieving propagated user errors. -- [#379](https://github.com/wasmerio/wasmer/pull/379) Fix small return types from imported functions. -- [#371](https://github.com/wasmerio/wasmer/pull/371) Add more Debug impl for WASI types -- [#368](https://github.com/wasmerio/wasmer/pull/368) Fix issue with write buffering -- [#343](https://github.com/wasmerio/wasmer/pull/343) Implement preopened files for WASI and fix aligment issue when accessing WASI memory -- [#367](https://github.com/wasmerio/wasmer/pull/367) Add caching support to the LLVM backend. -- [#366](https://github.com/wasmerio/wasmer/pull/366) Remove `UserTrapper` trait to fix [#365](https://github.com/wasmerio/wasmer/issues/365). -- [#348](https://github.com/wasmerio/wasmer/pull/348) Refactor internal runtime ↔️ backend abstraction. -- [#355](https://github.com/wasmerio/wasmer/pull/355) Misc changes to `Cargo.toml`s for publishing -- [#352](https://github.com/wasmerio/wasmer/pull/352) Bump version numbers to 0.3.0 -- [#351](https://github.com/wasmerio/wasmer/pull/351) Add hidden option to specify wasm program name (can be used to improve error messages) -- [#350](https://github.com/wasmerio/wasmer/pull/350) Enforce that CHANGELOG.md is updated through CI. -- [#349](https://github.com/wasmerio/wasmer/pull/349) Add [CHANGELOG.md](https://github.com/wasmerio/wasmer/blob/master/CHANGELOG.md). - -## 0.3.0 - 2019-04-12 - -- [#276](https://github.com/wasmerio/wasmer/pull/276) [#288](https://github.com/wasmerio/wasmer/pull/288) [#344](https://github.com/wasmerio/wasmer/pull/344) Use new singlepass backend (with the `--backend=singlepass` when running Wasmer) -- [#338](https://github.com/wasmerio/wasmer/pull/338) Actually catch traps/panics/etc when using a typed func. -- [#325](https://github.com/wasmerio/wasmer/pull/325) Fixed func_index in debug mode -- [#323](https://github.com/wasmerio/wasmer/pull/323) Add validate subcommand to validate Wasm files -- [#321](https://github.com/wasmerio/wasmer/pull/321) Upgrade to Cranelift 0.3.0 -- [#319](https://github.com/wasmerio/wasmer/pull/319) Add Export and GlobalDescriptor to Runtime API -- [#310](https://github.com/wasmerio/wasmer/pull/310) Cleanup warnings -- [#299](https://github.com/wasmerio/wasmer/pull/299) [#300](https://github.com/wasmerio/wasmer/pull/300) [#301](https://github.com/wasmerio/wasmer/pull/301) [#303](https://github.com/wasmerio/wasmer/pull/303) [#304](https://github.com/wasmerio/wasmer/pull/304) [#305](https://github.com/wasmerio/wasmer/pull/305) [#306](https://github.com/wasmerio/wasmer/pull/306) [#307](https://github.com/wasmerio/wasmer/pull/307) Add support for WASI 🎉 -- [#286](https://github.com/wasmerio/wasmer/pull/286) Add extend to imports -- [#278](https://github.com/wasmerio/wasmer/pull/278) Add versioning to cache -- [#250](https://github.com/wasmerio/wasmer/pull/250) Setup bors +# Changelog + +*The format is based on [Keep a Changelog].* + +[Keep a Changelog]: http://keepachangelog.com/en/1.0.0/ + +Looking for changes that affect our C API? See the [C API Changelog](lib/c-api/CHANGELOG.md). + + +## **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 + +## 3.1.0 - 12/12/2022 + +## Added + + - [#3403](https://github.com/wasmerio/wasmer/pull/3403) Add wasm_importtype_copy to C API + +## Changed + + - [#3416](https://github.com/wasmerio/wasmer/pull/3416) Download and install packages via .tar.gz URLs and improve installation error message + - [#3402](https://github.com/wasmerio/wasmer/pull/3402) Do not run first command of wapm file and print all commands instead + - [#3400](https://github.com/wasmerio/wasmer/pull/3400) Use the wasm_bindgen_downcast crate for downcasting JsValues + - [#3363](https://github.com/wasmerio/wasmer/pull/3363) Store Used CpuFeature in Artifact instead of Present CpuFeatures for Singlepass + - [#3378](https://github.com/wasmerio/wasmer/pull/3378) Introduced EngineRef and AsEngineRef trait + - [#3386](https://github.com/wasmerio/wasmer/pull/3386) Restore Support For All Wasi Clock Types + - [#3153](https://github.com/wasmerio/wasmer/pull/3153) SharedMemory & Atomics + +## Fixed + + - [#3415](https://github.com/wasmerio/wasmer/pull/3415) Fix singlepass for Aarch64 + - [#3395](https://github.com/wasmerio/wasmer/pull/3395) Fix create-exe to be able to cross-compile on Windows + - [#3396](https://github.com/wasmerio/wasmer/pull/3396) Fix build doc and minimum-sys build + +## 3.0.2 - 25/11/2022 + +## Added + + - [#3364](https://github.com/wasmerio/wasmer/pull/3364) Added the actual LZCNT / TZCNT implementation + +## Changed + + - [#3365](https://github.com/wasmerio/wasmer/pull/3365) Improve FreeBSD support + - [#3368](https://github.com/wasmerio/wasmer/pull/3368) Remove wasi conditional compilation from wasmer-registry + - [#3367](https://github.com/wasmerio/wasmer/pull/3367) Change LLVM detection in Makefile + +## Fixed + + - [#3370](https://github.com/wasmerio/wasmer/pull/3370) Fix wasmer run not interpreting URLs correctly + display fixes + - [#3371](https://github.com/wasmerio/wasmer/pull/3371) Fix cargo binstall + + +## 3.0.1 - 23/11/2022 + +## Added + + - [#3361](https://github.com/wasmerio/wasmer/pull/3361) Give users feedback when they are running "wasmer add ..." + +## Changed + + - [#3360](https://github.com/wasmerio/wasmer/pull/3360) Introduce a "wasmer_registry::queries" module with all GraphQL queries + - [#3355](https://github.com/wasmerio/wasmer/pull/3355) Fetch the pirita download URL + - [#3344](https://github.com/wasmerio/wasmer/pull/3344) Revert #3145 + - [#3302](https://github.com/wasmerio/wasmer/pull/3302) Some Refactor of Singlepass compiler to have better error and cpu features handling + - [#3296](https://github.com/wasmerio/wasmer/pull/3296) Use the right collection when parsing type section + - [#3292](https://github.com/wasmerio/wasmer/pull/3292) Precompute offsets in VMOffsets + - [#3290](https://github.com/wasmerio/wasmer/pull/3290) Limit the use of clone when handling Compilation object + - [#3316](https://github.com/wasmerio/wasmer/pull/3316) Implement wasmer whoami + - [#3341](https://github.com/wasmerio/wasmer/pull/3341) Update CHANGELOG.md + +## Fixed + + - [#3342](https://github.com/wasmerio/wasmer/pull/3342) Fixes for 3.0.0 release + +## 3.0.0 - 20/11/2022 + +## Added + + - [#3339](https://github.com/wasmerio/wasmer/pull/3339) Fixes for wasmer login / wasmer add + - [#3337](https://github.com/wasmerio/wasmer/pull/3337) Add automation script to automate deploying releases on GitHub + - [#3338](https://github.com/wasmerio/wasmer/pull/3338) Re-add codecov to get coverage reports + +## Changed + + - [#3295](https://github.com/wasmerio/wasmer/pull/3295) Implement wasmer run {url} + +## Fixed + + +## 3.0.0-rc.3 - 2022/11/18 + +## Added + + - [#3314](https://github.com/wasmerio/wasmer/pull/3314) Add windows-gnu workflow + +## Changed + + - [#3317](https://github.com/wasmerio/wasmer/pull/3317) Port "wapm install" to Wasmer + - [#3318](https://github.com/wasmerio/wasmer/pull/3318) Bump the MSRV to 1.63 + - [#3319](https://github.com/wasmerio/wasmer/pull/3319) Disable 'Test integration CLI' on CI for the Windows platform as it's not working at all + - [#3297](https://github.com/wasmerio/wasmer/pull/3297) Implement wasmer login + - [#3311](https://github.com/wasmerio/wasmer/pull/3311) Export Module::IoCompileError as it's an error returned by an exported function + - [#2800](https://github.com/wasmerio/wasmer/pull/2800) RISC-V support + - [#3293](https://github.com/wasmerio/wasmer/pull/3293) Removed call to to_vec() on assembler.finalise() + - [#3288](https://github.com/wasmerio/wasmer/pull/3288) Rollback all the TARGET_DIR changes + - [#3284](https://github.com/wasmerio/wasmer/pull/3284) Makefile now handle TARGET_DIR env. var. for build too + - [#3276](https://github.com/wasmerio/wasmer/pull/3276) Remove unnecessary checks to test internet connection + - [#3266](https://github.com/wasmerio/wasmer/pull/3266) Return ENotCapable error when accessing unknown files on root (for #3263 and #3264) + - [#3275](https://github.com/wasmerio/wasmer/pull/3275) Disable printing "local package ... not found" in release mode + - [#3273](https://github.com/wasmerio/wasmer/pull/3273) Undo Makefile commit + +## Fixed + + - [#3299](https://github.com/wasmerio/wasmer/pull/3299) Fix "create-exe" for windows-x86_64 target + - [#3294](https://github.com/wasmerio/wasmer/pull/3294) Fix test sys yaml syntax + - [#3287](https://github.com/wasmerio/wasmer/pull/3287) Fix Makefile with TARGET_DIR end with release folder, removing it + - [#3286](https://github.com/wasmerio/wasmer/pull/3286) Fix Makefile with TARGET_DIR end with release folder + - [#3285](https://github.com/wasmerio/wasmer/pull/3285) Fix CI to setup TARGET_DIR to target/release directly + - [#3277](https://github.com/wasmerio/wasmer/pull/3277) Fix red CI on master + + +## 3.0.0-rc.2 - 2022/11/02 + +## Added + + +## Changed + + - [#3258](https://github.com/wasmerio/wasmer/pull/3258) Migrate pirita / native executables feature from wasmer-private + +## Fixed + + - [#3268](https://github.com/wasmerio/wasmer/pull/3268) Fix fd_right nightly test to avoid foo.txt file leftover + - [#3260](https://github.com/wasmerio/wasmer/pull/3260) Fix bug in wasmer run + - [#3257](https://github.com/wasmerio/wasmer/pull/3257) Fix linux-aarch64 build + + +## 3.0.0-rc.1 - 2022/10/25 + +## Added + + - [#3222](https://github.com/wasmerio/wasmer/pull/3222) Add function to retrieve function name from wasm_frame_t + - [#3240](https://github.com/wasmerio/wasmer/pull/3240) Fix filesystem rights on WASI, add integration test for file permissions + - [#3238](https://github.com/wasmerio/wasmer/pull/3238) Fixed main README ocaml homepage link and added ocaml in other language README + - [#3145](https://github.com/wasmerio/wasmer/pull/3145) C-API: add functions to overwrite stdin / stdout / stderr handlers + +## Changed + + - [#3215](https://github.com/wasmerio/wasmer/pull/3215) Update wasmer --version logic, integrate wapm-cli + - [#3248](https://github.com/wasmerio/wasmer/pull/3248) Move loupe CHANGELOG entry from 2.3.0 to 3.x + - [#3230](https://github.com/wasmerio/wasmer/pull/3230) Remove test if dest file exist on path_rename wasi syscall (for #3228) + - [#3061](https://github.com/wasmerio/wasmer/pull/3061) Removed trailing zero in WASI::fd_prestat_dir_name name return (for #3025) + - [#3223](https://github.com/wasmerio/wasmer/pull/3223) Delete lib/wasi-types-generated directory + - [#3178](https://github.com/wasmerio/wasmer/pull/3178) Feat enhanced tinytunable test + - [#3177](https://github.com/wasmerio/wasmer/pull/3177) Auto-generate wasi-types from .wit files + - [#3218](https://github.com/wasmerio/wasmer/pull/3218) Seal `HostFunctionKind` + +## Fixed + + - [#3221](https://github.com/wasmerio/wasmer/pull/3221) Fix #3197 + - [#3229](https://github.com/wasmerio/wasmer/pull/3229) Fixed version to nightly-2022-10-09 for the CI build Minimal Wasmer Headless again + - [#3227](https://github.com/wasmerio/wasmer/pull/3227) Fixed version to nightly-2022-10-09 for the CI build Minimal Wasmer Headless + - [#3226](https://github.com/wasmerio/wasmer/pull/3226) Fixed version to nightly-2002-10-09 for the CI build Minimal Wasmer Headless + - [#3211](https://github.com/wasmerio/wasmer/pull/3211) fix popcnt for aarch64 + - [#3204](https://github.com/wasmerio/wasmer/pull/3204) Fixed a typo in README + + +## 3.0.0-beta.2 - 2022/09/26 + +## Added + + - [#3176](https://github.com/wasmerio/wasmer/pull/3176) Add support for `cargo-binstall` + - [#3141](https://github.com/wasmerio/wasmer/pull/3141) The API breaking changes from future WASIX/Network/Threading addition + - [#3119](https://github.com/wasmerio/wasmer/pull/3119) Added LinearMemory trait + - [#3117](https://github.com/wasmerio/wasmer/pull/3117) Add tests for wasmer-cli create-{exe,obj} commands + - [#3101](https://github.com/wasmerio/wasmer/pull/3101) CI/build.yaml: add libwasmer headless in default distribution + - [#3090](https://github.com/wasmerio/wasmer/pull/3090) Added version to the wasmer cli + - [#3089](https://github.com/wasmerio/wasmer/pull/3089) Add wasi_* C-API function changes in migration guide for 3.0.0 + - [#3076](https://github.com/wasmerio/wasmer/pull/3076) Add support for cross-compiling in create-exe with zig cc WIP + - [#3072](https://github.com/wasmerio/wasmer/pull/3072) Add back `Function::*_with_env(…)` + - [#3048](https://github.com/wasmerio/wasmer/pull/3048) Add cloudcompiler.yaml + - [#3068](https://github.com/wasmerio/wasmer/pull/3068) create-{exe,obj}: add documentations and header file generation for create-obj + - [#3065](https://github.com/wasmerio/wasmer/pull/3065) Added '.' and '..' special folder t WASI fd_readdir return (for #3033) + +## Changed + + - [#3184](https://github.com/wasmerio/wasmer/pull/3184) Test libwasmer.dll on Windows + - [#3164](https://github.com/wasmerio/wasmer/pull/3164) Synchronize between -sys and -js tests + - [#3165](https://github.com/wasmerio/wasmer/pull/3165) Initial port of make test-js-core (port wasmer API to core) + - [#3138](https://github.com/wasmerio/wasmer/pull/3138) Js imports revamp + - [#3142](https://github.com/wasmerio/wasmer/pull/3142) Bump rust toolchain + - [#3116](https://github.com/wasmerio/wasmer/pull/3116) Multithreading, full networking and RPC for WebAssembly + - [#3130](https://github.com/wasmerio/wasmer/pull/3130) Remove panics from Artifact::deserialize + - [#3134](https://github.com/wasmerio/wasmer/pull/3134) Bring libwasmer-headless.a from 22MiB to 7.2MiB (on my machine) + - [#3131](https://github.com/wasmerio/wasmer/pull/3131) Update for migration-to-3.0.0 for MemoryView changes + - [#3123](https://github.com/wasmerio/wasmer/pull/3123) Lower libwasmer headless size + - [#3132](https://github.com/wasmerio/wasmer/pull/3132) Revert "Lower libwasmer headless size" + - [#3128](https://github.com/wasmerio/wasmer/pull/3128) scripts/publish.py: validate crates version before publishing + - [#3126](https://github.com/wasmerio/wasmer/pull/3126) scripts/publish.py: replace toposort dependency with python std graphlib module + - [#3122](https://github.com/wasmerio/wasmer/pull/3122) Update Cargo.lock dependencies + - [#3118](https://github.com/wasmerio/wasmer/pull/3118) Refactor Artifact enum into a struct + - [#3114](https://github.com/wasmerio/wasmer/pull/3114) Implemented shared memory for Wasmer in preparation for multithreading + - [#3104](https://github.com/wasmerio/wasmer/pull/3104) Re-enabled ExternRef tests + - [#3103](https://github.com/wasmerio/wasmer/pull/3103) create-exe: prefer libwasmer headless when cross-compiling + - [#3097](https://github.com/wasmerio/wasmer/pull/3097) MemoryView lifetime tied to memory and not StoreRef + - [#3095](https://github.com/wasmerio/wasmer/pull/3095) create-exe: list supported cross-compilation target triples in help … + - [#3096](https://github.com/wasmerio/wasmer/pull/3096) create-exe: use cached wasmer tarballs for network fetches + - [#3083](https://github.com/wasmerio/wasmer/pull/3083) Disable wasm build in build CI + - [#3081](https://github.com/wasmerio/wasmer/pull/3081) 3.0.0-beta release + - [#3079](https://github.com/wasmerio/wasmer/pull/3079) Migrate to clap from structopt + - [#3075](https://github.com/wasmerio/wasmer/pull/3075) Remove __wbindgen_thread_id + - [#3074](https://github.com/wasmerio/wasmer/pull/3074) Update chrono to 0.4.20, avoiding RUSTSEC-2020-0159 + - [#3070](https://github.com/wasmerio/wasmer/pull/3070) wasmer-cli: Allow create-exe to receive a static object as input + - [#3069](https://github.com/wasmerio/wasmer/pull/3069) Remove native feature entry from docs.rs metadata + - [#3057](https://github.com/wasmerio/wasmer/pull/3057) wasmer-cli: create-obj command + - [#3060](https://github.com/wasmerio/wasmer/pull/3060) CI: Unset rustup override after usage instead of setting it to stable + +## Fixed + + - [#3192](https://github.com/wasmerio/wasmer/pull/3192) fix the typos + - [#3185](https://github.com/wasmerio/wasmer/pull/3185) Fix `wasmer compile` command for non-x86 target + - [#3129](https://github.com/wasmerio/wasmer/pull/3129) Fix differences between -sys and -js API + - [#3137](https://github.com/wasmerio/wasmer/pull/3137) Fix cache path not being present during installation of cross-tarball + - [#3115](https://github.com/wasmerio/wasmer/pull/3115) Fix static object signature deserialization + - [#3093](https://github.com/wasmerio/wasmer/pull/3093) Fixed a potential issue when renaming a file + - [#3088](https://github.com/wasmerio/wasmer/pull/3088) Fixed an issue when renaming a file from a preopened dir directly (for 3084) + - [#3078](https://github.com/wasmerio/wasmer/pull/3078) Fix errors from "make lint" + - [#3052](https://github.com/wasmerio/wasmer/pull/3052) Fixed a memory corruption issue with JS memory operations that were r… + - [#3058](https://github.com/wasmerio/wasmer/pull/3058) Fix trap tracking + + +## 3.0.0-alpha.4 - 2022/07/28 + +## Added + + - [#3035](https://github.com/wasmerio/wasmer/pull/3035) Added a simple divide by zero trap wast test (for #1899) + - [#3008](https://github.com/wasmerio/wasmer/pull/3008) Add check-public-api.yaml workflow + - [#3021](https://github.com/wasmerio/wasmer/pull/3021) Added back some needed relocation for arm64 llvm compiler + - [#2982](https://github.com/wasmerio/wasmer/pull/2982) Add a `rustfmt.toml` file to the repository + - [#2953](https://github.com/wasmerio/wasmer/pull/2953) Makefile: add `check` target + - [#2952](https://github.com/wasmerio/wasmer/pull/2952) CI: add make build-wasmer-wasm test + +## Changed + + - [#3051](https://github.com/wasmerio/wasmer/pull/3051) Updated Crenelift to v0.86.1 + - [#3038](https://github.com/wasmerio/wasmer/pull/3038) Re-introduce create-exe to wasmer-cli v3.0 + - [#3049](https://github.com/wasmerio/wasmer/pull/3049) Disable traps::trap_display_multi_module test for Windows+singlepass + - [#3047](https://github.com/wasmerio/wasmer/pull/3047) Improved EngineBuilder API + - [#3046](https://github.com/wasmerio/wasmer/pull/3046) Merge Backend into EngineBuilder and refactor feature flags + - [#3039](https://github.com/wasmerio/wasmer/pull/3039) Improved hashing/ids of function envs + - [#3029](https://github.com/wasmerio/wasmer/pull/3029) Remove Engine, Artifact traits, merge all Engines into one, make everything rkyv serialazable + - [#2892](https://github.com/wasmerio/wasmer/pull/2892) Implement new Context API for Wasmer 3.0 + - [#3031](https://github.com/wasmerio/wasmer/pull/3031) Update docs/migration_to_3.0.0.md + - [#3030](https://github.com/wasmerio/wasmer/pull/3030) Remove cranelift dependency from wasmer-wasi + - [#3028](https://github.com/wasmerio/wasmer/pull/3028) Ctx store rename + - [#3023](https://github.com/wasmerio/wasmer/pull/3023) Changed CI rust install action to dtolnay one + - [#3013](https://github.com/wasmerio/wasmer/pull/3013) Context api refactor + - [#2999](https://github.com/wasmerio/wasmer/pull/2999) Support --invoke option for emscripten files without _start function + - [#3003](https://github.com/wasmerio/wasmer/pull/3003) Remove RuntimeError::raise from public API + - [#3000](https://github.com/wasmerio/wasmer/pull/3000) Allow debugging of EXC_BAD_INSTRUCTION on macOS + - [#2946](https://github.com/wasmerio/wasmer/pull/2946) Removing dylib and staticlib engines in favor of a single Universal Engine + - [#2996](https://github.com/wasmerio/wasmer/pull/2996) Migrated al examples to new Context API + - [#2973](https://github.com/wasmerio/wasmer/pull/2973) Port C API to new Context API + - [#2974](https://github.com/wasmerio/wasmer/pull/2974) Context api tests + - [#2988](https://github.com/wasmerio/wasmer/pull/2988) Have make targets install-capi-lib,install-pkgconfig work without building the wasmer binary + - [#2976](https://github.com/wasmerio/wasmer/pull/2976) Upgrade enumset minimum version to one that compiles + - [#2969](https://github.com/wasmerio/wasmer/pull/2969) Port JS API to new Context API + - [#2966](https://github.com/wasmerio/wasmer/pull/2966) Singlepass nopanic + - [#2949](https://github.com/wasmerio/wasmer/pull/2949) Switch back to using custom LLVM builds on CI + - [#2963](https://github.com/wasmerio/wasmer/pull/2963) Remove libxcb and libwayland dependencies from wasmer-cli release build + - [#2957](https://github.com/wasmerio/wasmer/pull/2957) Enable multi-value handling in Singlepass compiler + - [#2941](https://github.com/wasmerio/wasmer/pull/2941) Implementation of WASIX and a fully networking for Web Assembly + - [#2947](https://github.com/wasmerio/wasmer/pull/2947) - Converted the WASI js test into a generic stdio test that works for… + - [#2940](https://github.com/wasmerio/wasmer/pull/2940) Merge `wasmer3` back to `master` branch + - [#2939](https://github.com/wasmerio/wasmer/pull/2939) Rename NativeFunc to TypedFunction + +## Fixed + + - [#3045](https://github.com/wasmerio/wasmer/pull/3045) Fixed WASI fd_read syscall when reading multiple iovs and read is partial (for #2904) + - [#2997](https://github.com/wasmerio/wasmer/pull/2997) Fix "run --invoke [function]" to behave the same as "run" + - [#3027](https://github.com/wasmerio/wasmer/pull/3027) Fixed residual package-doc issues + - [#3026](https://github.com/wasmerio/wasmer/pull/3026) test-js.yaml: fix typo + - [#3017](https://github.com/wasmerio/wasmer/pull/3017) Fixed translation in README.md + - [#3001](https://github.com/wasmerio/wasmer/pull/3001) Fix context capi ci errors + - [#2967](https://github.com/wasmerio/wasmer/pull/2967) Fix singlepass on arm64 that was trying to emit a sub opcode with a constant as destination (for #2959) + - [#2954](https://github.com/wasmerio/wasmer/pull/2954) Some fixes to x86_64 Singlepass compiler, when using atomics + - [#2950](https://github.com/wasmerio/wasmer/pull/2950) compiler-cranelift: Fix typo in enum variant + - [#2948](https://github.com/wasmerio/wasmer/pull/2948) Fix regression on gen_import_call_trampoline_arm64() + - [#2943](https://github.com/wasmerio/wasmer/pull/2943) Fix build error on some archs by using c_char instead of i8 + - [#2944](https://github.com/wasmerio/wasmer/pull/2944) Fix duplicate entries in the CHANGELOG + - [#2942](https://github.com/wasmerio/wasmer/pull/2942) Fix clippy lints + +## 2.3.0 - 2022/06/06 + +### Added +- [#2862](https://github.com/wasmerio/wasmer/pull/2862) Added CI builds for linux-aarch64 target. +- [#2811](https://github.com/wasmerio/wasmer/pull/2811) Added support for EH Frames in singlepass +- [#2851](https://github.com/wasmerio/wasmer/pull/2851) Allow Wasmer to compile to Wasm/WASI + +### Changed +- [#2807](https://github.com/wasmerio/wasmer/pull/2807) Run Wasm code in a separate stack +- [#2802](https://github.com/wasmerio/wasmer/pull/2802) Support Dylib engine with Singlepass +- [#2836](https://github.com/wasmerio/wasmer/pull/2836) Improve TrapInformation data stored at runtime +- [#2864](https://github.com/wasmerio/wasmer/pull/2864) `wasmer-cli`: remove wasi-experimental-io-devices from default builds +- [#2933](https://github.com/wasmerio/wasmer/pull/2933) Rename NativeFunc to TypedFunction. + +### Fixed +- [#2829](https://github.com/wasmerio/wasmer/pull/2829) Improve error message oriented from JS object. +- [#2828](https://github.com/wasmerio/wasmer/pull/2828) Fix JsImportObject resolver. +- [#2872](https://github.com/wasmerio/wasmer/pull/2872) Fix `WasmerEnv` finalizer +- [#2821](https://github.com/wasmerio/wasmer/pull/2821) Opt in `sys` feature + +## 2.2.1 - 2022/03/15 + +### Fixed +- [#2812](https://github.com/wasmerio/wasmer/pull/2812) Fixed another panic due to incorrect drop ordering. + +## 2.2.0 - 2022/02/28 + +### Added +- [#2775](https://github.com/wasmerio/wasmer/pull/2775) Added support for SSE 4.2 in the Singlepass compiler as an alternative to AVX. +- [#2805](https://github.com/wasmerio/wasmer/pull/2805) Enabled WASI experimental I/O devices by default in releases. + +### Fixed +- [#2795](https://github.com/wasmerio/wasmer/pull/2795) Fixed a bug in the Singlepass compiler introduced in #2775. +- [#2806](https://github.com/wasmerio/wasmer/pull/2806) Fixed a panic due to incorrect drop ordering of `Module` fields. + +## 2.2.0-rc2 - 2022/02/15 + +### Fixed +- [#2778](https://github.com/wasmerio/wasmer/pull/2778) Fixed f32_load/f64_load in Singlepass. Also fixed issues with out-of-range conditional branches. +- [#2786](https://github.com/wasmerio/wasmer/pull/2786) Fixed a potential integer overflow in WasmPtr memory access methods. +- [#2787](https://github.com/wasmerio/wasmer/pull/2787) Fixed a codegen regression in the Singlepass compiler due to non-determinism of `HashSet` iteration. + +## 2.2.0-rc1 - 2022/01/28 + +### Added +- [#2750](https://github.com/wasmerio/wasmer/pull/2750) Added Aarch64 support to Singlepass (both Linux and macOS). +- [#2753](https://github.com/wasmerio/wasmer/pull/2753) Re-add "dylib" to the list of default features. + +### Changed +- [#2747](https://github.com/wasmerio/wasmer/pull/2747) Use a standard header for metadata in all serialized modules. +- [#2759](https://github.com/wasmerio/wasmer/pull/2759) Use exact version for Wasmer crate dependencies. + +### Fixed +- [#2769](https://github.com/wasmerio/wasmer/pull/2769) Fixed deadlock in emscripten dynamic calls. +- [#2742](https://github.com/wasmerio/wasmer/pull/2742) Fixed WASMER_METADATA alignment in the dylib engine. +- [#2746](https://github.com/wasmerio/wasmer/pull/2746) Fixed invoking `wasmer binfmt register` from `$PATH`. +- [#2748](https://github.com/wasmerio/wasmer/pull/2748) Use trampolines for all libcalls in engine-universal and engine-dylib. +- [#2766](https://github.com/wasmerio/wasmer/pull/2766) Remove an attempt to reserve a GPR when no GPR clobbering is occurring. +- [#2768](https://github.com/wasmerio/wasmer/pull/2768) Fixed serialization of FrameInfo on Dylib engine. + +## 2.1.1 - 2021/12/20 + +### Added +- [#2726](https://github.com/wasmerio/wasmer/pull/2726) Added `externs_vec` method to `ImportObject`. +- [#2724](https://github.com/wasmerio/wasmer/pull/2724) Added access to the raw `Instance` JS object in Wsasmer-js. + +### CHanged +- [#2711](https://github.com/wasmerio/wasmer/pull/2711) Make C-API and Wasi dependencies more lean +- [#2706](https://github.com/wasmerio/wasmer/pull/2706) Refactored the Singlepass compiler in preparation for AArch64 support (no user visible changes). +### Fixed +- [#2717](https://github.com/wasmerio/wasmer/pull/2717) Allow `Exports` to be modified after being cloned. +- [#2719](https://github.com/wasmerio/wasmer/pull/2719) Fixed `wasm_importtype_new`'s Rust signature to not assume boxed vectors. +- [#2723](https://github.com/wasmerio/wasmer/pull/2723) Fixed a bug in parameter passing in the Singlepass compiler. +- [#2768](https://github.com/wasmerio/wasmer/pull/2768) Fixed issue with Frame Info on dylib engine. + +## 2.1.0 - 2021/11/30 + +### Added +- [#2574](https://github.com/wasmerio/wasmer/pull/2574) Added Windows support to Singlepass. +- [#2535](https://github.com/wasmerio/wasmer/pull/2435) Added iOS support for Wasmer. This relies on the `dylib-engine`. +- [#2460](https://github.com/wasmerio/wasmer/pull/2460) Wasmer can now compile to Javascript via `wasm-bindgen`. Use the `js-default` (and no default features) feature to try it!. +- [#2491](https://github.com/wasmerio/wasmer/pull/2491) Added support for WASI to Wasmer-js. +- [#2436](https://github.com/wasmerio/wasmer/pull/2436) Added the x86-32 bit variant support to LLVM compiler. +- [#2499](https://github.com/wasmerio/wasmer/pull/2499) Added a subcommand to linux wasmer-cli to register wasmer with binfmt_misc +- [#2511](https://github.com/wasmerio/wasmer/pull/2511) Added support for calling dynamic functions defined on the host +- [#2491](https://github.com/wasmerio/wasmer/pull/2491) Added support for WASI in Wasmer-js +- [#2592](https://github.com/wasmerio/wasmer/pull/2592) Added `ImportObject::get_namespace_exports` to allow modifying the contents of an existing namespace in an `ImportObject`. +- [#2694](https://github.com/wasmerio/wasmer/pull/2694) wasmer-js: Allow an `ImportObject` to be extended with a JS object. +- [#2698](https://github.com/wasmerio/wasmer/pull/2698) Provide WASI imports when invoking an explicit export from the CLI. +- [#2701](https://github.com/wasmerio/wasmer/pull/2701) Improved VFS API for usage from JS + +### Changed +- [#2460](https://github.com/wasmerio/wasmer/pull/2460) **breaking change** `wasmer` API usage with `no-default-features` requires now the `sys` feature to preserve old behavior. +- [#2476](https://github.com/wasmerio/wasmer/pull/2476) Removed unncessary abstraction `ModuleInfoTranslate` from `wasmer-compiler`. +- [#2442](https://github.com/wasmerio/wasmer/pull/2442) **breaking change** Improved `WasmPtr`, added `WasmCell` for host/guest interaction. `WasmPtr::deref` will now return `WasmCell<'a, T>` instead of `&'a Cell`, `WasmPtr::deref_mut` is now deleted from the API. +- [#2427](https://github.com/wasmerio/wasmer/pull/2427) Update `loupe` to 0.1.3. +- [#2685](https://github.com/wasmerio/wasmer/pull/2685) The minimum LLVM version for the LLVM compiler is now 12. LLVM 13 is used by default. +- [#2569](https://github.com/wasmerio/wasmer/pull/2569) Add `Send` and `Sync` to uses of the `LikeNamespace` trait object. +- [#2692](https://github.com/wasmerio/wasmer/pull/2692) Made module serialization deterministic. +- [#2693](https://github.com/wasmerio/wasmer/pull/2693) Validate CPU features when loading a deserialized module. + +### Fixed +- [#2599](https://github.com/wasmerio/wasmer/pull/2599) Fixed Universal engine for Linux/Aarch64 target. +- [#2587](https://github.com/wasmerio/wasmer/pull/2587) Fixed deriving `WasmerEnv` when aliasing `Result`. +- [#2518](https://github.com/wasmerio/wasmer/pull/2518) Remove temporary file used to creating an artifact when creating a Dylib engine artifact. +- [#2494](https://github.com/wasmerio/wasmer/pull/2494) Fixed `WasmerEnv` access when using `call_indirect` with the Singlepass compiler. +- [#2479](https://github.com/wasmerio/wasmer/pull/2479) Improved `wasmer validate` error message on non-wasm inputs. +- [#2454](https://github.com/wasmerio/wasmer/issues/2454) Won't set `WASMER_CACHE_DIR` for Windows. +- [#2426](https://github.com/wasmerio/wasmer/pull/2426) Fix the `wax` script generation. +- [#2635](https://github.com/wasmerio/wasmer/pull/2635) Fix cross-compilation for singlepass. +- [#2672](https://github.com/wasmerio/wasmer/pull/2672) Use `ENOENT` instead of `EINVAL` in some WASI syscalls for a non-existent file +- [#2547](https://github.com/wasmerio/wasmer/pull/2547) Delete temporary files created by the dylib engine. +- [#2548](https://github.com/wasmerio/wasmer/pull/2548) Fix stack probing on x86_64 linux with the cranelift compiler. +- [#2557](https://github.com/wasmerio/wasmer/pull/2557) [#2559](https://github.com/wasmerio/wasmer/pull/2559) Fix WASI dir path renaming. +- [#2560](https://github.com/wasmerio/wasmer/pull/2560) Fix signal handling on M1 MacOS. +- [#2474](https://github.com/wasmerio/wasmer/pull/2474) Fix permissions on `WASMER_CACHE_DIR` on Windows. +- [#2528](https://github.com/wasmerio/wasmer/pull/2528) [#2525](https://github.com/wasmerio/wasmer/pull/2525) [#2523](https://github.com/wasmerio/wasmer/pull/2523) [#2522](https://github.com/wasmerio/wasmer/pull/2522) [#2545](https://github.com/wasmerio/wasmer/pull/2545) [#2550](https://github.com/wasmerio/wasmer/pull/2550) [#2551](https://github.com/wasmerio/wasmer/pull/2551) Fix various bugs in the new VFS implementation. +- [#2552](https://github.com/wasmerio/wasmer/pull/2552) Fix stack guard handling on Windows. +- [#2585](https://github.com/wasmerio/wasmer/pull/2585) Fix build with 64-bit MinGW toolchain. +- [#2587](https://github.com/wasmerio/wasmer/pull/2587) Fix absolute import of `Result` in derive. +- [#2599](https://github.com/wasmerio/wasmer/pull/2599) Fix AArch64 support in the LLVM compiler. +- [#2655](https://github.com/wasmerio/wasmer/pull/2655) Fix argument parsing of `--dir` and `--mapdir`. +- [#2666](https://github.com/wasmerio/wasmer/pull/2666) Fix performance on Windows by using static memories by default. +- [#2667](https://github.com/wasmerio/wasmer/pull/2667) Fix error code for path_rename of a non-existant file +- [#2672](https://github.com/wasmerio/wasmer/pull/2672) Fix error code returned by some wasi fs syscalls for a non-existent file +- [#2673](https://github.com/wasmerio/wasmer/pull/2673) Fix BrTable codegen on the LLVM compiler +- [#2674](https://github.com/wasmerio/wasmer/pull/2674) Add missing `__WASI_RIGHT_FD_DATASYNC` for preopened directories +- [#2677](https://github.com/wasmerio/wasmer/pull/2677) Support 32-bit memories with 65536 pages +- [#2681](https://github.com/wasmerio/wasmer/pull/2681) Fix slow compilation in singlepass by using dynasm's `VecAssembler`. +- [#2690](https://github.com/wasmerio/wasmer/pull/2690) Fix memory leak when obtaining the stack bounds of a thread +- [#2699](https://github.com/wasmerio/wasmer/pull/2699) Partially fix unbounded memory leak from the FuncDataRegistry + +## 2.0.0 - 2021/06/16 + +### Added +- [#2411](https://github.com/wasmerio/wasmer/pull/2411) Extract types from `wasi` to a new `wasi-types` crate. +- [#2390](https://github.com/wasmerio/wasmer/pull/2390) Make `wasmer-vm` to compile on Windows 32bits. +- [#2402](https://github.com/wasmerio/wasmer/pull/2402) Add more examples and more doctests for `wasmer-middlewares`. + +### Changed +- [#2399](https://github.com/wasmerio/wasmer/pull/2399) Add the Dart integration in the `README.md`. + +### Fixed +- [#2386](https://github.com/wasmerio/wasmer/pull/2386) Handle properly when a module has no exported functions in the CLI. + +## 2.0.0-rc2 - 2021/06/03 + +### Fixed +- [#2383](https://github.com/wasmerio/wasmer/pull/2383) Fix bugs in the Wasmer CLI tool with the way `--version` and the name of the CLI tool itself were printed. + +## 2.0.0-rc1 - 2021/06/02 + +### Added +- [#2348](https://github.com/wasmerio/wasmer/pull/2348) Make Wasmer available on `aarch64-linux-android`. +- [#2315](https://github.com/wasmerio/wasmer/pull/2315) Make the Cranelift compiler working with the Native engine. +- [#2306](https://github.com/wasmerio/wasmer/pull/2306) Add support for the latest version of the Wasm SIMD proposal to compiler LLVM. +- [#2296](https://github.com/wasmerio/wasmer/pull/2296) Add support for the bulk memory proposal in compiler Singlepass and compiler LLVM. +- [#2291](https://github.com/wasmerio/wasmer/pull/2291) Type check tables when importing. +- [#2262](https://github.com/wasmerio/wasmer/pull/2262) Make parallelism optional for the Singlepass compiler. +- [#2249](https://github.com/wasmerio/wasmer/pull/2249) Make Cranelift unwind feature optional. +- [#2208](https://github.com/wasmerio/wasmer/pull/2208) Add a new CHANGELOG.md specific to our C API to make it easier for users primarily consuming our C API to keep up to date with changes that affect them. +- [#2154](https://github.com/wasmerio/wasmer/pull/2154) Implement Reference Types in the LLVM compiler. +- [#2003](https://github.com/wasmerio/wasmer/pull/2003) Wasmer works with musl, and is built, tested and packaged for musl. +- [#2250](https://github.com/wasmerio/wasmer/pull/2250) Use `rkyv` for the JIT/Universal engine. +- [#2190](https://github.com/wasmerio/wasmer/pull/2190) Use `rkyv` to read native `Module` artifact. +- [#2186](https://github.com/wasmerio/wasmer/pull/2186) Update and improve the Fuzz Testing infrastructure. +- [#2161](https://github.com/wasmerio/wasmer/pull/2161) Make NaN canonicalization configurable. +- [#2116](https://github.com/wasmerio/wasmer/pull/2116) Add a package for Windows that is not an installer, but all the `lib` and `include` files as for macOS and Linux. +- [#2123](https://github.com/wasmerio/wasmer/pull/2123) Use `ENABLE_{{compiler_name}}=(0|1)` to resp. force to disable or enable a compiler when running the `Makefile`, e.g. `ENABLE_LLVM=1 make build-wasmer`. +- [#2123](https://github.com/wasmerio/wasmer/pull/2123) `libwasmer` comes with all available compilers per target instead of Cranelift only. +- [#2135](https://github.com/wasmerio/wasmer/pull/2135) [Documentation](./PACKAGING.md) for Linux distribution maintainers +- [#2104](https://github.com/wasmerio/wasmer/pull/2104) Update WAsm core spectests and wasmparser. + +### Changed +- [#2369](https://github.com/wasmerio/wasmer/pull/2369) Remove the deprecated `--backend` option in the CLI. +- [#2368](https://github.com/wasmerio/wasmer/pull/2368) Remove the deprecated code in the `wasmer-wasi` crate. +- [#2367](https://github.com/wasmerio/wasmer/pull/2367) Remove the `deprecated` features and associated code in the `wasmer` crate. +- [#2366](https://github.com/wasmerio/wasmer/pull/2366) Remove the deprecated crates. +- [#2364](https://github.com/wasmerio/wasmer/pull/2364) Rename `wasmer-engine-object-file` to `wasmer-engine-staticlib`. +- [#2356](https://github.com/wasmerio/wasmer/pull/2356) Rename `wasmer-engine-native` to `wasmer-engine-dylib`. +- [#2340](https://github.com/wasmerio/wasmer/pull/2340) Rename `wasmer-engine-jit` to `wasmer-engine-universal`. +- [#2307](https://github.com/wasmerio/wasmer/pull/2307) Update Cranelift, implement low hanging fruit SIMD opcodes. +- [#2305](https://github.com/wasmerio/wasmer/pull/2305) Clean up and improve the trap API, more deterministic errors etc. +- [#2299](https://github.com/wasmerio/wasmer/pull/2299) Unused trap codes (due to Wasm spec changes), `HeapSetterOutOfBounds` and `TableSetterOutOfBounds` were removed from `wasmer_vm::TrapCode` and the numbering of the remaining variants has been adjusted. +- [#2293](https://github.com/wasmerio/wasmer/pull/2293) The `Memory::ty` trait method now returns `MemoryType` by value. `wasmer_vm::LinearMemory` now recomputes `MemoryType`'s `minimum` field when accessing its type. This behavior is what's expected by the latest spectests. `wasmer::Memory::ty` has also been updated to follow suit, it now returns `MemoryType` by value. +- [#2286](https://github.com/wasmerio/wasmer/pull/2286) Replace the `goblin` crate by the `object` crate. +- [#2281](https://github.com/wasmerio/wasmer/pull/2281) Refactor the `wasmer_vm` crate to remove unnecessary structs, reuse data when available etc. +- [#2251](https://github.com/wasmerio/wasmer/pull/2251) Wasmer CLI will now execute WASI modules with multiple WASI namespaces in them by default. Use `--allow-multiple-wasi-versions` to suppress the warning and use `--deny-multiple-wasi-versions` to make it an error. +- [#2201](https://github.com/wasmerio/wasmer/pull/2201) Implement `loupe::MemoryUsage` for `wasmer::Instance`. +- [#2200](https://github.com/wasmerio/wasmer/pull/2200) Implement `loupe::MemoryUsage` for `wasmer::Module`. +- [#2199](https://github.com/wasmerio/wasmer/pull/2199) Implement `loupe::MemoryUsage` for `wasmer::Store`. +- [#2195](https://github.com/wasmerio/wasmer/pull/2195) Remove dependency to `cranelift-entity`. +- [#2140](https://github.com/wasmerio/wasmer/pull/2140) Reduce the number of dependencies in the `wasmer.dll` shared library by statically compiling CRT. +- [#2113](https://github.com/wasmerio/wasmer/pull/2113) Bump minimum supported Rust version to 1.49 +- [#2144](https://github.com/wasmerio/wasmer/pull/2144) Bump cranelift version to 0.70 +- [#2149](https://github.com/wasmerio/wasmer/pull/2144) `wasmer-engine-native` looks for clang-11 instead of clang-10. +- [#2157](https://github.com/wasmerio/wasmer/pull/2157) Simplify the code behind `WasmPtr` + +### Fixed +- [#2397](https://github.com/wasmerio/wasmer/pull/2397) Fix WASI rename temporary file issue. +- [#2391](https://github.com/wasmerio/wasmer/pull/2391) Fix Singlepass emit bug, [#2347](https://github.com/wasmerio/wasmer/issues/2347) and [#2159](https://github.com/wasmerio/wasmer/issues/2159) +- [#2327](https://github.com/wasmerio/wasmer/pull/2327) Fix memory leak preventing internal instance memory from being freed when a WasmerEnv contained an exported extern (e.g. Memory, etc.). +- [#2247](https://github.com/wasmerio/wasmer/pull/2247) Internal WasiFS logic updated to be closer to what WASI libc does when finding a preopened fd for a path. +- [#2241](https://github.com/wasmerio/wasmer/pull/2241) Fix Undefined Behavior in setting memory in emscripten `EmEnv`. +- [#2224](https://github.com/wasmerio/wasmer/pull/2224) Enable SIMD based on actual Wasm features in the Cranelift compiler. +- [#2217](https://github.com/wasmerio/wasmer/pull/2217) Fix bug in `i64.rotr X 0` in the LLVM compiler. +- [#2290](https://github.com/wasmerio/wasmer/pull/2290) Handle Wasm modules with no imports in the CLI. +- [#2108](https://github.com/wasmerio/wasmer/pull/2108) The Object Native Engine generates code that now compiles correctly with C++. +- [#2125](https://github.com/wasmerio/wasmer/pull/2125) Fix RUSTSEC-2021-0023. +- [#2155](https://github.com/wasmerio/wasmer/pull/2155) Fix the implementation of shift and rotate in the LLVM compiler. +- [#2101](https://github.com/wasmerio/wasmer/pull/2101) cflags emitted by `wasmer config --pkg-config` are now correct. + +## 1.0.2 - 2021-02-04 + +### Added +- [#2053](https://github.com/wasmerio/wasmer/pull/2053) Implement the non-standard `wasi_get_unordered_imports` function in the C API. +- [#2072](https://github.com/wasmerio/wasmer/pull/2072) Add `wasm_config_set_target`, along with `wasm_target_t`, `wasm_triple_t` and `wasm_cpu_features_t` in the unstable C API. +- [#2059](https://github.com/wasmerio/wasmer/pull/2059) Ability to capture `stdout` and `stderr` with WASI in the C API. +- [#2040](https://github.com/wasmerio/wasmer/pull/2040) Add `InstanceHandle::vmoffsets` to expose the offsets of the `vmctx` region. +- [#2026](https://github.com/wasmerio/wasmer/pull/2026) Expose trap code of a `RuntimeError`, if it's a `Trap`. +- [#2054](https://github.com/wasmerio/wasmer/pull/2054) Add `wasm_config_delete` to the Wasm C API. +- [#2072](https://github.com/wasmerio/wasmer/pull/2072) Added cross-compilation to Wasm C API. + +### Changed +- [#2085](https://github.com/wasmerio/wasmer/pull/2085) Update to latest inkwell and LLVM 11. +- [#2037](https://github.com/wasmerio/wasmer/pull/2037) Improved parallelism of LLVM with the Native/Object engine +- [#2012](https://github.com/wasmerio/wasmer/pull/2012) Refactor Singlepass init stack assembly (more performant now) +- [#2036](https://github.com/wasmerio/wasmer/pull/2036) Optimize memory allocated for Function type definitions +- [#2083](https://github.com/wasmerio/wasmer/pull/2083) Mark `wasi_env_set_instance` and `wasi_env_set_memory` as deprecated. You may simply remove the calls with no side-effect. +- [#2056](https://github.com/wasmerio/wasmer/pull/2056) Change back to depend on the `enumset` crate instead of `wasmer_enumset` + +### Fixed +- [#2066](https://github.com/wasmerio/wasmer/pull/2066) Include 'extern "C"' in our C headers when included by C++ code. +- [#2090](https://github.com/wasmerio/wasmer/pull/2090) `wasi_env_t` needs to be freed with `wasi_env_delete` in the C API. +- [#2084](https://github.com/wasmerio/wasmer/pull/2084) Avoid calling the function environment finalizer more than once when the environment has been cloned in the C API. +- [#2069](https://github.com/wasmerio/wasmer/pull/2069) Use the new documentation for `include/README.md` in the Wasmer package. +- [#2042](https://github.com/wasmerio/wasmer/pull/2042) Parse more exotic environment variables in `wasmer run`. +- [#2041](https://github.com/wasmerio/wasmer/pull/2041) Documentation diagrams now have a solid white background rather than a transparent background. +- [#2070](https://github.com/wasmerio/wasmer/pull/2070) Do not drain the entire captured stream at first read with `wasi_env_read_stdout` or `_stderr` in the C API. +- [#2058](https://github.com/wasmerio/wasmer/pull/2058) Expose WASI versions to C correctly. +- [#2044](https://github.com/wasmerio/wasmer/pull/2044) Do not build C headers on docs.rs. + +## 1.0.1 - 2021-01-12 + +This release includes a breaking change in the API (changing the trait `enumset::EnumsetType` to `wasmer_enumset::EnumSetType` and changing `enumset::EnumSet` in signatures to `wasmer_enumset::EnumSet` to work around a breaking change introduced by `syn`) but is being released as a minor version because `1.0.0` is also in a broken state due to a breaking change introduced by `syn` which affects `enumset` and thus `wasmer`. + +This change is unlikely to affect any users of `wasmer`, but if it does please change uses of the `enumset` crate to the `wasmer_enumset` crate where possible. + +### Added +- [#2010](https://github.com/wasmerio/wasmer/pull/2010) A new, experimental, minified build of `wasmer` called `wasmer-headless` will now be included with releases. `wasmer-headless` is the `wasmer` VM without any compilers attached, so it can only run precompiled Wasm modules. +- [#2005](https://github.com/wasmerio/wasmer/pull/2005) Added the arguments `alias` and `optional` to `WasmerEnv` derive's `export` attribute. + +### Changed +- [#2006](https://github.com/wasmerio/wasmer/pull/2006) Use `wasmer_enumset`, a fork of the `enumset` crate to work around a breaking change in `syn` +- [#1985](https://github.com/wasmerio/wasmer/pull/1985) Bump minimum supported Rust version to 1.48 + +### Fixed +- [#2007](https://github.com/wasmerio/wasmer/pull/2007) Fix packaging of wapm on Windows +- [#2005](https://github.com/wasmerio/wasmer/pull/2005) Emscripten is now working again. + +## 1.0.0 - 2021-01-05 + +### Added + +- [#1969](https://github.com/wasmerio/wasmer/pull/1969) Added D integration to the README + +### Changed +- [#1979](https://github.com/wasmerio/wasmer/pull/1979) `WasmPtr::get_utf8_string` was renamed to `WasmPtr::get_utf8_str` and made `unsafe`. + +### Fixed +- [#1979](https://github.com/wasmerio/wasmer/pull/1979) `WasmPtr::get_utf8_string` now returns a `String`, fixing a soundness issue in certain circumstances. The old functionality is available under a new `unsafe` function, `WasmPtr::get_utf8_str`. + +## 1.0.0-rc1 - 2020-12-23 + +### Added + +* [#1894](https://github.com/wasmerio/wasmer/pull/1894) Added exports `wasmer::{CraneliftOptLevel, LLVMOptLevel}` to allow using `Cranelift::opt_level` and `LLVM::opt_level` directly via the `wasmer` crate + +### Changed + +* [#1941](https://github.com/wasmerio/wasmer/pull/1941) Turn `get_remaining_points`/`set_remaining_points` of the `Metering` middleware into free functions to allow using them in an ahead-of-time compilation setup +* [#1955](https://github.com/wasmerio/wasmer/pull/1955) Set `jit` as a default feature of the `wasmer-wasm-c-api` crate +* [#1944](https://github.com/wasmerio/wasmer/pull/1944) Require `WasmerEnv` to be `Send + Sync` even in dynamic functions. +* [#1963](https://github.com/wasmerio/wasmer/pull/1963) Removed `to_wasm_error` in favour of `impl From for WasmError` +* [#1962](https://github.com/wasmerio/wasmer/pull/1962) Replace `wasmparser::Result<()>` with `Result<(), MiddlewareError>` in middleware, allowing implementors to return errors in `FunctionMiddleware::feed` + +### Fixed + +- [#1949](https://github.com/wasmerio/wasmer/pull/1949) `wasm__vec_delete` functions no longer crash when the given vector is uninitialized, in the Wasmer C API +- [#1949](https://github.com/wasmerio/wasmer/pull/1949) The `wasm_frame_vec_t`, `wasm_functype_vec_t`, `wasm_globaltype_vec_t`, `wasm_memorytype_vec_t`, and `wasm_tabletype_vec_t` are now boxed vectors in the Wasmer C API + +## 1.0.0-beta2 - 2020-12-16 + +### Added + +* [#1916](https://github.com/wasmerio/wasmer/pull/1916) Add the `WASMER_VERSION*` constants with the `wasmer_version*` functions in the Wasmer C API +* [#1867](https://github.com/wasmerio/wasmer/pull/1867) Added `Metering::get_remaining_points` and `Metering::set_remaining_points` +* [#1881](https://github.com/wasmerio/wasmer/pull/1881) Added `UnsupportedTarget` error to `CompileError` +* [#1908](https://github.com/wasmerio/wasmer/pull/1908) Implemented `TryFrom>` for `i32`/`u32`/`i64`/`u64`/`f32`/`f64` +* [#1927](https://github.com/wasmerio/wasmer/pull/1927) Added mmap support in `Engine::deserialize_from_file` to speed up artifact loading +* [#1911](https://github.com/wasmerio/wasmer/pull/1911) Generalized signature type in `Function::new` and `Function::new_with_env` to accept owned and reference `FunctionType` as well as array pairs. This allows users to define signatures as constants. Implemented `From<([Type; $N], [Type; $M])>` for `FunctionType` to support this. + +### Changed + +- [#1865](https://github.com/wasmerio/wasmer/pull/1865) Require that implementors of `WasmerEnv` also implement `Send`, `Sync`, and `Clone`. +- [#1851](https://github.com/wasmerio/wasmer/pull/1851) Improve test suite and documentation of the Wasmer C API +- [#1874](https://github.com/wasmerio/wasmer/pull/1874) Set `CompilerConfig` to be owned (following wasm-c-api) +- [#1880](https://github.com/wasmerio/wasmer/pull/1880) Remove cmake dependency for tests +- [#1924](https://github.com/wasmerio/wasmer/pull/1924) Rename reference implementation `wasmer::Tunables` to `wasmer::BaseTunables`. Export trait `wasmer_engine::Tunables` as `wasmer::Tunables`. + +### Fixed + +- [#1865](https://github.com/wasmerio/wasmer/pull/1865) Fix memory leaks with host function environments. +- [#1870](https://github.com/wasmerio/wasmer/pull/1870) Fixed Trap instruction address maps in Singlepass +* [#1914](https://github.com/wasmerio/wasmer/pull/1914) Implemented `TryFrom for Pages` instead of `From for Pages` to properly handle overflow errors + +## 1.0.0-beta1 - 2020-12-01 + +### Added + +- [#1839](https://github.com/wasmerio/wasmer/pull/1839) Added support for Metering Middleware +- [#1837](https://github.com/wasmerio/wasmer/pull/1837) It is now possible to use exports of an `Instance` even after the `Instance` has been freed +- [#1831](https://github.com/wasmerio/wasmer/pull/1831) Added support for Apple Silicon chips (`arm64-apple-darwin`) +- [#1739](https://github.com/wasmerio/wasmer/pull/1739) Improved function environment setup via `WasmerEnv` proc macro. +- [#1649](https://github.com/wasmerio/wasmer/pull/1649) Add outline of migration to 1.0.0 docs. + +### Changed + +- [#1739](https://github.com/wasmerio/wasmer/pull/1739) Environments passed to host function- must now implement the `WasmerEnv` trait. You can implement it on your existing type with `#[derive(WasmerEnv)]`. +- [#1838](https://github.com/wasmerio/wasmer/pull/1838) Deprecate `WasiEnv::state_mut`: prefer `WasiEnv::state` instead. +- [#1663](https://github.com/wasmerio/wasmer/pull/1663) Function environments passed to host functions now must be passed by `&` instead of `&mut`. This is a breaking change. This change fixes a race condition when a host function is called from multiple threads. If you need mutability in your environment, consider using `std::sync::Mutex` or other synchronization primitives. +- [#1830](https://github.com/wasmerio/wasmer/pull/1830) Minimum supported Rust version bumped to 1.47.0 +- [#1810](https://github.com/wasmerio/wasmer/pull/1810) Make the `state` field of `WasiEnv` public + +### Fixed + +- [#1857](https://github.com/wasmerio/wasmer/pull/1857) Fix dynamic function with new Environment API +- [#1855](https://github.com/wasmerio/wasmer/pull/1855) Fix memory leak when using `wat2wasm` in the C API, the function now takes its output parameter by pointer rather than returning an allocated `wasm_byte_vec_t`. +- [#1841](https://github.com/wasmerio/wasmer/pull/1841) We will now panic when attempting to use a native function with a captured env as a host function. Previously this would silently do the wrong thing. See [#1840](https://github.com/wasmerio/wasmer/pull/1840) for info about Wasmer's support of closures as host functions. +- [#1764](https://github.com/wasmerio/wasmer/pull/1764) Fix bug in WASI `path_rename` allowing renamed files to be 1 directory below a preopened directory. + +## 1.0.0-alpha5 - 2020-11-06 + +### Added + +- [#1761](https://github.com/wasmerio/wasmer/pull/1761) Implement the `wasm_trap_t**` argument of `wasm_instance_new` in the Wasm C API. +- [#1687](https://github.com/wasmerio/wasmer/pull/1687) Add basic table example; fix ownership of local memory and local table metadata in the VM. +- [#1751](https://github.com/wasmerio/wasmer/pull/1751) Implement `wasm_trap_t` inside a function declared with `wasm_func_new_with_env` in the Wasm C API. +- [#1741](https://github.com/wasmerio/wasmer/pull/1741) Implement `wasm_memory_type` in the Wasm C API. +- [#1736](https://github.com/wasmerio/wasmer/pull/1736) Implement `wasm_global_type` in the Wasm C API. +- [#1699](https://github.com/wasmerio/wasmer/pull/1699) Update `wasm.h` to its latest version. +- [#1685](https://github.com/wasmerio/wasmer/pull/1685) Implement `wasm_exporttype_delete` in the Wasm C API. +- [#1725](https://github.com/wasmerio/wasmer/pull/1725) Implement `wasm_func_type` in the Wasm C API. +- [#1715](https://github.com/wasmerio/wasmer/pull/1715) Register errors from `wasm_module_serialize` in the Wasm C API. +- [#1709](https://github.com/wasmerio/wasmer/pull/1709) Implement `wasm_module_name` and `wasm_module_set_name` in the Wasm(er) C API. +- [#1700](https://github.com/wasmerio/wasmer/pull/1700) Implement `wasm_externtype_copy` in the Wasm C API. +- [#1785](https://github.com/wasmerio/wasmer/pull/1785) Add more examples on the Rust API. +- [#1783](https://github.com/wasmerio/wasmer/pull/1783) Handle initialized but empty results in `wasm_func_call` in the Wasm C API. +- [#1780](https://github.com/wasmerio/wasmer/pull/1780) Implement new SIMD zero-extend loads in compiler-llvm. +- [#1754](https://github.com/wasmerio/wasmer/pull/1754) Implement aarch64 ABI for compiler-llvm. +- [#1693](https://github.com/wasmerio/wasmer/pull/1693) Add `wasmer create-exe` subcommand. + +### Changed + +- [#1772](https://github.com/wasmerio/wasmer/pull/1772) Remove lifetime parameter from `NativeFunc`. +- [#1762](https://github.com/wasmerio/wasmer/pull/1762) Allow the `=` sign in a WASI environment variable value. +- [#1710](https://github.com/wasmerio/wasmer/pull/1710) Memory for function call trampolines is now owned by the Artifact. +- [#1781](https://github.com/wasmerio/wasmer/pull/1781) Cranelift upgrade to 0.67. +- [#1777](https://github.com/wasmerio/wasmer/pull/1777) Wasmparser update to 0.65. +- [#1775](https://github.com/wasmerio/wasmer/pull/1775) Improve LimitingTunables implementation. +- [#1720](https://github.com/wasmerio/wasmer/pull/1720) Autodetect llvm regardless of architecture. + +### Fixed + +- [#1718](https://github.com/wasmerio/wasmer/pull/1718) Fix panic in the API in some situations when the memory's min bound was greater than the memory's max bound. +- [#1731](https://github.com/wasmerio/wasmer/pull/1731) In compiler-llvm always load before store, to trigger any traps before any bytes are written. + +## 1.0.0-alpha4 - 2020-10-08 + +### Added +- [#1635](https://github.com/wasmerio/wasmer/pull/1635) Implement `wat2wasm` in the Wasm C API. +- [#1636](https://github.com/wasmerio/wasmer/pull/1636) Implement `wasm_module_validate` in the Wasm C API. +- [#1657](https://github.com/wasmerio/wasmer/pull/1657) Implement `wasm_trap_t` and `wasm_frame_t` for Wasm C API; add examples in Rust and C of exiting early with a host function. + +### Fixed +- [#1690](https://github.com/wasmerio/wasmer/pull/1690) Fix `wasm_memorytype_limits` where `min` and `max` represents pages, not bytes. Additionally, fixes the max limit sentinel value. +- [#1671](https://github.com/wasmerio/wasmer/pull/1671) Fix probestack firing inappropriately, and sometimes over/under allocating stack. +- [#1660](https://github.com/wasmerio/wasmer/pull/1660) Fix issue preventing map-dir aliases starting with `/` from working properly. +- [#1624](https://github.com/wasmerio/wasmer/pull/1624) Add Value::I32/Value::I64 converters from unsigned ints. + +### Changed +- [#1682](https://github.com/wasmerio/wasmer/pull/1682) Improve error reporting when making a memory with invalid settings. +- [#1691](https://github.com/wasmerio/wasmer/pull/1691) Bump minimum supported Rust version to 1.46.0 +- [#1645](https://github.com/wasmerio/wasmer/pull/1645) Move the install script to https://github.com/wasmerio/wasmer-install + +## 1.0.0-alpha3 - 2020-09-14 + +### Fixed + +- [#1620](https://github.com/wasmerio/wasmer/pull/1620) Fix bug causing the Wapm binary to not be packaged with the release +- [#1619](https://github.com/wasmerio/wasmer/pull/1619) Improve error message in engine-native when C compiler is missing + +## 1.0.0-alpha02.0 - 2020-09-11 + +### Added + +- [#1566](https://github.com/wasmerio/wasmer/pull/1566) Add support for opening special Unix files to the WASI FS + +### Fixed + +- [#1602](https://github.com/wasmerio/wasmer/pull/1602) Fix panic when calling host functions with negative numbers in certain situations +- [#1590](https://github.com/wasmerio/wasmer/pull/1590) Fix soundness issue in API of vm::Global + +## TODO: 1.0.0-alpha01.0 + +- Wasmer refactor lands + +## 0.17.1 - 2020-06-24 + +### Changed +- [#1439](https://github.com/wasmerio/wasmer/pull/1439) Move `wasmer-interface-types` into its own repository + +### Fixed + +- [#1554](https://github.com/wasmerio/wasmer/pull/1554) Update supported stable Rust version to 1.45.2. +- [#1552](https://github.com/wasmerio/wasmer/pull/1552) Disable `sigint` handler by default. + +## 0.17.0 - 2020-05-11 + +### Added +- [#1331](https://github.com/wasmerio/wasmer/pull/1331) Implement the `record` type and instrutions for WIT +- [#1345](https://github.com/wasmerio/wasmer/pull/1345) Adding ARM testing in Azure Pipelines +- [#1329](https://github.com/wasmerio/wasmer/pull/1329) New numbers and strings instructions for WIT +- [#1285](https://github.com/wasmerio/wasmer/pull/1285) Greatly improve errors in `wasmer-interface-types` +- [#1303](https://github.com/wasmerio/wasmer/pull/1303) NaN canonicalization for singlepass backend. +- [#1313](https://github.com/wasmerio/wasmer/pull/1313) Add new high-level public API through `wasmer` crate. Includes many updates including: + - Minor improvement: `imports!` macro now handles no trailing comma as well as a trailing comma in namespaces and between namespaces. + - New methods on `Module`: `exports`, `imports`, and `custom_sections`. + - New way to get exports from an instance with `let func_name: Func = instance.exports.get("func_name");`. + - Improved `Table` APIs including `set` which now allows setting functions directly. TODO: update this more if `Table::get` gets made public in this PR + - TODO: finish the list of changes here +- [#1305](https://github.com/wasmerio/wasmer/pull/1305) Handle panics from DynamicFunc. +- [#1300](https://github.com/wasmerio/wasmer/pull/1300) Add support for multiple versions of WASI tests: wasitests now test all versions of WASI. +- [#1292](https://github.com/wasmerio/wasmer/pull/1292) Experimental Support for Android (x86_64 and AArch64) + +### Fixed +- [#1283](https://github.com/wasmerio/wasmer/pull/1283) Workaround for floating point arguments and return values in `DynamicFunc`s. + +### Changed +- [#1401](https://github.com/wasmerio/wasmer/pull/1401) Make breaking change to `RuntimeError`: `RuntimeError` is now more explicit about its possible error values allowing for better insight into why a call into Wasm failed. +- [#1382](https://github.com/wasmerio/wasmer/pull/1382) Refactored test infranstructure (part 2) +- [#1380](https://github.com/wasmerio/wasmer/pull/1380) Refactored test infranstructure (part 1) +- [#1357](https://github.com/wasmerio/wasmer/pull/1357) Refactored bin commands into separate files +- [#1335](https://github.com/wasmerio/wasmer/pull/1335) Change mutability of `memory` to `const` in `wasmer_memory_data_length` in the C API +- [#1332](https://github.com/wasmerio/wasmer/pull/1332) Add option to `CompilerConfig` to force compiler IR verification off even when `debug_assertions` are enabled. This can be used to make debug builds faster, which may be important if you're creating a library that wraps Wasmer and depend on the speed of debug builds. +- [#1320](https://github.com/wasmerio/wasmer/pull/1320) Change `custom_sections` field in `ModuleInfo` to be more standards compliant by allowing multiple custom sections with the same name. To get the old behavior with the new API, you can add `.last().unwrap()` to accesses. For example, `module_info.custom_sections["custom_section_name"].last().unwrap()`. +- [#1301](https://github.com/wasmerio/wasmer/pull/1301) Update supported stable Rust version to 1.41.1. + +## 0.16.2 - 2020-03-11 + +### Fixed + +- [#1294](https://github.com/wasmerio/wasmer/pull/1294) Fix bug related to system calls in WASI that rely on reading from WasmPtrs as arrays of length 0. `WasmPtr` will now succeed on length 0 arrays again. + +## 0.16.1 - 2020-03-11 + +### Fixed + +- [#1291](https://github.com/wasmerio/wasmer/pull/1291) Fix installation packaging script to package the `wax` command. + +## 0.16.0 - 2020-03-11 + +### Added +- [#1286](https://github.com/wasmerio/wasmer/pull/1286) Updated Windows Wasmer icons. Add wax +- [#1284](https://github.com/wasmerio/wasmer/pull/1284) Implement string and memory instructions in `wasmer-interface-types` + +### Fixed +- [#1272](https://github.com/wasmerio/wasmer/pull/1272) Fix off-by-one error bug when accessing memory with a `WasmPtr` that contains the last valid byte of memory. Also changes the behavior of `WasmPtr` with a length of 0 and `WasmPtr` where `std::mem::size_of::()` is 0 to always return `None` + +## 0.15.0 - 2020-03-04 + +- [#1263](https://github.com/wasmerio/wasmer/pull/1263) Changed the behavior of some WASI syscalls to now handle preopened directories more properly. Changed default `--debug` logging to only show Wasmer-related messages. +- [#1217](https://github.com/wasmerio/wasmer/pull/1217) Polymorphic host functions based on dynamic trampoline generation. +- [#1252](https://github.com/wasmerio/wasmer/pull/1252) Allow `/` in wasi `--mapdir` wasm path. +- [#1212](https://github.com/wasmerio/wasmer/pull/1212) Add support for GDB JIT debugging: + - Add `--generate-debug-info` and `-g` flags to `wasmer run` to generate debug information during compilation. The debug info is passed via the GDB JIT interface to a debugger to allow source-level debugging of Wasm files. Currently only available on clif-backend. + - Break public middleware APIs: there is now a `source_loc` parameter that should be passed through if applicable. + - Break compiler trait methods such as `feed_local`, `feed_event` as well as `ModuleCodeGenerator::finalize`. + +## 0.14.1 - 2020-02-24 + +- [#1245](https://github.com/wasmerio/wasmer/pull/1245) Use Ubuntu 16.04 in CI so that we use an earlier version of GLIBC. +- [#1234](https://github.com/wasmerio/wasmer/pull/1234) Check for unused excluded spectest failures. +- [#1232](https://github.com/wasmerio/wasmer/pull/1232) `wasmer-interface-types` has a WAT decoder. + +## 0.14.0 - 2020-02-20 + +- [#1233](https://github.com/wasmerio/wasmer/pull/1233) Improved Wasmer C API release artifacts. +- [#1216](https://github.com/wasmerio/wasmer/pull/1216) `wasmer-interface-types` receives a binary encoder. +- [#1228](https://github.com/wasmerio/wasmer/pull/1228) Singlepass cleanup: Resolve several FIXMEs and remove protect_unix. +- [#1218](https://github.com/wasmerio/wasmer/pull/1218) Enable Cranelift verifier in debug mode. Fix bug with table indices being the wrong type. +- [#787](https://github.com/wasmerio/wasmer/pull/787) New crate `wasmer-interface-types` to implement WebAssembly Interface Types. +- [#1213](https://github.com/wasmerio/wasmer/pull/1213) Fixed WASI `fdstat` to detect `isatty` properly. +- [#1192](https://github.com/wasmerio/wasmer/pull/1192) Use `ExceptionCode` for error representation. +- [#1191](https://github.com/wasmerio/wasmer/pull/1191) Fix singlepass miscompilation on `Operator::CallIndirect`. +- [#1180](https://github.com/wasmerio/wasmer/pull/1180) Fix compilation for target `x86_64-unknown-linux-musl`. +- [#1170](https://github.com/wasmerio/wasmer/pull/1170) Improve the WasiFs builder API with convenience methods for overriding stdin, stdout, and stderr as well as a new sub-builder for controlling the permissions and properties of preopened directories. Also breaks that implementations of `WasiFile` must be `Send` -- please file an issue if this change causes you any issues. +- [#1161](https://github.com/wasmerio/wasmer/pull/1161) Require imported functions to be `Send`. This is a breaking change that fixes a soundness issue in the API. +- [#1140](https://github.com/wasmerio/wasmer/pull/1140) Use [`blake3`](https://github.com/BLAKE3-team/BLAKE3) as default hashing algorithm for caching. +- [#1129](https://github.com/wasmerio/wasmer/pull/1129) Standard exception types for singlepass backend. + +## 0.13.1 - 2020-01-16 +- Fix bug in wapm related to the `package.wasmer_extra_flags` entry in the manifest + +## 0.13.0 - 2020-01-15 + +Special thanks to [@repi](https://github.com/repi) and [@srenatus](https://github.com/srenatus) for their contributions! + +- [#1153](https://github.com/wasmerio/wasmer/pull/1153) Added Wasmex, an Elixir language integration, to the README +- [#1133](https://github.com/wasmerio/wasmer/pull/1133) New `wasmer_trap` function in the C API, to properly error from within a host function +- [#1147](https://github.com/wasmerio/wasmer/pull/1147) Remove `log` and `trace` macros from `wasmer-runtime-core`, remove `debug` and `trace` features from `wasmer-*` crates, use the `log` crate for logging and use `fern` in the Wasmer CLI binary to output log messages. Colorized output will be enabled automatically if printing to a terminal, to force colorization on or off, set the `WASMER_COLOR` environment variable to `true` or `false`. +- [#1128](https://github.com/wasmerio/wasmer/pull/1128) Fix a crash when a host function is missing and the `allow_missing_functions` flag is enabled +- [#1099](https://github.com/wasmerio/wasmer/pull/1099) Remove `backend::Backend` from `wasmer_runtime_core` +- [#1097](https://github.com/wasmerio/wasmer/pull/1097) Move inline breakpoint outside of runtime backend +- [#1095](https://github.com/wasmerio/wasmer/pull/1095) Update to cranelift 0.52. +- [#1092](https://github.com/wasmerio/wasmer/pull/1092) Add `get_utf8_string_with_nul` to `WasmPtr` to read nul-terminated strings from memory. +- [#1071](https://github.com/wasmerio/wasmer/pull/1071) Add support for non-trapping float-to-int conversions, enabled by default. + +## 0.12.0 - 2019-12-18 + +Special thanks to [@ethanfrey](https://github.com/ethanfrey), [@AdamSLevy](https://github.com/AdamSLevy), [@Jasper-Bekkers](https://github.com/Jasper-Bekkers), [@srenatus](https://github.com/srenatus) for their contributions! + +- [#1078](https://github.com/wasmerio/wasmer/pull/1078) Increase the maximum number of parameters `Func` can take +- [#1062](https://github.com/wasmerio/wasmer/pull/1062) Expose some opt-in Emscripten functions to the C API +- [#1032](https://github.com/wasmerio/wasmer/pull/1032) Change the signature of the Emscripten `abort` function to work with Emscripten 1.38.30 +- [#1060](https://github.com/wasmerio/wasmer/pull/1060) Test the capi with all the backends +- [#1069](https://github.com/wasmerio/wasmer/pull/1069) Add function `get_memory_and_data` to `Ctx` to help prevent undefined behavior and mutable aliasing. It allows accessing memory while borrowing data mutably for the `Ctx` lifetime. This new function is now being used in `wasmer-wasi`. +- [#1058](https://github.com/wasmerio/wasmer/pull/1058) Fix minor panic issue when `wasmer::compile_with` called with llvm backend. +- [#858](https://github.com/wasmerio/wasmer/pull/858) Minor panic fix when wasmer binary with `loader` option run a module without exported `_start` function. +- [#1056](https://github.com/wasmerio/wasmer/pull/1056) Improved `--invoke` args parsing (supporting `i32`, `i64`, `f32` and `f32`) in Wasmer CLI +- [#1054](https://github.com/wasmerio/wasmer/pull/1054) Improve `--invoke` output in Wasmer CLI +- [#1053](https://github.com/wasmerio/wasmer/pull/1053) For RuntimeError and breakpoints, use Box instead of Box. +- [#1052](https://github.com/wasmerio/wasmer/pull/1052) Fix minor panic and improve Error handling in singlepass backend. +- [#1050](https://github.com/wasmerio/wasmer/pull/1050) Attach C & C++ headers to releases. +- [#1033](https://github.com/wasmerio/wasmer/pull/1033) Set cranelift backend as default compiler backend again, require at least one backend to be enabled for Wasmer CLI +- [#1044](https://github.com/wasmerio/wasmer/pull/1044) Enable AArch64 support in the LLVM backend. +- [#1030](https://github.com/wasmerio/wasmer/pull/1030) Ability to generate `ImportObject` for a specific version WASI version with the C API. +- [#1028](https://github.com/wasmerio/wasmer/pull/1028) Introduce strict/non-strict modes for `get_wasi_version` +- [#1029](https://github.com/wasmerio/wasmer/pull/1029) Add the “floating” `WasiVersion::Latest` version. +- [#1006](https://github.com/wasmerio/wasmer/pull/1006) Fix minor panic issue when `wasmer::compile_with` called with llvm backend +- [#1009](https://github.com/wasmerio/wasmer/pull/1009) Enable LLVM verifier for all tests, add new llvm-backend-tests crate. +- [#1022](https://github.com/wasmerio/wasmer/pull/1022) Add caching support for Singlepass backend. +- [#1004](https://github.com/wasmerio/wasmer/pull/1004) Add the Auto backend to enable to adapt backend usage depending on wasm file executed. +- [#1068](https://github.com/wasmerio/wasmer/pull/1068) Various cleanups for the singlepass backend on AArch64. + +## 0.11.0 - 2019-11-22 + +- [#713](https://github.com/wasmerio/wasmer/pull/713) Add AArch64 support for singlepass. +- [#995](https://github.com/wasmerio/wasmer/pull/995) Detect when a global is read without being initialized (emit a proper error instead of panicking) +- [#996](https://github.com/wasmerio/wasmer/pull/997) Refactored spectests, emtests and wasitests to use default compiler logic +- [#992](https://github.com/wasmerio/wasmer/pull/992) Updates WAPM version to 0.4.1, fix arguments issue introduced in #990 +- [#990](https://github.com/wasmerio/wasmer/pull/990) Default wasmer CLI to `run`. Wasmer will now attempt to parse unrecognized command line options as if they were applied to the run command: `wasmer mywasm.wasm --dir=.` now works! +- [#987](https://github.com/wasmerio/wasmer/pull/987) Fix `runtime-c-api` header files when compiled by gnuc. +- [#957](https://github.com/wasmerio/wasmer/pull/957) Change the meaning of `wasmer_wasi::is_wasi_module` to detect any type of WASI module, add support for new wasi snapshot_preview1 +- [#934](https://github.com/wasmerio/wasmer/pull/934) Simplify float expressions in the LLVM backend. + +## 0.10.2 - 2019-11-18 + +- [#968](https://github.com/wasmerio/wasmer/pull/968) Added `--invoke` option to the command +- [#964](https://github.com/wasmerio/wasmer/pull/964) Enable cross-compilation for specific target +- [#971](https://github.com/wasmerio/wasmer/pull/971) In LLVM backend, use unaligned loads and stores for non-atomic accesses to wasmer memory. +- [#960](https://github.com/wasmerio/wasmer/pull/960) Fix `runtime-c-api` header files when compiled by clang. +- [#925](https://github.com/wasmerio/wasmer/pull/925) Host functions can be closures with a captured environment. +- [#917](https://github.com/wasmerio/wasmer/pull/917) Host functions (aka imported functions) may not have `&mut vm::Ctx` as first argument, i.e. the presence of the `&mut vm::Ctx` argument is optional. +- [#915](https://github.com/wasmerio/wasmer/pull/915) All backends share the same definition of `Trampoline` (defined in `wasmer-runtime-core`). + +## 0.10.1 - 2019-11-11 + +- [#952](https://github.com/wasmerio/wasmer/pull/952) Use C preprocessor to properly hide trampoline functions on Windows and non-x86_64 targets. + +## 0.10.0 - 2019-11-11 + +Special thanks to [@newpavlov](https://github.com/newpavlov) and [@Maxgy](https://github.com/Maxgy) for their contributions! + +- [#942](https://github.com/wasmerio/wasmer/pull/942) Deny missing docs in runtime core and add missing docs +- [#939](https://github.com/wasmerio/wasmer/pull/939) Fix bug causing attempts to append to files with WASI to delete the contents of the file +- [#940](https://github.com/wasmerio/wasmer/pull/940) Update supported Rust version to 1.38+ +- [#923](https://github.com/wasmerio/wasmer/pull/923) Fix memory leak in the C API caused by an incorrect cast in `wasmer_trampoline_buffer_destroy` +- [#921](https://github.com/wasmerio/wasmer/pull/921) In LLVM backend, annotate all memory accesses with TBAA metadata. +- [#883](https://github.com/wasmerio/wasmer/pull/883) Allow floating point operations to have arbitrary inputs, even including SNaNs. +- [#856](https://github.com/wasmerio/wasmer/pull/856) Expose methods in the runtime C API to get a WASI import object + +## 0.9.0 - 2019-10-23 + +Special thanks to @alocquet for their contributions! + +- [#898](https://github.com/wasmerio/wasmer/pull/898) State tracking is now disabled by default in the LLVM backend. It can be enabled with `--track-state`. +- [#861](https://github.com/wasmerio/wasmer/pull/861) Add descriptions to `unimplemented!` macro in various places +- [#897](https://github.com/wasmerio/wasmer/pull/897) Removes special casing of stdin, stdout, and stderr in WASI. Closing these files now works. Removes `stdin`, `stdout`, and `stderr` from `WasiFS`, replaced by the methods `stdout`, `stdout_mut`, and so on. +- [#863](https://github.com/wasmerio/wasmer/pull/863) Fix min and max for cases involving NaN and negative zero when using the LLVM backend. + +## 0.8.0 - 2019-10-02 + +Special thanks to @jdanford for their contributions! + +- [#850](https://github.com/wasmerio/wasmer/pull/850) New `WasiStateBuilder` API. small, add misc. breaking changes to existing API (for example, changing the preopen dirs arg on `wasi::generate_import_object` from `Vec` to `Vec`) +- [#852](https://github.com/wasmerio/wasmer/pull/852) Make minor grammar/capitalization fixes to README.md +- [#841](https://github.com/wasmerio/wasmer/pull/841) Slightly improve rustdoc documentation and small updates to outdated info in readme files +- [#836](https://github.com/wasmerio/wasmer/pull/836) Update Cranelift fork version to `0.44.0` +- [#839](https://github.com/wasmerio/wasmer/pull/839) Change supported version to stable Rust 1.37+ +- [#834](https://github.com/wasmerio/wasmer/pull/834) Fix panic when unwraping `wasmer` arguments +- [#835](https://github.com/wasmerio/wasmer/pull/835) Add parallel execution example (independent instances created from the same `ImportObject` and `Module` run with rayon) +- [#834](https://github.com/wasmerio/wasmer/pull/834) Fix panic when parsing numerical arguments for no-ABI targets run with the wasmer binary +- [#833](https://github.com/wasmerio/wasmer/pull/833) Add doc example of using ImportObject's new `maybe_with_namespace` method +- [#832](https://github.com/wasmerio/wasmer/pull/832) Delete unused runtime ABI +- [#809](https://github.com/wasmerio/wasmer/pull/809) Fix bugs leading to panics in `LocalBacking`. +- [#831](https://github.com/wasmerio/wasmer/pull/831) Add support for atomic operations, excluding wait and notify, to singlepass. +- [#822](https://github.com/wasmerio/wasmer/pull/822) Update Cranelift fork version to `0.43.1` +- [#829](https://github.com/wasmerio/wasmer/pull/829) Fix deps on `make bench-*` commands; benchmarks don't compile other backends now +- [#807](https://github.com/wasmerio/wasmer/pull/807) Implement Send for `Instance`, breaking change on `ImportObject`, remove method `get_namespace` replaced with `with_namespace` and `maybe_with_namespace` +- [#817](https://github.com/wasmerio/wasmer/pull/817) Add document for tracking features across backends and language integrations, [docs/feature_matrix.md] +- [#823](https://github.com/wasmerio/wasmer/issues/823) Improved Emscripten / WASI integration +- [#821](https://github.com/wasmerio/wasmer/issues/821) Remove patch version on most deps Cargo manifests. This gives Wasmer library users more control over which versions of the deps they use. +- [#820](https://github.com/wasmerio/wasmer/issues/820) Remove null-pointer checks in `WasmPtr` from runtime-core, re-add them in Emscripten +- [#803](https://github.com/wasmerio/wasmer/issues/803) Add method to `Ctx` to invoke functions by their `TableIndex` +- [#790](https://github.com/wasmerio/wasmer/pull/790) Fix flaky test failure with LLVM, switch to large code model. +- [#788](https://github.com/wasmerio/wasmer/pull/788) Use union merge on the changelog file. +- [#785](https://github.com/wasmerio/wasmer/pull/785) Include Apache license file for spectests. +- [#786](https://github.com/wasmerio/wasmer/pull/786) In the LLVM backend, lower atomic wasm operations to atomic machine instructions. +- [#784](https://github.com/wasmerio/wasmer/pull/784) Fix help string for wasmer run. + +## 0.7.0 - 2019-09-12 + +Special thanks to @YaronWittenstein @penberg for their contributions. + +- [#776](https://github.com/wasmerio/wasmer/issues/776) Allow WASI preopened fds to be closed +- [#774](https://github.com/wasmerio/wasmer/issues/774) Add more methods to the `WasiFile` trait +- [#772](https://github.com/wasmerio/wasmer/issues/772) [#770](https://github.com/wasmerio/wasmer/issues/770) Handle more internal failures by passing back errors +- [#756](https://github.com/wasmerio/wasmer/issues/756) Allow NULL parameter and 0 arity in `wasmer_export_func_call` C API +- [#747](https://github.com/wasmerio/wasmer/issues/747) Return error instead of panicking on traps when using the Wasmer binary +- [#741](https://github.com/wasmerio/wasmer/issues/741) Add validate Wasm fuzz target +- [#733](https://github.com/wasmerio/wasmer/issues/733) Remove dependency on compiler backends for `middleware-common` +- [#732](https://github.com/wasmerio/wasmer/issues/732) [#731](https://github.com/wasmerio/wasmer/issues/731) WASI bug fixes and improvements +- [#726](https://github.com/wasmerio/wasmer/issues/726) Add serialization and deserialization for Wasi State +- [#716](https://github.com/wasmerio/wasmer/issues/716) Improve portability of install script +- [#714](https://github.com/wasmerio/wasmer/issues/714) Add Code of Conduct +- [#708](https://github.com/wasmerio/wasmer/issues/708) Remove unconditional dependency on Cranelift in the C API +- [#703](https://github.com/wasmerio/wasmer/issues/703) Fix compilation on AArch64 Linux +- [#702](https://github.com/wasmerio/wasmer/issues/702) Add SharedMemory to Wasmer. Add `--enable-threads` flag, add partial implementation of atomics to LLVM backend. +- [#698](https://github.com/wasmerio/wasmer/issues/698) [#690](https://github.com/wasmerio/wasmer/issues/690) [#687](https://github.com/wasmerio/wasmer/issues/690) Fix panics in Emscripten +- [#689](https://github.com/wasmerio/wasmer/issues/689) Replace `wasmer_runtime_code::memory::Atomic` with `std::sync::atomic` atomics, changing its interface +- [#680](https://github.com/wasmerio/wasmer/issues/680) [#673](https://github.com/wasmerio/wasmer/issues/673) [#669](https://github.com/wasmerio/wasmer/issues/669) [#660](https://github.com/wasmerio/wasmer/issues/660) [#659](https://github.com/wasmerio/wasmer/issues/659) Misc. runtime and singlepass fixes +- [#677](https://github.com/wasmerio/wasmer/issues/677) [#675](https://github.com/wasmerio/wasmer/issues/675) [#674](https://github.com/wasmerio/wasmer/issues/674) LLVM backend fixes and improvements +- [#671](https://github.com/wasmerio/wasmer/issues/671) Implement fs polling in `wasi::poll_oneoff` for Unix-like platforms +- [#656](https://github.com/wasmerio/wasmer/issues/656) Move CI to Azure Pipelines +- [#650](https://github.com/wasmerio/wasmer/issues/650) Implement `wasi::path_rename`, improve WASI FS public api, and allow open files to exist even when the underlying file is deleted +- [#643](https://github.com/wasmerio/wasmer/issues/643) Implement `wasi::path_symlink` and improve WASI FS public api IO error reporting +- [#608](https://github.com/wasmerio/wasmer/issues/608) Implement wasi syscalls `fd_allocate`, `fd_sync`, `fd_pread`, `path_link`, `path_filestat_set_times`; update WASI fs API in a WIP way; reduce coupling of WASI code to host filesystem; make debug messages from WASI more readable; improve rights-checking when calling syscalls; implement reference counting on inodes; misc bug fixes and improvements +- [#616](https://github.com/wasmerio/wasmer/issues/616) Create the import object separately from instance instantiation in `runtime-c-api` +- [#620](https://github.com/wasmerio/wasmer/issues/620) Replace one `throw()` with `noexcept` in llvm backend +- [#618](https://github.com/wasmerio/wasmer/issues/618) Implement `InternalEvent::Breakpoint` in the llvm backend to allow metering in llvm +- [#615](https://github.com/wasmerio/wasmer/issues/615) Eliminate `FunctionEnvironment` construction in `feed_event()` speeding up to 70% of compilation in clif +- [#609](https://github.com/wasmerio/wasmer/issues/609) Update dependencies +- [#602](https://github.com/wasmerio/wasmer/issues/602) C api extract instance context from instance +- [#590](https://github.com/wasmerio/wasmer/issues/590) Error visibility changes in wasmer-c-api +- [#589](https://github.com/wasmerio/wasmer/issues/589) Make `wasmer_byte_array` fields `public` in wasmer-c-api + +## 0.6.0 - 2019-07-31 +- [#603](https://github.com/wasmerio/wasmer/pull/603) Update Wapm-cli, bump version numbers +- [#595](https://github.com/wasmerio/wasmer/pull/595) Add unstable public API for interfacing with the WASI file system in plugin-like usecases +- [#598](https://github.com/wasmerio/wasmer/pull/598) LLVM Backend is now supported in Windows +- [#599](https://github.com/wasmerio/wasmer/pull/599) Fix llvm backend failures in fat spec tests and simd_binaryen spec test. +- [#579](https://github.com/wasmerio/wasmer/pull/579) Fix bug in caching with LLVM and Singlepass backends. + Add `default-backend-singlepass`, `default-backend-llvm`, and `default-backend-cranelift` features to `wasmer-runtime` + to control the `default_compiler()` function (this is a breaking change). Add `compiler_for_backend` function in `wasmer-runtime` +- [#561](https://github.com/wasmerio/wasmer/pull/561) Call the `data_finalizer` field on the `Ctx` +- [#576](https://github.com/wasmerio/wasmer/pull/576) fix `Drop` of uninit `Ctx` +- [#542](https://github.com/wasmerio/wasmer/pull/542) Add SIMD support to Wasmer (LLVM backend only) + - Updates LLVM to version 8.0 + +## 0.5.7 - 2019-07-23 +- [#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 misc. improvements to most syscalls touching the filesystem + +## 0.5.6 - 2019-07-16 +- [#565](https://github.com/wasmerio/wasmer/pull/565) Update wapm and bump version to 0.5.6 +- [#563](https://github.com/wasmerio/wasmer/pull/563) Improve wasi testing infrastructure + - fixes arg parsing from comments & fixes the mapdir test to have the native code doing the same thing as the WASI code + - makes wasitests-generate output stdout/stderr by default & adds function to print stdout and stderr for a command if it fails + - compiles wasm with size optimizations & strips generated wasm with wasm-strip +- [#554](https://github.com/wasmerio/wasmer/pull/554) Finish implementation of `wasi::fd_seek`, fix bug in filestat +- [#550](https://github.com/wasmerio/wasmer/pull/550) Fix singlepass compilation error with `imul` instruction + + +## 0.5.5 - 2019-07-10 +- [#541](https://github.com/wasmerio/wasmer/pull/541) Fix dependency graph by making separate test crates; ABI implementations should not depend on compilers. Add Cranelift fork as git submodule of clif-backend +- [#537](https://github.com/wasmerio/wasmer/pull/537) Add hidden flag (`--cache-key`) to use prehashed key into the compiled wasm cache and change compiler backend-specific caching to use directories +- [#536](https://github.com/wasmerio/wasmer/pull/536) ~Update cache to use compiler backend name in cache key~ + +## 0.5.4 - 2019-07-06 +- [#529](https://github.com/wasmerio/wasmer/pull/529) Updates the Wasm Interface library, which is used by wapm, with bug fixes and error message improvements + +## 0.5.3 - 2019-07-03 +- [#523](https://github.com/wasmerio/wasmer/pull/523) Update wapm version to fix bug related to signed packages in the global namespace and locally-stored public keys + +## 0.5.2 - 2019-07-02 +- [#516](https://github.com/wasmerio/wasmer/pull/516) Add workaround for singlepass miscompilation on GetLocal +- [#521](https://github.com/wasmerio/wasmer/pull/521) Update Wapm-cli, bump version numbers +- [#518](https://github.com/wasmerio/wasmer/pull/518) Update Cranelift and WasmParser +- [#514](https://github.com/wasmerio/wasmer/pull/514) [#519](https://github.com/wasmerio/wasmer/pull/519) Improved Emscripten network related calls, added a null check to `WasmPtr` +- [#515](https://github.com/wasmerio/wasmer/pull/515) Improved Emscripten dyncalls +- [#513](https://github.com/wasmerio/wasmer/pull/513) Fix emscripten lseek implementation. +- [#510](https://github.com/wasmerio/wasmer/pull/510) Simplify construction of floating point constants in LLVM backend. Fix LLVM assertion failure due to definition of %ctx. + +## 0.5.1 - 2019-06-24 +- [#508](https://github.com/wasmerio/wasmer/pull/508) Update wapm version, includes bug fixes + +## 0.5.0 - 2019-06-17 + +- [#471](https://github.com/wasmerio/wasmer/pull/471) Added missing functions to run Python. Improved Emscripten bindings +- [#494](https://github.com/wasmerio/wasmer/pull/494) Remove deprecated type aliases from libc in the runtime C API +- [#493](https://github.com/wasmerio/wasmer/pull/493) `wasmer_module_instantiate` has better error messages in the runtime C API +- [#474](https://github.com/wasmerio/wasmer/pull/474) Set the install name of the dylib to `@rpath` +- [#490](https://github.com/wasmerio/wasmer/pull/490) Add MiddlewareChain and StreamingCompiler to runtime +- [#487](https://github.com/wasmerio/wasmer/pull/487) Fix stack offset check in singlepass backend +- [#450](https://github.com/wasmerio/wasmer/pull/450) Added Metering +- [#481](https://github.com/wasmerio/wasmer/pull/481) Added context trampoline into runtime +- [#484](https://github.com/wasmerio/wasmer/pull/484) Fix bugs in emscripten socket syscalls +- [#476](https://github.com/wasmerio/wasmer/pull/476) Fix bug with wasi::environ_get, fix off by one error in wasi::environ_sizes_get +- [#470](https://github.com/wasmerio/wasmer/pull/470) Add mapdir support to Emscripten, implement getdents for Unix +- [#467](https://github.com/wasmerio/wasmer/pull/467) `wasmer_instantiate` returns better error messages in the runtime C API +- [#463](https://github.com/wasmerio/wasmer/pull/463) Fix bug in WASI path_open allowing one level above preopened dir to be accessed +- [#461](https://github.com/wasmerio/wasmer/pull/461) Prevent passing negative lengths in various places in the runtime C API +- [#459](https://github.com/wasmerio/wasmer/pull/459) Add monotonic and real time clocks for wasi on windows +- [#447](https://github.com/wasmerio/wasmer/pull/447) Add trace macro (`--features trace`) for more verbose debug statements +- [#451](https://github.com/wasmerio/wasmer/pull/451) Add `--mapdir=src:dest` flag to rename host directories in the guest context +- [#457](https://github.com/wasmerio/wasmer/pull/457) Implement file metadata for WASI, fix bugs in WASI clock code for Unix platforms + +## 0.4.2 - 2019-05-16 + +- [#416](https://github.com/wasmerio/wasmer/pull/416) Remote code loading framework +- [#449](https://github.com/wasmerio/wasmer/pull/449) Fix bugs: opening host files in filestat and opening with write permissions unconditionally in path_open +- [#442](https://github.com/wasmerio/wasmer/pull/442) Misc. WASI FS fixes and implement readdir +- [#440](https://github.com/wasmerio/wasmer/pull/440) Fix type mismatch between `wasmer_instance_call` and `wasmer_export_func_*_arity` functions in the runtime C API. +- [#269](https://github.com/wasmerio/wasmer/pull/269) Add better runtime docs +- [#432](https://github.com/wasmerio/wasmer/pull/432) Fix returned value of `wasmer_last_error_message` in the runtime C API +- [#429](https://github.com/wasmerio/wasmer/pull/429) Get wasi::path_filestat_get working for some programs; misc. minor WASI FS improvements +- [#413](https://github.com/wasmerio/wasmer/pull/413) Update LLVM backend to use new parser codegen traits + +## 0.4.1 - 2019-05-06 + +- [#426](https://github.com/wasmerio/wasmer/pull/426) Update wapm-cli submodule, bump version to 0.4.1 +- [#422](https://github.com/wasmerio/wasmer/pull/422) Improved Emscripten functions to run optipng and pngquant compiled to wasm +- [#409](https://github.com/wasmerio/wasmer/pull/409) Improved Emscripten functions to run JavascriptCore compiled to wasm +- [#399](https://github.com/wasmerio/wasmer/pull/399) Add example of using a plugin extended from WASI +- [#397](https://github.com/wasmerio/wasmer/pull/397) Fix WASI fs abstraction to work on Windows +- [#390](https://github.com/wasmerio/wasmer/pull/390) Pin released wapm version and add it as a git submodule +- [#408](https://github.com/wasmerio/wasmer/pull/408) Add images to windows installer and update installer to add wapm bin directory to path + +## 0.4.0 - 2019-04-23 + +- [#383](https://github.com/wasmerio/wasmer/pull/383) Hook up wasi exit code to wasmer cli. +- [#382](https://github.com/wasmerio/wasmer/pull/382) Improve error message on `--backend` flag to only suggest currently enabled backends +- [#381](https://github.com/wasmerio/wasmer/pull/381) Allow retrieving propagated user errors. +- [#379](https://github.com/wasmerio/wasmer/pull/379) Fix small return types from imported functions. +- [#371](https://github.com/wasmerio/wasmer/pull/371) Add more Debug impl for WASI types +- [#368](https://github.com/wasmerio/wasmer/pull/368) Fix issue with write buffering +- [#343](https://github.com/wasmerio/wasmer/pull/343) Implement preopened files for WASI and fix aligment issue when accessing WASI memory +- [#367](https://github.com/wasmerio/wasmer/pull/367) Add caching support to the LLVM backend. +- [#366](https://github.com/wasmerio/wasmer/pull/366) Remove `UserTrapper` trait to fix [#365](https://github.com/wasmerio/wasmer/issues/365). +- [#348](https://github.com/wasmerio/wasmer/pull/348) Refactor internal runtime ↔️ backend abstraction. +- [#355](https://github.com/wasmerio/wasmer/pull/355) Misc changes to `Cargo.toml`s for publishing +- [#352](https://github.com/wasmerio/wasmer/pull/352) Bump version numbers to 0.3.0 +- [#351](https://github.com/wasmerio/wasmer/pull/351) Add hidden option to specify wasm program name (can be used to improve error messages) +- [#350](https://github.com/wasmerio/wasmer/pull/350) Enforce that CHANGELOG.md is updated through CI. +- [#349](https://github.com/wasmerio/wasmer/pull/349) Add [CHANGELOG.md](https://github.com/wasmerio/wasmer/blob/master/CHANGELOG.md). + +## 0.3.0 - 2019-04-12 + +- [#276](https://github.com/wasmerio/wasmer/pull/276) [#288](https://github.com/wasmerio/wasmer/pull/288) [#344](https://github.com/wasmerio/wasmer/pull/344) Use new singlepass backend (with the `--backend=singlepass` when running Wasmer) +- [#338](https://github.com/wasmerio/wasmer/pull/338) Actually catch traps/panics/etc when using a typed func. +- [#325](https://github.com/wasmerio/wasmer/pull/325) Fixed func_index in debug mode +- [#323](https://github.com/wasmerio/wasmer/pull/323) Add validate subcommand to validate Wasm files +- [#321](https://github.com/wasmerio/wasmer/pull/321) Upgrade to Cranelift 0.3.0 +- [#319](https://github.com/wasmerio/wasmer/pull/319) Add Export and GlobalDescriptor to Runtime API +- [#310](https://github.com/wasmerio/wasmer/pull/310) Cleanup warnings +- [#299](https://github.com/wasmerio/wasmer/pull/299) [#300](https://github.com/wasmerio/wasmer/pull/300) [#301](https://github.com/wasmerio/wasmer/pull/301) [#303](https://github.com/wasmerio/wasmer/pull/303) [#304](https://github.com/wasmerio/wasmer/pull/304) [#305](https://github.com/wasmerio/wasmer/pull/305) [#306](https://github.com/wasmerio/wasmer/pull/306) [#307](https://github.com/wasmerio/wasmer/pull/307) Add support for WASI 🎉 +- [#286](https://github.com/wasmerio/wasmer/pull/286) Add extend to imports +- [#278](https://github.com/wasmerio/wasmer/pull/278) Add versioning to cache +- [#250](https://github.com/wasmerio/wasmer/pull/250) Setup bors From 6d539e004419ddfdebbf3f8eaae202d9d74e8f84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=BCtt?= Date: Mon, 23 Jan 2023 16:55:59 +0100 Subject: [PATCH 53/55] Print warning when the libwasmer path might be wrong --- lib/cli/src/commands/create_exe.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/cli/src/commands/create_exe.rs b/lib/cli/src/commands/create_exe.rs index 7eb6f0362e2..29613cd4bcb 100644 --- a/lib/cli/src/commands/create_exe.rs +++ b/lib/cli/src/commands/create_exe.rs @@ -1225,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()))); From 5a05b756c1504c6cfa41b318de7771a3e95f4c8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=BCtt?= Date: Mon, 23 Jan 2023 17:57:31 +0100 Subject: [PATCH 54/55] Fix publish.py script --- scripts/publish.py | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/scripts/publish.py b/scripts/publish.py index 6cfc938dffe..b7bd11b5cb1 100644 --- a/scripts/publish.py +++ b/scripts/publish.py @@ -46,6 +46,7 @@ # 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 @@ def return_dependencies(toml) -> typing.List[str]: 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} From d4dd8d4fe8753df9a0b15bb2e587e25d566623ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=BCtt?= Date: Mon, 23 Jan 2023 20:04:58 +0100 Subject: [PATCH 55/55] Fix Windows-GNU distribution --- .github/workflows/build.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 519138b2f5c..9a3dfc56f50 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -307,6 +307,9 @@ jobs: - name: Dist run: | make distribution-gnu + env: + CARGO_TARGET: x86_64-pc-windows-gnu + TARGET_DIR: target/x86_64-pc-windows-gnu/release - name: Upload Artifacts uses: actions/upload-artifact@v2 with: