From f2130fc2271329909267fbce8d1ee14a5dd9447a Mon Sep 17 00:00:00 2001 From: Mackenzie Clark Date: Tue, 23 Apr 2019 12:06:55 -0700 Subject: [PATCH 01/12] pin wapm version --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 831abb956..9be02af8d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -153,7 +153,7 @@ jobs: - run: name: "Pull dependencies" command: | - git clone git@github.com:wasmerio/wapm-cli.git + git clone --branch v0.1.0 --depth 1 https://github.com/wasmerio/wapm-cli - restore_cache: keys: - v8-cargo-cache-linux-nightly-{{ arch }}-{{ checksum "Cargo.lock" }} From f372fddb9e2fc6d0bf46e203bcf843b41152d69c Mon Sep 17 00:00:00 2001 From: Mackenzie Clark Date: Tue, 23 Apr 2019 12:59:55 -0700 Subject: [PATCH 02/12] add wapm-cli as git submodule at the v0.1.0 tag commit --- .gitmodules | 3 +++ wapm-cli | 1 + 2 files changed, 4 insertions(+) create mode 100644 .gitmodules create mode 160000 wapm-cli diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000..ea4c03efb --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "wapm-cli"] + path = wapm-cli + url = git@github.com:wasmerio/wapm-cli.git diff --git a/wapm-cli b/wapm-cli new file mode 160000 index 000000000..c9399f3fb --- /dev/null +++ b/wapm-cli @@ -0,0 +1 @@ +Subproject commit c9399f3fb117c8ab1cbaf17b02bd5aeefb8e8e54 From 5881f5468280a69fb114f033f429c8f2ad7a2e85 Mon Sep 17 00:00:00 2001 From: Mackenzie Clark Date: Tue, 23 Apr 2019 12:06:55 -0700 Subject: [PATCH 03/12] Revert "pin wapm version" This reverts commit f2130fc2271329909267fbce8d1ee14a5dd9447a. --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9be02af8d..831abb956 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -153,7 +153,7 @@ jobs: - run: name: "Pull dependencies" command: | - git clone --branch v0.1.0 --depth 1 https://github.com/wasmerio/wapm-cli + git clone git@github.com:wasmerio/wapm-cli.git - restore_cache: keys: - v8-cargo-cache-linux-nightly-{{ arch }}-{{ checksum "Cargo.lock" }} From 7494e2c8f2a88ad54c61d6f3728b00c063f2845a Mon Sep 17 00:00:00 2001 From: Mackenzie Clark Date: Tue, 23 Apr 2019 13:04:12 -0700 Subject: [PATCH 04/12] update config to update the new git submodule --- .circleci/config.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 831abb956..72b83a36a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -153,7 +153,8 @@ jobs: - run: name: "Pull dependencies" command: | - git clone git@github.com:wasmerio/wapm-cli.git + git submodule init + git submodule update --remote - restore_cache: keys: - v8-cargo-cache-linux-nightly-{{ arch }}-{{ checksum "Cargo.lock" }} @@ -220,7 +221,8 @@ jobs: - run: name: "Pull dependencies" command: | - git clone git@github.com:wasmerio/wapm-cli.git + git submodule init + git submodule update --remote - restore_cache: keys: - v8-cargo-cache-darwin-nightly-{{ arch }}-{{ checksum "Cargo.lock" }} From 24d5d2d8a7ff745a43bc7d4644c639a120435522 Mon Sep 17 00:00:00 2001 From: Mackenzie Clark Date: Tue, 23 Apr 2019 13:43:40 -0700 Subject: [PATCH 05/12] install rust with new https curl --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 72b83a36a..4d0722cfb 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -240,7 +240,7 @@ jobs: - run: name: Install Rust command: | - curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain nightly-2019-04-11 + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly export PATH="$HOME/.cargo/bin:$PATH" cargo --version # Use rust nightly (for singlepass, for now) From b1ece9dc41aa52d61113ec2da00639068082f35f Mon Sep 17 00:00:00 2001 From: Mackenzie Clark Date: Tue, 23 Apr 2019 13:53:48 -0700 Subject: [PATCH 06/12] add the other correct usage of rustup install --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4d0722cfb..49d8b10d5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -103,7 +103,7 @@ jobs: - run: name: Install Rust command: | - curl https://sh.rustup.rs -sSf | sh -s -- -y + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly export PATH="$HOME/.cargo/bin:$PATH" cargo --version - run: From 389c6a015d694c7e9d9ae2b62ed04f2106dbae58 Mon Sep 17 00:00:00 2001 From: Brandon Fish Date: Wed, 24 Apr 2019 02:00:07 -0500 Subject: [PATCH 07/12] Remove unused function memory offset addr --- lib/runtime-core/src/instance.rs | 7 ------- 1 file changed, 7 deletions(-) diff --git a/lib/runtime-core/src/instance.rs b/lib/runtime-core/src/instance.rs index 78d0f7d91..14d7a0146 100644 --- a/lib/runtime-core/src/instance.rs +++ b/lib/runtime-core/src/instance.rs @@ -657,10 +657,3 @@ impl<'a> DynFunc<'a> { } } } - -#[doc(hidden)] -impl Instance { - pub fn memory_offset_addr(&self, _: u32, _: usize) -> *const u8 { - unimplemented!() - } -} From 6ff24a8aa18eb809d1e887f2554ed4a864e46654 Mon Sep 17 00:00:00 2001 From: Mark McCaskey Date: Thu, 25 Apr 2019 11:01:46 -0700 Subject: [PATCH 08/12] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c4deaceb2..1a2fc7739 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ All PRs to the Wasmer repository must add to this file. Blocks of changes will separated by version increments. ## **[Unreleased]** +- [#390](https://github.com/wasmerio/wasmer/pull/390) Pin released wapm version and add it as a git submodule - [#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. From 3998c9ec179e6fa89b288ebb40871b78fafa4be6 Mon Sep 17 00:00:00 2001 From: Mackenzie Clark Date: Thu, 25 Apr 2019 12:45:45 -0700 Subject: [PATCH 09/12] remove zbox because wasmer will not build on windows nightly --- Cargo.lock | 1 - lib/wasi/Cargo.toml | 5 ----- lib/wasi/src/state.rs | 15 --------------- 3 files changed, 21 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9c2fd0078..2bac41a81 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2406,7 +2406,6 @@ dependencies = [ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "wasmer-runtime-core 0.3.0", - "zbox 0.6.1 (git+https://github.com/wasmerio/zbox?branch=bundle-libsodium)", ] [[package]] diff --git a/lib/wasi/Cargo.toml b/lib/wasi/Cargo.toml index 87224d529..30493f8fa 100644 --- a/lib/wasi/Cargo.toml +++ b/lib/wasi/Cargo.toml @@ -16,8 +16,3 @@ hashbrown = "0.1.8" generational-arena = "0.2.2" log = "0.4.6" byteorder = "1.3.1" - -[dependencies.zbox] -git = "https://github.com/wasmerio/zbox" -branch = "bundle-libsodium" -features = ["libsodium-bundled"] diff --git a/lib/wasi/src/state.rs b/lib/wasi/src/state.rs index 813250c57..eb7323bf7 100644 --- a/lib/wasi/src/state.rs +++ b/lib/wasi/src/state.rs @@ -12,42 +12,35 @@ use std::{ time::SystemTime, }; use wasmer_runtime_core::debug; -use zbox::init_env as zbox_init_env; pub const MAX_SYMLINKS: usize = 100; #[derive(Debug)] pub enum WasiFile { - #[allow(dead_code)] - ZboxFile(zbox::File), HostFile(fs::File), } impl Write for WasiFile { fn write(&mut self, buf: &[u8]) -> io::Result { match self { - WasiFile::ZboxFile(zbf) => zbf.write(buf), WasiFile::HostFile(hf) => hf.write(buf), } } fn flush(&mut self) -> io::Result<()> { match self { - WasiFile::ZboxFile(zbf) => zbf.flush(), WasiFile::HostFile(hf) => hf.flush(), } } fn write_all(&mut self, buf: &[u8]) -> io::Result<()> { match self { - WasiFile::ZboxFile(zbf) => zbf.write_all(buf), WasiFile::HostFile(hf) => hf.write_all(buf), } } fn write_fmt(&mut self, fmt: ::std::fmt::Arguments) -> io::Result<()> { match self { - WasiFile::ZboxFile(zbf) => zbf.write_fmt(fmt), WasiFile::HostFile(hf) => hf.write_fmt(fmt), } } @@ -56,28 +49,24 @@ impl Write for WasiFile { impl Read for WasiFile { fn read(&mut self, buf: &mut [u8]) -> io::Result { match self { - WasiFile::ZboxFile(zbf) => zbf.read(buf), WasiFile::HostFile(hf) => hf.read(buf), } } fn read_to_end(&mut self, buf: &mut Vec) -> io::Result { match self { - WasiFile::ZboxFile(zbf) => zbf.read_to_end(buf), WasiFile::HostFile(hf) => hf.read_to_end(buf), } } fn read_to_string(&mut self, buf: &mut String) -> io::Result { match self { - WasiFile::ZboxFile(zbf) => zbf.read_to_string(buf), WasiFile::HostFile(hf) => hf.read_to_string(buf), } } fn read_exact(&mut self, buf: &mut [u8]) -> io::Result<()> { match self { - WasiFile::ZboxFile(zbf) => zbf.read_exact(buf), WasiFile::HostFile(hf) => hf.read_exact(buf), } } @@ -86,7 +75,6 @@ impl Read for WasiFile { impl Seek for WasiFile { fn seek(&mut self, pos: io::SeekFrom) -> io::Result { match self { - WasiFile::ZboxFile(zbf) => zbf.seek(pos), WasiFile::HostFile(hf) => hf.seek(pos), } } @@ -183,9 +171,6 @@ pub struct WasiFs { impl WasiFs { pub fn new(preopened_files: &[String]) -> Result { - debug!("wasi::fs::init"); - zbox_init_env(); - debug!("wasi::fs::repo"); /*let repo = RepoOpener::new() .create(true) .open("mem://wasmer-test-fs", "") From 8eb6a0a53ec391e02de71c5319de8f2104d24a86 Mon Sep 17 00:00:00 2001 From: Mark McCaskey Date: Thu, 25 Apr 2019 13:47:58 -0700 Subject: [PATCH 10/12] revert curl command change --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 49d8b10d5..1837fcd89 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -103,7 +103,7 @@ jobs: - run: name: Install Rust command: | - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly + curl -sSf https://sh.rustup.rs | sh -s -- -y export PATH="$HOME/.cargo/bin:$PATH" cargo --version - run: From 65e6f2582fdb707a13dd25364445373edd98a9d1 Mon Sep 17 00:00:00 2001 From: Mark McCaskey Date: Thu, 25 Apr 2019 15:09:01 -0700 Subject: [PATCH 11/12] revert curl command to not ask for tls 1.2 in ci --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1837fcd89..946c0da63 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -240,7 +240,7 @@ jobs: - run: name: Install Rust command: | - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly + curl -sSf https://sh.rustup.rs | sh -s -- -y export PATH="$HOME/.cargo/bin:$PATH" cargo --version # Use rust nightly (for singlepass, for now) From 750aafd7cad11770e24de23e80803ad7d8c64383 Mon Sep 17 00:00:00 2001 From: Syrus Akbary Date: Thu, 25 Apr 2019 15:59:46 -0700 Subject: [PATCH 12/12] Fix nightly on macos --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 946c0da63..e2905a425 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -240,7 +240,7 @@ jobs: - run: name: Install Rust command: | - curl -sSf https://sh.rustup.rs | sh -s -- -y + curl -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly export PATH="$HOME/.cargo/bin:$PATH" cargo --version # Use rust nightly (for singlepass, for now)