commit_hash
stringlengths
40
40
author
stringlengths
1
57
date
timestamp[s]date
2010-07-26 04:45:09
2026-04-14 18:21:10
message
stringlengths
8
1.39M
diff
stringlengths
68
51.2k
files_changed
int64
1
136
insertions
int64
0
2.35k
deletions
int64
0
1.9k
9fcdc7a68e69105cf4b2b3a41b36817ae0477074
Remo Senekowitsch
2023-06-01T16:04:34
fuzz: Insert random instructions (#6407) * Fix fuel consumption of ControlPlane::shuffle Co-authored-by: Falk Zwimpfer <24669719+FalkZ@users.noreply.github.com> Co-authored-by: Moritz Waser <mzrw.dev@pm.me> * Insert random instructions during lowering Co-authored-by: Falk Zwimpfer <24669719+FalkZ@users.noreply.gith...
diff --git a/cranelift/codegen/src/isa/x64/inst/mod.rs b/cranelift/codegen/src/isa/x64/inst/mod.rs index ec9dbbb77..0e6f2f6c7 100644 --- a/cranelift/codegen/src/isa/x64/inst/mod.rs +++ b/cranelift/codegen/src/isa/x64/inst/mod.rs @@ -2446,6 +2446,21 @@ impl MachInst for Inst { Inst::jmp_known(label) } + ...
6
83
4
9aacf31ad2a9b6ed3c0b0df8498c91adbbb54f26
Andrew Brown
2023-06-01T15:24:01
wasi-threads: check module shape at spawn time (#6492) This change relaxes what kinds of modules can be run when wasi-threads is enabled via `--wasi-modules experimental-wasi-threads`. Previously, as reported in #6153, simple modules that made no use of thread spawning or shared memories were preemptively rejected whe...
diff --git a/crates/wasi-threads/src/lib.rs b/crates/wasi-threads/src/lib.rs index 255d698b0..76f12edae 100644 --- a/crates/wasi-threads/src/lib.rs +++ b/crates/wasi-threads/src/lib.rs @@ -2,12 +2,12 @@ //! //! [`wasi-threads`]: https://github.com/WebAssembly/wasi-threads -use anyhow::{anyhow, bail, Result}; +use a...
2
72
43
7f66d62f2807e5d73be61b9c654ae04939bba13d
Trevor Elliott
2023-05-31T14:36:21
Refactor the x64 pretty-printer (#6481) While working on #6461 I found it nice to have the format strings for the pretty-printer use variables inline rather than as arguments.
diff --git a/cranelift/codegen/src/isa/x64/inst/mod.rs b/cranelift/codegen/src/isa/x64/inst/mod.rs index 0072de6db..5afc33e41 100644 --- a/cranelift/codegen/src/isa/x64/inst/mod.rs +++ b/cranelift/codegen/src/isa/x64/inst/mod.rs @@ -692,21 +692,14 @@ impl PrettyPrint for Inst { let src1 = pretty_print_...
1
241
373
c044790a9047db1593516b9c6916642c155ee87a
PROMETHIA-27
2023-05-31T01:07:07
Add `EntityList::copy_from` (#6421) * add copy_from and test * un-mut `list2` in the test * added more tests & banned self-moves * Add comment to panicking test * Added note that function will panic
diff --git a/cranelift/entity/src/list.rs b/cranelift/entity/src/list.rs index 682eb256f..80d0acef8 100644 --- a/cranelift/entity/src/list.rs +++ b/cranelift/entity/src/list.rs @@ -482,6 +482,48 @@ impl<T: EntityRef + ReservedValue> EntityList<T> { } } + /// Copies a slice from an entity list in the ...
1
87
0
d308dbdcdaf9ec4c9ba844af4f67dc92bade3823
Alex Crichton
2023-05-26T20:14:36
Disable tests for all proc-macros (#6473) This commit goes through all proc-macros we have in this repository and ensures that they're all flagged with `test = false` and `doctest = false`. This comes about as I was curious why CI time was 40m which felt a little long and upon inspection the cross-compiled builders we...
diff --git a/crates/c-api/macros/Cargo.toml b/crates/c-api/macros/Cargo.toml index 152bdd122..6f11c432f 100644 --- a/crates/c-api/macros/Cargo.toml +++ b/crates/c-api/macros/Cargo.toml @@ -8,6 +8,7 @@ publish = false [lib] proc-macro = true test = false +doctest = false [dependencies] quote = "1.0" diff --git a/...
6
10
0
f5d9131c5392c0968bb8c94870db0bf55146a746
Roman Volosatovs
2023-05-26T15:06:25
refactor(preview2): add `inherit_std{in,out,err}` (#6465) Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
diff --git a/crates/wasi/src/preview2/ctx.rs b/crates/wasi/src/preview2/ctx.rs index 1e23ac841..511008b9c 100644 --- a/crates/wasi/src/preview2/ctx.rs +++ b/crates/wasi/src/preview2/ctx.rs @@ -60,10 +60,20 @@ impl WasiCtxBuilder { self } - pub fn inherit_stdio(self) -> Self { + pub fn inherit_stdi...
1
13
3
b7d3261bafb78bb84d2370adc48c3fceda3687c5
Roman Volosatovs
2023-05-26T14:59:42
feat(preview1): implement `fd_readdir` (#6453) * refactor(preview2): return deleted table values Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net> * doc(preview2): ensure module doc is properly rendered Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net> * fix(preview1): `Transcation` -> `Transaction` ...
diff --git a/crates/test-programs/tests/wasi-preview1-host-in-preview2.rs b/crates/test-programs/tests/wasi-preview1-host-in-preview2.rs index 76fe85ead..ec95c3a53 100644 --- a/crates/test-programs/tests/wasi-preview1-host-in-preview2.rs +++ b/crates/test-programs/tests/wasi-preview1-host-in-preview2.rs @@ -148,7 +148,...
7
199
69
791d6f95033e9df38943505e261903714033ba9b
Ian Ker-Seymer
2023-05-25T17:29:22
Honor `ModuleVersionStrategy` in `Engine::precompile_compatibility_hash` (#6457)
diff --git a/crates/wasmtime/src/config.rs b/crates/wasmtime/src/config.rs index 0b3420e53..4b3e3c484 100644 --- a/crates/wasmtime/src/config.rs +++ b/crates/wasmtime/src/config.rs @@ -68,6 +68,16 @@ impl Default for ModuleVersionStrategy { } } +impl std::hash::Hash for ModuleVersionStrategy { + fn hash<H: s...
3
39
2
f70b0f39c3e15f637b00a6cfb006801e7a114248
Saúl Cabrera
2023-05-25T15:49:17
winch: Refactor the Masm associated types (#6451) This commit is a follow up to https://github.com/bytecodealliance/wasmtime/pull/6443, in which we discussed potentially having `PtrSize` and `ABI` as associated types to the `MacroAssembler` trait. I considered having `PtrSize` associated to the `ABI`, but given the a...
diff --git a/winch/codegen/src/abi/mod.rs b/winch/codegen/src/abi/mod.rs index 79e522919..f7f37b301 100644 --- a/winch/codegen/src/abi/mod.rs +++ b/winch/codegen/src/abi/mod.rs @@ -56,20 +56,20 @@ pub(crate) use local::*; /// specific registers, etc. pub(crate) trait ABI { /// The required stack alignment. - ...
13
168
237
72b641d5dada4084b5ec839968ffd1655d64be1b
Roman Volosatovs
2023-05-25T15:15:38
fix: respect `fd_prestat_dir_name` `path_max_len` argument (#6444) prtest:full Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
diff --git a/crates/test-programs/wasi-tests/src/bin/dir_fd_op_failures.rs b/crates/test-programs/wasi-tests/src/bin/dir_fd_op_failures.rs index 35c0f2827..bb081c696 100644 --- a/crates/test-programs/wasi-tests/src/bin/dir_fd_op_failures.rs +++ b/crates/test-programs/wasi-tests/src/bin/dir_fd_op_failures.rs @@ -5,6 +5,...
3
19
3
83ac69ca840dc20ecda1892d417031bad90060cf
Roman Volosatovs
2023-05-24T20:58:22
feat(preview1): implement `fd_fdstat_set_rights` (#6447) Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
diff --git a/crates/wasi-preview1-component-adapter/src/lib.rs b/crates/wasi-preview1-component-adapter/src/lib.rs index 998ce47a2..f7dd36315 100644 --- a/crates/wasi-preview1-component-adapter/src/lib.rs +++ b/crates/wasi-preview1-component-adapter/src/lib.rs @@ -557,15 +557,17 @@ pub unsafe extern "C" fn fd_fdstat_se...
2
53
51
afde47c214716273362bb3e7b04e3e225b9d7001
Saúl Cabrera
2023-05-24T17:32:20
winch: Drop `FuncEnv` trait (#6443) This commit is a small cleanup to drop the usage of the `FuncEnv` trait. In https://github.com/bytecodealliance/wasmtime/pull/6358, we agreed on making `winch-codegen` directly depend on `wasmtime-environ`. Introducing a direct relatioship between `winch-codegen` and `wasmtime-env...
diff --git a/Cargo.lock b/Cargo.lock index ec6f2bdab..4ebf1c432 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4354,7 +4354,6 @@ dependencies = [ "wasmtime-cranelift-shared", "wasmtime-environ", "winch-codegen", - "winch-environ", ] [[package]] @@ -4525,15 +4524,6 @@ dependencies = [ "wasmtime-environ", ] ...
18
86
145
b25fe202b0fd53a560eaa60b562fae5a1e7740e2
Saúl Cabrera
2023-05-22T19:10:02
winch(trampolines): Save SP, FP and return address (#6400) * winch(trampolines): Save SP, FP and return address This change is a follow-up to https://github.com/bytecodealliance/wasmtime/pull/6358 This change implements the necessary stores of SP, FP and return address for fast stack walking. * Ignore backtrace tes...
diff --git a/tests/all/winch.rs b/tests/all/winch.rs index ac1541aa6..503d393dc 100644 --- a/tests/all/winch.rs +++ b/tests/all/winch.rs @@ -1,3 +1,4 @@ +use anyhow::{bail, Result}; use wasmtime::*; const MODULE: &'static str = r#" @@ -45,80 +46,145 @@ fn add_fn(store: impl AsContextMut) -> Func { #[test] #[cfg...
5
242
45
c45e17c09cc109cd476cc00c66f523ee43b9a5f8
Alex Crichton
2023-05-22T16:17:02
Fix readme directive for `wasmtime-wasi-http` (#6426) This points to a nonexistent file which caused the publish to crates.io to fail.
diff --git a/crates/wasi-http/Cargo.toml b/crates/wasi-http/Cargo.toml index d3d2e0957..f91f9b523 100644 --- a/crates/wasi-http/Cargo.toml +++ b/crates/wasi-http/Cargo.toml @@ -6,7 +6,6 @@ edition.workspace = true repository = "https://github.com/bytecodealliance/wasmtime" license = "Apache-2.0 WITH LLVM-exception" ...
1
0
1
ba6c9fe2129b3d5cdb21713be0db3defa325a68e
Marcin S
2023-05-22T14:54:57
Add benchmark for `deserialize` to compare with `deserialize_file` (#6420) I was curious how `deserialize` compared with `deserialize_file`. There was already a `bench_deserialize_module` so I expanded it to support `deserialize`. Some results: ``` Benchmarking deserialize/deserialize/wasi.wasm Benchmarking deserial...
diff --git a/benches/instantiation.rs b/benches/instantiation.rs index 48048cb89..c1810ac16 100644 --- a/benches/instantiation.rs +++ b/benches/instantiation.rs @@ -156,11 +156,18 @@ fn bench_deserialize_module(c: &mut Criterion, path: &Path) { let state = Lazy::new(|| { let engine = Engine::default(); ...
1
10
3
28931a4ae64f32dfd4d825df526429c05b3d4945
Nick Fitzgerald
2023-05-19T05:49:45
cranelift-codegen: Rename `abi::Caller` to `abi::CallSite` (#6414) Will be less confusing since each call site has both a caller and a callee.
diff --git a/cranelift/codegen/src/isa/aarch64/abi.rs b/cranelift/codegen/src/isa/aarch64/abi.rs index 3698a449c..8ba8ce4a6 100644 --- a/cranelift/codegen/src/isa/aarch64/abi.rs +++ b/cranelift/codegen/src/isa/aarch64/abi.rs @@ -24,7 +24,7 @@ use smallvec::{smallvec, SmallVec}; pub(crate) type AArch64Callee = Callee<A...
9
27
24
9733e7d552e500e309a4f4205fb97c5ecdc99d29
Alex Crichton
2023-05-19T05:49:06
Fix the component_api fuzzer (#6410) This fuzz target was accidentally broken by #6378 and I forgot to update this fuzz target. Namely all the generated types now need names to satisfy possible restrictions depending on the structure. For simplicity everything is given a name to avoid having to special case some vs ot...
diff --git a/crates/misc/component-fuzz-util/src/lib.rs b/crates/misc/component-fuzz-util/src/lib.rs index 826dfbc9e..93090d09d 100644 --- a/crates/misc/component-fuzz-util/src/lib.rs +++ b/crates/misc/component-fuzz-util/src/lib.rs @@ -210,13 +210,6 @@ impl Type { } } -// impl<'a> Arbitrary<'a> for Type { -// ...
2
21
32
fa4bdb535e229b29c548d3956ae371e4804e0414
Pat Hickey
2023-05-18T23:37:19
poll_oneoff_files doesnt work on windows, apparently
diff --git a/crates/test-programs/tests/wasi-preview2-components.rs b/crates/test-programs/tests/wasi-preview2-components.rs index a3a07bb78..1983d7489 100644 --- a/crates/test-programs/tests/wasi-preview2-components.rs +++ b/crates/test-programs/tests/wasi-preview2-components.rs @@ -247,6 +247,7 @@ async fn path_symli...
1
1
0
b44ac1329a493fbf3fbb52939b4189bbd5ff7255
Pat Hickey
2023-05-18T22:58:18
wasmtime-wasi: include witx and wit in publish
diff --git a/crates/wasi/Cargo.toml b/crates/wasi/Cargo.toml index cb4b9bc38..31ac0bf46 100644 --- a/crates/wasi/Cargo.toml +++ b/crates/wasi/Cargo.toml @@ -9,7 +9,7 @@ keywords = ["webassembly", "wasm"] repository = "https://github.com/bytecodealliance/wasmtime" readme = "README.md" edition.workspace = true -includ...
1
1
1
6bde6a1c5ca2e63d922a7404f068dd8149bfb0d7
Pat Hickey
2023-05-18T22:40:39
bump cargo.lock
diff --git a/Cargo.lock b/Cargo.lock index 0a22466ee..acf909d9a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4277,6 +4277,7 @@ dependencies = [ "wasi-tokio", "wasmtime", "wiggle", + "windows-sys 0.48.0", ] [[package]]
1
1
0
85f05b6ce4b56dccdadf665b7db526aa4cf30307
Pat Hickey
2023-05-18T22:34:24
wasmtime-wasi needs windows-sys
diff --git a/crates/wasi/Cargo.toml b/crates/wasi/Cargo.toml index cf046b776..cb4b9bc38 100644 --- a/crates/wasi/Cargo.toml +++ b/crates/wasi/Cargo.toml @@ -38,6 +38,7 @@ rustix = { workspace = true, features = ["fs"] } [target.'cfg(windows)'.dependencies] io-extras = "0.17.1" +windows-sys = { workspace = true } ...
1
1
0
d6dace08d9e51323e0a4552babceefc2ad4f7ad2
Pat Hickey
2023-05-18T21:57:14
delete bogus cargo doc
diff --git a/crates/wasi/src/preview2/error.rs b/crates/wasi/src/preview2/error.rs index c86eae999..c3493b238 100644 --- a/crates/wasi/src/preview2/error.rs +++ b/crates/wasi/src/preview2/error.rs @@ -1,12 +1,3 @@ -//! wasi-common uses an [`Error`] type which represents either a preview 1 [`Errno`] enum, on -//! [`anyh...
1
0
9
317320e22c296cab7c49be9702d78c87722891f1
Pat Hickey
2023-05-18T19:20:10
add comments, make everything scheduler-related private to crate
diff --git a/crates/wasi/src/preview2/ctx.rs b/crates/wasi/src/preview2/ctx.rs index a9a550bfa..fe069126c 100644 --- a/crates/wasi/src/preview2/ctx.rs +++ b/crates/wasi/src/preview2/ctx.rs @@ -1,9 +1,7 @@ use crate::preview2::{ clocks::{self, WasiClocks}, filesystem::{Dir, TableFsExt}, - pipe, random, - ...
5
35
29
e809f2d684b2c39a9a2e9e2bcd3e1c1072b7a97e
Pat Hickey
2023-05-18T17:09:33
wasi-tests fd_readdir: delete assertion about ordering of fds (#6404) This is an unnecessary restriction: applications shouldn't be relying on any ordering of preview1 fds, besides that other files are not found in the stdio range. This behavior changed with the introduction of the component adapter, but I am making ...
diff --git a/crates/test-programs/wasi-tests/src/bin/fd_readdir.rs b/crates/test-programs/wasi-tests/src/bin/fd_readdir.rs index 83398f6ae..023829255 100644 --- a/crates/test-programs/wasi-tests/src/bin/fd_readdir.rs +++ b/crates/test-programs/wasi-tests/src/bin/fd_readdir.rs @@ -118,10 +118,6 @@ unsafe fn test_fd_read...
1
0
4
55281df154983daa6a27eb85a1abe6f0c9c6d0b1
Pat Hickey
2023-05-18T17:08:31
add test for preview2's preview 1 host adapter, which is in its infancy
diff --git a/crates/test-programs/tests/wasi-preview1-host-in-preview2.rs b/crates/test-programs/tests/wasi-preview1-host-in-preview2.rs new file mode 100644 index 000000000..482aa7a7f --- /dev/null +++ b/crates/test-programs/tests/wasi-preview1-host-in-preview2.rs @@ -0,0 +1,351 @@ +#![cfg(feature = "test_programs")] ...
1
351
0
535acaa4c0f0885f0ad609126a9b3e3107e69e16
Pat Hickey
2023-05-18T17:08:17
factor out common config to test-programs crate
diff --git a/crates/test-programs/src/lib.rs b/crates/test-programs/src/lib.rs index efeb701d0..960fd9a7a 100644 --- a/crates/test-programs/src/lib.rs +++ b/crates/test-programs/src/lib.rs @@ -1,2 +1,37 @@ -// This crate doesn't contain any code; it just exists to run tests for -// other crates in the workspace. +///! ...
4
40
101
8d9bbb81c992980ae8fbe64d6fff450959d871c8
Pat Hickey
2023-05-18T00:11:16
add test of preview2 running as components
diff --git a/crates/test-programs/tests/wasi-preview2-components.rs b/crates/test-programs/tests/wasi-preview2-components.rs new file mode 100644 index 000000000..66de10b12 --- /dev/null +++ b/crates/test-programs/tests/wasi-preview2-components.rs @@ -0,0 +1,333 @@ +#![cfg(feature = "test_programs")] +use anyhow::Resul...
1
333
0
f749b823c4aaa4ad9c01dcee805e160c759dc691
Pat Hickey
2023-05-18T00:11:07
fix typo
diff --git a/crates/test-programs/tests/wasi-tokio.rs b/crates/test-programs/tests/wasi-tokio.rs index 1746dc594..db619552b 100644 --- a/crates/test-programs/tests/wasi-tokio.rs +++ b/crates/test-programs/tests/wasi-tokio.rs @@ -20,7 +20,7 @@ lazy_static::lazy_static! { include!(concat!(env!("OUT_DIR"), "/wasi_tests_m...
1
1
1
26e27ec3be62aa1ad6428329ca6de25921aee119
Pat Hickey
2023-05-17T23:12:17
pipe docs
diff --git a/crates/wasi/src/preview2/pipe.rs b/crates/wasi/src/preview2/pipe.rs index f1c401daa..a29aada93 100644 --- a/crates/wasi/src/preview2/pipe.rs +++ b/crates/wasi/src/preview2/pipe.rs @@ -26,7 +26,7 @@ use system_interface::io::ReadReady; /// easy to create. For example: /// /// ``` -/// use wasi_common::{p...
1
2
2
403f32dc609443194ec6e826cc95a8229be154dc
Pat Hickey
2023-05-17T03:05:01
add command and reactor tests
diff --git a/Cargo.lock b/Cargo.lock index 6e8242dbc..7953bce0a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3130,6 +3130,7 @@ name = "test-programs" version = "0.0.0" dependencies = [ "anyhow", + "cap-rand", "cap-std", "cargo_metadata", "cfg-if", diff --git a/crates/test-programs/Cargo.toml b/crates/test-pro...
5
22
14
4b74b2ddad4693b7a3cd3d8ccc13400ba98763b5
Afonso Bordado
2023-05-16T23:07:12
wasmtime: Enable SIMD testsuite for RISC-V (#6392)
diff --git a/build.rs b/build.rs index ab728b739..b0d64c190 100644 --- a/build.rs +++ b/build.rs @@ -193,12 +193,79 @@ fn ignore(testsuite: &str, testname: &str, strategy: &str) -> bool { testname == "simd_f32x4_pmin_pmax" || testname == "simd_f64x2_pmin_pmax" } - // Currently the simd wa...
1
72
5
f271adff188ce7186b057df3000896980234896d
Brendan Burns
2023-05-16T21:36:59
Fix scheme for URIs, add coverage to detect regressions in the future. (#6389)
diff --git a/crates/test-programs/tests/http_tests/runtime/wasi_http_tests.rs b/crates/test-programs/tests/http_tests/runtime/wasi_http_tests.rs index 5ed731dbc..ad5cd21c3 100644 --- a/crates/test-programs/tests/http_tests/runtime/wasi_http_tests.rs +++ b/crates/test-programs/tests/http_tests/runtime/wasi_http_tests.rs...
3
8
8
7f0228c96777b4ebf2fda90e37b66318c62f1731
Alex Crichton
2023-05-16T20:54:20
Fix some warnings on nightly Rust (#6388) Upstream rust has decided that ignoring a value is not spelled `drop(foo)` but instead it's spelled `let _ = foo`
diff --git a/cranelift/wasm/src/environ/spec.rs b/cranelift/wasm/src/environ/spec.rs index dc05fca3c..595dba293 100644 --- a/cranelift/wasm/src/environ/spec.rs +++ b/cranelift/wasm/src/environ/spec.rs @@ -101,7 +101,7 @@ pub trait FuncEnvironment: TargetEnvironment { /// Called after the locals for a function have...
17
43
35
7c6ec0ff1c25433934a6320953b45b268e493beb
Saúl Cabrera
2023-05-16T20:08:57
winch: Append traps to final object (#6387) This change is a follow-up to https://github.com/bytecodealliance/wasmtime/pull/6298, in which the function traps were not added to the final object.
diff --git a/crates/winch/src/compiler.rs b/crates/winch/src/compiler.rs index 41c386edc..91306a028 100644 --- a/crates/winch/src/compiler.rs +++ b/crates/winch/src/compiler.rs @@ -6,7 +6,8 @@ use wasmparser::FuncValidatorAllocations; use wasmtime_cranelift_shared::{CompiledFunction, ModuleTextBuilder}; use wasmtime_...
1
5
1
79a38fd6433a06e1ff602241110f70ad6b3989f6
Daniel Bevenius
2023-05-16T14:06:33
Fix typo in doc comment in component/mod.rs (#6386) Signed-off-by: Daniel Bevenius <daniel.bevenius@gmail.com>
diff --git a/crates/wasmtime/src/component/mod.rs b/crates/wasmtime/src/component/mod.rs index 21550adef..671cce9d0 100644 --- a/crates/wasmtime/src/component/mod.rs +++ b/crates/wasmtime/src/component/mod.rs @@ -298,7 +298,7 @@ pub(crate) use self::store::ComponentStoreData; /// import foo: package.foo; /// ...
1
1
1
53ca1552219df2356a47cf7e0c97e0c8977da11d
Alex Crichton
2023-05-15T23:57:02
Switch wasmtime-wasi-http to using Wasmtime's version (#6382) * Switch wasmtime-wasi-http to using Wasmtime's version This should use the same versioning scheme as all the other `wasmtime-*` crates. * Fixup more directives
diff --git a/Cargo.lock b/Cargo.lock index 7582f44e7..e5446d59d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4211,7 +4211,7 @@ dependencies = [ [[package]] name = "wasmtime-wasi-http" -version = "0.0.2" +version = "10.0.0" dependencies = [ "anyhow", "bytes", diff --git a/Cargo.toml b/Cargo.toml index 3b51a55dd...
3
3
3
21def7602365c65e4d02785e8c6b4833c7b57820
Pat Hickey
2023-05-15T22:40:50
remove version constraint from adapter and bytearray in workspace dependencies this was apparently messing up ./publish bump
diff --git a/Cargo.toml b/Cargo.toml index f785e1c08..3b51a55dd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -176,8 +176,8 @@ winch-environ = { path = "winch/environ", version = "=0.8.0" } winch-filetests = { path = "winch/filetests" } winch-test-macros = { path = "winch/test-macros" } -wasi-preview1-component-adapt...
1
2
2
22ccf87d1a14a54b164ccac888fda568a7a6b9ec
Pat Hickey
2023-05-15T21:28:19
still need test = false because adapter cant link on native profile includes linker options
diff --git a/crates/wasi-preview1-component-adapter/Cargo.toml b/crates/wasi-preview1-component-adapter/Cargo.toml index eeb8f0ded..c2ca4c9c6 100644 --- a/crates/wasi-preview1-component-adapter/Cargo.toml +++ b/crates/wasi-preview1-component-adapter/Cargo.toml @@ -15,6 +15,7 @@ wasm-encoder = "0.25" object = { version...
1
1
0
44b9d6c3217ef20fcc53aa60c7b8ceea8cf876d4
Pat Hickey
2023-05-15T21:14:07
cfg static assertion in adapter so it builds for native this is required for cargo test and cargo doc of the whole workspace.
diff --git a/crates/wasi-preview1-component-adapter/Cargo.toml b/crates/wasi-preview1-component-adapter/Cargo.toml index 36a52a192..eeb8f0ded 100644 --- a/crates/wasi-preview1-component-adapter/Cargo.toml +++ b/crates/wasi-preview1-component-adapter/Cargo.toml @@ -16,7 +16,6 @@ object = { version = "0.30.0", default-fe...
2
1
5
651dab199ee040965ecad8e4b9c07d209940ba75
Pat Hickey
2023-05-15T21:14:01
delete adatper Cargo.lock
diff --git a/crates/wasi-preview1-component-adapter/Cargo.lock b/crates/wasi-preview1-component-adapter/Cargo.lock deleted file mode 100644 index 4cdca9e02..000000000 --- a/crates/wasi-preview1-component-adapter/Cargo.lock +++ /dev/null @@ -1,456 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not i...
1
0
456
1b5f41659d8c56ad2d22d44f5bfb95e6b2f99230
Pat Hickey
2023-05-15T20:34:50
adapter and byte-array-literals are publish = false
diff --git a/crates/wasi-preview1-component-adapter/Cargo.toml b/crates/wasi-preview1-component-adapter/Cargo.toml index ba1aa9478..36a52a192 100644 --- a/crates/wasi-preview1-component-adapter/Cargo.toml +++ b/crates/wasi-preview1-component-adapter/Cargo.toml @@ -3,6 +3,7 @@ name = "wasi-preview1-component-adapter" v...
2
2
0
0259833ffb9e9210c61b5e1794b7a0780241a4f3
Pat Hickey
2023-05-15T18:28:22
adapter: compile_error when not wasm32-unknown-unknown, and note this where the static assertion fails
diff --git a/crates/wasi-preview1-component-adapter/src/lib.rs b/crates/wasi-preview1-component-adapter/src/lib.rs index 1198dd3d8..d5459baa7 100644 --- a/crates/wasi-preview1-component-adapter/src/lib.rs +++ b/crates/wasi-preview1-component-adapter/src/lib.rs @@ -14,6 +14,9 @@ use core::slice; use poll::Pollable; us...
1
4
0
a3a491cb430750ca0b0dab7997901ff6a8fb109d
Daniel Bevenius
2023-05-13T04:46:06
Fix typo in StoreContext doc comments (#6375) Signed-off-by: Daniel Bevenius <daniel.bevenius@gmail.com>
diff --git a/crates/wasmtime/src/store/context.rs b/crates/wasmtime/src/store/context.rs index 4e15eaabf..2e65c0c33 100644 --- a/crates/wasmtime/src/store/context.rs +++ b/crates/wasmtime/src/store/context.rs @@ -2,7 +2,7 @@ use crate::store::{Store, StoreInner}; /// A temporary handle to a [`&Store<T>`][`Store`]. ...
1
2
2
a729a2a621d87258e100327497791883d42a2378
Pat Hickey
2023-05-12T17:34:13
error types: resolve type definition id by chasing alias ids (#6373)
diff --git a/crates/wit-bindgen/src/lib.rs b/crates/wit-bindgen/src/lib.rs index c589266c7..a935912aa 100644 --- a/crates/wit-bindgen/src/lib.rs +++ b/crates/wit-bindgen/src/lib.rs @@ -1027,9 +1027,10 @@ impl<'a> InterfaceGenerator<'a> { _ => return None, }; let error_typeid = match resul...
2
16
2
5e57c6aae37c95d66bf74a38d9200aaa5a151bb4
theothergraham
2023-05-11T15:12:27
copy input msg into result of C API wasmtime_error_new (#6369) * copy input msg into result of C API wasmtime_error_new * make copy more clear with into_owned()
diff --git a/crates/c-api/src/error.rs b/crates/c-api/src/error.rs index 5b320ad4f..0c9dde879 100644 --- a/crates/c-api/src/error.rs +++ b/crates/c-api/src/error.rs @@ -24,7 +24,8 @@ impl Into<Error> for wasmtime_error_t { pub extern "C" fn wasmtime_error_new( msg: *const std::ffi::c_char, ) -> Option<Box<wasmti...
1
2
1
e944531588c1ebfcf56ec83fe1c9f607c00f87f1
Roman Volosatovs
2023-05-10T10:41:45
refactor(preview1): trap explicitly Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
diff --git a/wasi-common/src/preview1/mod.rs b/wasi-common/src/preview1/mod.rs index 16a85231d..52e2f554a 100644 --- a/wasi-common/src/preview1/mod.rs +++ b/wasi-common/src/preview1/mod.rs @@ -60,12 +60,6 @@ impl wiggle::GuestErrorType for types::Errno { } } -impl From<anyhow::Error> for types::Error { - fn ...
1
18
15
e31960349eade871c0c9b9139904eae7351fab88
Roman Volosatovs
2023-05-09T18:27:33
test: add `environment` test program Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
diff --git a/host/tests/wasi_component.rs b/host/tests/wasi_component.rs index 69064430e..c259a8f0a 100644 --- a/host/tests/wasi_component.rs +++ b/host/tests/wasi_component.rs @@ -54,7 +54,9 @@ async fn instantiate( Ok((store, command)) } async fn run_with_temp_dir(component: &str) { - let mut builder = Wasi...
3
20
2
d15e804168c8e8c0d2780c0e11548941d5179955
Roman Volosatovs
2023-05-09T18:10:22
feat(preview1): implement `random_get` Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
diff --git a/host/tests/wasi_module.rs b/host/tests/wasi_module.rs index d65b052ab..efc744920 100644 --- a/host/tests/wasi_module.rs +++ b/host/tests/wasi_module.rs @@ -110,7 +110,6 @@ async fn run_with_temp_dir(module: &str) { } #[test_log::test(tokio::test)] -#[should_panic] async fn big_random_buf() { run_...
2
6
2
c1c6720e07d10b65ad0f91d9d9cbb90ddf84d424
Roman Volosatovs
2023-05-09T17:53:14
feat(preview1): implement `sched_yield` Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
diff --git a/host/tests/wasi_module.rs b/host/tests/wasi_module.rs index 3216a915c..d65b052ab 100644 --- a/host/tests/wasi_module.rs +++ b/host/tests/wasi_module.rs @@ -328,7 +328,6 @@ async fn renumber() { } #[test_log::test(tokio::test)] -#[should_panic] async fn sched_yield() { run_with_temp_dir("sched_yie...
2
2
2
2599bbc5aced4296582af7c21f1cd4565c72b627
Roman Volosatovs
2023-05-09T17:53:03
feat(preview1): implement `proc_raise` Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
diff --git a/wasi-common/src/preview1/mod.rs b/wasi-common/src/preview1/mod.rs index 026ba9df5..32d45c96d 100644 --- a/wasi-common/src/preview1/mod.rs +++ b/wasi-common/src/preview1/mod.rs @@ -517,7 +517,7 @@ impl< } async fn proc_raise(&mut self, _sig: types::Signal) -> Result<(), types::Error> { - ...
1
1
1
59ab6bea3319e4a54e34a57802cd180f7a74c663
Roman Volosatovs
2023-05-09T16:51:55
feat(preview1): implement `WasiPreview1Adapter::new` Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
diff --git a/wasi-common/src/preview1/mod.rs b/wasi-common/src/preview1/mod.rs index 0a5be3f82..026ba9df5 100644 --- a/wasi-common/src/preview1/mod.rs +++ b/wasi-common/src/preview1/mod.rs @@ -14,7 +14,7 @@ impl WasiPreview1Adapter { // no parameters: anything it needs from the preview 2 implementation // sho...
1
1
1
8662a774dedb7da5385ad59206cc8109c5569647
Roman Volosatovs
2023-05-09T15:49:51
feat(preview1): implement `clock_time_get` Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
diff --git a/host/tests/wasi_module.rs b/host/tests/wasi_module.rs index 1c5540cb1..3216a915c 100644 --- a/host/tests/wasi_module.rs +++ b/host/tests/wasi_module.rs @@ -116,7 +116,6 @@ async fn big_random_buf() { } #[test_log::test(tokio::test)] -#[should_panic] async fn clock_time_get() { run_with_temp_dir("...
2
14
3
d63d5984e9ce4af875003a986cc27b146f64b5cb
Roman Volosatovs
2023-05-09T15:45:39
feat(preview1): implement `clock_res_get` Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
diff --git a/wasi-common/src/preview1/mod.rs b/wasi-common/src/preview1/mod.rs index 1ad83564b..029acd2e9 100644 --- a/wasi-common/src/preview1/mod.rs +++ b/wasi-common/src/preview1/mod.rs @@ -66,6 +66,22 @@ impl From<anyhow::Error> for types::Error { } } +impl TryFrom<wasi::wall_clock::Datetime> for types::Tim...
1
29
1
7c22cb79f5022bb527a438bffe2b59b9cb472dc8
Roman Volosatovs
2023-05-09T15:26:04
feat(preview1): implement `proc_exit` Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
diff --git a/wasi-common/src/preview1/mod.rs b/wasi-common/src/preview1/mod.rs index 72ac19e5d..1ad83564b 100644 --- a/wasi-common/src/preview1/mod.rs +++ b/wasi-common/src/preview1/mod.rs @@ -5,7 +5,7 @@ use crate::wasi; use core::borrow::Borrow; -use anyhow::Context; +use anyhow::{anyhow, Context}; use wiggle::...
1
9
2
93e753dd773e0cb5ae1b37130d34852fb35d27f5
Roman Volosatovs
2023-05-09T15:25:15
feat(preview1): implement `environ_sizes_get` Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
diff --git a/wasi-common/src/preview1/mod.rs b/wasi-common/src/preview1/mod.rs index ca35de128..72ac19e5d 100644 --- a/wasi-common/src/preview1/mod.rs +++ b/wasi-common/src/preview1/mod.rs @@ -179,7 +179,21 @@ impl< } async fn environ_sizes_get(&mut self) -> Result<(types::Size, types::Size), types::Error> ...
1
15
1
e8010e8addd1b51c4e0e7036f269e76601526212
Roman Volosatovs
2023-05-09T15:25:01
feat(preview1): implement `environ_get` Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
diff --git a/wasi-common/src/preview1/mod.rs b/wasi-common/src/preview1/mod.rs index 8804a6823..ca35de128 100644 --- a/wasi-common/src/preview1/mod.rs +++ b/wasi-common/src/preview1/mod.rs @@ -153,7 +153,29 @@ impl< environ: &GuestPtr<'b, GuestPtr<'b, u8>>, environ_buf: &GuestPtr<'b, u8>, ) -> Re...
1
23
1
1cadc426a62447611dc45e5e9890debf1486880d
Roman Volosatovs
2023-05-09T15:24:45
feat(preview1): implement `args_sizes_get` Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
diff --git a/wasi-common/src/preview1/mod.rs b/wasi-common/src/preview1/mod.rs index ee1ea0131..8804a6823 100644 --- a/wasi-common/src/preview1/mod.rs +++ b/wasi-common/src/preview1/mod.rs @@ -134,7 +134,18 @@ impl< } async fn args_sizes_get(&mut self) -> Result<(types::Size, types::Size), types::Error> { -...
1
12
1
4aa54b391f6fcd84a20a0c17a2a1740c4d22b6bf
Roman Volosatovs
2023-05-09T15:24:24
feat(preview1): implement `args_get` Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
diff --git a/wasi-common/src/preview1/mod.rs b/wasi-common/src/preview1/mod.rs index 3457537a4..ee1ea0131 100644 --- a/wasi-common/src/preview1/mod.rs +++ b/wasi-common/src/preview1/mod.rs @@ -2,6 +2,10 @@ #![allow(unused_variables)] use crate::wasi; + +use core::borrow::Borrow; + +use anyhow::Context; use wiggle:...
1
53
1
b930c59213b3b5727a7027e07dff2bae0cc2f2b6
Eduardo de Moura Rodrigues
2023-05-11T00:55:42
feat(wasi-http): implement basic future incoming response (#6357) * feat(wasi-http): implement basic future incoming response * chore: add malformed request tests --------- Co-authored-by: Eduardo Rodrigues <eduardomourar@users.noreply.github.com>
diff --git a/crates/test-programs/wasi-http-tests/src/bin/outbound_request.rs b/crates/test-programs/wasi-http-tests/src/bin/outbound_request.rs index 384cf0177..4918ae00a 100644 --- a/crates/test-programs/wasi-http-tests/src/bin/outbound_request.rs +++ b/crates/test-programs/wasi-http-tests/src/bin/outbound_request.rs...
5
150
46
0ebd564fd52564ee7f6a4cf21b67072ce7be5279
Pat Hickey
2023-05-09T23:22:47
rename WasiCtxBuilder::new_sync() to new() there isnt actually a different way to build a context for sync vs async yet, and idk precisely how that is going to shake out, so lets just do the simplest possible thing here
diff --git a/host/src/main.rs b/host/src/main.rs index ab96e0a1e..46b47f9be 100644 --- a/host/src/main.rs +++ b/host/src/main.rs @@ -59,7 +59,7 @@ async fn main() -> Result<()> { let mut argv: Vec<&str> = vec!["wasm"]; argv.extend(args.args.iter().map(String::as_str)); - let mut builder = WasiCtxBuilder:...
6
24
24
cc973908eb3860d9487a7eb7b364865e747a6e39
Pat Hickey
2023-05-09T22:35:56
fix windows error translation
diff --git a/wasi-common/src/preview2/filesystem.rs b/wasi-common/src/preview2/filesystem.rs index 7b8d077e4..9fcfe9bb5 100644 --- a/wasi-common/src/preview2/filesystem.rs +++ b/wasi-common/src/preview2/filesystem.rs @@ -805,8 +805,8 @@ fn from_raw_os_error(raw_os_error: Option<i32>) -> Option<wasi::filesystem::Erro ...
1
2
2
39cbb74a2c27dbfcf1f0bc75520b3f4f01b3ac37
Pat Hickey
2023-05-09T21:03:51
wild guess
diff --git a/wasi-common/src/preview2/filesystem.rs b/wasi-common/src/preview2/filesystem.rs index 4eadc7948..7b8d077e4 100644 --- a/wasi-common/src/preview2/filesystem.rs +++ b/wasi-common/src/preview2/filesystem.rs @@ -530,11 +530,6 @@ impl<T: WasiView> wasi::filesystem::Host for T { } let mut opene...
1
5
5
541a1f480692cf099a4d0862bb0a36f06ce03d16
Pat Hickey
2023-05-09T20:28:45
directory_list test: add some context for debugging
diff --git a/test-programs/command-tests/Cargo.toml b/test-programs/command-tests/Cargo.toml index 019a0aa30..b5c427363 100644 --- a/test-programs/command-tests/Cargo.toml +++ b/test-programs/command-tests/Cargo.toml @@ -5,6 +5,7 @@ edition = "2021" publish = false [dependencies] +anyhow = "1" getrandom = "0.2.8" ...
2
12
6
bef458e632a193d5988b08e1e62fe705358241dc
Pat Hickey
2023-05-09T20:05:03
command directory list test: inherit stdio so i can figure out why this fails on windows
diff --git a/host/tests/command.rs b/host/tests/command.rs index ea560a223..2ca6ba867 100644 --- a/host/tests/command.rs +++ b/host/tests/command.rs @@ -397,6 +397,7 @@ async fn directory_list() -> Result<()> { let mut table = Table::new(); let wasi = WasiCtxBuilder::new_sync() + .inherit_stdio() ...
1
1
0
7fb918d17265c54b8595ea1da4f5229a8714970f
Pat Hickey
2023-05-09T18:32:41
fixes for windows
diff --git a/wasi-common/src/filesystem.rs b/wasi-common/src/filesystem.rs index 91de79617..c6f077704 100644 --- a/wasi-common/src/filesystem.rs +++ b/wasi-common/src/filesystem.rs @@ -107,6 +107,7 @@ impl InputStream for FileInputStream { } #[cfg(windows)] fn pollable_read(&self) -> Option<io_extras::os...
2
36
74
3ea5d15f596575efc8086637e9d92a4f5ea4eb01
Pat Hickey
2023-05-08T23:39:39
fix wasi-sockets-sync build to not use wasi_common::Error
diff --git a/host/Cargo.toml b/host/Cargo.toml index a3a278465..df66f8654 100644 --- a/host/Cargo.toml +++ b/host/Cargo.toml @@ -8,8 +8,8 @@ anyhow = { workspace = true } cap-std = { workspace = true } wasmtime = { workspace = true } wasi-common = { workspace = true } -#wasmtime-wasi-sockets = { workspace = true } -...
2
9
15
49ec1a6b91f50686868ea3cb480728bb61f5053f
Pat Hickey
2023-05-08T23:24:30
fix readonly test
diff --git a/wasi-common/src/preview2/filesystem.rs b/wasi-common/src/preview2/filesystem.rs index 332ac4d97..17da129c6 100644 --- a/wasi-common/src/preview2/filesystem.rs +++ b/wasi-common/src/preview2/filesystem.rs @@ -473,8 +473,12 @@ impl<T: WasiView> wasi::filesystem::Host for T { if !d.perms.contains(Dir...
2
10
3
003c94fa21b0eb043ccd34ca02412e1306230fc3
Pat Hickey
2023-05-08T22:53:30
fix a few more bugs
diff --git a/host/tests/wasi_component.rs b/host/tests/wasi_component.rs index 0f0556d90..2a88ff97c 100644 --- a/host/tests/wasi_component.rs +++ b/host/tests/wasi_component.rs @@ -54,12 +54,12 @@ async fn instantiate( Ok((store, command)) } async fn run_with_temp_dir(component: &str) { - let mut builder = Wa...
2
20
11
7f06ffb00873c4d9eb4befcd47fe0d9c73688981
Pat Hickey
2023-05-08T22:34:55
fix some table accessors and tests
diff --git a/wasi-common/src/pipe.rs b/wasi-common/src/pipe.rs index 0af6be4ac..d45531fb2 100644 --- a/wasi-common/src/pipe.rs +++ b/wasi-common/src/pipe.rs @@ -135,11 +135,13 @@ impl<R: Read + ReadReady + Any + Send + Sync> InputStream for ReadPipe<R> { /// /// ```no_run /// use wasi_common::{pipe::WritePipe, WasiC...
3
47
17
7ac78c56b721fd3cd46f32c3b399be91069ba68f
Pat Hickey
2023-05-08T21:56:15
a bunch of fixes, move clocks and randomness impls in
diff --git a/host/tests/command.rs b/host/tests/command.rs index c2c02951f..ea560a223 100644 --- a/host/tests/command.rs +++ b/host/tests/command.rs @@ -5,14 +5,12 @@ use std::{ io::{Cursor, Write}, sync::Mutex, }; -use wasi_cap_std_sync::WasiCtxBuilder; use wasi_common::{ clocks::{WasiMonotonicClock, ...
11
78
62
7feecfea6977c9ab00f1b73205d77232bf8e82fe
Pat Hickey
2023-05-08T21:15:54
start making host actually kick over by disabling stuff...
diff --git a/host/Cargo.toml b/host/Cargo.toml index d69088bb5..a3a278465 100644 --- a/host/Cargo.toml +++ b/host/Cargo.toml @@ -8,9 +8,8 @@ anyhow = { workspace = true } cap-std = { workspace = true } wasmtime = { workspace = true } wasi-common = { workspace = true } -wasi-cap-std-sync = { workspace = true } -wasmt...
8
84
62
a453eb391cdc04af157594e1d7899c0d6fa571fd
Pat Hickey
2023-05-08T20:08:56
add all the streams. consolidate file and dir into one file.
diff --git a/wasi-common/src/ctx.rs b/wasi-common/src/ctx.rs index 66e06b493..74fad2776 100644 --- a/wasi-common/src/ctx.rs +++ b/wasi-common/src/ctx.rs @@ -1,7 +1,7 @@ use crate::clocks::WasiClocks; use crate::sched::WasiSched; use crate::stream::{InputStream, OutputStream, TableStreamExt}; -use crate::{Dir, DirPer...
6
286
123
fbf2c6e6ab44e5c0f4e56793a5e2caa17e630d72
Pat Hickey
2023-05-05T01:29:33
filesystem::open_at implemented (i think?)
diff --git a/wasi-common/src/dir.rs b/wasi-common/src/dir.rs index dae609080..16cdee6d7 100644 --- a/wasi-common/src/dir.rs +++ b/wasi-common/src/dir.rs @@ -21,9 +21,6 @@ impl Dir { file_perms, } } - pub fn read_only(dir: cap_std::fs::Dir) -> Self { - Dir::new(dir, DirPerms::READ, F...
3
79
41
4ca29f4dd0a02ec4abaeef382b5c01cc0d54d761
Pat Hickey
2023-05-05T00:42:47
readdir done
diff --git a/wasi-common/src/preview2/filesystem.rs b/wasi-common/src/preview2/filesystem.rs index eeaa63c35..e5fefc788 100644 --- a/wasi-common/src/preview2/filesystem.rs +++ b/wasi-common/src/preview2/filesystem.rs @@ -1,13 +1,15 @@ #![allow(unused_variables, unreachable_code)] -use crate::{wasi, Dir, DirPerms, File...
1
129
65
9cc2c0f6e7bb130f3331f247ae849aa9d4f70b01
Pat Hickey
2023-05-04T23:49:13
everything in fs is done except open, readdir, and the stream read/writes aka the hard parts
diff --git a/wasi-common/src/dir.rs b/wasi-common/src/dir.rs index ac722e60f..dae609080 100644 --- a/wasi-common/src/dir.rs +++ b/wasi-common/src/dir.rs @@ -28,6 +28,7 @@ impl Dir { pub(crate) trait TableDirExt { fn push_dir(&mut self, dir: Dir) -> Result<u32, TableError>; + fn delete_dir(&mut self, fd: u32)...
4
126
165
6ea8be18dba502b875c7a6a7332af5bd1313039c
Pat Hickey
2023-05-04T23:11:32
more stat
diff --git a/wasi-common/src/preview2/filesystem.rs b/wasi-common/src/preview2/filesystem.rs index 5c47b8e47..fcc8f1c47 100644 --- a/wasi-common/src/preview2/filesystem.rs +++ b/wasi-common/src/preview2/filesystem.rs @@ -126,7 +126,7 @@ impl<T: WasiView> wasi::filesystem::Host for T { if table.is_file(fd) { ...
1
123
24
0522da0dc86ff014128261d27aebafba469daf6e
Pat Hickey
2023-05-04T21:10:43
sync is basically the same as datasync
diff --git a/wasi-common/src/preview2/filesystem.rs b/wasi-common/src/preview2/filesystem.rs index f9e905fda..5c47b8e47 100644 --- a/wasi-common/src/preview2/filesystem.rs +++ b/wasi-common/src/preview2/filesystem.rs @@ -289,16 +289,30 @@ impl<T: WasiView> wasi::filesystem::Host for T { fd: wasi::filesystem::D...
1
21
7
018deb8d51cdc6a8445a651b8e270b6cd93aa02c
Pat Hickey
2023-05-04T20:16:48
set times, pread, pwrite
diff --git a/wasi-common/Cargo.toml b/wasi-common/Cargo.toml index 71257cebf..0fd53fd9d 100644 --- a/wasi-common/Cargo.toml +++ b/wasi-common/Cargo.toml @@ -19,6 +19,7 @@ tracing = { workspace = true } cap-std = { workspace = true } cap-rand = { workspace = true } cap-fs-ext = { workspace = true } +fs-set-times = { ...
3
71
32
0d1fe10b860c660f7e659996c12dea805537f733
Pat Hickey
2023-05-04T19:48:23
making real progress
diff --git a/wasi-common/src/ctx.rs b/wasi-common/src/ctx.rs index 08d036b81..66e06b493 100644 --- a/wasi-common/src/ctx.rs +++ b/wasi-common/src/ctx.rs @@ -1,9 +1,8 @@ use crate::clocks::WasiClocks; use crate::sched::WasiSched; -use crate::stream::{InputStream, OutputStream}; -use crate::Table; +use crate::stream::{...
8
203
71
ce5c677f9a6d8085c03b01d9aefbce4656597807
Nick Fitzgerald
2023-05-09T20:33:39
wasmtime: Stop using `cfg(compiler)` (#6337) It was an alias, defined in `build.rs`, for cfg(any(feature = "cranelift", feature = "winch")) But it wasn't actually saving us much typing because we also have to have #[cfg_attr(nightlydoc, doc(cfg(any(feature = "cranelift", feature = "winch"))))] for all the ...
diff --git a/crates/wasmtime/build.rs b/crates/wasmtime/build.rs deleted file mode 100644 index 0809a4534..000000000 --- a/crates/wasmtime/build.rs +++ /dev/null @@ -1,20 +0,0 @@ -fn main() { - // Code in the `wasmtime` crate will use #[cfg(compiler)] conditional - // compilation when runtime compilation is suppo...
9
80
100
445f05c7286a12743a3c5b9a99d5da8bee4035a6
Alex Crichton
2023-05-09T19:39:11
Fold guest profiling flags into `--profile` CLI option (#6362) * Fold guest profiling flags into `--profile` CLI option This commit removes the `--profile-guest` and `--profile-guest-interval` CLI flags and folds them into the preexisting `--profile` flag. Specifying guest profiling can now be done with `--profile gu...
diff --git a/crates/cli-flags/src/lib.rs b/crates/cli-flags/src/lib.rs index 495021fbc..2306e8c31 100644 --- a/crates/cli-flags/src/lib.rs +++ b/crates/cli-flags/src/lib.rs @@ -20,7 +20,7 @@ use anyhow::{bail, Result}; use clap::Parser; use std::collections::HashMap; use std::path::PathBuf; -use wasmtime::{Config, P...
3
61
38
4c38a18f3c86f5e6ed9ed292c02633f77db1a259
Alex Crichton
2023-05-09T19:37:12
Refactor Wasmtime's profiling support (#6361) * Reorganize profiling-related code This commit is a bit of reorganization around profiling-related code in Wasmtime with the aim of eventually simplifying it a bit more. The changes here are: * All exposed agents are removed and instead only constructor functions retu...
diff --git a/Cargo.lock b/Cargo.lock index ef4f6472b..fd0449d75 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4067,6 +4067,7 @@ dependencies = [ "log", "object", "rustc-demangle", + "rustix", "serde", "target-lexicon", "wasmtime-environ", diff --git a/crates/jit/Cargo.toml b/crates/jit/Cargo.toml index b795d...
16
224
845
614665688d27986014926be37a99f70dcff02910
Alex Crichton
2023-05-09T15:28:29
Make libcalls slightly safer (#6360) Bake in the `*mut VMContext` to `&mut Instance` translation into the macro-generated trampolines to avoid the need to use `Instance::from_vmctx` with an extra level of indentation everywhere. Additionally some libcalls are now entirely safe code as their one unsafe operation was th...
diff --git a/crates/runtime/src/libcalls.rs b/crates/runtime/src/libcalls.rs index f1044d2ea..bceb89014 100644 --- a/crates/runtime/src/libcalls.rs +++ b/crates/runtime/src/libcalls.rs @@ -56,7 +56,7 @@ use crate::externref::VMExternRef; use crate::table::{Table, TableElementType}; -use crate::vmcontext::{VMContext...
1
142
174
d9cad60be9db830266c96df7324f8b942f5bb5b5
Alex Crichton
2023-05-08T18:35:14
Remove the initializer from a global's type information (#6349) * Remove the initializer from a global's type information This commit removes the `Global::initializer` field to instead only store type information about the global rather than its initialization state. Instead now the initializer is stored separately f...
diff --git a/cranelift/filetests/src/test_wasm/env.rs b/cranelift/filetests/src/test_wasm/env.rs index 23ca9bac8..316afcbcc 100644 --- a/cranelift/filetests/src/test_wasm/env.rs +++ b/cranelift/filetests/src/test_wasm/env.rs @@ -149,8 +149,12 @@ impl<'data> ModuleEnvironment<'data> for ModuleEnv { self.inner.d...
11
34
42
a5898560b22c74ea679f31c08d7d51fcd9be3c64
Juan Jose Medina
2023-05-08T17:01:52
Fix opening directories failing on Windows when fdFlags contains NONBLOCK (#6348)
diff --git a/crates/test-programs/wasi-tests/src/bin/path_open_nonblock.rs b/crates/test-programs/wasi-tests/src/bin/path_open_nonblock.rs new file mode 100644 index 000000000..35c02ce2d --- /dev/null +++ b/crates/test-programs/wasi-tests/src/bin/path_open_nonblock.rs @@ -0,0 +1,29 @@ +use std::{env, process}; +use was...
2
34
6
998362174625e4b00f14af6a389c9363ed94c75f
Alex Crichton
2023-05-08T15:12:05
Remove lingering references to `experimental_x64` (#6350) * Remove lingering references to `experimental_x64` This hasn't been experimental for quite a long time now and these are all mostly old vestiges of when the current backend was under development, so remove them all as they're no longer necessary. * Try to fi...
diff --git a/Cargo.toml b/Cargo.toml index 815e34703..59ee3daae 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -239,10 +239,6 @@ component-model = [ ] winch = ["wasmtime/winch"] -# Stub feature that does nothing, for Cargo-features compatibility: the new -# backend is the default now. -experimental_x64 = [] - [[test]...
6
3
20
7f94f80f7d16b545ce0f0316d8fb93213f97b01b
Remo Senekowitsch
2023-05-05T20:51:25
Chaos mode: add fuel parameter (#6208) * add fuel parameter to control plane Co-authored-by: Falk Zwimpfer <24669719+FalkZ@users.noreply.github.com> Co-authored-by: Moritz Waser <mzrw.dev@pm.me> * remove unused cranelift setting Co-authored-by: Falk Zwimpfer <24669719+FalkZ@users.noreply.github.com> Co-authored-by:...
diff --git a/cranelift/control/src/chaos.rs b/cranelift/control/src/chaos.rs index 9b05efec7..5074a6c11 100644 --- a/cranelift/control/src/chaos.rs +++ b/cranelift/control/src/chaos.rs @@ -5,6 +5,7 @@ use arbitrary::{Arbitrary, Unstructured}; #[derive(Debug, Clone, Default)] pub struct ControlPlane { data: Vec<u...
4
60
5
b2118a9dd9642e15a6bf66a697ec232bcf359124
Andrew Brown
2023-05-05T01:00:30
test: fix some `wasi_testsuite` cases (#6343) * test: clean up `wasi_testsuite` test files When running `cargo run wasi_testsuite -- --nocapture`, some test cases generate files and folders that need to be removed for subsequent test runs to pass. These paths are all suffixed with `*.cleanup` so we walk the suite dir...
diff --git a/tests/all/wasi_testsuite.rs b/tests/all/wasi_testsuite.rs index 8d18aa328..65a635dca 100644 --- a/tests/all/wasi_testsuite.rs +++ b/tests/all/wasi_testsuite.rs @@ -33,21 +33,7 @@ fn wasi_testsuite() -> Result<()> { const WASI_COMMON_IGNORE_LIST: &[&str] = &[ "environ_get-multiple-variables.wa...
1
34
20
95da3d92b8cdcdebd9b73daf8abe9938cc7345b8
T0b1-iOS
2023-05-05T00:07:43
Fix panic when pretty printing `MachInst`s before register allocation (#6344)
diff --git a/cranelift/codegen/src/machinst/reg.rs b/cranelift/codegen/src/machinst/reg.rs index cc654fbe9..61b804f1f 100644 --- a/cranelift/codegen/src/machinst/reg.rs +++ b/cranelift/codegen/src/machinst/reg.rs @@ -496,7 +496,12 @@ impl<'a> AllocationConsumer<'a> { ) }); - assert_eq!(pr...
1
6
1
c2184a10a42d5702a81ea7b3b3ecc05a72b91081
Alex Crichton
2023-05-04T20:14:40
Unify differential result comparison logic (#6340) * Unify differential result comparison logic Execution of functions handles the case where one instance stack overflows and the other didn't, but instantiation didn't handle this case. This commit fixes this issue by sharing the result comparison logic between the tw...
diff --git a/crates/fuzzing/src/oracles.rs b/crates/fuzzing/src/oracles.rs index 37ffacc7c..ed279404a 100644 --- a/crates/fuzzing/src/oracles.rs +++ b/crates/fuzzing/src/oracles.rs @@ -382,30 +382,11 @@ pub fn differential( return Ok(false); } - match (lhs_results, rhs_results) { - // If the e...
2
59
46
4b3c50b147f9f96717becf44bcfcff2de9b06c68
Dante Broggi
2023-05-04T01:16:20
Fix typo 'oeprations' ⇒ 'operations' (#6339) Fix typo in crates/runtime/src/mmap/miri.rs on line 4 'oeprations' ⇒ 'operations'.
diff --git a/crates/runtime/src/mmap/miri.rs b/crates/runtime/src/mmap/miri.rs index bb5e9e751..015a8305c 100644 --- a/crates/runtime/src/mmap/miri.rs +++ b/crates/runtime/src/mmap/miri.rs @@ -1,7 +1,7 @@ //! A "dummy" implementation of mmaps for miri where "we do the best we can" //! //! Namely this uses `alloc` to...
1
1
1
e4f2968fb842b2f3218ff081859fd276215cc897
Dan Gohman
2023-05-03T21:51:44
Revert #131, renaming `main` back to `run`. (#165) Changing LLVM and/or Rust to avoid special handling of `main` is a fair amount of work, and there could be other toolchains with similar special rules for functions named `main`, so rename the command entrypoint back to `run`. We could potentially re-evaluate th...
diff --git a/host/src/main.rs b/host/src/main.rs index 87395a8d6..207d34a87 100644 --- a/host/src/main.rs +++ b/host/src/main.rs @@ -136,7 +136,7 @@ async fn main() -> Result<()> { let (wasi, _instance) = wasi::command::Command::instantiate_async(&mut store, &component, &linker).await?; - ...
3
21
21
1e04bf294112442d926b1b33a9ade82382a738b5
Pat Hickey
2023-05-03T19:20:41
adapter: StreamType::Unknown is actually Stdio (#161) We have only ever used Unknown for the stdio streams, and I don't expect us to use it for anything else in the future, so rename it. Set the returned filetype to character device: Closes #146. Also, fix some warnings.
diff --git a/src/descriptors.rs b/src/descriptors.rs index a9f9bc5bd..214794952 100644 --- a/src/descriptors.rs +++ b/src/descriptors.rs @@ -30,7 +30,7 @@ impl Drop for Descriptor { match &stream.type_ { StreamType::File(file) => filesystem::drop_descriptor(file.fd), ...
2
14
25
60ce6f5d5c5b7defc6f7a8bfaa6bfb8db82b0aa1
Nick Fitzgerald
2023-05-03T05:29:00
`wasmtime`: Fix resetting stack-walking registers when entering/exiting Wasm (#6321) * wasmtime: Fix resetting stack-walking registers when entering/exiting Wasm Fixes a regression from #6262, originally reported in https://github.com/bytecodealliance/wasmtime-dotnet/pull/245 The issue was that we would enter Wasm a...
diff --git a/crates/runtime/src/externref.rs b/crates/runtime/src/externref.rs index cc90b48ac..b2d2e10c9 100644 --- a/crates/runtime/src/externref.rs +++ b/crates/runtime/src/externref.rs @@ -99,6 +99,7 @@ //! Examination of Deferred Reference Counting and Cycle Detection* by Quinane: //! <https://openresearch-repos...
10
442
198
39730be408506c840552e8eaa7e7eb203d1e6bdf
Pat Hickey
2023-05-02T22:23:37
wasi-common: Table operations return a distinct TableError enum
diff --git a/wasi-common/src/dir.rs b/wasi-common/src/dir.rs index ae3f73bc2..57518791a 100644 --- a/wasi-common/src/dir.rs +++ b/wasi-common/src/dir.rs @@ -1,5 +1,5 @@ use crate::file::{FdFlags, FileType, Filestat, OFlags, ReadOnlyFile, WasiFile}; -use crate::{Error, ErrorExt, SystemTimeSpec}; +use crate::{Error, Err...
8
71
51
61fe11a37c772edc749143b8307371dfe8e89469
Pat Hickey
2023-05-02T03:19:00
rejigger test generation and suites fix the build and macros, separate wasi test suite from "command" test suite, test suite for preview 1 should always panic
diff --git a/host/Cargo.toml b/host/Cargo.toml index 1b35af94f..d69088bb5 100644 --- a/host/Cargo.toml +++ b/host/Cargo.toml @@ -18,7 +18,7 @@ tokio = { version = "1", features = ["full"] } [dev-dependencies] tracing = { workspace = true } cap-rand = { workspace = true } -test-programs-macros = { path = "../test-pro...
7
806
344
5573b0ffb137c294639db724998bec26330543f6
Pat Hickey
2023-05-02T02:09:05
test-programs-macros is called test-programs now
diff --git a/test-programs/Cargo.toml b/test-programs/Cargo.toml index e26f4c79b..a3b4fccd0 100644 --- a/test-programs/Cargo.toml +++ b/test-programs/Cargo.toml @@ -4,8 +4,15 @@ version = "0.0.0" edition = "2021" publish = false +[lib] +proc-macro = true +doctest = false +test = false + [dependencies] -getrandom =...
5
22
22
66775e0591154c231664f35f95102bf0a28f8f3f
Pat Hickey
2023-05-02T01:59:15
possible to run preview 1 modules through host adapter
diff --git a/host/src/main.rs b/host/src/main.rs index e6007c62c..87395a8d6 100644 --- a/host/src/main.rs +++ b/host/src/main.rs @@ -1,5 +1,6 @@ use anyhow::{Context, Result}; use wasi_cap_std_sync::WasiCtxBuilder; +use wasi_common::preview1::{self, WasiPreview1Adapter, WasiPreview1View}; use wasi_common::{wasi, Tab...
2
122
13
544db7e9a3bd78bb7d084fa18dc8f2d036d8a9ab
Pat Hickey
2023-05-01T19:53:42
uniform view trait
diff --git a/host/src/main.rs b/host/src/main.rs index e1b85390a..e6007c62c 100644 --- a/host/src/main.rs +++ b/host/src/main.rs @@ -101,10 +101,16 @@ async fn main() -> Result<()> { .inherit_network(cap_std::ambient_authority()) .build(); impl WasiSocketsView for CommandCtx { - ...
1
8
2
2811ab5642bbe87958890b777e3df2d83a60fd96
Pat Hickey
2023-05-01T19:28:37
fix host tests
diff --git a/host/tests/command.rs b/host/tests/command.rs index dfa01d701..a628d4560 100644 --- a/host/tests/command.rs +++ b/host/tests/command.rs @@ -10,8 +10,10 @@ use wasi_common::{ clocks::{WasiMonotonicClock, WasiWallClock}, dir::ReadOnlyDir, pipe::ReadPipe, + wasi::command::add_to_linker, + ...
2
150
50