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
2109935fef6e0297b96b4d67a52e525290faad0b
XAMPPRocky
2019-12-03T01:36:13
Remove custom TryInto (#646)
diff --git a/crates/lightbeam/src/backend.rs b/crates/lightbeam/src/backend.rs index 33eb4b5f6..c276a703e 100644 --- a/crates/lightbeam/src/backend.rs +++ b/crates/lightbeam/src/backend.rs @@ -13,7 +13,7 @@ use more_asserts::assert_le; use std::{ any::{Any, TypeId}, collections::HashMap, - convert::TryFro...
1
10
39
4b001912ce382f6660cacd37b7c775431c98f62c
Josh Triplett
2019-12-03T01:32:00
Update rayon dependencies to avoid duplicate crossbeam dependencies (#651) rayon 1.2.1 avoids introducing two different versions of crossbeam crates into the dependency tree (one through rayon, the other through rayon-core).
diff --git a/Cargo.toml b/Cargo.toml index 59514fe07..da4c51175 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -39,7 +39,7 @@ pretty_env_logger = "0.3.0" file-per-thread-logger = "0.1.1" wat = "1.0.2" libc = "0.2.60" -rayon = "1.1" +rayon = "1.2.1" wasm-webidl-bindings = "0.6" [dev-dependencies] diff --git a/crates...
3
3
3
eac124970c7d3795c3c7a7c49e1bdc71448e2d8c
Joshua Nelson
2019-11-25T00:04:10
Use a published version of `object` This allows publishing `cranelift-object` since it no longer depends on a git version of a dependency. See https://github.com/bytecodealliance/cranelift/issues/1254 for context.
diff --git a/cranelift/object/Cargo.toml b/cranelift/object/Cargo.toml index 0a16f50cd..fd79e7479 100644 --- a/cranelift/object/Cargo.toml +++ b/cranelift/object/Cargo.toml @@ -11,7 +11,7 @@ edition = "2018" [dependencies] cranelift-module = { path = "../cranelift-module", version = "0.51.0" } -object = { git = "ht...
1
1
1
d733ebf3abd5fc074e93fd283f0a894e986ecbcb
Jakub Konka
2019-11-27T22:42:29
Fast-forward snapshot_0 to match wasi-common upstream While we are waiting for the Rust toolchain to use the new ABI, I thought it might be useful to sync `snapshot_0` with the latest code in `wasi-common` "upstream". This mainly includes the latest refactoring effort to unify the machinery for `fd_readdir` between Li...
diff --git a/crates/wasi-common/src/old/snapshot_0/hostcalls_impl/fs.rs b/crates/wasi-common/src/old/snapshot_0/hostcalls_impl/fs.rs index 631c8b171..4481dc461 100644 --- a/crates/wasi-common/src/old/snapshot_0/hostcalls_impl/fs.rs +++ b/crates/wasi-common/src/old/snapshot_0/hostcalls_impl/fs.rs @@ -576,41 +576,6 @@ pu...
7
283
287
1f9d764d5d583cf876a6e7350df3be82dcbf62c7
Dan Gohman
2019-11-28T13:36:18
Support fd_fdstat_get and fd_renumber on stdin/stdout/stderr (#631) * Support fd_fdstat_get on stdin/stdout/stderr. Add a routine for obtaining an `OsFile` containing a file descriptor for stdin/stdout/stderr so that we can do fd_fdstat_get on them. * Add a testcase for fd_fdstat_get etc. on stdin etc. * Don...
diff --git a/crates/test-programs/wasi-tests/src/bin/stdio.rs b/crates/test-programs/wasi-tests/src/bin/stdio.rs new file mode 100644 index 000000000..1ef15114d --- /dev/null +++ b/crates/test-programs/wasi-tests/src/bin/stdio.rs @@ -0,0 +1,31 @@ +use libc; +use std::mem::MaybeUninit; +use std::{env, process}; +use was...
22
278
191
b69758f67220883a9ce74c3f8771ab495e9c84b4
Marcin Mielniczuk
2019-11-28T03:11:32
Correctly handle possibly misaligned pointers in readdir (#615)
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 79c11dcaa..7c93ab6ee 100644 --- a/crates/test-programs/wasi-tests/src/bin/fd_readdir.rs +++ b/crates/test-programs/wasi-tests/src/bin/fd_readdir.rs @@ -36,7 +36,7 @@ impl<'a> Iterator for Rea...
2
3
3
dbdeb788f0ac9482e589c53e7b86f054a763ed2b
data-pup
2019-11-27T23:41:37
Fix jump table comment grammar (#1259)
diff --git a/cranelift/codegen/src/ir/jumptable.rs b/cranelift/codegen/src/ir/jumptable.rs index b412e807a..372ad0983 100644 --- a/cranelift/codegen/src/ir/jumptable.rs +++ b/cranelift/codegen/src/ir/jumptable.rs @@ -10,7 +10,7 @@ use core::slice::{Iter, IterMut}; /// Contents of a jump table. /// -/// All jump tab...
1
1
1
16b8b3e58db3068c9969990926e213571c9c1cf9
Dan Gohman
2019-11-27T16:58:38
Make `Module::new` perform validation. (#621) * Make `Module::new` perform validation. As noticed in #602, `Module::new` did not perform validation, which turns out to be error-prone in practice. Rename it to `Module::new_unchecked`, and add a new `Module::new` which does perform validation. Preserve wasm-c-a...
diff --git a/crates/api/src/module.rs b/crates/api/src/module.rs index 6cc44c3a1..e3d2f8bfb 100644 --- a/crates/api/src/module.rs +++ b/crates/api/src/module.rs @@ -4,8 +4,11 @@ use crate::types::{ ExportType, ExternType, FuncType, GlobalType, ImportType, Limits, MemoryType, Mutability, TableType, ValType, }...
2
37
5
f931243ceeb92369470c05b7216af0eea7beb34e
Nick Fitzgerald
2019-11-26T23:58:34
Remove allow pragma now that it is unnecessary
diff --git a/crates/fuzzing/tests/regressions.rs b/crates/fuzzing/tests/regressions.rs index 8576cd6c8..069cd8ae0 100644 --- a/crates/fuzzing/tests/regressions.rs +++ b/crates/fuzzing/tests/regressions.rs @@ -5,8 +5,7 @@ //! use the Wasm binary by including it via //! `include_bytes!("./regressions/some-descriptive-n...
1
1
2
d3f3aa04d7dfbaa15468233669fe573f9138b90d
data-pup
2019-11-26T20:08:23
misc. cleanup
diff --git a/crates/jit/src/compiler.rs b/crates/jit/src/compiler.rs index f1e2e5e8b..ff30bc71e 100644 --- a/crates/jit/src/compiler.rs +++ b/crates/jit/src/compiler.rs @@ -156,10 +156,9 @@ impl Compiler { let dbg = if let Some(debug_data) = debug_data { let target_config = self.isa.frontend_con...
1
2
3
4f47a4f60788270412fb93a987b328122157e38d
data-pup
2019-11-26T19:58:48
only collect functions if defined memories exist
diff --git a/crates/jit/src/compiler.rs b/crates/jit/src/compiler.rs index 663f56ec8..f1e2e5e8b 100644 --- a/crates/jit/src/compiler.rs +++ b/crates/jit/src/compiler.rs @@ -158,13 +158,13 @@ impl Compiler { let target_config = self.isa.frontend_config(); let triple = self.isa.triple().clone();...
1
5
5
bbea2855beec7231750a90af1adbde6e3f8c044f
data-pup
2019-11-26T17:43:31
wip - fix #636, check memory before calculating offset
diff --git a/crates/jit/src/compiler.rs b/crates/jit/src/compiler.rs index 4020baf65..663f56ec8 100644 --- a/crates/jit/src/compiler.rs +++ b/crates/jit/src/compiler.rs @@ -163,26 +163,30 @@ impl Compiler { let body_len = compilation.get(i).body.len(); funcs.push((ptr, body_len)); ...
1
24
20
46766ed9255f1696c827ff280cf1cd525745da3d
data-pup
2019-11-26T15:59:24
add failing test for #636
diff --git a/tests/foo.rs b/tests/foo.rs new file mode 100644 index 000000000..a1c6d2cb0 --- /dev/null +++ b/tests/foo.rs @@ -0,0 +1,28 @@ +use cranelift_codegen::settings; +use wasmtime_jit::{CompilationStrategy, Compiler, NullResolver}; + +#[test] +fn instantiate_empty_module() { + // `(module)` + let wasm = ve...
1
28
0
0cf54ffebaa5920a3f1c9b99f24a7600d7efa673
Peter Huene
2019-11-13T00:41:54
Implement `__wasi_fd_fdstat_get` for Windows. This commit fully implements `__wasi_fd_fdstat_get` on Windows so that the descriptor flags can be determined. It does this by calling into `NtQueryInformationFile` (safe to call from user mode) to get the open mode and access of the underlying OS handle. `NtQueryInforma...
diff --git a/crates/test-programs/wasi-tests/src/bin/path_filestat.rs b/crates/test-programs/wasi-tests/src/bin/path_filestat.rs index 3ff999c3c..006e25c77 100644 --- a/crates/test-programs/wasi-tests/src/bin/path_filestat.rs +++ b/crates/test-programs/wasi-tests/src/bin/path_filestat.rs @@ -35,7 +35,8 @@ unsafe fn tes...
11
245
172
752ed901d6822f1296d26cfbece1ff17ed3ea5ef
Artyom Pavlov
2019-11-25T23:01:09
Use getrandom for random_get, disable default rand features (#625) * use getrandom, disable default rand features
diff --git a/crates/environ/Cargo.toml b/crates/environ/Cargo.toml index 97cd656ce..c9584e233 100644 --- a/crates/environ/Cargo.toml +++ b/crates/environ/Cargo.toml @@ -44,7 +44,7 @@ errno = "0.2.4" tempfile = "3" target-lexicon = { version = "0.9.0", default-features = false } pretty_env_logger = "0.3.0" -rand = { ...
4
12
14
64f9cee842a6171c93ccd8b3ba9957fdbdc31d6e
Jakub Konka
2019-11-25T22:17:57
Fix build errors on nightly Workaround for a regression in upstream rust-lang/rust.
diff --git a/crates/wasi-common/src/old/snapshot_0/sys/unix/bsd/mod.rs b/crates/wasi-common/src/old/snapshot_0/sys/unix/bsd/mod.rs index 933048af3..4ba789dbc 100644 --- a/crates/wasi-common/src/old/snapshot_0/sys/unix/bsd/mod.rs +++ b/crates/wasi-common/src/old/snapshot_0/sys/unix/bsd/mod.rs @@ -24,6 +24,7 @@ pub(crate...
6
44
6
e9622654c58be859153d53b8a8f219e137a58e3e
Yury Delendik
2019-11-25T16:34:28
[wasmtime-api] Collect and wrap cranelift dependencies (#623) * Collect and wrap cranelift dependencies * rename all _cranelift_ named methods
diff --git a/crates/api/src/callable.rs b/crates/api/src/callable.rs index b6b51f878..e373d1b69 100644 --- a/crates/api/src/callable.rs +++ b/crates/api/src/callable.rs @@ -1,10 +1,10 @@ +use crate::data_structures::ir; use crate::r#ref::HostRef; use crate::runtime::Store; use crate::trampoline::generate_func_export...
15
157
117
6594a3bbe0079ea38d2f8ae2af66823d47dca5bc
Daniel Bevenius
2019-11-25T14:36:12
Correct grammar/typo in runtime instance.rs (#628)
diff --git a/crates/runtime/src/instance.rs b/crates/runtime/src/instance.rs index 95c22a7e2..70babd8ad 100644 --- a/crates/runtime/src/instance.rs +++ b/crates/runtime/src/instance.rs @@ -881,7 +881,7 @@ impl InstanceHandle { /// Return an iterator over the exports of this instance. /// - /// Specifical...
1
1
1
b9296b792d41856bb65b29e08272b3eae7d6ca95
Joshua Nelson
2019-11-25T12:46:15
Derive Debug for FaerieProduct (#1252) This allows using Result::unwrap_err for `Result`s with FaerieProducts.
diff --git a/cranelift/faerie/src/backend.rs b/cranelift/faerie/src/backend.rs index db173b929..14d824537 100644 --- a/cranelift/faerie/src/backend.rs +++ b/cranelift/faerie/src/backend.rs @@ -322,6 +322,7 @@ impl Backend for FaerieBackend { /// This is the output of `Module`'s /// [`finish`](../cranelift_module/stru...
2
4
0
c45f70999a2b81cb0c6ba73ff3fa907ba8ccc6fa
Jakub Konka
2019-11-24T09:29:55
Unify fd_readdir impl between *nixes (#613) * Unify fd_readdir impl between *nixes This commit unifies the implementation of `fd_readdir` between Linux and BSD hosts. In particular, it re-uses the `Dirent`, `Entry`, and `Dir` (among others) building blocks introduced recently when `fd_readdir` was being implemen...
diff --git a/crates/wasi-common/src/hostcalls_impl/fs.rs b/crates/wasi-common/src/hostcalls_impl/fs.rs index ca9b52e21..0d910a34b 100644 --- a/crates/wasi-common/src/hostcalls_impl/fs.rs +++ b/crates/wasi-common/src/hostcalls_impl/fs.rs @@ -578,41 +578,6 @@ pub(crate) unsafe fn path_open( enc_fd_byref(memory, fd_o...
7
192
263
66977cd4aeee2da471238199886f99cc02a50425
Nick Fitzgerald
2019-11-22T17:56:34
Update `binaryen-rs` to 0.8.2 This contains an update of the `bindgen` build dependency, to a new version that compiles on nightly, unlike the old version.
diff --git a/crates/fuzzing/Cargo.toml b/crates/fuzzing/Cargo.toml index c949a063e..a4956a1b0 100644 --- a/crates/fuzzing/Cargo.toml +++ b/crates/fuzzing/Cargo.toml @@ -10,7 +10,7 @@ version = "0.1.0" [dependencies] arbitrary = "0.2.0" -binaryen = "0.8.1" +binaryen = "0.8.2" cranelift-codegen = "0.50.0" cranelift...
1
1
1
a26103b10ce17055deb0afefdfe62884c58df017
Nick Fitzgerald
2019-11-21T22:50:51
Remove unnecessary `extern crate`s We are using 2018 edition.
diff --git a/fuzz/fuzz_targets/compile.rs b/fuzz/fuzz_targets/compile.rs index 1f283b1ce..67bc4f013 100644 --- a/fuzz/fuzz_targets/compile.rs +++ b/fuzz/fuzz_targets/compile.rs @@ -1,7 +1,5 @@ #![no_main] -extern crate libfuzzer_sys; - use libfuzzer_sys::fuzz_target; use wasmtime_fuzzing::oracles; use wasmtime_ji...
3
0
6
58ba066758e856e4cd619b87249282d9539fd6b7
Nick Fitzgerald
2019-11-21T22:40:25
Split our existing fuzz targets into separate generators and oracles Part of #611
diff --git a/crates/fuzzing/Cargo.toml b/crates/fuzzing/Cargo.toml index b0711d63d..c949a063e 100644 --- a/crates/fuzzing/Cargo.toml +++ b/crates/fuzzing/Cargo.toml @@ -9,3 +9,9 @@ version = "0.1.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] +arbi...
8
116
85
eb8538099f7e9d6431271112c36abfffe099bba2
Daniel Bevenius
2019-11-20T14:25:03
Correct typo in crates/jit/src/action.rs
diff --git a/crates/jit/src/action.rs b/crates/jit/src/action.rs index 0c1be9d94..f293ff7ba 100644 --- a/crates/jit/src/action.rs +++ b/crates/jit/src/action.rs @@ -162,7 +162,7 @@ pub fn invoke( // TODO: Support values larger than v128. And pack the values into memory // instead of just using fixed-sized s...
1
1
1
a58709d99eda476542fb7892009e8a60b0d64416
Jakub Konka
2019-11-19T12:00:55
Feature-gate test-programs This commit feature-gates `test-programs` as a workaround for `cargo test` not allowing for optional dev-dependencies. This commit addresses #595.
diff --git a/crates/test-programs/build.rs b/crates/test-programs/build.rs index 04c0a2841..da5e4768d 100644 --- a/crates/test-programs/build.rs +++ b/crates/test-programs/build.rs @@ -3,191 +3,200 @@ //! By generating a separate `#[test]` test for each file, we allow cargo test //! to automatically run the files in ...
2
168
158
3cb238366d5082f383fe626cada6b8447a0c9e6d
Josh Triplett
2019-11-20T05:40:22
Simplify gcd example: remove unnecessary clone
diff --git a/crates/api/examples/gcd.rs b/crates/api/examples/gcd.rs index 2c65d6183..0fdbf27d2 100644 --- a/crates/api/examples/gcd.rs +++ b/crates/api/examples/gcd.rs @@ -58,7 +58,7 @@ fn main() -> Result<()> { let instance = Instance::new(&store, &module, &[])?; // Invoke `gcd` export - let gcd = inst...
1
1
1
7c8ac3d71c324971181e2d737dc4727d2862f798
Josh Triplett
2019-11-20T05:01:09
Simplify examples: avoid unnecessary HostRef wrap/unwrap Several of the examples wrap the Instance in a HostRef, only to immediately borrow it again to get the exports,and then never touch it again. Simplify this by owning the Instance directly.
diff --git a/crates/api/examples/gcd.rs b/crates/api/examples/gcd.rs index 42a92df59..2c65d6183 100644 --- a/crates/api/examples/gcd.rs +++ b/crates/api/examples/gcd.rs @@ -55,13 +55,10 @@ fn main() -> Result<()> { .0; // Instantiate the module. - let instance = HostRef::new(Instance::new(&store, &mo...
4
10
21
838f2f4646958e9a2e607e2e7be91ea8f4a9b5ab
Andrew Brown
2019-11-20T21:29:53
Merge pull request #1226 from abrown/log-verifier-errors Log verifier errors
diff --git a/cranelift/codegen/src/verifier/mod.rs b/cranelift/codegen/src/verifier/mod.rs index f31b4e234..61b653e46 100644 --- a/cranelift/codegen/src/verifier/mod.rs +++ b/cranelift/codegen/src/verifier/mod.rs @@ -70,13 +70,15 @@ use crate::ir::{ }; use crate::isa::TargetIsa; use crate::iterators::IteratorExtras;...
1
264
139
58dd4c6c88cd1c92181eb6b072a03427e81cab82
Dan Gohman
2019-11-19T15:34:17
Replace more miscellaenous `read_wasm` utilities with `wat::parse_file`. (#601)
diff --git a/crates/test-programs/Cargo.toml b/crates/test-programs/Cargo.toml index 09806f517..391219903 100644 --- a/crates/test-programs/Cargo.toml +++ b/crates/test-programs/Cargo.toml @@ -22,3 +22,4 @@ pretty_env_logger = "0.3.0" tempfile = "3.1.0" os_pipe = "0.9" anyhow = "1.0.19" +wat = "1.0.2" diff --git a/c...
4
4
22
7d7360b32df8440ff24004877643bb189cdfbd6f
Jakub Konka
2019-11-19T11:20:47
Move dangling_fd test case into test-programs (#590) * Move dangling_fd test case in test-programs * Fix build errors
diff --git a/crates/wasi-common/wasi-misc-tests/src/bin/dangling_fd.rs b/crates/test-programs/wasi-tests/src/bin/dangling_fd.rs similarity index 93% rename from crates/wasi-common/wasi-misc-tests/src/bin/dangling_fd.rs rename to crates/test-programs/wasi-tests/src/bin/dangling_fd.rs index e9baf35d6..9ec7df0dd 100644 --...
1
3
3
ea73d4fa91399349fd8d42e833363a0b1cad9f1c
Dan Gohman
2019-11-19T06:35:27
Remove a few more explicit `alloc::` and `core::`. These were accidently re-introduced by d645902620bf172b8d4ee6afe70fe8eee4f6fdc0 after 39e57e3e9ac9c15bef45eb77a2544a7c0b76501a landed.
diff --git a/crates/debug/src/write_debuginfo.rs b/crates/debug/src/write_debuginfo.rs index 28771ab3e..9a62460b4 100644 --- a/crates/debug/src/write_debuginfo.rs +++ b/crates/debug/src/write_debuginfo.rs @@ -2,7 +2,6 @@ use faerie::artifact::{Decl, SectionKind}; use faerie::*; use gimli::write::{Address, Dwarf, Endi...
2
2
3
f2718a9573103ec048f3cd0ea4ce42af39ac9f8b
Alex Crichton
2019-11-18T22:26:37
Update faerie, remove usage of `failure` (#591) This commit removes the usage of the `failure` crate and finishes up the final pieces of the migration to `std::error::Error` and `anyhow`. The `faerie` crate was updated to pull in its migration from `failure` to `anyhow` as well.
diff --git a/Cargo.toml b/Cargo.toml index 12a0fa917..b9909d7e7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,7 +32,7 @@ wasmtime-wasi-c = { path = "crates/wasi-c", optional = true } wasi-common = { path = "crates/wasi-common" } docopt = "1.0.1" serde = { "version" = "1.0.94", features = ["derive"] } -faerie = "0....
15
19
20
d804ab8b92e9f7fe992dc41edc3a542b096f9b36
iximeow
2019-11-18T18:18:38
Track frame layout changes. (#1204) * Track frame layout changes.
diff --git a/cranelift/codegen/src/ir/framelayout.rs b/cranelift/codegen/src/ir/framelayout.rs new file mode 100644 index 000000000..1b914a54f --- /dev/null +++ b/cranelift/codegen/src/ir/framelayout.rs @@ -0,0 +1,70 @@ +//! Frame layout item changes. + +use crate::ir::entities::Inst; +use crate::isa::RegUnit; +use std...
4
298
13
9182971697bc9fee51d5b5f4556d157466fbd5a0
Jakub Konka
2019-11-18T16:39:40
Add missing import to wasmtime-rust macro (#589) This commit does two things: 1) it fixes `wasmtime_rust::wasmtime` proc macro by adding the missing import to the `__rt` module, and fixing the scoping inside the macro itself; and 2) it augments the `wasmtime_rust::wasmtime` proc macro with custom error messages in ...
diff --git a/crates/misc/rust/macro/src/lib.rs b/crates/misc/rust/macro/src/lib.rs index be1c1b478..76e9c1d0b 100644 --- a/crates/misc/rust/macro/src/lib.rs +++ b/crates/misc/rust/macro/src/lib.rs @@ -66,7 +66,7 @@ fn generate_load(item: &syn::ItemTrait) -> syn::Result<TokenStream> { let mut imports: Vec...
2
10
1
ea04aa5b9876171eeb389c77fb6a34831c08db1b
Andrew Brown
2019-11-16T19:42:17
Improve error messages received from Cranelift (#583) As discussed in https://github.com/bytecodealliance/cranelift/pull/1226, the context of Cranelift errors is lost after exiting the scope containing the Cranelift function. `CodegenError` then only contains something like `inst2: arg 0 (v4) has type i16x8, expected ...
diff --git a/crates/api/src/trampoline/func.rs b/crates/api/src/trampoline/func.rs index a2272a16d..de3b4b2e3 100644 --- a/crates/api/src/trampoline/func.rs +++ b/crates/api/src/trampoline/func.rs @@ -7,6 +7,7 @@ use alloc::{boxed::Box, rc::Rc, string::ToString, vec::Vec}; use anyhow::Result; use core::cmp; use cran...
4
38
12
7d47a042772118079ed8c510f6aa359d99649ae3
Dan Gohman
2019-11-16T19:40:14
Remove unneded prefix argument from `instantiate_wasi`. (#584) * Remove unneded prefix argument from `instantiate_wasi`. This was an artifact of an earlier backwards-compatibility mechanism which is no longer needed. * Remove unneeded prefix arg from remaning uses
diff --git a/crates/test-programs/tests/wasm_tests/runtime.rs b/crates/test-programs/tests/wasm_tests/runtime.rs index 8b27ecd2a..1c0018b16 100644 --- a/crates/test-programs/tests/wasm_tests/runtime.rs +++ b/crates/test-programs/tests/wasm_tests/runtime.rs @@ -53,7 +53,6 @@ pub fn instantiate(data: &[u8], bin_name: &st...
3
6
10
0753b1206b79254b9c71d82ccfcbd2ddb9c00fc2
Daniel Bevenius
2019-11-16T18:26:45
Use nested paths for use declarations (#576) * Use nested paths for use declarations This commit uses nested paths for cranelift_codegen and some of the standard library use declarations. The main motivation for this is that it seems to be consistent with other use declarations in this file, and saves a few li...
diff --git a/src/bin/wasmtime.rs b/src/bin/wasmtime.rs index e19dbd67f..b935fbe4f 100644 --- a/src/bin/wasmtime.rs +++ b/src/bin/wasmtime.rs @@ -31,15 +31,11 @@ )] use anyhow::{bail, Context as _, Result}; -use cranelift_codegen::settings; -use cranelift_codegen::settings::Configurable; +use cranelift_codegen::{set...
1
2
6
ea56118651561e0229e3a6b4fbb37ade98758a55
Yury Delendik
2019-11-16T00:48:05
Add/use create_wasi_instance() instead of instantiate_wasi(). (#571) * Add/use create_wasi_instance() instead of instantiate_wasi(). * rm Result from Instance::from_handle
diff --git a/crates/api/src/instance.rs b/crates/api/src/instance.rs index e28d6e8b2..b5d433fe2 100644 --- a/crates/api/src/instance.rs +++ b/crates/api/src/instance.rs @@ -121,10 +121,7 @@ impl Instance { Some(&self.exports()[i]) } - pub fn from_handle( - store: &HostRef<Store>, - inst...
8
36
39
9896a5cabd7b948d509b6d8aea868d32e6802b89
Jakub Konka
2019-11-15T22:28:50
Add test for dangling file/dir handles (#566) * Add test for dangling file/dir handles This commit adds a test for dangling file/dir handles. The logic is quite simple: we first create a resource (file or dir), get a WASI file descriptor to it, remove the resource without closing the FD, and then try to re-creat...
diff --git a/crates/test-programs/build.rs b/crates/test-programs/build.rs index b460c46cc..e2ddc946a 100644 --- a/crates/test-programs/build.rs +++ b/crates/test-programs/build.rs @@ -168,6 +168,7 @@ cfg_if::cfg_if! { "truncation_rights" => true, "poll_oneoff" => true, ...
2
97
0
5edbd9b967138845819bd9734cea61ae0543b6a7
Jakub Konka
2019-11-15T21:49:10
Test path_open O_EXCL behaviour
diff --git a/crates/test-programs/wasi-tests/src/bin/path_open_create_existing.rs b/crates/test-programs/wasi-tests/src/bin/path_open_create_existing.rs new file mode 100644 index 000000000..11bf603a5 --- /dev/null +++ b/crates/test-programs/wasi-tests/src/bin/path_open_create_existing.rs @@ -0,0 +1,65 @@ +use std::{en...
1
65
0
f72a5d9caac94b2e87c5346153f7f0575b250545
Andrew Brown
2019-11-11T20:50:06
Translate WASM floating-point `abs` and `neg` to CLIF
diff --git a/cranelift/wasm/src/code_translator.rs b/cranelift/wasm/src/code_translator.rs index b871c9f23..2f645f500 100644 --- a/cranelift/wasm/src/code_translator.rs +++ b/cranelift/wasm/src/code_translator.rs @@ -1229,15 +1229,19 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>( let a = pop1_...
1
8
4
3d5b55c0950083e38bff2da55d07b74cfa1639fd
Jakub Konka
2019-11-15T19:06:44
Fix rights check for fd_pread and fd_pwrite This commit fixes rights check for `fd_pread` and `fd_pwrite` to be conformant with the WASI spec. In the spec, it is clearly stated that the right to invoke `__wasi_fd_pread()` requires a combination of `__WASI_RIGHT_FD_READ` with `__WASI_RIGHT_FD_SEEK`, and similarly for `...
diff --git a/crates/test-programs/wasi-tests/src/bin/file_pread_pwrite.rs b/crates/test-programs/wasi-tests/src/bin/file_pread_pwrite.rs index e7773fea7..b9e9924ed 100644 --- a/crates/test-programs/wasi-tests/src/bin/file_pread_pwrite.rs +++ b/crates/test-programs/wasi-tests/src/bin/file_pread_pwrite.rs @@ -14,7 +14,7 ...
2
3
3
cd4d7ca0a1a59ad4922eebf7e702500503338c51
Projjal Chanda
2019-11-15T13:32:24
Merged scalar and simd logical operator
diff --git a/cranelift/wasm/src/code_translator.rs b/cranelift/wasm/src/code_translator.rs index 3d46aa695..b871c9f23 100644 --- a/cranelift/wasm/src/code_translator.rs +++ b/cranelift/wasm/src/code_translator.rs @@ -786,15 +786,15 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>( let (arg1, arg2...
1
3
15
569a57fa7de40fb3f4f7d4cee3fd8c20072fd5f1
Benjamin Bouvier
2019-11-08T16:20:52
Hoist the stack alignment and Windows64 fastcall shadow stack space constants.
diff --git a/cranelift/codegen/src/isa/x86/abi.rs b/cranelift/codegen/src/isa/x86/abi.rs index e316d9068..5201a11f9 100644 --- a/cranelift/codegen/src/isa/x86/abi.rs +++ b/cranelift/codegen/src/isa/x86/abi.rs @@ -34,6 +34,29 @@ static ARG_GPRS_WIN_FASTCALL_X64: [RU; 4] = [RU::rcx, RU::rdx, RU::r8, RU::r9]; /// Return ...
1
33
31
b0f558aa1068f292c19def1342a7561bc0f67d8c
Ben Brittain
2019-11-15T01:20:45
Mark functions as pub if trait is public (#574)
diff --git a/crates/misc/rust/macro/src/lib.rs b/crates/misc/rust/macro/src/lib.rs index 2ff5071d5..e94deb6b0 100644 --- a/crates/misc/rust/macro/src/lib.rs +++ b/crates/misc/rust/macro/src/lib.rs @@ -102,6 +102,7 @@ fn generate_methods(item: &syn::ItemTrait) -> syn::Result<TokenStream> { } let mut result = T...
1
2
1
36cb806c54244d5f6321576720557ddb192ad2dd
Yury Delendik
2019-11-14T16:40:04
Use embedding api in python extension (#569) Now embedding API is used in the Python extension, this allows us to remove ModuleData::invoke() from wasmtime-interface-types
diff --git a/crates/api/src/instance.rs b/crates/api/src/instance.rs index 767b7d22e..e28d6e8b2 100644 --- a/crates/api/src/instance.rs +++ b/crates/api/src/instance.rs @@ -106,6 +106,10 @@ impl Instance { &self.exports } + pub fn module(&self) -> &HostRef<Module> { + &self.module + } + ...
10
254
641
a495418210b34534d76ca3b9ffb569438bd91e1a
Daniel Bevenius
2019-11-14T15:06:30
Correct minor typo in wasmtime.rs doc comment (#568)
diff --git a/src/bin/wasmtime.rs b/src/bin/wasmtime.rs index 204bc0534..0539f3c32 100644 --- a/src/bin/wasmtime.rs +++ b/src/bin/wasmtime.rs @@ -2,7 +2,7 @@ //! crate. //! //! Reads Wasm binary files (one Wasm module per file), translates the functions' code to Cranelift -//! IL. Can also executes the `start` functi...
1
1
1
f8ae62200303b56c346a00f27d63b44d557e8dc2
Sean Stangl
2019-11-14T01:01:13
Use a struct interface for creating and reading encoding bits on x86. #1156 (#1212)
diff --git a/cranelift/codegen/meta/src/isa/x86/recipes.rs b/cranelift/codegen/meta/src/isa/x86/recipes.rs index 6b5367a50..6fcd0b456 100644 --- a/cranelift/codegen/meta/src/isa/x86/recipes.rs +++ b/cranelift/codegen/meta/src/isa/x86/recipes.rs @@ -1,5 +1,8 @@ +//! Encoding recipes for x86/x86_64. use std::rc::Rc; +...
7
273
45
b578fd5396b900ae8e150ca4c09ad8bb15a09216
Peter Huene
2019-11-14T00:22:26
Fix the cranelift-filetests build. (#1227) This commit removes the dependency on `byteorder::ReadBytesExt`, which can't be used from `no_std`, which is how we're building the `byteorder` crate. The fix is to simply offset into the slice as needed rather than using a `std::io::Cursor`. Fixes #1225.
diff --git a/cranelift/filetests/src/test_unwind.rs b/cranelift/filetests/src/test_unwind.rs index 55fcbcdd9..7b67ee731 100644 --- a/cranelift/filetests/src/test_unwind.rs +++ b/cranelift/filetests/src/test_unwind.rs @@ -4,13 +4,12 @@ #![cfg_attr(feature = "cargo-clippy", allow(clippy::cast_ptr_alignment))] use cra...
1
21
22
fb60a219309fa8bee13debcd7df860c558aa8b2f
Alex Crichton
2019-11-13T16:00:30
Reduce number of crates needed for `Config` usage This commit is an attempt to reduce the number of crates necessary to link to when using `wasmtime::Config` in "default mode" or with only one or two tweaks. The change moves to a builder-style pattern for `Config` to only require importing crates as necessary if you c...
diff --git a/crates/api/src/context.rs b/crates/api/src/context.rs index a9db461de..3c004db1c 100644 --- a/crates/api/src/context.rs +++ b/crates/api/src/context.rs @@ -1,8 +1,8 @@ +use crate::Config; use alloc::rc::Rc; use core::cell::{RefCell, RefMut}; use core::hash::{Hash, Hasher}; -use cranelift_codegen::settin...
8
87
95
8b0cfd9245231545f404a5dbcd802ebbf314fd03
Alex Crichton
2019-11-13T15:26:27
Squash improper_ctypes warnings on nightly Lots more warnings are showing up on nightly compilers due to a recent change. I've opened rust-lang/rust#66373 on the compiler side for this as well.
diff --git a/crates/api/src/lib.rs b/crates/api/src/lib.rs index 065b8c7ba..54039179b 100644 --- a/crates/api/src/lib.rs +++ b/crates/api/src/lib.rs @@ -1,5 +1,6 @@ //! Wasmtime embed API. Based on wasm-c-api. +#![allow(improper_ctypes)] #![cfg_attr(not(feature = "std"), no_std)] mod callable; diff --git a/crate...
5
8
0
98266498afeb440a6dae7f60de1322bf1f517cc7
Yury Delendik
2019-11-13T15:15:37
Use embedded API in the wasmtime-rust (#540)
diff --git a/crates/api/src/externals.rs b/crates/api/src/externals.rs index 56aca24ad..c5a6325be 100644 --- a/crates/api/src/externals.rs +++ b/crates/api/src/externals.rs @@ -255,7 +255,7 @@ impl Global { } else { panic!("wasmtime export is not memory") }; - let ty = GlobalType::...
13
310
106
2737c5e8e57a08d86396a8968cfcdaf08538cc97
Jakub Konka
2019-11-13T15:06:09
Enable WASI tests on Windows (#560) For some weird reason (probably when migrating the codebase from `wasi-common` repo to `wasmtime`), these did not get enabled for the Windows platform.
diff --git a/crates/wasi-common/build.rs b/crates/wasi-common/build.rs index df29e72a5..4a19ddb32 100644 --- a/crates/wasi-common/build.rs +++ b/crates/wasi-common/build.rs @@ -177,8 +177,6 @@ mod wasm_tests { "dangling_symlink" => true, "symlink_loop" => true, ...
1
0
2
23e8bd8d66873d38a9171caebcbf6b9c9395cca4
Jakub Konka
2019-11-13T15:05:17
Add test case for path_link syscall (#559) This commit adds a relatively complete test case for the `path_link` syscall. This commit should serve as some prep work for implementing `path_link` on Windows (which will follow in a subsequent PR).
diff --git a/crates/wasi-common/build.rs b/crates/wasi-common/build.rs index 8d464ff92..df29e72a5 100644 --- a/crates/wasi-common/build.rs +++ b/crates/wasi-common/build.rs @@ -180,6 +180,7 @@ mod wasm_tests { "path_rename_trailing_slashes" => true, "fd_readdir" => true...
3
288
0
215884e9071b47b78323ce320c33df42e0c30708
Andrew Brown
2019-11-12T23:48:55
Simplify variable name: change `inst_` to `inst`
diff --git a/cranelift/codegen/meta/src/isa/x86/encodings.rs b/cranelift/codegen/meta/src/isa/x86/encodings.rs index bc0e26b87..0f380ccbf 100644 --- a/cranelift/codegen/meta/src/isa/x86/encodings.rs +++ b/cranelift/codegen/meta/src/isa/x86/encodings.rs @@ -2069,8 +2069,8 @@ pub(crate) fn define( (I16, x86_pmin...
1
6
6
a2b28f947272233728a16603c3b0c85e1ef5b8d4
Andrew Brown
2019-10-29T16:59:35
Ensure vectors are bitcast to the correct type Due to SIMD's v128 operations, vectors that may have had an explicit type (e.g. f32x4) before a v128 operation will subsequently have CLIF's v128 stand-in type: i8x16. In order for follow-on operations (that may be more stricly typed, e.g. f32x4.add) to avoid CLIF errors,...
diff --git a/cranelift/wasm/src/code_translator.rs b/cranelift/wasm/src/code_translator.rs index c97826a16..3d46aa695 100644 --- a/cranelift/wasm/src/code_translator.rs +++ b/cranelift/wasm/src/code_translator.rs @@ -1019,12 +1019,12 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>( state.push1(s...
1
12
14
b425ddc52dd2bfa9a72c59fc94e5e6bdbb78608b
Andrew Brown
2019-10-29T16:49:31
Translate WASM floating-point arithmetic to CLIF
diff --git a/cranelift/wasm/src/code_translator.rs b/cranelift/wasm/src/code_translator.rs index 5e9b76fcd..c97826a16 100644 --- a/cranelift/wasm/src/code_translator.rs +++ b/cranelift/wasm/src/code_translator.rs @@ -1215,6 +1215,34 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>( Operator::F32x4Ge ...
1
54
15
093629f7eb27cb1f42e7827c53c2d49d742992f4
Jakub Konka
2019-11-12T15:22:19
Refactor common clockid conversion on *nix (#548)
diff --git a/crates/wasi-common/src/sys/unix/hostcalls_impl/misc.rs b/crates/wasi-common/src/sys/unix/hostcalls_impl/misc.rs index 98d81db8d..b3ed25676 100644 --- a/crates/wasi-common/src/sys/unix/hostcalls_impl/misc.rs +++ b/crates/wasi-common/src/sys/unix/hostcalls_impl/misc.rs @@ -6,16 +6,19 @@ use crate::{wasi, Err...
1
12
17
01ab20e372361768b57f8456c140baec93651f4a
Nick Fitzgerald
2019-11-11T23:52:49
Bump cranelift deps to 0.50.0
diff --git a/Cargo.toml b/Cargo.toml index d78cb4b9f..22208d23b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,10 +14,10 @@ default-run = "wasmtime" [dependencies] # Enable all supported architectures by default. -cranelift-codegen = { version = "0.49", features = ["enable-serde", "all-arch"] } -cranelift-entity =...
15
45
45
4c4699a22647978957d38693f886302fc46cddce
Nick Fitzgerald
2019-10-29T22:42:07
Test the multi-value example on windows
diff --git a/crates/api/tests/examples.rs b/crates/api/tests/examples.rs index 3f6468f9a..24de77f3e 100644 --- a/crates/api/tests/examples.rs +++ b/crates/api/tests/examples.rs @@ -32,7 +32,6 @@ fn test_run_memory_example() { run_example("memory"); } -#[cfg(not(target_os = "windows"))] #[test] fn test_run_mul...
1
0
1
b3b7ce4f6bdb1565ecac3158dee3ff99eab20813
Nick Fitzgerald
2019-10-29T19:54:58
Enable all Wasm multi-value proposal tests!
diff --git a/build.rs b/build.rs index 924cfd212..085ac3eea 100644 --- a/build.rs +++ b/build.rs @@ -160,34 +160,18 @@ fn write_testsuite_tests( /// Ignore tests that aren't supported yet. fn ignore(testsuite: &str, testname: &str, strategy: &str) -> bool { - let is_multi_value = testsuite.ends_with("multi_value...
1
1
17
cd8cc4d37511353d02665494d00fa713b8949cec
Alex Crichton
2019-11-11T23:19:33
Enable multi-value in the Python extension (#541) This commit enables the multi-value features in the Python extension to be usable by-default with interface types. Additionally this removes some code which panics on multi-value but doesn't end up getting used today.
diff --git a/crates/misc/py/src/instance.rs b/crates/misc/py/src/instance.rs index deb284b10..83616bc67 100644 --- a/crates/misc/py/src/instance.rs +++ b/crates/misc/py/src/instance.rs @@ -6,7 +6,6 @@ use crate::function::Function; use crate::memory::Memory; use alloc::rc::Rc; use core::cell::RefCell; -use cranelift...
2
6
24
d9edb9521870e086bd7919691beabe719a7dd5d0
Alex Crichton
2019-11-11T19:09:45
Allow using WASI APIs in the Python extension (#533) * Allow using WASI APIs in the Python extension This commit adds support to the Python extension to load the WASI implementation when a WASI module is seen allowing Python to load WebAssembly modules that use WASI. This is pretty primitive right now because th...
diff --git a/crates/interface-types/Cargo.toml b/crates/interface-types/Cargo.toml index 9b9f8e0a8..c7cc8d243 100644 --- a/crates/interface-types/Cargo.toml +++ b/crates/interface-types/Cargo.toml @@ -18,6 +18,7 @@ wasmparser = { version = "0.39.2", default-features = false } wasm-webidl-bindings = "0.6" wasmtime-jit...
6
54
16
0006a2af954eba74c79885cb1fe8cdeb68f531c1
Jakub Konka
2019-11-11T17:42:28
Dynamically load utimensat if exists on the host (#535) * Dynamically load utimensat if exists on the host This commit introduces a change to file time management for *nix based hosts in that it firstly tries to load `utimensat` symbol, and if it doesn't exist, then falls back to `utimes` instead. This change is ...
diff --git a/crates/wasi-common/src/sys/unix/bsd/filetime.rs b/crates/wasi-common/src/sys/unix/bsd/filetime.rs new file mode 100644 index 000000000..8825e97a6 --- /dev/null +++ b/crates/wasi-common/src/sys/unix/bsd/filetime.rs @@ -0,0 +1,103 @@ +//! This internal module consists of helper types and functions for dealin...
8
335
103
5a1845b4caf7a5dba8eda1fef05213a532ed4259
whitequark
2019-11-11T14:05:52
Add missing x86_64 registers to debug info transformer. (#538)
diff --git a/crates/debug/src/transform/expression.rs b/crates/debug/src/transform/expression.rs index 537d23b3b..2102a600f 100644 --- a/crates/debug/src/transform/expression.rs +++ b/crates/debug/src/transform/expression.rs @@ -91,7 +91,15 @@ fn map_reg(reg: RegUnit) -> Register { 21 => X86_64::XMM5, ...
1
9
1
32064615027a556bbee2b1a8f7f73aad3d1f5b23
Marcin Mielniczuk
2019-11-10T21:50:19
Fix some clippy warnings (#536)
diff --git a/crates/environ/src/cache.rs b/crates/environ/src/cache.rs index 6bfaf6bc8..2d65dc298 100644 --- a/crates/environ/src/cache.rs +++ b/crates/environ/src/cache.rs @@ -39,11 +39,13 @@ lazy_static! { .map_err(|_| warn!("Failed to get metadata of current executable")) .o...
6
16
13
f5dad665939c52d6d5938b477cec50ec565d99c3
Dan Gohman
2019-11-09T03:43:17
Fix a missing `use bitflags::bitflags;`.
diff --git a/crates/wasi-common/winx/src/file.rs b/crates/wasi-common/winx/src/file.rs index b937c2895..b72b81381 100644 --- a/crates/wasi-common/winx/src/file.rs +++ b/crates/wasi-common/winx/src/file.rs @@ -1,5 +1,6 @@ #![allow(non_camel_case_types)] use crate::{winerror, Result}; +use bitflags::bitflags; use cvt:...
1
1
0
061b4532556baed1ab225557836f9b2450018cf5
Dan Gohman
2019-11-09T01:13:06
Remove unneeded `extern crate`, `macro_use`, and tidy `use`s.
diff --git a/crates/api/src/callable.rs b/crates/api/src/callable.rs index a5838f6b2..2a8678937 100644 --- a/crates/api/src/callable.rs +++ b/crates/api/src/callable.rs @@ -1,12 +1,10 @@ use crate::r#ref::HostRef; use crate::runtime::Store; +use crate::trampoline::generate_func_export; use crate::trap::Trap; use cr...
62
125
261
31f8f124f5c8efa4b2a7484c0715e70212d7f279
Dan Gohman
2019-11-09T00:26:58
Delete spurious commas.
diff --git a/crates/jit/src/link.rs b/crates/jit/src/link.rs index 652824dbf..fb43a07e2 100644 --- a/crates/jit/src/link.rs +++ b/crates/jit/src/link.rs @@ -412,6 +412,6 @@ extern "C" { pub fn __chkstk(); // ___chkstk (note the triple underscore) is implemented in compiler-builtins/src/x86_64.rs // by th...
2
2
2
dd27237c74b71eba9f1f6ecb7e33b8c7b62de36f
Dan Gohman
2019-11-09T00:23:43
Avoid capturing a pointer into a temporary CString buffer.
diff --git a/crates/wasi-c/src/instantiate.rs b/crates/wasi-c/src/instantiate.rs index 7216e4fed..2304b1faf 100644 --- a/crates/wasi-c/src/instantiate.rs +++ b/crates/wasi-c/src/instantiate.rs @@ -146,11 +146,8 @@ pub fn instantiate_wasi_c( let mut wasm_fd = 3; for (dir, file) in preopened_dirs { ...
1
2
5
5b0031ece8fd3c60a5a4df1e3b63e57a87180197
Dan Gohman
2019-11-09T00:22:41
Use `pointer::add` instead of `pointer::offset` with a cast.
diff --git a/crates/api/src/trampoline/func.rs b/crates/api/src/trampoline/func.rs index 95b17631f..4b05a98d1 100644 --- a/crates/api/src/trampoline/func.rs +++ b/crates/api/src/trampoline/func.rs @@ -58,7 +58,7 @@ unsafe extern "C" fn stub_fn(vmctx: *mut VMContext, call_id: u32, values_vec: *m Ok(()) => { ...
3
5
10
e8f08193fcc1bfda4bea2b0953dd77c48c4c705d
Dan Gohman
2019-11-08T23:44:07
Reformat some long lines and macros.
diff --git a/build.rs b/build.rs index 440ad8b3d..924cfd212 100644 --- a/build.rs +++ b/build.rs @@ -58,7 +58,10 @@ fn main() -> anyhow::Result<()> { ) .expect("generating tests"); } else { - println!("cargo:warning=The spec testsuite is disabled. To enable, run `git submod...
8
84
49
29c8c4f68f802a69b77457279de7e5f0aacf10b2
Alex Crichton
2019-11-09T00:24:02
Reduce duplication in error messages (#532) * Reduce duplication in error messages This commit removes duplication in error messages where the same text would show up multiple times in a fully rendered error message. When using `derive(Error)` when the `#[from]` attribute is used there's no need to also render...
diff --git a/crates/environ/src/compilation.rs b/crates/environ/src/compilation.rs index 797d7d82a..acb349ac8 100644 --- a/crates/environ/src/compilation.rs +++ b/crates/environ/src/compilation.rs @@ -152,11 +152,11 @@ pub type Traps = PrimaryMap<DefinedFuncIndex, Vec<TrapInformation>>; #[derive(Error, Debug)] pub en...
6
11
11
5a5f241f984ef82bda282aebee9e9277881fd3af
Alex Crichton
2019-11-08T23:41:05
Fix typo in warning message for `--invoke` (#530) This was supposed to be `--invoke`, not `--render`
diff --git a/src/bin/wasmtime.rs b/src/bin/wasmtime.rs index 91e634252..e5f47873d 100644 --- a/src/bin/wasmtime.rs +++ b/src/bin/wasmtime.rs @@ -397,7 +397,7 @@ fn invoke_export( let binding = data.binding_for_export(&mut handle, name)?; if binding.param_types()?.len() > 0 { eprintln!( - "...
1
2
2
1a0ed6e388d96c5844044f81f91fe2770ed7d857
Dan Gohman
2019-11-08T23:21:47
Use the more-asserts crate in more places. This provides assert_le, assert_lt, and so on, which can print the values of the operands.
diff --git a/Cargo.toml b/Cargo.toml index fa1711d85..d78cb4b9f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -40,6 +40,7 @@ wat = "1.0.2" libc = "0.2.60" rayon = "1.1" wasm-webidl-bindings = "0.6" +more-asserts = "0.2.1" [build-dependencies] anyhow = "1.0.19" diff --git a/crates/api/examples/multi.rs b/crates/api...
37
124
113
81df93e6a05ffd130fb391687e44e4e5a9da189b
Andrew Brown
2019-10-28T20:31:05
Translate WASM float comparisons to CLIF
diff --git a/cranelift/wasm/src/code_translator.rs b/cranelift/wasm/src/code_translator.rs index cab540533..5e9b76fcd 100644 --- a/cranelift/wasm/src/code_translator.rs +++ b/cranelift/wasm/src/code_translator.rs @@ -1197,19 +1197,25 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>( Operator::I8x16Le...
1
31
13
e5a36e2c611935d352e3d4349f9de691660dc590
Andrew Brown
2019-10-28T20:21:43
Allow CLIF lexer to properly identify `NaN` and `Inf` keywords
diff --git a/cranelift/reader/src/lexer.rs b/cranelift/reader/src/lexer.rs index 0168d2027..9838227e8 100644 --- a/cranelift/reader/src/lexer.rs +++ b/cranelift/reader/src/lexer.rs @@ -488,7 +488,13 @@ impl<'a> Lexer<'a> { } } Some(ch) if ch.is_digit(10) => Some(se...
2
10
3
0f4f9d78326c275b5f801d335f95d8aaa0223335
Dan Gohman
2019-11-08T20:28:05
Use `r#` to escape strings which may be rust keywords. This is a minor simplification, replacing a hardcoded list of keywords.
diff --git a/crates/wasi-common/build.rs b/crates/wasi-common/build.rs index 1858fc5c7..613982022 100644 --- a/crates/wasi-common/build.rs +++ b/crates/wasi-common/build.rs @@ -129,8 +129,8 @@ mod wasm_tests { } writeln!( out, - " fn {}() -> anyhow::Result<()> {{", - ...
1
2
14
97d37e93691be94ca6baff2beb466de44cb6a57a
Dan Gohman
2019-11-08T20:34:58
Add a `keywords` field to Cargo.toml files.
diff --git a/Cargo.toml b/Cargo.toml index 4fc28b47b..69938ddad 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,6 +6,7 @@ description = "Command-line interface for Wasmtime" license = "Apache-2.0 WITH LLVM-exception" documentation = "https://cranelift.readthedocs.io/" categories = ["wasm"] +keywords = ["webassembly",...
5
5
0
7e32fa2731878ca9a1fd5351958c9eca7d8d4627
Nick Fitzgerald
2019-11-08T17:51:57
Try and assign directly to return registers; backtrack to use struct-return param (#1213) * Try and assign directly to return registers; backtrack to use struct-return param Rather than trying to count number of return registers that would be used by a given set of return values, optimistically assign the return v...
diff --git a/cranelift/codegen/src/isa/x86/abi.rs b/cranelift/codegen/src/isa/x86/abi.rs index fb4f9e53d..e316d9068 100644 --- a/cranelift/codegen/src/isa/x86/abi.rs +++ b/cranelift/codegen/src/isa/x86/abi.rs @@ -34,6 +34,7 @@ static ARG_GPRS_WIN_FASTCALL_X64: [RU; 4] = [RU::rcx, RU::rdx, RU::r8, RU::r9]; /// Return v...
1
70
163
771e51c5c5dbdca5e0e1e632f0cba1e351e2ac50
Dan Gohman
2019-11-08T17:37:31
Fix the exclude path for wasi-misc-tests.
diff --git a/Cargo.toml b/Cargo.toml index 453576f3b..4fc28b47b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -47,7 +47,7 @@ members = [ "crates/misc/py", ] -exclude = ["wasi-common/wasi-misc-tests"] +exclude = ["crates/wasi-common/wasi-misc-tests"] [features] # Enable all supported architectures by default.
1
1
1
a06f2c87c29ebbf53ee1f22cd023e4c71e878a58
Sean Stangl
2019-11-07T18:43:08
Pass Encoding to compute_size() for runtime Encoding inspection. #1156 In some cases, compute_size() is used to choose between various different Encodings before one has been assigned to an instruction. For x86, the REX.W bit is stored in the Encoding. To share recipes between REX/non-REX, that bit must be inspected b...
diff --git a/cranelift/codegen/src/isa/encoding.rs b/cranelift/codegen/src/isa/encoding.rs index 118bfa200..99894cab2 100644 --- a/cranelift/codegen/src/isa/encoding.rs +++ b/cranelift/codegen/src/isa/encoding.rs @@ -80,23 +80,29 @@ impl fmt::Display for DisplayEncoding { } } -type SizeCalculatorFn = fn(&Recipe...
2
20
8
1074c7675e19a62930d3fa629dab05143bae8afa
Benjamin Bouvier
2019-11-06T15:48:21
Clear the old_signatures between functions' compilations.
diff --git a/cranelift/codegen/src/ir/dfg.rs b/cranelift/codegen/src/ir/dfg.rs index 49f6fdbd7..9e8634b74 100644 --- a/cranelift/codegen/src/ir/dfg.rs +++ b/cranelift/codegen/src/ir/dfg.rs @@ -104,6 +104,7 @@ impl DataFlowGraph { self.value_lists.clear(); self.values.clear(); self.signatures....
1
1
0
3a8c2bbb82b88b8b86f3f79e3d254f8aa6143150
Yury Delendik
2019-11-08T13:57:53
Adds WASI support to markdown rust example. (#509) * Adds WASI support to markdown rust example. * Rename has_wasi -> find_wasi_module_name
diff --git a/misc/wasmtime-rust/Cargo.toml b/misc/wasmtime-rust/Cargo.toml index 6ce913155..cf3ad45c2 100644 --- a/misc/wasmtime-rust/Cargo.toml +++ b/misc/wasmtime-rust/Cargo.toml @@ -17,4 +17,5 @@ cranelift-native = { version = "0.49" } wasmtime-interface-types = { path = "../../wasmtime-interface-types" } wasmtime...
3
25
0
4982878a95a5f9a6731997357bda4be899f1dbad
Jakub Konka
2019-11-08T09:49:15
Fix bug in fd_readdir impl on BSD This commit fixes a subtle bug in `fd_readdir` implementation on BSD-style nixes. In particular, the bug only resurfaced when testing in release mode, and I can only assume it was due to a unlucky combination of compiler optimizations and at first sight correct casting of `d_name` poi...
diff --git a/wasi-common/src/sys/unix/bsd/hostcalls_impl.rs b/wasi-common/src/sys/unix/bsd/hostcalls_impl.rs index 6c46e2e8f..96960bf12 100644 --- a/wasi-common/src/sys/unix/bsd/hostcalls_impl.rs +++ b/wasi-common/src/sys/unix/bsd/hostcalls_impl.rs @@ -147,6 +147,7 @@ pub(crate) fn fd_readdir( use crate::sys::unix...
1
30
21
ac40eff871eedf80d76d3fe5aaba720dfcb7839e
Jakub Konka
2019-11-08T05:58:05
Fix compilation of integration tests
diff --git a/wasi-common/tests/wasm_tests/runtime.rs b/wasi-common/tests/wasm_tests/runtime.rs index d577f4378..fc0dd617f 100644 --- a/wasi-common/tests/wasm_tests/runtime.rs +++ b/wasi-common/tests/wasm_tests/runtime.rs @@ -21,7 +21,7 @@ pub fn instantiate(data: &[u8], bin_name: &str, workspace: Option<&Path>) -> any ...
1
7
10
4ccf0fdfa3fa8655679c6dfdb526f2fffeff49f0
Peter Huene
2019-11-08T00:41:32
Fix build errors in x86 unwind info when building no_std. (#1214) This commit fixes the build errors in the unwind info implementation for the x86 ABI by changing `byteorder` to build `no_std`. This copies two simple functions from the `WriteBytesExt` trait so that we can easily write to a `Vec<u8>` with a partic...
diff --git a/cranelift/codegen/Cargo.toml b/cranelift/codegen/Cargo.toml index 29a07cda3..3fca04980 100644 --- a/cranelift/codegen/Cargo.toml +++ b/cranelift/codegen/Cargo.toml @@ -22,7 +22,7 @@ log = { version = "0.4.6", default-features = false } serde = { version = "1.0.94", features = ["derive"], optional = true }...
3
40
40
59b15eab136cbdff2180c0bba3e7d60f1c821d10
Alex Crichton
2019-11-07T23:01:17
Simplify `#[test]` generation for `*.wast` files (#507) This commit simplifies the build script slightly for generating tests by doing a few dull refactorings: * Leaves formatting to `rustfmt` * Extract bulk of code execution into a top-level shared `run_wast` function so each test is a one-liner * Use `anyho...
diff --git a/Cargo.toml b/Cargo.toml index 603d5551f..05322667f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -38,6 +38,9 @@ libc = "0.2.60" rayon = "1.1" wasm-webidl-bindings = "0.6" +[build-dependencies] +anyhow = "1.0.19" + [workspace] members = [ "misc/wasmtime-rust", diff --git a/build.rs b/build.rs index 4...
3
103
111
2411831964ad5977f1b6dc205a4b079c27299cb2
Alex Crichton
2019-11-07T22:57:43
Ensure wasi-common tests always have an unreadable stdin Some wasi-common tests assume that stdin is never ready to be read, but on CI stdin is closed so it's always ready to be read. Work around this by guaranteeing that wasi-common tests always have an unreadable stdin pipe by creating our own pipe.
diff --git a/wasi-common/Cargo.toml b/wasi-common/Cargo.toml index 4da67c268..0647e641b 100644 --- a/wasi-common/Cargo.toml +++ b/wasi-common/Cargo.toml @@ -17,7 +17,8 @@ wasm_tests = [] [dependencies] wasi-common-cbindgen = { path = "wasi-common-cbindgen", version = "0.5.0" } -failure = "0.1" +anyhow = "1.0" +this...
10
185
157
6aabdaa0384fe93a7115bc0b919802dc969ffd25
Dan Gohman
2019-11-07T21:33:48
Update lightbeam's "bench" tests to use `wat`. (#504) The rest of lightbeam switched from `wabt` to `wat` already, this just updates some of the tests which aren't enabled by default.
diff --git a/lightbeam/src/tests.rs b/lightbeam/src/tests.rs index a832062ec..1fa655110 100644 --- a/lightbeam/src/tests.rs +++ b/lightbeam/src/tests.rs @@ -1027,18 +1027,18 @@ test_select!(select64, i64); mod benches { extern crate test; - use super::{translate, wabt, FIBONACCI, FIBONACCI_OPT}; + use sup...
1
4
4
d896cc34c2840403cb4b7adfec7477bb499d0b6b
Dan Gohman
2019-11-07T21:33:17
Remove an obsolete workaround. (#505) We needed a workaround when using wabt on old Linux distros due to using old versions of `strtof`. With the switch to `wat`, we no longer need these workarounds.
diff --git a/Cargo.toml b/Cargo.toml index d4111d747..603d5551f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -38,10 +38,6 @@ libc = "0.2.60" rayon = "1.1" wasm-webidl-bindings = "0.6" -# build.rs tests whether to enable a workaround for the libc strtof function. -[target.'cfg(target_os = "linux")'.build-dependencies...
2
0
29
6632a7da374711725018029972902ca130b1b23b
Yury Delendik
2019-11-07T17:39:23
[wasmtime-api] reduce examples complexity: hostref for store/engine (#489) * reduce amount of store.clone() * use HostRef Engine as ref / use Engine::default()
diff --git a/src/bin/wasmtime.rs b/src/bin/wasmtime.rs index 0b2697771..3bf755a55 100644 --- a/src/bin/wasmtime.rs +++ b/src/bin/wasmtime.rs @@ -270,14 +270,14 @@ fn main() -> Result<()> { strategy, ); let engine = HostRef::new(Engine::new(config)); - let store = HostRef::new(Store::new(engine)); ...
13
76
88
55eb06ecc208813cf3305c268926f7c6c585dc08
Alex Crichton
2019-11-07T15:38:35
Reformat with new stable rustfmt Fixes CI!
diff --git a/lightbeam/src/microwasm.rs b/lightbeam/src/microwasm.rs index 6d485de51..dd304e03e 100644 --- a/lightbeam/src/microwasm.rs +++ b/lightbeam/src/microwasm.rs @@ -1179,8 +1179,12 @@ where sig!((ty) -> (ty)) } - WasmOperator::GetGlobal { global_index } => sig!(() -> (...
1
12
4
ab3cd945bc2f4626a2fae8eabf6c7108973ce1a5
Adam C. Foltzer
2019-11-07T11:25:43
Use new `WasiCtxBuilder` types from wasi-common (#490) * use new `WasiCtxBuilder` types from wasi-common * Update wasi-common deps
diff --git a/Cargo.toml b/Cargo.toml index 36a388f9e..d4111d747 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,7 +25,7 @@ wasmtime-obj = { path = "wasmtime-obj" } wasmtime-wast = { path = "wasmtime-wast" } wasmtime-wasi = { path = "wasmtime-wasi" } wasmtime-wasi-c = { path = "wasmtime-wasi-c", optional = true } -wa...
4
6
9
2fe353044fe8b0f46e90e77c7728eb37f173d7f6
Adam C. Foltzer
2019-11-07T10:50:47
Improvements to `WasiCtxBuilder`, and a couple bug fixes (#175) * fix Linux `isatty` implementation * defer `WasiCtxBuilder` errors to `build()`; don't change API yet This changes the fields on the builder to types that let the various `.arg()`, `.env()`, etc methods infallible, so we don't have to worry about ...
diff --git a/Cargo.toml b/Cargo.toml index 85c3eda47..e934400fe 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -41,12 +41,12 @@ cpu-time = "1.0" [dev-dependencies] -wasmtime-runtime = { git = "https://github.com/cranestation/wasmtime", rev = "b42e550" } -wasmtime-environ = { git = "https://github.com/cranestation/was...
5
201
93
12972c7fd3ecdf8f1e4206c3f579ebb5a6068f85
Marcin Mielniczuk
2019-11-07T10:23:52
Implement fd_readdir (#116) * Reimpleent fd_readdir on Linux using quasi-nix. * Implement fd_readdir on Windows. * wip * Adapt to upstream changes. * Cleanup dir.rs * Address review * Fix macos build * host -> wasi * Partially address review, more to come later. * Address more review comment...
diff --git a/build.rs b/build.rs index fc7db99b8..ec379f736 100644 --- a/build.rs +++ b/build.rs @@ -197,6 +197,7 @@ mod wasm_tests { "dangling_symlink" => true, "symlink_loop" => true, "truncation_rights" => true, + "path...
8
449
99
325e973474ca80b0833c99476b0e92c2966aa0b9
Dan Gohman
2019-11-07T01:00:00
Update faerie to 0.12 to finish the `target-lexicon` update story.
diff --git a/Cargo.toml b/Cargo.toml index 06da2db1e..36a388f9e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,7 +28,7 @@ wasmtime-wasi-c = { path = "wasmtime-wasi-c", optional = true } wasi-common = { git = "https://github.com/CraneStation/wasi-common", rev = "37ce4ba"} docopt = "1.0.1" serde = { "version" = "1.0....
3
3
3
c46d6b7269ec3fc261cb80a514af40f48ade3568
Johnnie Birch
2019-11-07T00:21:12
Removes build warnings for usused code for lightbeam build (#493)
diff --git a/lightbeam/src/backend.rs b/lightbeam/src/backend.rs index b77fdb9d3..6e22bc7f8 100644 --- a/lightbeam/src/backend.rs +++ b/lightbeam/src/backend.rs @@ -616,6 +616,7 @@ struct RelocateAccess { pub struct TranslatedCodeSection { exec_buf: ExecutableBuffer, func_starts: Vec<AssemblyOffset>, + #[...
1
2
1
a8afdff9725cec5e78c4af85e48b64711153d8b9
Andrew Brown
2019-11-06T19:58:29
Add error causes to failed WAST directives (#477)
diff --git a/src/bin/wast.rs b/src/bin/wast.rs index be74a23f3..08191f51a 100644 --- a/src/bin/wast.rs +++ b/src/bin/wast.rs @@ -168,7 +168,7 @@ fn main() { wast_context .run_file(Path::new(&filename)) .unwrap_or_else(|e| { - eprintln!("{}", e); + eprintl...
1
1
1
22494057dfeadfffc3e2a504ff73233fbae80299
Marcin Mielniczuk
2019-11-06T16:02:58
Try to somehow implement clock_res_get on Windows. (#124) * Implement clock_time_get on Windows. Also update misc_testsuite to include latest clock_time_get test changes. * Try to somehow implement clock_res_get on Windows. * Fix 55ms * Cache the perf counter resolution * Fix integration tests
diff --git a/Cargo.toml b/Cargo.toml index 9c3f181cd..85c3eda47 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -50,6 +50,9 @@ cranelift-codegen = "0.46.1" target-lexicon = "0.8.1" pretty_env_logger = "0.3.0" tempfile = "3.1.0" +# this is just a temp fix to make the tests build and run; I hope this to be +# completely r...
4
71
1