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 |
|---|---|---|---|---|---|---|---|
2687b0147455f1aee8978fd2aa39480720433823 | Jakub Konka | 2020-02-04T22:26:18 | Refactor Region struct (#4)
* Add some basic sanity tests for Region
This commit adds some basic sanity tests for `overlap` method
of `Region`.
* Refactor overlaps method of Region struct
This commit refactors `Region::overlaps` method.
* Add some docs
* Assert Region's len is nonzero | diff --git a/crates/memory/src/region.rs b/crates/memory/src/region.rs
index 2e0aadc50..7ee542f38 100644
--- a/crates/memory/src/region.rs
+++ b/crates/memory/src/region.rs
@@ -1,3 +1,4 @@
+/// Represents a contiguous region in memory.
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
pub struct Region {
pub start: u... | 1 | 42 | 16 |
1bfca842b0926ea9882b29108890f0642ca9f51a | Alex Crichton | 2020-02-04T20:32:35 | Support `Func` imports with zero shims (#839)
* Move `Func` to its own file
* Support `Func` imports with zero shims
This commit extends the `Func` type in the `wasmtime` crate with static
`wrap*` constructors. The goal of these constructors is to create a
`Func` type which has zero shims associated with it, c... | diff --git a/crates/api/examples/hello.rs b/crates/api/examples/hello.rs
index 317e0361f..9a461569b 100644
--- a/crates/api/examples/hello.rs
+++ b/crates/api/examples/hello.rs
@@ -1,19 +1,8 @@
//! Translation of hello example
use anyhow::{ensure, Context as _, Result};
-use std::rc::Rc;
use wasmtime::*;
-struct... | 11 | 631 | 190 |
e09231e33f0193981d26a0c847c6d1906c4b8ac8 | Alex Crichton | 2020-02-04T20:05:28 | Add a test tha call_indirect traps produce good errors (#889)
Closes #178 | diff --git a/crates/api/tests/traps.rs b/crates/api/tests/traps.rs
index a5dbbadf4..610760a32 100644
--- a/crates/api/tests/traps.rs
+++ b/crates/api/tests/traps.rs
@@ -339,3 +339,34 @@ fn mismatched_arguments() -> Result<()> {
);
Ok(())
}
+
+#[test]
+fn call_signature_mismatch() -> Result<()> {
+ let sto... | 1 | 31 | 0 |
a01bcff2193cfd9a3eb4a2ac99fd11af4fd14a94 | Yury Delendik | 2020-02-04T19:50:56 | Implement wasm_global_type (#898) | diff --git a/crates/c-api/src/lib.rs b/crates/c-api/src/lib.rs
index 1fc5be8de..877510652 100644
--- a/crates/c-api/src/lib.rs
+++ b/crates/c-api/src/lib.rs
@@ -1422,6 +1422,16 @@ pub unsafe extern "C" fn wasm_global_new(
Box::into_raw(g)
}
+#[no_mangle]
+pub unsafe extern "C" fn wasm_global_type(g: *const wasm... | 1 | 10 | 0 |
19a188789bf089f342a82078897f0b381b907860 | Nick Fitzgerald | 2020-02-04T15:18:59 | Bump to 0.57.0 (#1375)
* Update wasmparser to 0.48.2
* Bump to version 0.57.0 | diff --git a/cranelift/Cargo.toml b/cranelift/Cargo.toml
index 30a0c434b..a6f57398f 100644
--- a/cranelift/Cargo.toml
+++ b/cranelift/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "cranelift-tools"
authors = ["The Cranelift Project Developers"]
-version = "0.56.0"
+version = "0.57.0"
description = "Binaries for testi... | 18 | 68 | 68 |
76f9e7ea417bea59b862abb3c98b1a8f8c7fd3dc | Alex Crichton | 2020-02-04T15:13:14 | Verify correct number and types of arguments enter wasm (#890)
Whenever we enter wasm code we need to verify that the correct number
and the correct types of arguments were passed in, lest we misinterpret
bits!
Closes #52 | diff --git a/crates/api/src/callable.rs b/crates/api/src/callable.rs
index edeee6f23..2e59b39e1 100644
--- a/crates/api/src/callable.rs
+++ b/crates/api/src/callable.rs
@@ -127,15 +127,32 @@ impl WrappedCallable for WasmtimeFn {
} => (*vmctx, *address, signature.clone()),
_ => panic!("unexpect... | 2 | 51 | 3 |
70f179b499e5ef381af764461c78e7ec546c722a | Alex Crichton | 2020-02-04T14:14:16 | Update `wast` to 7.0.0, fix stack overflow (#897)
This updates the `wast` dependency to include bytecodealliance/wat#48
which fixes a stack overflow for deeply recursive `*.wat` files. | diff --git a/Cargo.lock b/Cargo.lock
index 502e3dadf..3a9030718 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2142,7 +2142,7 @@ version = "0.9.0"
dependencies = [
"anyhow",
"wasmtime",
- "wast 6.0.0",
+ "wast 7.0.0",
]
[[package]]
@@ -2156,20 +2156,20 @@ dependencies = [
[[package]]
name = "wast"
-version =... | 3 | 7 | 8 |
169dbef784742331de4fed466f7159b530383954 | Yury Delendik | 2020-02-03T22:08:40 | Properly preserve and restore CFA state in FDE (#1373)
* Properly preserve and restore CFA state in FDE | diff --git a/cranelift/codegen/src/isa/x86/abi.rs b/cranelift/codegen/src/isa/x86/abi.rs
index 6a1a3cea1..3d160a2cf 100644
--- a/cranelift/codegen/src/isa/x86/abi.rs
+++ b/cranelift/codegen/src/isa/x86/abi.rs
@@ -835,25 +835,7 @@ fn insert_common_epilogues(
pos.goto_last_inst(ebb);
if let Some(inst) =... | 2 | 99 | 25 |
ef843b9e5a1d4d112b604f8e98e081f1ed607341 | Alex Crichton | 2020-02-01T10:46:53 | Add a `Debug` implementation for `wsmtime::Config`
Handy to have in some situations! | diff --git a/crates/api/src/runtime.rs b/crates/api/src/runtime.rs
index 3475261ce..a930cac46 100644
--- a/crates/api/src/runtime.rs
+++ b/crates/api/src/runtime.rs
@@ -1,5 +1,6 @@
use anyhow::Result;
use std::cell::RefCell;
+use std::fmt;
use std::rc::Rc;
use std::sync::Arc;
use wasmtime_environ::settings::{self,... | 2 | 16 | 1 |
1a64acf43bb2407d4be3575c732d99faf74971c1 | Alex Crichton | 2020-02-01T10:45:27 | Don't rebuild `wasmtime-cli` on all file changes
Print out an explicit `rerun-if-changed` annotation in the `build.rs`
for the `wasmtime-cli` crate to avoid rebuilding it constantly as files
like tests change which don't need to cause a rebuild. | diff --git a/build.rs b/build.rs
index d3ece13dd..9d1967591 100644
--- a/build.rs
+++ b/build.rs
@@ -11,6 +11,7 @@ use std::path::{Path, PathBuf};
use std::process::Command;
fn main() -> anyhow::Result<()> {
+ println!("cargo:rerun-if-changed=build.rs");
let out_dir = PathBuf::from(
env::var_os("OU... | 1 | 1 | 0 |
8affec0896334925f6b6ee714b7d3a85782ab7ee | Josh Triplett | 2020-01-31T19:47:15 | Don't spend build time optimizing build-time-only crates
Crates used exclusively at build time, such as proc-macro crates and
their dependencies, don't benefit substantially from optimization; they
take far longer to optimize than time saved when running them during the
build. No machine code from these crates will ap... | diff --git a/Cargo.toml b/Cargo.toml
index bdb5f3dd8..8bceb9ba7 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -55,6 +55,9 @@ tempfile = "3.1.0"
[build-dependencies]
anyhow = "1.0.19"
+[profile.release.build-override]
+opt-level = 0
+
[workspace]
members = [
"crates/fuzzing", | 1 | 3 | 0 |
d22b60e834f650e7e3d03f5a1a56f131a405878a | Alex Crichton | 2020-01-31T07:47:12 | Fix a memory leak with link errors
During creation of an `InstanceHandle` if a link error occurred (such as
an element segment doesn't fit) then the instance itself would be leaked
by accident. This commit fixes the issue by ensuring that an
`InstanceHandle` is created very quickly so if any initialization later
fails... | diff --git a/crates/runtime/src/instance.rs b/crates/runtime/src/instance.rs
index 8cd61cc25..40b0f72f4 100644
--- a/crates/runtime/src/instance.rs
+++ b/crates/runtime/src/instance.rs
@@ -668,7 +668,7 @@ impl InstanceHandle {
)
.map_err(InstantiationError::Resource)?;
- let instance = {
+ ... | 1 | 30 | 25 |
29c3ef9d091a9e71c403f58bc13330c2dc32ae41 | Pat Hickey | 2020-01-31T00:38:16 | we now parse witx paths and the ctx type name in the macro invocation | diff --git a/crates/generate/src/config.rs b/crates/generate/src/config.rs
index 3cb1cf5c0..9e7848e82 100644
--- a/crates/generate/src/config.rs
+++ b/crates/generate/src/config.rs
@@ -1,64 +1,98 @@
use std::path::PathBuf;
+use proc_macro2::Span;
use syn::{
- bracketed,
+ braced, bracketed,
parse::{Parse... | 5 | 90 | 49 |
84c4d8cc6c26657061e317c9152152719ffa3ee5 | Nick Fitzgerald | 2020-01-30T22:46:50 | Remove always-on logging from fuzz targets (#878)
Now that the `cargo fuzz` tooling is better, it is easier to reproduce failures,
and we don't need to be super paranoid about logging here. | diff --git a/Cargo.lock b/Cargo.lock
index b0110b210..502e3dadf 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1998,9 +1998,7 @@ name = "wasmtime-fuzz"
version = "0.9.0"
dependencies = [
"arbitrary 0.2.0",
- "env_logger 0.7.1",
"libfuzzer-sys",
- "log",
"wasmtime",
"wasmtime-fuzzing",
]
diff --git a/crates/fuz... | 7 | 8 | 197 |
0ba8e73184c5faec768a0a8670aab5ab68507b1e | Pat Hickey | 2020-01-30T22:29:53 | change proc macro argument parsing to use `syn` | diff --git a/crates/generate/Cargo.toml b/crates/generate/Cargo.toml
index 2b89101bd..886fea8b3 100644
--- a/crates/generate/Cargo.toml
+++ b/crates/generate/Cargo.toml
@@ -14,3 +14,4 @@ quote = "1.0"
proc-macro2 = "1.0"
heck = "0.3"
anyhow = "1"
+syn = { version = "1.0", features = ["full"] }
diff --git a/crates/ge... | 4 | 41 | 9 |
c6438d0d4457dc4d83279f6d34f622cd9a28f485 | Alex Crichton | 2020-01-30T21:22:05 | fuzz: Don't panic on module compilation errors (#875)
Let's avoid having two phases of checks and just ignore the module
compilation errors during the instantiate oracle, only relying on one check. | diff --git a/crates/fuzzing/src/oracles.rs b/crates/fuzzing/src/oracles.rs
index c7d9ecfb1..5b1b79ed5 100644
--- a/crates/fuzzing/src/oracles.rs
+++ b/crates/fuzzing/src/oracles.rs
@@ -23,10 +23,6 @@ use wasmtime::*;
///
/// You can control which compiler is used via passing a `Strategy`.
pub fn instantiate(wasm: &[... | 1 | 4 | 5 |
f2382db4617ea00b1830686699f32d050f0962ad | Sergei Pepyakin | 2020-01-30T20:11:41 | Check the types of values returned by Callable (#876)
If the values mismatch to the ones that were specified by the
signature of the callable, raise a trap! | diff --git a/crates/api/src/trampoline/func.rs b/crates/api/src/trampoline/func.rs
index d6435c8d7..446e6f859 100644
--- a/crates/api/src/trampoline/func.rs
+++ b/crates/api/src/trampoline/func.rs
@@ -129,8 +129,15 @@ unsafe extern "C" fn stub_fn(
.downcast_ref::<TrampolineState>()
.expect("st... | 2 | 58 | 1 |
eb183d7ab36b9345e20e1c5be9e02295f69da628 | Sergei Pepyakin | 2020-01-30T20:03:50 | Run rustfmt 1.41 (#877) | diff --git a/crates/lightbeam/src/backend.rs b/crates/lightbeam/src/backend.rs
index c03442e44..4b8f36215 100644
--- a/crates/lightbeam/src/backend.rs
+++ b/crates/lightbeam/src/backend.rs
@@ -5589,25 +5589,26 @@ impl<'this, M: ModuleContext> Context<'this, M> {
}
if pending.len() == start_l... | 2 | 18 | 18 |
83ff0150b420cc3a98a461e31a449348657e2f36 | Alex Crichton | 2020-01-30T14:15:20 | Improve panics/traps from imported functions (#857)
* Improve panics/traps from imported functions
This commit performs a few refactorings and fixes a bug as well. The
changes here are:
* The `thread_local!` in the `wasmtime` crate for trap information is
removed. The thread local in the `wasmtime_runtime` c... | diff --git a/crates/api/src/callable.rs b/crates/api/src/callable.rs
index 1fbaa3789..b13fe6f58 100644
--- a/crates/api/src/callable.rs
+++ b/crates/api/src/callable.rs
@@ -1,5 +1,5 @@
use crate::runtime::Store;
-use crate::trampoline::{generate_func_export, take_api_trap};
+use crate::trampoline::generate_func_export... | 11 | 315 | 137 |
e2079c085dbb2df503c429bddb590545bb8db3bc | Pat Hickey | 2020-01-29T21:18:57 | report which field a struct validation error occured in | diff --git a/crates/generate/src/types.rs b/crates/generate/src/types.rs
index 21dcaaa4b..096015ae2 100644
--- a/crates/generate/src/types.rs
+++ b/crates/generate/src/types.rs
@@ -164,7 +164,22 @@ fn define_copy_struct(names: &Names, name: &witx::Id, s: &witx::StructDatatype)
let member_valids = s.member_layout()... | 2 | 39 | 2 |
bc50815eac12aa5bd2c699f45bccadb239b9e6e3 | Andrew Brown | 2020-01-29T08:02:24 | Re-enable simd_const.wast spec test (#872) | diff --git a/build.rs b/build.rs
index ea89c7003..d3ece13dd 100644
--- a/build.rs
+++ b/build.rs
@@ -152,7 +152,6 @@ fn ignore(testsuite: &str, testname: &str, strategy: &str) -> bool {
},
"Cranelift" => match (testsuite, testname) {
("simd", "simd_bit_shift") => return true, // FIXME Uns... | 1 | 0 | 1 |
3502cd3cd18311d5afe2506728f961d5817d98b4 | Andrew Brown | 2020-01-28T18:11:37 | Remove unused import; fixes #1367 (#1368) | diff --git a/cranelift/filetests/src/runone.rs b/cranelift/filetests/src/runone.rs
index 7dbedf8c8..8d1c36dff 100644
--- a/cranelift/filetests/src/runone.rs
+++ b/cranelift/filetests/src/runone.rs
@@ -8,7 +8,7 @@ use cranelift_codegen::print_errors::pretty_verifier_error;
use cranelift_codegen::settings::Flags;
use c... | 1 | 1 | 1 |
373560b88a1336aa8e24d9ed36f2186f20d4faf2 | Pat Hickey | 2020-01-28T04:28:27 | and now funcs work again | diff --git a/crates/generate/src/funcs.rs b/crates/generate/src/funcs.rs
index 6f4eebe59..9a3c1d471 100644
--- a/crates/generate/src/funcs.rs
+++ b/crates/generate/src/funcs.rs
@@ -74,8 +74,7 @@ pub fn define_func(names: &Names, func: &witx::InterfaceFunc) -> TokenStream {
let marshal_args = func
.params
... | 3 | 12 | 9 |
c780421c28463e70c016946c004a9db20e781720 | Pat Hickey | 2020-01-28T04:21:53 | i think the memory model is fixed now? at least until arrays.... | diff --git a/crates/generate/src/types.rs b/crates/generate/src/types.rs
index 4ee337bbc..a49995b26 100644
--- a/crates/generate/src/types.rs
+++ b/crates/generate/src/types.rs
@@ -105,12 +105,16 @@ fn define_enum(names: &Names, name: &witx::Id, e: &witx::EnumDatatype) -> TokenS
impl ::memory::GuestTypeCopy ... | 5 | 105 | 53 |
ec456e9e509d72ffb285656d8657a7d34b9448e4 | Pat Hickey | 2020-01-28T02:20:47 | new memory model. not quite complete | diff --git a/crates/generate/src/funcs.rs b/crates/generate/src/funcs.rs
index e886308f8..6f4eebe59 100644
--- a/crates/generate/src/funcs.rs
+++ b/crates/generate/src/funcs.rs
@@ -74,7 +74,8 @@ pub fn define_func(names: &Names, func: &witx::InterfaceFunc) -> TokenStream {
let marshal_args = func
.params
... | 8 | 273 | 165 |
1defae27426d51105867fd8327db099d75da70b4 | Alex Crichton | 2020-01-27T09:57:25 | Run `cargo update` on dependencies (#868)
Looks like we're able to actually drop a good number of various deps,
especially some large-ish ones like syn 0.14!
Adding proc-macro2 v1.0.8
Adding syn v1.0.14
Removing base64 v0.10.1
Removing cloudabi v0.0.3
Removing crossbeam-utils v0.6.6
... | diff --git a/Cargo.lock b/Cargo.lock
index 186343bbf..c9145c872 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -32,18 +32,18 @@ checksum = "64cf76cb6e2222ed0ea86b2b0ee2f71c96ec6edd5af42e84d59160e91b836ec4"
[[package]]
name = "arbitrary"
-version = "0.3.2"
+version = "0.3.3"
source = "registry+https://github.com/rust-... | 1 | 142 | 292 |
4b84d19f776e7bc6f957d33b84e4328be2dfe7ef | Jakub Konka | 2020-01-26T22:44:10 | Update instantiate.rs (#864)
* Update instantiate.rs
This must have snuck in the latest refactor of auto-generating the hostcalls from `*.witx` files.
* Fix formatting | diff --git a/crates/wasi/src/old/snapshot_0/instantiate.rs b/crates/wasi/src/old/snapshot_0/instantiate.rs
index a110d5da9..579957c0a 100644
--- a/crates/wasi/src/old/snapshot_0/instantiate.rs
+++ b/crates/wasi/src/old/snapshot_0/instantiate.rs
@@ -7,8 +7,8 @@ use std::fs::File;
use std::sync::Arc;
use target_lexicon... | 1 | 1 | 1 |
daf0772bd5168ff8949fe90c02848399488b38da | Jakub Konka | 2020-01-26T20:11:19 | Fix environ crate tests on nightly | diff --git a/crates/environ/src/cache/tests.rs b/crates/environ/src/cache/tests.rs
index 7a9bdc31c..d99028804 100644
--- a/crates/environ/src/cache/tests.rs
+++ b/crates/environ/src/cache/tests.rs
@@ -333,13 +333,13 @@ fn new_module_cache_data(rng: &mut impl Rng) -> ModuleCacheData {
let traps = (0..rng.gen_rang... | 1 | 2 | 2 |
42eca19b503c0fcfb237a92274689937154721ef | Pat Hickey | 2020-01-24T23:12:51 | types: make the tryfrom/to impl for the abi type, not the signed variant | diff --git a/crates/generate/src/types.rs b/crates/generate/src/types.rs
index 66df3583f..59b99507a 100644
--- a/crates/generate/src/types.rs
+++ b/crates/generate/src/types.rs
@@ -32,7 +32,10 @@ fn define_enum(names: &Names, name: &witx::Id, e: &witx::EnumDatatype) -> TokenS
let ident = names.type_(&name);
... | 1 | 15 | 12 |
62a86ae52b19602f06426d97ca83f3d02f540c15 | Alex Crichton | 2020-01-24T20:30:38 | Remove a stray empty file
Forgotten in a previous refactoring! | diff --git a/crates/wasi-common/src/hostcalls.rs b/crates/wasi-common/src/hostcalls.rs
deleted file mode 100644
index e69de29bb..000000000 | 1 | 0 | 0 |
3db1074c1539709b76e1b51dcda45390fe0a377f | Alex Crichton | 2020-01-24T17:53:55 | Improve handling of strings for backtraces (#843)
* Improve handling of strings for backtraces
Largely avoid storing strings at all in the `wasmtime-*` internal
crates, and instead only store strings in a separate global cache
specific to the `wasmtime` crate itself. This global cache is inserted
and removed fro... | diff --git a/Cargo.lock b/Cargo.lock
index e279d2357..186343bbf 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2032,6 +2032,7 @@ dependencies = [
"backtrace",
"cfg-if",
"file-per-thread-logger",
+ "lazy_static",
"libc",
"pretty_env_logger",
"rayon",
diff --git a/crates/api/Cargo.toml b/crates/api/Cargo.toml
i... | 17 | 139 | 156 |
5edf015ada5c7cdc85369443b063ea0162ba6591 | Joshua Nelson | 2020-01-24T15:43:44 | Make `get_libcall_funcref` `pub(crate)` (#1291)
* Make `get_libcall_funcref` `pub(crate)`
Closes https://github.com/bytecodealliance/cranelift/issues/1273.
Since get_libcall_funcref is only used internally by the verifier,
it doesn't make sense to have it be public. This will encourage users to
look elsewhere ... | diff --git a/cranelift/codegen/src/ir/libcall.rs b/cranelift/codegen/src/ir/libcall.rs
index cffbfb5a9..33d3fa606 100644
--- a/cranelift/codegen/src/ir/libcall.rs
+++ b/cranelift/codegen/src/ir/libcall.rs
@@ -106,7 +106,7 @@ impl LibCall {
/// for `inst`.
///
/// If there is an existing reference, use it, otherwise ... | 3 | 4 | 4 |
b4f21752b045cea26d46cae215679f55b28ec5df | Pat Hickey | 2020-01-23T20:46:57 | generate a module trait and call it | diff --git a/crates/generate/src/funcs.rs b/crates/generate/src/funcs.rs
index bfe720f2d..255e7a90e 100644
--- a/crates/generate/src/funcs.rs
+++ b/crates/generate/src/funcs.rs
@@ -1,4 +1,4 @@
-use proc_macro2::TokenStream;
+use proc_macro2::{Ident, TokenStream};
use quote::quote;
use crate::names::Names;
@@ -6,10 ... | 7 | 139 | 17 |
946251e6555413b06ba51b31960dd5d6a59f1e62 | Ryan Hunt | 2020-01-06T21:48:12 | Codegen: Align representation of stackmap with SpiderMonkey
This commit aligns the representation of stackmaps to be the same
as Spidermonkey's by:
* Reversing the order of the bitmap from low addresses to high addresses
* Including incoming stack arguments
* Excluding outgoing stack arguments
Additionally, some a... | diff --git a/cranelift/codegen/src/binemit/stackmap.rs b/cranelift/codegen/src/binemit/stackmap.rs
index cb5739670..10ae96a7c 100644
--- a/cranelift/codegen/src/binemit/stackmap.rs
+++ b/cranelift/codegen/src/binemit/stackmap.rs
@@ -6,10 +6,19 @@ use alloc::vec::Vec;
type Num = u32;
const NUM_BITS: usize = core::mem:... | 7 | 85 | 36 |
bbc0a328c74ead5a36a4baede0084e68d5635312 | Ryan Hunt | 2020-01-06T21:49:06 | Codegen: Allow encoding of (r32|r64).(load|store)
Accessing Wasm reference globals that are reference types will
want to use the plain load/store instructions. This commit adds
encodings for these instructions to match loading a i32/i64.
Producers of IR are required to insert the appropriate barriers
around the loads/... | diff --git a/cranelift/codegen/meta/src/cdsl/cpu_modes.rs b/cranelift/codegen/meta/src/cdsl/cpu_modes.rs
index e62ba7229..7d119b00c 100644
--- a/cranelift/codegen/meta/src/cdsl/cpu_modes.rs
+++ b/cranelift/codegen/meta/src/cdsl/cpu_modes.rs
@@ -37,6 +37,12 @@ impl CpuMode {
assert!(self.default_legalize.is_non... | 4 | 29 | 0 |
848baa0aa7486ea2ad1a8541f86c5032fcdf6139 | Ryan Hunt | 2019-11-27T20:16:09 | Codegen: Add ref.is_invalid instruction
Spidermonkey returns a sentinel ref value of '-1' from some VM functions
to indicate failure. This commit adds an instruction analagous to ref.is_null
that checks for this value. | diff --git a/cranelift/codegen/meta/src/isa/x86/encodings.rs b/cranelift/codegen/meta/src/isa/x86/encodings.rs
index 8baa109e5..bd86715c6 100644
--- a/cranelift/codegen/meta/src/isa/x86/encodings.rs
+++ b/cranelift/codegen/meta/src/isa/x86/encodings.rs
@@ -2329,10 +2329,12 @@ fn define_reftypes(e: &mut PerCpuModeEncodi... | 3 | 43 | 0 |
a15bb9cfcbf3f4c992c00b7a8271889bee3d2b5e | Ryan Hunt | 2019-11-27T20:16:36 | Codegen: Use GPR regclass for reference types on x86 | diff --git a/cranelift/codegen/src/isa/x86/abi.rs b/cranelift/codegen/src/isa/x86/abi.rs
index 4c1925708..6a1a3cea1 100644
--- a/cranelift/codegen/src/isa/x86/abi.rs
+++ b/cranelift/codegen/src/isa/x86/abi.rs
@@ -333,7 +333,7 @@ pub fn legalize_signature(
/// Get register class for a type appearing in a legalized si... | 1 | 1 | 1 |
3b1dda8e92af79d1895528cc4e24182d81e66814 | Ryan Hunt | 2019-11-27T20:18:51 | Wasm: Ensure result of `ref.is_null` is I32
The (r32|r64).is_null instruction yields a boolean type, so we must
convert a Wasm `ref.is_null` to an integer so we don't get verifier
errors. | diff --git a/cranelift/wasm/src/code_translator.rs b/cranelift/wasm/src/code_translator.rs
index bb92e8e85..baaa335be 100644
--- a/cranelift/wasm/src/code_translator.rs
+++ b/cranelift/wasm/src/code_translator.rs
@@ -975,7 +975,8 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>(
Operator::RefIsNull =... | 1 | 2 | 1 |
41f225804bd881bab570f58895bcbdf3f6b104b1 | Ryan Hunt | 2020-01-06T21:41:02 | Wasm: Allow environment to translate some global.set/get operations
Spidermonkey will need to emit pre/post barriers for global.set/get to a
reference type. #1176 and #1299 plan to add a template concept that could
be used to implement this. Once that has been stabilized, we should be able
to remove this code in favor... | diff --git a/cranelift/wasm/src/code_translator.rs b/cranelift/wasm/src/code_translator.rs
index c50b00b39..bb92e8e85 100644
--- a/cranelift/wasm/src/code_translator.rs
+++ b/cranelift/wasm/src/code_translator.rs
@@ -28,7 +28,7 @@ use crate::state::{ControlStackFrame, ElseData, FuncTranslationState, ModuleTran
use cra... | 3 | 50 | 1 |
f41bf5ecca81f72268d68d5aa77270b2fd7ca621 | Ryan Hunt | 2020-01-06T21:40:15 | Wasm: Use environment to translate reference types instructions and add support for multiple tables
This commit introduces environment functions to handle the translation of
reference type instructions, analogous to how bulk-memory was implemented.
Additionally, the bulk-memory instructions that operate on tables are... | diff --git a/cranelift/wasm/src/code_translator.rs b/cranelift/wasm/src/code_translator.rs
index e6055cea1..c50b00b39 100644
--- a/cranelift/wasm/src/code_translator.rs
+++ b/cranelift/wasm/src/code_translator.rs
@@ -965,8 +965,8 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>(
let val = builder... | 3 | 128 | 24 |
cb24fd97c0f1a09533c55a66d54097acc0206317 | Pat Hickey | 2020-01-23T19:21:04 | better error trait design | diff --git a/crates/generate/src/errors.rs b/crates/generate/src/errors.rs
deleted file mode 100644
index 2dc2f243b..000000000
--- a/crates/generate/src/errors.rs
+++ /dev/null
@@ -1,57 +0,0 @@
-use crate::names::Names;
-use heck::SnakeCase;
-use proc_macro2::TokenStream;
-use quote::{format_ident, quote};
-use std::co... | 5 | 29 | 72 |
7cc0073a3e569df06bedd4018b4d3b3c7bd93259 | Pat Hickey | 2020-01-23T05:03:24 | hmm my first idea was bad but not too bad | diff --git a/crates/generate/src/errors.rs b/crates/generate/src/errors.rs
index d1b4bbfbc..2dc2f243b 100644
--- a/crates/generate/src/errors.rs
+++ b/crates/generate/src/errors.rs
@@ -7,6 +7,18 @@ use witx::{Document, TypeRef};
/// The context struct needs to implement a trait for converting memory and value errors... | 1 | 12 | 0 |
97077954f8bb3bc249a20ebde57eca47b01ff2fd | Pat Hickey | 2020-01-23T01:23:29 | enum generation: fill in GuestTypeCopy impl | diff --git a/crates/generate/src/types.rs b/crates/generate/src/types.rs
index 4b107f4f9..e517134c9 100644
--- a/crates/generate/src/types.rs
+++ b/crates/generate/src/types.rs
@@ -82,12 +82,15 @@ fn define_enum(names: &Names, name: &witx::Id, e: &witx::EnumDatatype) -> TokenS
impl ::memory::GuestTypeCopy for #i... | 1 | 7 | 4 |
aa5c5f70188dcfc7137fc54bfc255b03079deab8 | Pat Hickey | 2020-01-23T00:38:25 | flesh out the guest type traits a bit further | diff --git a/crates/generate/src/names.rs b/crates/generate/src/names.rs
index ed59e44e3..a674f13cf 100644
--- a/crates/generate/src/names.rs
+++ b/crates/generate/src/names.rs
@@ -41,6 +41,7 @@ impl Names {
}
}
+ #[allow(unused)]
pub fn type_ref(&self, tref: &TypeRef) -> TokenStream {
... | 5 | 117 | 68 |
e5af0ae3debf5e9aa49caabed32738dbcd07b690 | Alex Crichton | 2020-01-22T20:54:55 | Move the `Store::signature_cache` field (#847)
This commit removes the `signature_cache` field from the `Store` type
and performs a few internal changes which are aimed to be a bit forward
looking towards #777, making `Store` threadsafe.
The changes made here are:
* The `SignatureRegistry` internal type now co... | diff --git a/crates/api/src/instance.rs b/crates/api/src/instance.rs
index 672b62380..27846fcba 100644
--- a/crates/api/src/instance.rs
+++ b/crates/api/src/instance.rs
@@ -186,7 +186,7 @@ impl Instance {
// HACK ensure all handles, instantiated outside Store, present in
// the store's... | 7 | 48 | 53 |
cc50e65f311e6260dee9dd8522376260c009276b | bjorn3 | 2020-01-22T19:25:35 | Update gimli to 0.20 (#1361) | diff --git a/cranelift/codegen/Cargo.toml b/cranelift/codegen/Cargo.toml
index 188ecf557..e135b166a 100644
--- a/cranelift/codegen/Cargo.toml
+++ b/cranelift/codegen/Cargo.toml
@@ -20,7 +20,7 @@ hashbrown = { version = "0.6", optional = true }
target-lexicon = "0.10"
log = { version = "0.4.6", default-features = fals... | 2 | 2 | 2 |
5d7635c351b5fe88ec397dde4348a0327943941a | Julian Popescu | 2020-01-22T18:11:24 | Replaces `load_file` with `load_bytes` in rust macro (#750)
* Replaces `load_file` with `load_bytes` in macro
Loading an `AsRef<[u8]>` object is just more flexible than a filestring.
In the end you can just do `std::fs::read(&str)?` as the argument to get
the same behavior, but the reverse is a lot harder.
* u... | diff --git a/crates/misc/rust/macro/src/lib.rs b/crates/misc/rust/macro/src/lib.rs
index ffc9fc100..f97a20302 100644
--- a/crates/misc/rust/macro/src/lib.rs
+++ b/crates/misc/rust/macro/src/lib.rs
@@ -46,17 +46,19 @@ fn generate_load(item: &syn::ItemTrait) -> syn::Result<TokenStream> {
let root = root();
Ok(q... | 1 | 5 | 3 |
e1446cff8d5b0ad91b5edaf4d7b44d55bdfb6457 | bjorn3 | 2020-01-22T17:18:23 | Derive Ord for all entities (#1313) | diff --git a/cranelift/codegen/src/ir/entities.rs b/cranelift/codegen/src/ir/entities.rs
index 02fa9cbc0..6673c71a1 100644
--- a/cranelift/codegen/src/ir/entities.rs
+++ b/cranelift/codegen/src/ir/entities.rs
@@ -31,6 +31,8 @@ use serde::{Deserialize, Serialize};
///
/// You can get an `Ebb` using
/// [`FunctionBuil... | 1 | 34 | 9 |
903f972cb4b1e28f00b9be8ea7a03f7351306703 | Jonathan Foote | 2020-01-21T19:31:14 | Update Cargo.lock for libfuzzer-sys version number increment | diff --git a/Cargo.lock b/Cargo.lock
index db69b0726..d049f82a5 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -915,9 +915,9 @@ checksum = "d515b1f41455adea1313a4a2ac8a8a477634fbae63cc6100e3aebb207ce61558"
[[package]]
name = "libfuzzer-sys"
-version = "0.2.0"
+version = "0.2.1"
source = "registry+https://github.com/r... | 1 | 2 | 2 |
3992b8669f9b9e185abe81e9998ce2ff4d40ff68 | Yury Delendik | 2020-01-21T18:36:11 | [wasmtime-debug] Update DWARF expression transform to use new format. (#842) | diff --git a/crates/debug/src/transform/expression.rs b/crates/debug/src/transform/expression.rs
index 9a4d5f339..ac93c21db 100644
--- a/crates/debug/src/transform/expression.rs
+++ b/crates/debug/src/transform/expression.rs
@@ -295,6 +295,16 @@ impl CompiledExpression {
}
}
+fn is_old_expression_format(buf: &[... | 1 | 36 | 5 |
386c3a94b00fc4542b132d878eef6e456dfa0c60 | Nick Fitzgerald | 2020-01-21T17:32:52 | fuzz: Don't run tests or docs for `differential` fuzz target | diff --git a/fuzz/Cargo.toml b/fuzz/Cargo.toml
index 2e2fe38cb..b286c21d2 100644
--- a/fuzz/Cargo.toml
+++ b/fuzz/Cargo.toml
@@ -43,3 +43,5 @@ doc = false
[[bin]]
name = "differential"
path = "fuzz_targets/differential.rs"
+test = false
+doc = false | 1 | 2 | 0 |
dfc9e195ee9359c06ed98ef17295089084554f1f | Andrew Brown | 2020-01-21T16:18:52 | Add temporary translation of Wasm's `load_splat` using Cranelift's `load` and `splat` instructions (#1347)
If/when Cranelift gains a `load_splat` instruction, the `load + splat` could be replaced with a single Cranelift `load_splat`. This change allows the `simd_load_splat.wast` spec test to pass. | diff --git a/cranelift/wasm/src/code_translator.rs b/cranelift/wasm/src/code_translator.rs
index c2caa38a1..e6055cea1 100644
--- a/cranelift/wasm/src/code_translator.rs
+++ b/cranelift/wasm/src/code_translator.rs
@@ -1158,6 +1158,32 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>(
let splatted =... | 1 | 30 | 4 |
b8feffe6e1c0969087fc3b356c250df611f84a4e | Pat Hickey | 2020-01-20T22:55:06 | funcs get abi type definitions | diff --git a/crates/generate/src/funcs.rs b/crates/generate/src/funcs.rs
index 6a6430cb8..3f856b863 100644
--- a/crates/generate/src/funcs.rs
+++ b/crates/generate/src/funcs.rs
@@ -3,21 +3,53 @@ use quote::quote;
use crate::names::Names;
+// FIXME need to template what arguments are required to an import function ... | 4 | 65 | 11 |
47f8c1e561a35c7b97fe1156148ddfd1bc963f4f | Jonathan Foote | 2020-01-20T15:28:53 | Update libfuzzer-sys dependency version number
To support oss-fuzz PoC, see
https://github.com/bytecodealliance/wasmtime/issues/611 | diff --git a/fuzz/Cargo.toml b/fuzz/Cargo.toml
index 0d28aae9a..efa1cd210 100644
--- a/fuzz/Cargo.toml
+++ b/fuzz/Cargo.toml
@@ -14,7 +14,7 @@ env_logger = "0.7.1"
log = "0.4.8"
wasmtime-fuzzing = { path = "../crates/fuzzing", features = ["env_logger"] }
wasmtime = { path = "../crates/api" }
-libfuzzer-sys = "0.2.0"... | 1 | 1 | 1 |
175b9641e03fcbc09b993ec2e51723e7bac35731 | Joshua Nelson | 2020-01-20T13:29:05 | frontend: Add `entries()` API for Switch (#1358) | diff --git a/cranelift/frontend/src/switch.rs b/cranelift/frontend/src/switch.rs
index 25cba38ac..e4c147d16 100644
--- a/cranelift/frontend/src/switch.rs
+++ b/cranelift/frontend/src/switch.rs
@@ -62,6 +62,11 @@ impl Switch {
);
}
+ /// Get a reference to all existing entries
+ pub fn entries(&sel... | 1 | 5 | 0 |
1bf8de35f352237f58370363b6ca1ce5221d263d | Nick Fitzgerald | 2020-01-17T00:39:28 | Add initial differential fuzzing
Part of #611 | diff --git a/crates/fuzzing/src/generators.rs b/crates/fuzzing/src/generators.rs
index 62ed219ae..c3813a1b6 100644
--- a/crates/fuzzing/src/generators.rs
+++ b/crates/fuzzing/src/generators.rs
@@ -45,3 +45,41 @@ impl Arbitrary for WasmOptTtf {
Ok(WasmOptTtf { wasm })
}
}
+
+/// A description of configura... | 5 | 237 | 8 |
fd04ea2b0615ecc602d835fbd57783b072155ed3 | Andrew Brown | 2020-01-17T22:39:31 | Fix incorrect assertion for `insertlane` (#1355)
Previously, the assertion checked for `lane > 0` when it should have been `lane >= 0`; since lane is unsigned, this half of the assertion can be entirely removed. | diff --git a/cranelift/codegen/src/isa/x86/enc_tables.rs b/cranelift/codegen/src/isa/x86/enc_tables.rs
index d45f1314a..9a5481e22 100644
--- a/cranelift/codegen/src/isa/x86/enc_tables.rs
+++ b/cranelift/codegen/src/isa/x86/enc_tables.rs
@@ -1173,7 +1173,7 @@ fn convert_insertlane(
// Floats are already in ... | 1 | 1 | 1 |
815576edc5ab00da8c6b67916bf7e9f8af1504d2 | Marcin Mielniczuk | 2020-01-17T21:41:37 | Return EINVAL in poll_oneoff with no events. (#838)
* Return EINVAL in poll_oneoff with no events.
We adhere to WebAssembly/WASI#193.
* Add a test for empty poll. | diff --git a/crates/test-programs/wasi-tests/src/bin/poll_oneoff.rs b/crates/test-programs/wasi-tests/src/bin/poll_oneoff.rs
index 235e2d874..e87e70726 100644
--- a/crates/test-programs/wasi-tests/src/bin/poll_oneoff.rs
+++ b/crates/test-programs/wasi-tests/src/bin/poll_oneoff.rs
@@ -19,6 +19,18 @@ unsafe fn poll_oneof... | 2 | 22 | 0 |
13afbd0bae4d443107ef279c14b3270e669fae5d | Marcin Mielniczuk | 2020-01-17T21:27:37 | Fix a typo.
Co-Authored-By: Peter Huene <peterhuene@protonmail.com> | diff --git a/crates/wasi-common/src/sys/windows/hostcalls_impl/misc.rs b/crates/wasi-common/src/sys/windows/hostcalls_impl/misc.rs
index 4837003ec..1e2db7340 100644
--- a/crates/wasi-common/src/sys/windows/hostcalls_impl/misc.rs
+++ b/crates/wasi-common/src/sys/windows/hostcalls_impl/misc.rs
@@ -77,7 +77,7 @@ impl Stdi... | 1 | 1 | 1 |
3d29244203e816e9537e5eccf891db207fbfc083 | Marcin Mielniczuk | 2020-01-17T21:26:22 | Cleanup empty event behavior | diff --git a/crates/wasi-common/src/sys/windows/hostcalls_impl/misc.rs b/crates/wasi-common/src/sys/windows/hostcalls_impl/misc.rs
index 8d2ffa0ef..4837003ec 100644
--- a/crates/wasi-common/src/sys/windows/hostcalls_impl/misc.rs
+++ b/crates/wasi-common/src/sys/windows/hostcalls_impl/misc.rs
@@ -263,18 +263,9 @@ pub(cr... | 1 | 3 | 12 |
1266b68f9aaa454072c0ede353ea5e1f6c3d1236 | Alex Crichton | 2020-01-17T20:11:54 | Use `is_wasm_parameter` in translating wasm calls (#1352)
* Use `is_wasm_parameter` in translating wasm calls
Added in #1329 it's now possible for multiple parameters to be non-wasm
parameters, so the previous `param_types` method is no longer suitable
for acquiring all wasm-related parameters, rather then `FuncE... | diff --git a/cranelift/codegen/src/ir/extfunc.rs b/cranelift/codegen/src/ir/extfunc.rs
index 42030b2e9..9274efe9b 100644
--- a/cranelift/codegen/src/ir/extfunc.rs
+++ b/cranelift/codegen/src/ir/extfunc.rs
@@ -102,24 +102,6 @@ impl Signature {
.count()
> 1
}
-
- /// Collect the normal p... | 4 | 35 | 23 |
e1d513ab4b37f2e31847945addb1f8b8fe372fdb | Andrew Brown | 2020-01-17T20:03:30 | Fix remaining clippy warnings (#1340)
* clippy: allow complex encoding function
* clippy: remove unnecessary main() function in doctest
* clippy: remove redundant `Type` suffix on LaneType enum variants
* clippy: ignore incorrect debug_assert_with_mut_call warning
* clippy: fix FDE clippy warnings | diff --git a/cranelift/codegen/meta/src/cdsl/instructions.rs b/cranelift/codegen/meta/src/cdsl/instructions.rs
index 86ef1e2a8..10c7f54a7 100644
--- a/cranelift/codegen/meta/src/cdsl/instructions.rs
+++ b/cranelift/codegen/meta/src/cdsl/instructions.rs
@@ -1346,7 +1346,7 @@ mod test {
let type1 = TypeSetBuilde... | 8 | 140 | 137 |
919190e0620e5271413599c861983d77190c6b54 | Marcin Mielniczuk | 2020-01-09T20:14:20 | Document the behavior of some rights-related functions.
cf. #770 | diff --git a/crates/wasi-common/src/hostcalls_impl/fs.rs b/crates/wasi-common/src/hostcalls_impl/fs.rs
index 3d2e73243..f4ed12822 100644
--- a/crates/wasi-common/src/hostcalls_impl/fs.rs
+++ b/crates/wasi-common/src/hostcalls_impl/fs.rs
@@ -610,10 +610,8 @@ pub(crate) unsafe fn path_open(
let fd = hostcalls_impl::... | 4 | 17 | 6 |
448faed5ca0e38c3ee5cdbe703b9f89f1e76e8a0 | Alex Crichton | 2020-01-17T18:36:57 | Deny missing documentation in `wasmtime` crate (#836)
* Deny missing documentation in `wasmtime` crate
Everything is largely documented now, so let's be sure to keep it that
way!
* Add windows docs | diff --git a/crates/api/src/lib.rs b/crates/api/src/lib.rs
index 63e41fb57..0858b7e97 100644
--- a/crates/api/src/lib.rs
+++ b/crates/api/src/lib.rs
@@ -6,6 +6,8 @@
//! and there to implement Rust idioms. This crate also defines the actual C API
//! itself for consumption from other languages.
+#![deny(missing_docs... | 6 | 46 | 14 |
f24b0240ae3285313e16f9c262d1d5bdd3352d56 | Jakub Konka | 2020-01-17T15:22:52 | Start tweaking original wig with Pat's suggestion | diff --git a/Cargo.toml b/Cargo.toml
index f1e504929..22ce267e3 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
-name = "wig-new"
+name = "wiggle"
version = "0.1.0"
-authors = ["Jakub Konka <jakub.konka@golem.network>"]
+authors = ["Jakub Konka <kubkonk@jakubkonka.com>"]
edition = "2018"
[depen... | 4 | 282 | 13 |
435fc71d68d4a4365311c1edf0d04c234263f3ed | Aleksey Kuznetsov | 2020-01-17T17:40:56 | Allow 'clif-util run' to read stdin as intended, closes #1004 (#1335) | diff --git a/cranelift/src/run.rs b/cranelift/src/run.rs
index 701104fcf..7825b1852 100644
--- a/cranelift/src/run.rs
+++ b/cranelift/src/run.rs
@@ -10,9 +10,19 @@ use target_lexicon::Triple;
use walkdir::WalkDir;
pub fn run(files: Vec<String>, flag_print: bool) -> Result<(), String> {
+ let stdin_exist = files.... | 1 | 11 | 1 |
0bee67a852bc887c35847b57bc5edc0e39dd9097 | Alex Crichton | 2020-01-17T15:43:35 | Document and update the API of the `externals.rs` module (#812)
* Document and update the API of the `externals.rs` module
This commit ensures that all public methods and items are documented in
the `externals.rs` module, notably all external values that can be
imported and exported in WebAssembly. Along the way ... | diff --git a/crates/api/examples/memory.rs b/crates/api/examples/memory.rs
index a167e6f1a..15fb12728 100644
--- a/crates/api/examples/memory.rs
+++ b/crates/api/examples/memory.rs
@@ -105,9 +105,9 @@ fn main() -> Result<(), Error> {
println!("Checking memory...");
check!(memory.size(), 2u32);
check!(mem... | 10 | 384 | 99 |
64f07933881e11a88721dba49c3a2045715ce4fe | Jakub Konka | 2020-01-17T13:59:51 | Fix incorrect hardcoded path to witx spec | diff --git a/crates/generate/src/lib.rs b/crates/generate/src/lib.rs
index 473136656..17757a987 100644
--- a/crates/generate/src/lib.rs
+++ b/crates/generate/src/lib.rs
@@ -3,8 +3,11 @@ extern crate proc_macro;
use proc_macro::TokenStream;
use proc_macro2::TokenStream as TokenStream2;
+const WITX_PATH: &'static str... | 1 | 3 | 0 |
5b5f9a7b06f4894c692efd85ccdbaa91dfdd896f | Marcin Mielniczuk | 2020-01-17T08:12:12 | Properly return errors. | diff --git a/crates/wasi-common/src/error.rs b/crates/wasi-common/src/error.rs
index c18856d4b..4ce56bbc5 100644
--- a/crates/wasi-common/src/error.rs
+++ b/crates/wasi-common/src/error.rs
@@ -248,15 +248,15 @@ pub(crate) trait FromRawOsError {
pub(crate) type Result<T> = std::result::Result<T, Error>;
-pub(crate)... | 2 | 14 | 17 |
7890fa670547578f549a5e4e5d0f69788bed96cf | Sergei Pepyakin | 2020-01-17T04:23:32 | Use __chkstk for aarch64 instead of __rust_probestack. (#800)
* Use __chkstk for aarch64 instead of __rust_probestack.
* Demote rustdoc to a regular comment to fix the build. | diff --git a/Cargo.lock b/Cargo.lock
index 79da3e985..db69b0726 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2204,6 +2204,7 @@ name = "wasmtime-jit"
version = "0.9.0"
dependencies = [
"anyhow",
+ "cfg-if",
"cranelift-codegen",
"cranelift-entity",
"cranelift-frontend",
diff --git a/crates/jit/Cargo.toml b/crat... | 3 | 32 | 25 |
d81aa203bb1b549d951bfa3a52ccace1ec419131 | Andrew Chin | 2020-01-17T01:55:08 | Disable rustdoc on the wasmtime cli binary (#834)
Currently the wasmtime binary (src/bin/wasmtime) and the wasmtime API
crate (crates/api) share the same output filename. This causes the
output files of the wasmtime binary to clobber the output files of the
wasmtime API crate. So running `cargo doc --all` will o... | diff --git a/Cargo.toml b/Cargo.toml
index 09bdaa1cf..35060e785 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -16,6 +16,11 @@ publish = false
[lib]
doctest = false
+[[bin]]
+name = "wasmtime"
+path = "src/bin/wasmtime.rs"
+doc = false
+
[dependencies]
# Enable all supported architectures by default.
wasmtime = { p... | 1 | 5 | 0 |
e5afdd2edecfd39a0989cf7cda634e242eeb4591 | Alex Crichton | 2020-01-16T23:58:44 | Document the `wasmtime::Instance` APIs (#814)
* Document the `wasmtime::Instance` APIs
This documents oddities like the import list and export list and how to
match them all up. Addtionally this largely just expands all the docs
related to `Instance` to get filled out.
This also moves the `set_signal_handler` ... | diff --git a/crates/api/src/instance.rs b/crates/api/src/instance.rs
index 64f5024df..672b62380 100644
--- a/crates/api/src/instance.rs
+++ b/crates/api/src/instance.rs
@@ -39,18 +39,77 @@ fn instantiate(
Ok(instance)
}
+/// An instantiated WebAssembly module.
+///
+/// This type represents the instantiation of... | 14 | 198 | 90 |
0c99ac3d7e5855b3a2623c6ca028b7f94672a692 | Alex Crichton | 2020-01-16T23:40:44 | Capture a backtrace before calling wasm (#830)
* Capture a backtrace before calling wasm
This helps mitigate the issue, at least locally, described in #829 and
there's some more comments inline in the code as well.
* Run rustfmt
* Move around where the trace happens | diff --git a/crates/runtime/src/signalhandlers.rs b/crates/runtime/src/signalhandlers.rs
index 5beb73776..97f27b9b4 100644
--- a/crates/runtime/src/signalhandlers.rs
+++ b/crates/runtime/src/signalhandlers.rs
@@ -61,6 +61,17 @@ pub extern "C" fn wasmtime_init_eager() {
state.tried = true;
assert!(!state.succe... | 1 | 11 | 0 |
c417d4b5876ea982818dc3f1ab993159bbdf9cb6 | Alex Crichton | 2020-01-16T23:39:52 | Improve trap error messages (#831)
* Improve trap error messages
The new trap error message for the issue #828 looks like:
```
thread 'main' panicked at 'a', /proc/self/fd/11:1:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
Error: failed to run main module `test.wasm`
Cau... | diff --git a/Cargo.lock b/Cargo.lock
index acfc8bf47..79da3e985 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2061,6 +2061,7 @@ dependencies = [
"pretty_env_logger",
"rayon",
"region",
+ "rustc-demangle",
"target-lexicon",
"wasi-common",
"wasmparser 0.47.0",
diff --git a/crates/api/Cargo.toml b/crates/api/Ca... | 6 | 144 | 60 |
5f1c0eb86b79dc950c288bc558a75324394159ba | Jakub Konka | 2020-01-16T22:39:53 | Generate strerror from witx; tweak Display for WasiError (#832)
This commit introduces two small changes:
* it adds `gen_errno_strerror` to `wig` crate which generates a
`strerror` function for `__wasi_errno_t` directly from `*.witx`,
similarly to how it's done in the `wasi` crate
* it tweaks `WasiError` type ... | diff --git a/crates/wasi-common/src/error.rs b/crates/wasi-common/src/error.rs
index bd48fd86b..303b3ed54 100644
--- a/crates/wasi-common/src/error.rs
+++ b/crates/wasi-common/src/error.rs
@@ -8,7 +8,7 @@ use thiserror::Error;
#[derive(Clone, Copy, Debug, Error, Eq, PartialEq)]
#[repr(u16)]
-#[error("{:?}", self)]
... | 5 | 34 | 168 |
5b8be5f262795ebeace10235f2b9aee2a85e297c | Sergei Pepyakin | 2020-01-16T22:37:10 | Move compilation into Module from Instance. (#822)
* Move compilation into Module from Instance.
* Fix fuzzing
* Use wasmtime::Module in fuzzing crates
Instead of wasmtime_jit.
* Compile eagerly.
* Review fixes.
* Always use the saved name.
* Preserve the former behavior for fuzzing oracle | diff --git a/Cargo.lock b/Cargo.lock
index f829cc5bf..acfc8bf47 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2166,7 +2166,6 @@ dependencies = [
"log",
"wasmtime",
"wasmtime-fuzzing",
- "wasmtime-jit",
]
[[package]]
@@ -2181,8 +2180,6 @@ dependencies = [
"wasmparser 0.47.0",
"wasmprinter",
"wasmtime",
- ... | 12 | 378 | 413 |
e474a9e822324b22351ec1221ed61994ea30651b | Jakub Konka | 2020-01-16T20:52:04 | [wasi-common] Log string representation of WASI errno at the trace level (#760)
* Log str repr of WASI errno at trace level
This commit refactors `Error` enum, and adds logging of the WASI
errno string representation at the trace level. Now, when tracing
WASI syscalls, we will be greeted with a nicely formatted e... | diff --git a/crates/wasi-common/src/error.rs b/crates/wasi-common/src/error.rs
index 302d5d76b..bd48fd86b 100644
--- a/crates/wasi-common/src/error.rs
+++ b/crates/wasi-common/src/error.rs
@@ -104,14 +104,11 @@ pub enum Error {
#[cfg(unix)]
#[error("Yanix error: {0}")]
Yanix(#[from] yanix::YanixError),
-... | 23 | 334 | 322 |
e4905c31006eb6aa36e7586cc57c9104d2f9973e | Marcin Mielniczuk | 2020-01-16T18:50:16 | Extra comments | diff --git a/crates/wasi-common/src/sys/windows/hostcalls_impl/misc.rs b/crates/wasi-common/src/sys/windows/hostcalls_impl/misc.rs
index 1403e2f4d..40e6d694e 100644
--- a/crates/wasi-common/src/sys/windows/hostcalls_impl/misc.rs
+++ b/crates/wasi-common/src/sys/windows/hostcalls_impl/misc.rs
@@ -72,7 +72,10 @@ impl Std... | 1 | 6 | 0 |
b2bfb98f1ffbd10209aa2510ce5e5a2dbdafdd25 | Yury Delendik | 2020-01-16T18:36:51 | Provide proper function index and name in the FrameInfo (#824)
* fix function index
* Add function name to JITFunctionTag
* Add ModuleSyncString. | diff --git a/crates/api/src/trap.rs b/crates/api/src/trap.rs
index 0672b661f..fb4cdaf76 100644
--- a/crates/api/src/trap.rs
+++ b/crates/api/src/trap.rs
@@ -42,7 +42,8 @@ impl Trap {
if let Some(info) = wasmtime_runtime::jit_function_registry::find(pc) {
wasm_trace.push(FrameInfo {
... | 8 | 63 | 12 |
caa6897af5634e93f7ee73a7ba53e914fc8ce087 | Marcin Mielniczuk | 2020-01-16T18:24:24 | Finish minimal impl | diff --git a/crates/wasi-common/src/sys/windows/hostcalls_impl/misc.rs b/crates/wasi-common/src/sys/windows/hostcalls_impl/misc.rs
index 5e960d513..16c1a5858 100644
--- a/crates/wasi-common/src/sys/windows/hostcalls_impl/misc.rs
+++ b/crates/wasi-common/src/sys/windows/hostcalls_impl/misc.rs
@@ -187,6 +187,20 @@ fn mak... | 1 | 25 | 8 |
716acf77d1791efaac50287a02b6675bd0cc74d0 | Marcin Mielniczuk | 2020-01-16T17:34:08 | Move to mpsc, drop crossbeam. Simplify | diff --git a/Cargo.lock b/Cargo.lock
index 71ae1c703..f829cc5bf 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -439,29 +439,6 @@ dependencies = [
"wasmparser 0.47.0",
]
-[[package]]
-name = "crossbeam"
-version = "0.7.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "69323bff1fb41c6353... | 3 | 70 | 62 |
3c132d6909bcebb9996da74793721458821dc32f | Marcin Mielniczuk | 2020-01-16T16:54:12 | Improve comments | diff --git a/crates/wasi-common/src/sys/windows/hostcalls_impl/misc.rs b/crates/wasi-common/src/sys/windows/hostcalls_impl/misc.rs
index 0f293fa9e..cdb3e6a35 100644
--- a/crates/wasi-common/src/sys/windows/hostcalls_impl/misc.rs
+++ b/crates/wasi-common/src/sys/windows/hostcalls_impl/misc.rs
@@ -137,11 +137,6 @@ pub(cr... | 1 | 32 | 46 |
5b9272f2a68fd38f49fa188a79cf6e7d42594d7f | Marcin Mielniczuk | 2020-01-16T14:23:08 | fix build | 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 cff4ea56c..34135f59d 100644
--- a/crates/wasi-common/src/sys/unix/hostcalls_impl/misc.rs
+++ b/crates/wasi-common/src/sys/unix/hostcalls_impl/misc.rs
@@ -60,12 +60,6 @@ pub(crate) fn poll_o... | 2 | 0 | 12 |
410777de52e29578fa4a1750a87c4c4be3fa8874 | Marcin Mielniczuk | 2020-01-16T14:09:36 | Handle timeout | diff --git a/crates/wasi-common/src/sys/windows/hostcalls_impl/misc.rs b/crates/wasi-common/src/sys/windows/hostcalls_impl/misc.rs
index d949f982b..cbef97794 100644
--- a/crates/wasi-common/src/sys/windows/hostcalls_impl/misc.rs
+++ b/crates/wasi-common/src/sys/windows/hostcalls_impl/misc.rs
@@ -269,18 +269,11 @@ pub(c... | 1 | 2 | 9 |
33818ea18ece104838ec0a7e73eb52a58d936cd2 | Marcin Mielniczuk | 2020-01-16T13:59:18 | Align with Unix | diff --git a/crates/wasi-common/src/sys/windows/hostcalls_impl/misc.rs b/crates/wasi-common/src/sys/windows/hostcalls_impl/misc.rs
index 0b9a26a60..d949f982b 100644
--- a/crates/wasi-common/src/sys/windows/hostcalls_impl/misc.rs
+++ b/crates/wasi-common/src/sys/windows/hostcalls_impl/misc.rs
@@ -247,10 +247,14 @@ pub(c... | 1 | 7 | 3 |
0be3c2983c1e8c085fd98e9145638acadb91a110 | Alex Crichton | 2020-01-15T22:54:57 | Remove the `Context` type from `wasmtime` (#825)
* Remove the `Context` type from `wasmtime`
This hasn't really ended up being used in all that many places and the
dependencies on it were pretty minimal. This commit removes it in favor
of simplifying its various users a bit and/or leveraging the
`Engine`/`Store`... | diff --git a/crates/api/src/callable.rs b/crates/api/src/callable.rs
index 8425d1d57..732f95898 100644
--- a/crates/api/src/callable.rs
+++ b/crates/api/src/callable.rs
@@ -141,8 +141,7 @@ impl WrappedCallable for WasmtimeFn {
// Get the trampoline to call for this function.
let exec_code_buf = self
... | 6 | 23 | 94 |
e7e08f162df5c184de78f5cbe3e2442f69b7a6e1 | Alex Crichton | 2020-01-15T21:30:17 | Preserve full native stack traces in errors (#823)
* Preserve full native stack traces in errors
This commit builds on #759 by performing a few refactorings:
* The `backtrace` crate is updated to 0.3.42 which incorporates the
Windows-specific stack-walking code, so that's no longer needed.
* A full `backtrac... | diff --git a/Cargo.lock b/Cargo.lock
index 0b60270a4..1f24462c3 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -76,9 +76,9 @@ checksum = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d"
[[package]]
name = "backtrace"
-version = "0.3.40"
+version = "0.3.42"
source = "registry+https://github.com/rust-... | 12 | 89 | 239 |
b8e4354efc53398ecf8f5a64c89ee89d5d57c004 | Dan Gohman | 2020-01-09T18:35:18 | Implement `write_vectored` for `SandboxedTTYWriter`.
Fixes #629. | diff --git a/crates/wasi-common/src/sandboxed_tty_writer.rs b/crates/wasi-common/src/sandboxed_tty_writer.rs
index 2f927d0d2..315292615 100644
--- a/crates/wasi-common/src/sandboxed_tty_writer.rs
+++ b/crates/wasi-common/src/sandboxed_tty_writer.rs
@@ -1,4 +1,4 @@
-use std::io::{Result, Write};
+use std::io::{IoSlice, ... | 1 | 22 | 1 |
4208c7f8a26745e064344bb3bb410a7fe033b648 | Alex Wu | 2020-01-15T04:22:39 | fix build error for using the optional 'wasi-c' feature | diff --git a/src/commands/run.rs b/src/commands/run.rs
index 4426245c7..313e83701 100644
--- a/src/commands/run.rs
+++ b/src/commands/run.rs
@@ -17,8 +17,7 @@ use wasmtime_interface_types::ModuleData;
use wasmtime_wasi::{
create_wasi_instance, old::snapshot_0::create_wasi_instance as create_wasi_instance_snapshot... | 1 | 3 | 3 |
1d504ecf6dc5554f4a9ff364a74f6413488aa0cf | Dan Gohman | 2020-01-14T19:42:22 | Correctly count the number of wasm parameters. (#1337)
* Correctly count the number of wasm parameters.
Following up on #1329, this further replaces `num_normal_params` with a function
which calls `is_wasm_parameter` to correctly count the number of wasm
parameters a function has.
* Move is_wasm_parameter's im... | diff --git a/cranelift/codegen/src/ir/extfunc.rs b/cranelift/codegen/src/ir/extfunc.rs
index ab79bb5ea..42030b2e9 100644
--- a/cranelift/codegen/src/ir/extfunc.rs
+++ b/cranelift/codegen/src/ir/extfunc.rs
@@ -88,16 +88,6 @@ impl Signature {
.count()
}
- /// Count the number of normal parameters i... | 5 | 18 | 18 |
7f997fe7a66de510c41d9582c74ca973241b5d79 | Alex Crichton | 2020-01-14T17:41:03 | Fix CI after merge (#817) | diff --git a/crates/api/tests/invoke_func_via_table.rs b/crates/api/tests/invoke_func_via_table.rs
index c10d696ef..9b64e894d 100644
--- a/crates/api/tests/invoke_func_via_table.rs
+++ b/crates/api/tests/invoke_func_via_table.rs
@@ -16,7 +16,7 @@ fn test_invoke_func_via_table() -> Result<()> {
"#,
)?;
... | 1 | 1 | 1 |
d31242c2e28de49611ef618f3b0444179271652a | Marcin Mielniczuk | 2020-01-14T15:41:05 | Update Cargo.lock | diff --git a/Cargo.lock b/Cargo.lock
index d8b036cd0..a79bb8bb9 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -429,6 +429,29 @@ dependencies = [
"wasmparser 0.45.2",
]
+[[package]]
+name = "crossbeam"
+version = "0.7.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "69323bff1fb41c6353... | 1 | 24 | 0 |
432dbf0e74c4bdf3b7dd9f3ac00ca9a1172c3d75 | Marcin Mielniczuk | 2020-01-14T15:33:35 | More WIP | diff --git a/crates/wasi-common/Cargo.toml b/crates/wasi-common/Cargo.toml
index f9d0f08ec..370e61539 100644
--- a/crates/wasi-common/Cargo.toml
+++ b/crates/wasi-common/Cargo.toml
@@ -22,6 +22,7 @@ filetime = "0.2.7"
lazy_static = "1.4.0"
num = { version = "0.2.0", default-features = false }
wig = { path = "wig" }
... | 2 | 175 | 86 |
0cf12b3f93f0e1518d7f367d899c30bb41c51ad8 | Yury Delendik | 2020-01-14T14:08:41 | Register module signatures (#811) | diff --git a/crates/api/src/instance.rs b/crates/api/src/instance.rs
index 7d1d8c18e..48b080528 100644
--- a/crates/api/src/instance.rs
+++ b/crates/api/src/instance.rs
@@ -9,7 +9,7 @@ use anyhow::{Error, Result};
use std::cell::RefCell;
use std::collections::{HashMap, HashSet};
use std::rc::Rc;
-use wasmtime_jit::{... | 2 | 47 | 6 |
420dcd76fd0d684291901c7a6afeb481481dea7e | Alex Crichton | 2020-01-13T23:50:57 | Don't require `Store` in `Instance` constructor (#810)
* Don't require `Store` in `Instance` constructor
This can be inferred from the `Module` argument. Additionally add a
`store` accessor to an `Instance` in case it's needed to instantiate
another `Module`.
cc #708
* Update more constructors
* Fix a do... | diff --git a/crates/api/examples/gcd.rs b/crates/api/examples/gcd.rs
index c510a176c..43a29fcf0 100644
--- a/crates/api/examples/gcd.rs
+++ b/crates/api/examples/gcd.rs
@@ -50,7 +50,7 @@ fn main() -> anyhow::Result<()> {
.0;
// Instantiate the module.
- let instance = Instance::new(&store, &module, &... | 19 | 56 | 28 |
f592811c9aac88e589eab207a6c63719423ffe01 | Andrew Brown | 2020-01-11T01:02:42 | Update cranelifte and enable more SIMD spec tests (#806)
* Update cranelift to 0.54
* Enable entire SIMD spec test directory and skip failing tests | diff --git a/Cargo.lock b/Cargo.lock
index 01553a79a..d8b036cd0 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -341,18 +341,18 @@ dependencies = [
[[package]]
name = "cranelift-bforest"
-version = "0.53.0"
+version = "0.54.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3b065d5992ea22... | 7 | 47 | 55 |
8bec6fe869550db8dc816f7b19c8703515b7b357 | Dan Gohman | 2020-01-10T23:31:37 | Update to wasmparser 0.47. (#1331)
Co-authored-by: Yury Delendik <ydelendik@mozilla.com> | diff --git a/cranelift/wasm/Cargo.toml b/cranelift/wasm/Cargo.toml
index 1dbebdce7..6521d7157 100644
--- a/cranelift/wasm/Cargo.toml
+++ b/cranelift/wasm/Cargo.toml
@@ -11,7 +11,7 @@ keywords = ["webassembly", "wasm"]
edition = "2018"
[dependencies]
-wasmparser = { version = "0.45.0", default-features = false }
+wa... | 3 | 19 | 7 |
ad2e94fce3b884527465be2988843a7d381cb357 | Alex Crichton | 2020-01-10T22:40:28 | Don't use webidl bindings in custom tests (#801)
It's not necessary and we can go straight to the general `wasmtime`
crate APIs instead. | diff --git a/tests/custom_signal_handler.rs b/tests/custom_signal_handler.rs
index 66a449fb2..8f0e1c83e 100644
--- a/tests/custom_signal_handler.rs
+++ b/tests/custom_signal_handler.rs
@@ -1,9 +1,9 @@
#[cfg(not(target_os = "windows"))]
mod tests {
+ use anyhow::Result;
use std::rc::Rc;
use std::sync::ato... | 1 | 24 | 22 |
3a13f79b663f00d00af05c5fdf0983d3993c478d | Alex Crichton | 2020-01-10T22:32:16 | Try to reduce CI times with a Rust `*.wat` parser (#1332)
This commit moves the cranelift tests and tools from the `wabt` crate on
crates.io (which compiles the wabt C++ codebase) to the `wat` crate on
crates.io which is a Rust parser for the `*.wat` format. This was
motivated by me noticing that release builds on ... | diff --git a/cranelift/Cargo.toml b/cranelift/Cargo.toml
index 23d846ea0..b16b00876 100644
--- a/cranelift/Cargo.toml
+++ b/cranelift/Cargo.toml
@@ -38,7 +38,7 @@ clap = "2.32.0"
serde = "1.0.8"
term = "0.6.1"
capstone = { version = "0.6.0", optional = true }
-wabt = { version = "0.9.1", optional = true }
+wat = { v... | 6 | 24 | 90 |
a45b037bfceffce45e290691b22315bd7f6b1f37 | Alex Crichton | 2020-01-10T22:27:52 | Move around some panics in `wasmtime` (#804)
In preparation for eventual support for wasm interface types this commit
moves around a few panics internally inside of conversions between the
`wasmtime` crate and the underlying jit support crates. This should have
any immediately-visible user changes, but the goal is ... | diff --git a/crates/api/src/externals.rs b/crates/api/src/externals.rs
index 98afc5a69..0062b60b1 100644
--- a/crates/api/src/externals.rs
+++ b/crates/api/src/externals.rs
@@ -163,8 +163,12 @@ impl Func {
store: &Store,
instance_handle: InstanceHandle,
) -> Self {
+ // This is only called... | 6 | 100 | 58 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.