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 |
|---|---|---|---|---|---|---|---|
e31ff9dc67b6ea2cc2611307291e86fbaff548de | Joel Dice | 2022-07-12T23:47:58 | implement wasmtime::component::flags! per #4308 (#4414)
* implement wasmtime::component::flags! per #4308
This is the last macro needed to complete #4308. It supports generating a Rust
type that represents a `flags` component type, analogous to how the [bitflags
crate](https://crates.io/crates/bitflags) operates... | diff --git a/crates/component-macro/src/lib.rs b/crates/component-macro/src/lib.rs
index 878c53f68..e3f290922 100644
--- a/crates/component-macro/src/lib.rs
+++ b/crates/component-macro/src/lib.rs
@@ -2,7 +2,9 @@ use proc_macro2::{Literal, TokenStream, TokenTree};
use quote::{format_ident, quote};
use std::collection... | 5 | 1,043 | 140 |
56831e0a762a64bbf0fd838b9b38370e00c714c7 | Alex Crichton | 2022-07-12T18:41:00 | Update wasmi used for differential fuzzing (#4436)
This fixes a bug recently found on oss-fuzz which was fixed in
paritytech/wasmi#295 and paritytech/wasmi#293. | diff --git a/Cargo.lock b/Cargo.lock
index 70a921656..7b1471bbe 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1742,9 +1742,9 @@ dependencies = [
[[package]]
name = "num-bigint"
-version = "0.2.6"
+version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "090c7f9998ee0ff65aa5b72... | 2 | 12 | 12 |
f242975c49385edafe4f72dfa5f0ff6aae23eda3 | Jamey Sharp | 2022-07-11T20:09:51 | cranelift-frontend: Allow jump table reuse (#4429)
* Allow using jump-tables multiple times (fixes #3347)
If there are multiple `br_table` instructions using the same jump table,
then `append_jump_argument` must not modify the jump table in-place.
When this function is called, we don't know if more `br_table`
... | diff --git a/cranelift/frontend/src/ssa.rs b/cranelift/frontend/src/ssa.rs
index 7017cfc1b..ce0310317 100644
--- a/cranelift/frontend/src/ssa.rs
+++ b/cranelift/frontend/src/ssa.rs
@@ -17,7 +17,9 @@ use cranelift_codegen::entity::SecondaryMap;
use cranelift_codegen::ir::immediates::{Ieee32, Ieee64};
use cranelift_cod... | 2 | 33 | 26 |
1d319c0ec2bcf5a169062eece08f7f78650ce282 | 罗泽轩 | 2022-07-11T14:10:41 | c-api: refactor definitions with macroes (#4416)
Signed-off-by: spacewander <spacewanderlzx@gmail.com> | diff --git a/crates/c-api/src/linker.rs b/crates/c-api/src/linker.rs
index b712e4a9b..d5ad429fd 100644
--- a/crates/c-api/src/linker.rs
+++ b/crates/c-api/src/linker.rs
@@ -12,6 +12,8 @@ pub struct wasmtime_linker_t {
linker: Linker<crate::StoreData>,
}
+wasmtime_c_api_macros::declare_own!(wasmtime_linker_t);
+... | 5 | 10 | 54 |
a8ce7f123b264e48a7e2a65b50d8df45d1c42021 | Andrew Brown | 2022-07-07T22:50:59 | fuzz: add a single instruction module generator (#4409)
* fuzz: add a single instruction module generator
As proposed by @cfallin in #3251, this change adds a way to generate a
Wasm module for a single instruction. It captures the necessary
parameter and result types so that fuzzing can not only choose which
ins... | diff --git a/crates/fuzzing/src/generators.rs b/crates/fuzzing/src/generators.rs
index 9e945d550..c0b9c9caf 100644
--- a/crates/fuzzing/src/generators.rs
+++ b/crates/fuzzing/src/generators.rs
@@ -15,6 +15,7 @@ mod instance_allocation_strategy;
mod instance_limits;
mod memory;
mod module_config;
+mod single_inst_mod... | 2 | 316 | 0 |
b9e63fe77a43abd0ed5bd32e7705a3756fd20cea | Alex Crichton | 2022-07-07T22:20:09 | Update miette dependency to 5.1 (#4412)
Just some dependency gardening, no other external motivation. | diff --git a/Cargo.lock b/Cargo.lock
index 49f8ed068..70a921656 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1664,9 +1664,9 @@ checksum = "71d96e3f3c0b6325d8ccd83c33b28acb183edcb6c67938ba104ec546854b0882"
[[package]]
name = "miette"
-version = "4.7.0"
+version = "5.1.0"
source = "registry+https://github.com/rust-l... | 4 | 7 | 7 |
601e8f30949f34d2ebec6d93c60531fb7e8c7610 | Alex Crichton | 2022-07-07T21:28:25 | Remove dependency on the `region` crate (#4407)
This commit removes Wasmtime's dependency on the `region` crate. The
motivation for this came about when I was updating dependencies and saw
that `region` had a new major version at 3.0.0 as opposed to our
currently used 2.3 track. In reviewing the use cases of `regio... | diff --git a/Cargo.lock b/Cargo.lock
index 98fe9b819..49f8ed068 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -3323,7 +3323,6 @@ dependencies = [
"paste",
"psm",
"rayon",
- "region",
"serde",
"target-lexicon",
"tempfile",
@@ -3568,7 +3567,6 @@ dependencies = [
"ittapi-rs",
"log",
"object",
- "region",
... | 14 | 134 | 121 |
9ae060a12a0799f9679b3052050cf30625731899 | Alex Crichton | 2022-07-07T18:47:39 | Update some dependency versions used by Wasmtime (#4405)
No major motivation here, mostly just dependency gardening. | diff --git a/Cargo.lock b/Cargo.lock
index 9626e0d7b..98fe9b819 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -141,9 +141,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
[[package]]
name = "backtrace"
-version = "0.3.65"
+version = "0.3.66"
source = "registry+https://github.com/rus... | 11 | 18 | 18 |
7000b0a4cff1798b8e2fc5316b1be29b9fee2415 | Nick Fitzgerald | 2022-07-07T00:20:40 | wasmtime: Add criterion micro benchmarks for traps (#4398)
* wasmtime: Rename host->wasm trampolines
As we introduce new types of trampolines, having clear names for our existing
trampolines will be helpful.
* Fix typo in docs for `VMCOMPONENT_MAGIC`
* wasmtime: Add criterion micro benchmarks for traps | diff --git a/Cargo.toml b/Cargo.toml
index 6b3e0a5c5..e1e19a871 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -138,6 +138,10 @@ harness = false
name = "thread_eager_init"
harness = false
+[[bench]]
+name = "trap"
+harness = false
+
[[bench]]
name = "call"
harness = false
diff --git a/benches/trap.rs b/benches/trap... | 4 | 181 | 3 |
f9e5f274e8a195e8485999e67356795e2df4f7dd | Afonso Bordado | 2022-07-06T22:52:59 | cranelift: Disable pinned_reg runtests (#4392)
We've had some ABI issues with pinned reg in runtests.
See #4376 for more info. | diff --git a/cranelift/filetests/src/test_run.rs b/cranelift/filetests/src/test_run.rs
index 4f80050b1..504d3e0f2 100644
--- a/cranelift/filetests/src/test_run.rs
+++ b/cranelift/filetests/src/test_run.rs
@@ -50,6 +50,16 @@ impl SubTest for TestRun {
return Ok(());
}
+ // Disable runtests... | 1 | 10 | 0 |
b9745c05f85dfb3bce34f3c85a391a94dd7728d6 | Alex Crichton | 2022-07-06T20:51:22 | Disable tests for `wasmtime-bench-api` (#4395)
Additionally remove the `rlib` crate type so it's possible to build the
API with LTO options if configured (otherwise Cargo ignores LTO
configuration with an `rlib` output since it would hit an error in
rustc) | diff --git a/crates/bench-api/Cargo.toml b/crates/bench-api/Cargo.toml
index 300c56776..e8d97cf27 100644
--- a/crates/bench-api/Cargo.toml
+++ b/crates/bench-api/Cargo.toml
@@ -11,8 +11,9 @@ publish = false
[lib]
name = "wasmtime_bench_api"
-crate-type = ["rlib", "cdylib"]
-# The rlib is only included here so that ... | 1 | 3 | 2 |
b522171a681485779f144774a6a9b9535b33b6f2 | Alex Crichton | 2022-07-06T16:40:37 | Disable the cranelift-fuzzgen fuzz targets (#4391)
Consulting oss-fuzz it looks like these fuzz targets are crashing 100%
of the time partly due to #3347 I believe. Until that's fixed this hopes
to reclaim the time used on oss-fuzz for other fuzzers to make progress. | diff --git a/fuzz/Cargo.toml b/fuzz/Cargo.toml
index af1cc7cc3..a55a55ae2 100644
--- a/fuzz/Cargo.toml
+++ b/fuzz/Cargo.toml
@@ -85,17 +85,22 @@ path = "fuzz_targets/compile-maybe-invalid.rs"
test = false
doc = false
-[[bin]]
-name = "cranelift-fuzzgen"
-path = "fuzz_targets/cranelift-fuzzgen.rs"
-test = false
-doc... | 1 | 16 | 11 |
e86e62806187866e0f8b2471a3473361f278ee48 | Sam Parker | 2022-07-06T16:40:03 | ValueDataPacked getter and setter for Type (#4390)
Speeds compilation of the spidermonkey benchmark by ~0.5%.
Copyright (c) 2022, Arm Limited. | diff --git a/cranelift/codegen/src/ir/dfg.rs b/cranelift/codegen/src/ir/dfg.rs
index 1cf41dab7..a3dad36cb 100644
--- a/cranelift/codegen/src/ir/dfg.rs
+++ b/cranelift/codegen/src/ir/dfg.rs
@@ -249,7 +249,7 @@ impl DataFlowGraph {
/// Get the type of a value.
pub fn value_type(&self, v: Value) -> Type {
- ... | 1 | 14 | 18 |
00f357c028aa52464837d726cb8b89e426ed64fe | Chris Fallin | 2022-07-05T21:51:02 | Cranelift: support 14-bit Type index with some bitpacking. (#4269)
* Cranelift: make `ir::Type` a `u16`.
* Cranelift: pack ValueData back into 64 bits.
After extending `Type` to a `u16`, `ValueData` became 12 bytes rather
than 8. This packs it back down to 8 bytes (64 bits) by stealing two
bits from the `Type`... | diff --git a/cranelift/codegen/meta/src/cdsl/types.rs b/cranelift/codegen/meta/src/cdsl/types.rs
index 3c8d8927c..12da29829 100644
--- a/cranelift/codegen/meta/src/cdsl/types.rs
+++ b/cranelift/codegen/meta/src/cdsl/types.rs
@@ -71,7 +71,7 @@ impl ValueType {
}
/// Find the unique number associated with thi... | 5 | 184 | 52 |
52ad76ed7c7f737009355e9cc5064b4272947f29 | Alex Crichton | 2022-07-05T21:14:31 | Update differential fuzzing configuration (#4386)
* Update differential fuzzing configuration
This uses some new features of `wasm-smith` and additionally tweaks the
existing fuzz configuration:
* More than one function is now allowed to be generated. There's no
particular reason to limit differential execut... | diff --git a/crates/fuzzing/src/generators.rs b/crates/fuzzing/src/generators.rs
index d338fac37..724251908 100644
--- a/crates/fuzzing/src/generators.rs
+++ b/crates/fuzzing/src/generators.rs
@@ -272,29 +272,38 @@ impl Config {
let config = &mut self.module_config.config;
config.allow_start_export ... | 2 | 31 | 16 |
308a0fcc063bc1da27bb035c76f1425042a89273 | Alex Crichton | 2022-07-05T20:43:37 | Disable reference types in v8 fuzzing (#4387)
OSS-fuzz long-ago discovered https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=45662
which we currently believe to be a bug in v8. I originally thought it
was going to be fixed with https://bugs.chromium.org/p/v8/issues/detail?id=12722
but that no longer appears to ... | diff --git a/fuzz/fuzz_targets/differential_v8.rs b/fuzz/fuzz_targets/differential_v8.rs
index 882ae6628..e4546ea8c 100644
--- a/fuzz/fuzz_targets/differential_v8.rs
+++ b/fuzz/fuzz_targets/differential_v8.rs
@@ -19,7 +19,16 @@ fn run(data: &[u8]) -> Result<()> {
// Enable features that v8 has implemented
con... | 1 | 10 | 1 |
41ba851a95763035f0d60aff0a4604c589c8125b | Alex Crichton | 2022-07-05T19:23:03 | Bump versions of wasm-tools crates (#4380)
* Bump versions of wasm-tools crates
Note that this leaves new features in the component model, outer type
aliases for core wasm types, unimplemented for now.
* Move to crates.io-based versions of tools | diff --git a/Cargo.lock b/Cargo.lock
index 57152c1f0..9626e0d7b 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -3219,18 +3219,18 @@ checksum = "d554b7f530dee5964d9a9468d95c1f8b8acae4f282807e7d27d4b03099a46744"
[[package]]
name = "wasm-encoder"
-version = "0.13.0"
+version = "0.14.0"
source = "registry+https://github.... | 16 | 46 | 38 |
7943d3448361b23b41086755e15afdc33f8e5c58 | Alex Crichton | 2022-07-05T19:21:59 | Update v8 used when fuzzing (#4384)
No particular reason for doing so,just seems good to loosely stay
up-to-date with this dependency. | diff --git a/Cargo.lock b/Cargo.lock
index 4d9ab56f3..57152c1f0 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -3017,9 +3017,9 @@ dependencies = [
[[package]]
name = "v8"
-version = "0.41.0"
+version = "0.44.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a9c3d267007e1f137d79b4da64267... | 2 | 3 | 3 |
371ae80ac38b4dd8087d7d51af2ed52f0ea565b3 | Dan Gohman | 2022-07-05T17:52:48 | Migrate most of wasmtime from lazy_static to once_cell (#4368)
* Update tracing-core to a version which doesn't depend on lazy-static.
* Update crossbeam-utils to a version that doesn't depend on lazy-static.
* Update crossbeam-epoch to a version that doesn't depend on lazy-static.
* Update clap to a version ... | diff --git a/Cargo.lock b/Cargo.lock
index 4717e16e9..2a4fb4ba3 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -404,16 +404,16 @@ dependencies = [
[[package]]
name = "clap"
-version = "3.1.15"
+version = "3.2.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "85a35a599b11c089a7f49105658d... | 25 | 128 | 143 |
5542c4ef268eb62bc8da7e1c351511b4ce9d04d1 | Joel Dice | 2022-07-05T15:36:43 | support enums with more than 256 variants in derive macro (#4370)
* support enums with more than 256 variants in derive macro
This addresses #4361. Technically, we now support up to 2^32 variants, which is
the maximum for the canonical ABI. In practice, though, the derived code for
enums with even just 2^16 var... | diff --git a/Cargo.lock b/Cargo.lock
index 04c2b74f1..4717e16e9 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -450,6 +450,15 @@ dependencies = [
"cc",
]
+[[package]]
+name = "component-macro-test"
+version = "0.1.0"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
[[package]]
name = "console"
version =... | 6 | 190 | 28 |
7320db98d1e31e5f3c0770052cf651c308e7e24e | Ilya Leoshkevich | 2022-07-05T15:27:51 | Add rerun-if-changed to fiber/build.rs (#4377)
Not having rerun-if-changed leads to including nanosecond-precision
mtimes in fingerprints and unnecessary rebuilds in docker [1].
[1] https://github.com/rust-lang/cargo/blob/0.63.1/src/cargo/core/compiler/fingerprint.rs#L1491 | diff --git a/crates/fiber/build.rs b/crates/fiber/build.rs
index 9e7b8b5a3..6bfc5c4b9 100644
--- a/crates/fiber/build.rs
+++ b/crates/fiber/build.rs
@@ -5,13 +5,16 @@ fn main() {
let arch = env::var("CARGO_CFG_TARGET_ARCH").unwrap();
let os = env::var("CARGO_CFG_TARGET_OS").unwrap();
if os == "windows" {... | 1 | 3 | 0 |
a2197ebbeb207f72b0a26b0fedcc81b43486cd99 | Dan Gohman | 2022-07-01T23:00:18 | Do one `add_seals` call, rather than one per flag. (#4366)
When setting up a copy on write image, we add several seals, to prevent
the image from being resized or modified. Set all the seals in a single
call, rather than doing one call per seal. | diff --git a/Cargo.lock b/Cargo.lock
index 61be15734..f3e125def 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1631,11 +1631,11 @@ checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"
[[package]]
name = "memfd"
-version = "0.4.1"
+version = "0.6.1"
source = "registry+https://github.com/rust-... | 3 | 10 | 8 |
64759f04a4bbfeb05f48752fe758454992c3c6c6 | Dan Gohman | 2022-07-01T15:41:02 | Migrate cranelift-jit from `winapi` to `windows-sys` (#4363)
* Migrate cranelift-jit from `winapi` to `windows-sys`
Following up on #4346, this migrates one more place in the tree from
winapi to windows-sys. | diff --git a/Cargo.lock b/Cargo.lock
index f6d8f01c9..61be15734 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -624,7 +624,7 @@ dependencies = [
"memmap2",
"region",
"target-lexicon",
- "winapi",
+ "windows-sys",
]
[[package]]
diff --git a/cranelift/jit/Cargo.toml b/cranelift/jit/Cargo.toml
index 69cb479cc..8936... | 4 | 20 | 10 |
f252ae34ec806ce51d5bc58f35c9f7aa289d7c02 | Joel Dice | 2022-06-30T23:18:28 | support variant, enum, and union derives (#4359)
* support variant, enum, and union derives
This is the second stage of implementing #4308. It adds support for deriving
variant, enum, and union impls for `ComponentType`, `Lift`, and `Lower`. It
also fixes derived record impls for generic `struct`s, which I had ... | diff --git a/crates/component-macro/src/lib.rs b/crates/component-macro/src/lib.rs
index 4e1abe6c0..b956c9e31 100644
--- a/crates/component-macro/src/lib.rs
+++ b/crates/component-macro/src/lib.rs
@@ -1,16 +1,32 @@
use proc_macro2::{Literal, TokenStream, TokenTree};
use quote::{format_ident, quote};
use std::collect... | 4 | 901 | 52 |
95836ba114ec263acb3dec2e8ae3f845060fb5e5 | Ulrich Weigand | 2022-06-30T18:16:59 | s390x: clean up lower.rs (#4355)
Now that lowering is fully done in ISLE, clean up some code remnants
in lower.rs. In particular, move code to lower/isle.rs where
possible, and inline lower_insn_to_regs into its caller and simplify. | diff --git a/cranelift/codegen/src/isa/s390x/lower.rs b/cranelift/codegen/src/isa/s390x/lower.rs
index fd33f8e1f..fe402f83a 100644
--- a/cranelift/codegen/src/isa/s390x/lower.rs
+++ b/cranelift/codegen/src/isa/s390x/lower.rs
@@ -1,329 +1,15 @@
//! Lowering rules for S390x.
-use crate::ir::condcodes::IntCC;
use crat... | 2 | 297 | 331 |
b4830ef1e7601f8ae450799d855cae6e40b895eb | Steven Allen | 2022-06-30T15:13:43 | Wasmtime: disable unwind_info unless needed (#4351)
* Wasmtime: disable unwind_info unless needed
fixes #4350
Otherwise wasm modules will be built with unwind info, even if
backtraces are disabled. This can get expensive in deeply recursive
modules.
* Wasmtime: test that disabling backtraces disables unwind... | diff --git a/crates/wasmtime/src/config.rs b/crates/wasmtime/src/config.rs
index b41ae9396..6cd656402 100644
--- a/crates/wasmtime/src/config.rs
+++ b/crates/wasmtime/src/config.rs
@@ -1423,6 +1423,10 @@ impl Config {
{
bail!("compiler option 'unwind_info' must be enabled when either 'back... | 2 | 32 | 1 |
e179e736b94a6dadc33c09180773c9f9f0985208 | Alex Crichton | 2022-06-29T21:31:17 | Update may_enter flag handling in components (#4354)
This commit updates the management of the `may_enter` flag in line with
WebAssembly/component-model#57. Namely the `may_enter` flag is now
exclusively managed in the `canon lift` function (which is
`TypedFunc::call`) and is only unset after post-return completes
... | diff --git a/crates/wasmtime/src/component/func/host.rs b/crates/wasmtime/src/component/func/host.rs
index 86b7d9f0e..5f073ffc6 100644
--- a/crates/wasmtime/src/component/func/host.rs
+++ b/crates/wasmtime/src/component/func/host.rs
@@ -154,10 +154,6 @@ where
bail!("cannot leave component instance");
}
... | 5 | 248 | 123 |
816e7f7cc75216253ee03c8a866cdc2fa15391ca | Alex Crichton | 2022-06-29T21:30:54 | Change `ComponentType::{size, align}` to constants (#4353)
The more I read over this again the more I think that these should be
constants to explicitly indicate that we're supposed to be able to
optimize for them. Currently I'm predicting that adding memory64 support
will probably double the surface area of each t... | diff --git a/crates/component-macro/src/lib.rs b/crates/component-macro/src/lib.rs
index d319e6df7..4e1abe6c0 100644
--- a/crates/component-macro/src/lib.rs
+++ b/crates/component-macro/src/lib.rs
@@ -192,7 +192,7 @@ impl Expander for LiftExpander {
memory,
&bytes
... | 4 | 138 | 194 |
22fb3ecbbf287a78cb8e449e550b871ae6fef126 | Joel Dice | 2022-06-29T14:38:36 | add ComponentType/Lift/Lower derive macro for record types (#4337)
This is the first stage of implementing
https://github.com/bytecodealliance/wasmtime/issues/4308, i.e. derive macros for
`ComponentType`, `Lift`, and `Lower` for composite types in the component model.
This stage only covers records; I expect the ot... | diff --git a/Cargo.lock b/Cargo.lock
index 4796d80f2..f6d8f01c9 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -3332,6 +3332,7 @@ dependencies = [
"wasi-cap-std-sync",
"wasmparser",
"wasmtime-cache",
+ "wasmtime-component-macro",
"wasmtime-cranelift",
"wasmtime-environ",
"wasmtime-fiber",
@@ -3457,6 +3458,15 @... | 14 | 660 | 46 |
2034c8aa453d7114ef8acbe201bd4acec9117974 | Chris Fallin | 2022-06-28T22:25:47 | Cranelift: add a config option for alias analysis and redundant-load elimination. (#4349)
This allows for experiments as in here [1] and also generally gives an
option to anyone who is concerned that the extra optimization may be
counterproductive or take too much time. The optimization remains
enabled by default.
... | diff --git a/cranelift/codegen/meta/src/shared/settings.rs b/cranelift/codegen/meta/src/shared/settings.rs
index 7f4189541..0f344d25e 100644
--- a/cranelift/codegen/meta/src/shared/settings.rs
+++ b/cranelift/codegen/meta/src/shared/settings.rs
@@ -31,6 +31,16 @@ pub(crate) fn define() -> SettingGroup {
vec!["... | 4 | 13 | 1 |
df1502531d437b2105effb990a7caa28796aa985 | Alex Crichton | 2022-06-28T18:02:41 | Migrate from `winapi` to `windows-sys` (#4346)
* Migrate from `winapi` to `windows-sys`
I believe that Microsoft itself is supporting the development of
`windows-sys` and it's also used by `cap-std` now so this switches
Wasmtime's dependencies on Windows APIs from the `winapi` crate to the
`windows-sys` crate. W... | diff --git a/Cargo.lock b/Cargo.lock
index 88a9fbfbc..4796d80f2 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -3339,7 +3339,7 @@ dependencies = [
"wasmtime-runtime",
"wasmtime-wasi",
"wat",
- "winapi",
+ "windows-sys",
]
[[package]]
@@ -3401,7 +3401,7 @@ dependencies = [
"sha2",
"tempfile",
"toml",
- "win... | 15 | 79 | 68 |
27b94a41736f6ffa1f212c531d3a3a57666d795a | JMS55 | 2022-06-28T17:27:00 | Note that epoch-interrupts are safe against malicious guests (#4343)
* Note that epoch-interrupts are safe against malicious guests
* Remove implementation details from epoch deadline docs | diff --git a/crates/wasmtime/src/config.rs b/crates/wasmtime/src/config.rs
index ed01ec111..b41ae9396 100644
--- a/crates/wasmtime/src/config.rs
+++ b/crates/wasmtime/src/config.rs
@@ -425,6 +425,10 @@ impl Config {
/// signal handler), then we can ensure that all async code will
/// yield to the executor wit... | 1 | 4 | 0 |
baabd40b94fcfa733b942f42b49caace7643bf45 | Alex Crichton | 2022-06-28T17:20:25 | Improve error message for failed function compiles (#4340)
* Improve error message for failed function compiles
Add in the wasm function index, the name if specified, and the function
offset in the original file to assist in debugging failed function compiles.
* Review commments | diff --git a/crates/wasmtime/src/module.rs b/crates/wasmtime/src/module.rs
index 1d23d8b8d..5524ebb73 100644
--- a/crates/wasmtime/src/module.rs
+++ b/crates/wasmtime/src/module.rs
@@ -374,9 +374,21 @@ impl Module {
let functions = functions.into_iter().collect::<Vec<_>>();
let funcs = engine
... | 1 | 12 | 0 |
17ed95ad8cb661d5cd06dcbc448876a3d8f5c6d9 | Alex Crichton | 2022-06-28T16:29:40 | Document immediate-trap behavior of epochs (#4345)
Closes #4342 | diff --git a/crates/wasmtime/src/config.rs b/crates/wasmtime/src/config.rs
index 44fe5a009..ed01ec111 100644
--- a/crates/wasmtime/src/config.rs
+++ b/crates/wasmtime/src/config.rs
@@ -449,9 +449,9 @@ impl Config {
/// not available. This means epoch-based interruption can only
/// serve as a simple external-... | 2 | 11 | 3 |
66b829b1bfaafd04c8f4db2db6ca40ceb5ce20f2 | Alex Crichton | 2022-06-28T15:40:04 | Change how unwind information is stored on Windows (#4314)
* Change how unwind information is stored on Windows
Unwind information on Windows is stored in two separate locations. The
first location is the unwind information itself which corresponds to
`UNWIND_INFO`. The second location is a list of `RUNTIME_INFO`... | diff --git a/crates/cranelift/src/obj.rs b/crates/cranelift/src/obj.rs
index 213123c7b..a10a53844 100644
--- a/crates/cranelift/src/obj.rs
+++ b/crates/cranelift/src/obj.rs
@@ -109,9 +109,7 @@ impl<'a> ModuleTextBuilder<'a> {
});
if let Some(info) = &func.unwind_info {
- self.unwind_info.... | 2 | 79 | 42 |
fc38f39bd20b50342ccfa670a0b90d7cb72451df | Alex Crichton | 2022-06-28T15:23:58 | Expose raw list accessors for all integer types (#4330)
This commit extends the `WasmList<T>` type to have an
`as_slice`-lookalike method (now renamed to `as_le_slice`) for all
integer types rather than just the `u8` type. With the guarantees of the
component model it's known that all lists are aligned in linear me... | diff --git a/crates/wasmtime/src/component/func/typed.rs b/crates/wasmtime/src/component/func/typed.rs
index 36064ba84..221b1bb12 100644
--- a/crates/wasmtime/src/component/func/typed.rs
+++ b/crates/wasmtime/src/component/func/typed.rs
@@ -1378,16 +1378,55 @@ impl<T: Lift> WasmList<T> {
}
}
-impl WasmList<u8> ... | 2 | 215 | 12 |
2efdd5c46b589071767e0a5f880c637d07fff844 | Alex Crichton | 2022-06-28T14:34:31 | Fix compilation of wasmtime-fiber on arm macOS (#4341)
Turns out that `adr` doesn't work in inline assembly within LLVM on
arm macOS, or at least not how we were using it. This switches instead
to an `adrp` and `add` pair which seems to convince the linker that the
relocations should all fit. The same pattern is us... | diff --git a/crates/fiber/src/unix/aarch64.rs b/crates/fiber/src/unix/aarch64.rs
index a0b4201b9..92a3bfcb4 100644
--- a/crates/fiber/src/unix/aarch64.rs
+++ b/crates/fiber/src/unix/aarch64.rs
@@ -20,15 +20,19 @@
cfg_if::cfg_if! {
if #[cfg(target_os = "macos")] {
- macro_rules! cfi_window_save { () => ()... | 1 | 10 | 5 |
5c2c285dd782519a28efad84c9b14d1e6645dd2c | Chris Fallin | 2022-06-27T19:31:06 | Cranelift/x64: fix register allocator metadata for 8-bit divides. (#4332)
`idiv` on x86-64 only reads `rdx`/`edx`/`dx`/`dl` for divides with width
greater than 8 bits; for an 8-bit divide, it reads the whole 16-bit
divisor from `ax`, as our CISC ancestors intended. This PR fixes the
metadata to avoid a regalloc pan... | diff --git a/cranelift/codegen/src/isa/x64/inst/emit.rs b/cranelift/codegen/src/isa/x64/inst/emit.rs
index 42f08cd66..2c610adea 100644
--- a/cranelift/codegen/src/isa/x64/inst/emit.rs
+++ b/cranelift/codegen/src/isa/x64/inst/emit.rs
@@ -385,13 +385,15 @@ pub(crate) fn emit(
dst_remainder,
} => {
... | 3 | 15 | 6 |
c8414cfca8e695524b7b05f638496a0e9e130992 | Alex Crichton | 2022-06-27T19:16:06 | Fix guard size configuration when fuzzing (#4321)
Fuzzers weren't updated to account for #4262 where guard sizes are now
validated rather than automatically sanitized. I'm not sure why oss-fuzz
hasn't filed a bug about this yet because it's definitely crashing a lot
on oss-fuzz... | diff --git a/crates/fuzzing/src/generators.rs b/crates/fuzzing/src/generators.rs
index 19c82b265..d338fac37 100644
--- a/crates/fuzzing/src/generators.rs
+++ b/crates/fuzzing/src/generators.rs
@@ -249,12 +249,18 @@ impl<'a> Arbitrary<'a> for NormalMemoryConfig {
fn arbitrary(u: &mut Unstructured<'a>) -> arbitrary:... | 1 | 8 | 2 |
dc2fe0ac6790d5e7c3eff5da984ecc9722fb2e4d | Alex Crichton | 2022-06-27T18:20:31 | x64: Fix codegen for the `i8x16.swizzle` instruction (#4318)
This commit fixes a mistake in the `Swizzle` opcode implementation in
the x64 backend of Cranelift. Previously an input register was casted to
a writable register and then modified, which I believe instructions are
not supposed to do. This was discovered ... | diff --git a/cranelift/codegen/src/isa/x64/lower.rs b/cranelift/codegen/src/isa/x64/lower.rs
index 3867ddc25..2d51d1595 100644
--- a/cranelift/codegen/src/isa/x64/lower.rs
+++ b/cranelift/codegen/src/isa/x64/lower.rs
@@ -2554,17 +2554,18 @@ fn lower_insn_to_regs<C: LowerCtx<I = Inst>>(
ctx.emit(Inst::xmm_l... | 1 | 4 | 3 |
0ef873f1bd8af3428d672f9c5e82a440994b8dee | Alex Crichton | 2022-06-27T18:20:01 | Fix the documentation build in the component model (#4328)
Currently `cargo doc` fails for a number of broken links and this commit
fixes all of them. Currently I don't think it's worth adding this to CI
because we don't actually generate docs for the component model anywhere
yet. When the component model support i... | diff --git a/crates/wasmtime/src/component/func.rs b/crates/wasmtime/src/component/func.rs
index 1dd152e33..6e4dca586 100644
--- a/crates/wasmtime/src/component/func.rs
+++ b/crates/wasmtime/src/component/func.rs
@@ -127,30 +127,26 @@ impl Func {
///
/// This function will perform a type-check at runtime that... | 5 | 19 | 22 |
77e06213b76fe45d78e94e290270db2b1b5c1ec8 | Alex Crichton | 2022-06-27T17:35:14 | Refactor the internals of traps in `wasmtime_runtime` (#4326)
This commit is a small refactoring of `wasmtime_runtime::Trap` and
various internals. The `Trap` structure is now a reason plus backtrace,
and the old `Trap` enum is mostly in `TrapReason` now. Additionally all
`Trap`-returning methods of `wasmtime_runti... | diff --git a/crates/runtime/src/instance.rs b/crates/runtime/src/instance.rs
index 1ae33e3e9..08f4f4c63 100644
--- a/crates/runtime/src/instance.rs
+++ b/crates/runtime/src/instance.rs
@@ -6,7 +6,6 @@ use crate::export::Export;
use crate::externref::VMExternRefActivationsTable;
use crate::memory::{Memory, RuntimeMemo... | 9 | 81 | 130 |
90876f717dbf0a23894d1e3f566b98c90a9cf685 | Johnnie Birch | 2022-06-27T13:56:16 | Adds VTune profiling strategy to the C-API (#4316)
C-API currently only includes the jitdump strategy intended for use with
perf. This adds the vtune strategy for use with Intel VTune Profiler. | diff --git a/crates/c-api/src/config.rs b/crates/c-api/src/config.rs
index 144504be8..ec7b86a8a 100644
--- a/crates/c-api/src/config.rs
+++ b/crates/c-api/src/config.rs
@@ -35,6 +35,7 @@ pub enum wasmtime_opt_level_t {
pub enum wasmtime_profiling_strategy_t {
WASMTIME_PROFILING_STRATEGY_NONE,
WASMTIME_PROFIL... | 1 | 2 | 0 |
84a43d86a1e95777b7cb6b54f4f6d0040b87188f | Pat Hickey | 2022-06-27T13:55:50 | Add a method to Linker and flag to wasmtime-cli to trap unknown import funcs (#4312)
* Add a method to Linker and flag to wasmtime-cli to trap unknown import funcs
Sometimes users have a Command module which imports functions unknown to
the wasmtime-cli, but does not call them at runtime. This PR provides a
conve... | diff --git a/crates/wasmtime/src/linker.rs b/crates/wasmtime/src/linker.rs
index 2a45b1ca0..fd5230d1f 100644
--- a/crates/wasmtime/src/linker.rs
+++ b/crates/wasmtime/src/linker.rs
@@ -2,8 +2,8 @@ use crate::func::HostFunc;
use crate::instance::InstancePre;
use crate::store::StoreOpaque;
use crate::{
- AsContextM... | 3 | 92 | 3 |
fa36e86f2c45f427e9d8a16f559a2515213ab3d4 | Dan Gohman | 2022-06-23T17:47:15 | Update WASI to cap-std 0.25 and windows-sys. (#4302)
This updates to rustix 0.35.6, and updates wasi-common to use cap-std 0.25 and
windows-sys (instead of winapi).
Changes include:
- Better error code mappings on Windows.
- Fixes undefined references to `utimensat` on Darwin.
- Fixes undefined references ... | diff --git a/Cargo.lock b/Cargo.lock
index f69f4b57e..1ce4e0ce2 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -237,21 +237,21 @@ checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8"
[[package]]
name = "cap-fs-ext"
-version = "0.24.3"
+version = "0.25.0"
source = "registry+https://github.com/... | 27 | 316 | 185 |
445cc87a068143f5e54f4d5837c4287c301a667c | Alex Crichton | 2022-06-23T14:41:03 | Fix a "trampoline missing" panic with components (#4296)
One test case I wrote recently was to import a lowered function into a
wasm module and then immediately export it. This previously didn't work
because trampoline lookup would fail as the original
`VMCallerCheckedAnyfunc` function pointer points into the
`tra... | diff --git a/crates/wasmtime/src/component/component.rs b/crates/wasmtime/src/component/component.rs
index c2f57c769..552854385 100644
--- a/crates/wasmtime/src/component/component.rs
+++ b/crates/wasmtime/src/component/component.rs
@@ -1,6 +1,7 @@
use crate::signatures::SignatureCollection;
use crate::{Engine, Modul... | 7 | 204 | 28 |
6778b4fce20d0a2f2f33fd69d73651849a76cdbe | Alex Crichton | 2022-06-22T20:01:32 | Update comment on stack overflow checking (#4290)
* Update comment on stack overflow checking
This commit moves the top-level comment in `crates/cranelift/src/lib.rs`
into the location where the global value for the stack limit is
generated. Stack overflow checking is pretty localized nowadays so
there's not muc... | diff --git a/crates/cranelift/src/compiler.rs b/crates/cranelift/src/compiler.rs
index 9985d0afd..c78dd3b9c 100644
--- a/crates/cranelift/src/compiler.rs
+++ b/crates/cranelift/src/compiler.rs
@@ -152,19 +152,38 @@ impl wasmtime_environ::Compiler for Compiler {
let mut func_env = FuncEnvironment::new(isa, tr... | 2 | 30 | 52 |
b48b10b2aafa513ef982877a58313522265c4b57 | Sergei Shulepov | 2022-06-22T19:02:47 | Document a caveat regarding `max_wasm_stack` (#4295)
* Document a caveat regarding `max_wasm_stack`
Specifically, that the `max_wasm_stack` only limits the stack that can
be consumed by wasm, but it does not guarantee that the so much stack
space will be available.
* rustfmt
* Fix the claim about reseting t... | diff --git a/crates/wasmtime/src/config.rs b/crates/wasmtime/src/config.rs
index c905ed75b..44fe5a009 100644
--- a/crates/wasmtime/src/config.rs
+++ b/crates/wasmtime/src/config.rs
@@ -494,12 +494,33 @@ impl Config {
/// If a wasm call (or series of nested wasm calls) take more stack space
/// than the `size`... | 1 | 24 | 3 |
2f9d96cd004c3b51033a4cf16c9b24563bcfe6cf | Alex Crichton | 2022-06-21T20:05:14 | Use Cargo's "namespace features" feature (#4293)
Cargo recently added the ability to have an optional dependency without
implicitly introducing a new named feature on a crate. This is triggered
with some new directives in the `[features]` section, specifically:
* The `dep:foo` syntax means that `foo` is activated... | diff --git a/Cargo.toml b/Cargo.toml
index 8315036a9..ec4cb2d9c 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -101,8 +101,8 @@ default = [
]
jitdump = ["wasmtime/jitdump"]
vtune = ["wasmtime/vtune"]
-wasi-crypto = ["wasmtime-wasi-crypto"]
-wasi-nn = ["wasmtime-wasi-nn"]
+wasi-crypto = ["dep:wasmtime-wasi-crypto"]
+was... | 2 | 7 | 7 |
b2e03ae873cce1cfc70736e865e2d88a781316da | Andrew Brown | 2022-06-21T19:55:27 | shared memory: change some assertions to returned errors (#4292)
Previously, @alexcrichton had mentioned that some of these assertions
should be bubbled up as errors. This change re-factors two such
assertions, leaving others in this file as assertions since they
represent code paths that we should avoid internally... | diff --git a/crates/runtime/src/memory.rs b/crates/runtime/src/memory.rs
index 6fb822e15..90a0ae9f4 100644
--- a/crates/runtime/src/memory.rs
+++ b/crates/runtime/src/memory.rs
@@ -470,7 +470,7 @@ impl SharedMemory {
pub fn new(plan: MemoryPlan) -> Result<Self> {
let (minimum_bytes, maximum_bytes) = Memor... | 1 | 11 | 7 |
337c1ca8324f9e8c7453f9bee6415310edba6202 | Trevor Elliott | 2022-06-16T19:27:49 | Use `similar` to diff expected and actual output in filetests (#4282) | diff --git a/Cargo.lock b/Cargo.lock
index ad7a5e326..f69f4b57e 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -561,6 +561,7 @@ dependencies = [
"log",
"memmap2",
"num_cpus",
+ "similar",
"target-lexicon",
"thiserror",
]
@@ -2599,6 +2600,12 @@ dependencies = [
"rand_core 0.6.3",
]
+[[package]]
+name = "sim... | 3 | 13 | 6 |
c7be93753ac9fcdff816eaccad00986a6ac06b27 | Alex Crichton | 2022-06-14T21:23:28 | Enable parallel compilation in the C API by default (#4270)
When parallel compilation was moved behind a compile-time feature in the
`wasmtime` crate we forgot to add the corresponding feature to the C API
which means that the C API hasn't been using parallel compilation since #1903
(oh dear!) | diff --git a/crates/c-api/Cargo.toml b/crates/c-api/Cargo.toml
index de269f348..5a43be661 100644
--- a/crates/c-api/Cargo.toml
+++ b/crates/c-api/Cargo.toml
@@ -32,7 +32,8 @@ wasmtime-wasi = { path = "../wasi", optional = true }
cap-std = { version = "0.24.1", optional = true }
[features]
-default = ['jitdump', 'wa... | 1 | 2 | 1 |
6997b2c4478abff6fc9f08afadd0c14041dc9554 | Harald Hoyer | 2022-06-14T19:48:15 | fix(WasiFile): sock_* methods from snapshot1 to trait (#4108)
So wasitime crate users can implement them.
Signed-off-by: Harald Hoyer <harald@profian.com> | diff --git a/crates/wasi-common/src/file.rs b/crates/wasi-common/src/file.rs
index 0c6c9b2a3..0de79e312 100644
--- a/crates/wasi-common/src/file.rs
+++ b/crates/wasi-common/src/file.rs
@@ -25,6 +25,26 @@ pub trait WasiFile: Send + Sync {
Err(Error::badf())
}
+ async fn sock_recv<'a>(
+ &mut se... | 2 | 106 | 10 |
43d4f0b93b087a3a159863308eacdba12cff180f | Benjamin Bouvier | 2022-06-13T19:04:37 | Serialize `BlockNode`'s cold field too when serializing a `Layout` (#4265)
This fixes a bug when the `cold` field would not be serialized, since
we're using a custom (de)serializer for `Layout`. This is now properly
handled by adding a boolean in the serialized stream.
This was caught during the work on #4155, as... | diff --git a/cranelift/codegen/src/ir/layout.rs b/cranelift/codegen/src/ir/layout.rs
index 47ec6b1fd..80471c300 100644
--- a/cranelift/codegen/src/ir/layout.rs
+++ b/cranelift/codegen/src/ir/layout.rs
@@ -484,6 +484,8 @@ impl Layout {
}
}
+/// A single node in the linked-list of blocks.
+// Whenever you add new... | 1 | 11 | 2 |
0dcda643eab76f4f780893aba74e1f98d8a6a4a1 | Andrew Brown | 2022-06-10T00:53:11 | runtime: vmoffsets must be checked in reverse order (#4253)
When adding shared memory, memories owned by the module were added to a
`owned_memories` array placed immediately after the `defined_memories`
array. When checking the size of each array with `region_sizes`, the
size of `defined_memories` and `owned_memori... | diff --git a/crates/environ/src/vmoffsets.rs b/crates/environ/src/vmoffsets.rs
index cee03503f..347bec97a 100644
--- a/crates/environ/src/vmoffsets.rs
+++ b/crates/environ/src/vmoffsets.rs
@@ -251,8 +251,8 @@ impl<P: PtrSize> VMOffsets<P> {
calculate_sizes! {
defined_anyfuncs: "module functions",
... | 1 | 1 | 1 |
5033f9994b1100d46265014c6243c07cd395789a | Chris Fallin | 2022-06-08T20:48:41 | cranelift-native flags detection: fix flags on SSE2-only systems. (#4231)
In #4224 we saw that an SSE2-only x86-64 system somehow was still
detecting SSE3/SSSE3/SSE4.1/SSE4.2. It turns out that we enabled these
in the baseline `Flags` in #3816, because without that, a ton of other
things break: default flags no ... | diff --git a/cranelift/native/src/lib.rs b/cranelift/native/src/lib.rs
index 62df2c6c9..2bae5206c 100644
--- a/cranelift/native/src/lib.rs
+++ b/cranelift/native/src/lib.rs
@@ -58,6 +58,19 @@ pub fn builder_with_options(infer_native_flags: bool) -> Result<isa::Builder, &'
return Ok(isa_builder);
}... | 1 | 13 | 0 |
088e568f22600fb90b0b30a770d23fd4f61675bd | Alex Crichton | 2022-06-07T22:58:17 | Accept `(tuple)` and `unit` as `()` in Rust (#4241)
This commit updates the implementation of `ComponentType for ()` to
typecheck both the empty tuple type in addition to the `unit` type in
the component model. This allows the usage of `()` when either of those
types are used. Currently this can work because we don... | diff --git a/crates/wasmtime/src/component/func/typed.rs b/crates/wasmtime/src/component/func/typed.rs
index 5842bc262..c25520b3b 100644
--- a/crates/wasmtime/src/component/func/typed.rs
+++ b/crates/wasmtime/src/component/func/typed.rs
@@ -603,74 +603,6 @@ forward_impls! {
(T: Lower) Vec<T> => [T],
}
-unsafe i... | 2 | 35 | 93 |
0b4448a4230f201848ed90657f7b20c903b44695 | Alex Crichton | 2022-06-07T18:34:34 | Validate alignment in the canonical ABI (#4238)
This commit updates the lifting and lowering done by Wasmtime to
validate that alignment is all correct. Previously alignment was ignored
because I wasn't sure how this would all work out.
To be extra safe I haven't actually modified any loads/stores and
they're al... | diff --git a/crates/wasmtime/src/component/func/host.rs b/crates/wasmtime/src/component/func/host.rs
index 82d86b1ac..45bbe3bd6 100644
--- a/crates/wasmtime/src/component/func/host.rs
+++ b/crates/wasmtime/src/component/func/host.rs
@@ -230,12 +230,15 @@ where
fn validate_inbounds<T: ComponentType>(memory: &[u8], ptr:... | 6 | 493 | 77 |
479def00b9e86c50bb55dc8f2edaa3bb40b4660e | Alex Crichton | 2022-06-07T17:51:32 | Update lifting for integers and bools (#4237)
This commit updates lifting for integer types and boolean types to
account for WebAssembly/component-model#35 where extra bits are now
discarded instead of being validated as all zero. | diff --git a/crates/wasmtime/src/component/func/typed.rs b/crates/wasmtime/src/component/func/typed.rs
index 97b337a55..9356f6f65 100644
--- a/crates/wasmtime/src/component/func/typed.rs
+++ b/crates/wasmtime/src/component/func/typed.rs
@@ -712,11 +712,7 @@ macro_rules! integers {
unsafe impl Lift for $primiti... | 2 | 42 | 64 |
11ff9650e599ad656ec3324d26bb2cb2f1cca17d | Alex Crichton | 2022-06-07T17:29:26 | Split the `ComponentValue` trait into... components (#4236)
This commit splits the current `ComponentValue` trait into three
separate traits:
* `ComponentType` - contains size/align/typecheck information in
addition to the "lower" representation.
* `Lift` - only contains `lift` and `load`
* `Lower` - only con... | diff --git a/crates/wasmtime/src/component/func.rs b/crates/wasmtime/src/component/func.rs
index 7d304a623..44cb74e60 100644
--- a/crates/wasmtime/src/component/func.rs
+++ b/crates/wasmtime/src/component/func.rs
@@ -196,8 +196,8 @@ impl Func {
/// ```
pub fn typed<Params, Return, S>(&self, store: S) -> Resul... | 6 | 345 | 419 |
20f510671dbaa1c9c41b51f39f6c517461fc08d3 | Alex Crichton | 2022-06-07T14:39:02 | Enable passing host functions to components (#4219)
* Enable passing host functions to components
This commit implements the ability to pass a host function into a
component. The `wasmtime::component::Linker` type now has a `func_wrap`
method allowing it to take a host function which is exposed internally
to the... | diff --git a/crates/wasmtime/src/component/func.rs b/crates/wasmtime/src/component/func.rs
index 0e5fef2a5..7d304a623 100644
--- a/crates/wasmtime/src/component/func.rs
+++ b/crates/wasmtime/src/component/func.rs
@@ -1,4 +1,4 @@
-use crate::component::instance::InstanceData;
+use crate::component::instance::{Instance, ... | 8 | 726 | 24 |
82f7dd67e07a4957a412a3c38810155254b15e27 | Jamey Sharp | 2022-06-06T15:44:37 | Refactor the ComponentValue impls for tuples (#4217)
These helper functions are also useful for implementing this trait on
user-defined record and tuple types. | diff --git a/crates/wasmtime/src/component/func/typed.rs b/crates/wasmtime/src/component/func/typed.rs
index d2ae25860..c60742ddf 100644
--- a/crates/wasmtime/src/component/func/typed.rs
+++ b/crates/wasmtime/src/component/func/typed.rs
@@ -1433,6 +1433,7 @@ unsafe impl<T: ComponentValue> ComponentValue for WasmList<T>... | 1 | 43 | 26 |
7148882867b55a85a9a38a2de98b4d8e086b954e | Alex Crichton | 2022-06-06T14:13:05 | Rewrite a TODO as a note (#4218)
* Rewrite a TODO as a note
With WebAssembly/component-model#35 this is no longer a TODO
* typo | diff --git a/crates/wasmtime/src/component/func/typed.rs b/crates/wasmtime/src/component/func/typed.rs
index 78df247b8..d2ae25860 100644
--- a/crates/wasmtime/src/component/func/typed.rs
+++ b/crates/wasmtime/src/component/func/typed.rs
@@ -1617,28 +1617,25 @@ where
}
fn lift(store: &StoreOpaque, options: &... | 1 | 17 | 20 |
ae2c84205f0ad1d4865a2de636ed34ffaf0b506c | Chris Fallin | 2022-06-04T00:12:32 | Upgrade to regalloc2 v0.2.2. (#4222)
Pulls in an improvement to spillslot allocation
(bytecodealliance/regalloc2#56). | diff --git a/Cargo.lock b/Cargo.lock
index db66d79c1..57c8c6e2b 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2351,9 +2351,9 @@ dependencies = [
[[package]]
name = "regalloc2"
-version = "0.2.1"
+version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dac38642b54866528dc69ab1... | 2 | 3 | 3 |
2af358dd9c578f3e6707ba1dd08caea945b0be2a | Alex Crichton | 2022-06-03T18:34:50 | Add a `VMComponentContext` type and create it on instantiation (#4215)
* Add a `VMComponentContext` type and create it on instantiation
This commit fills out the `wasmtime-runtime` crate's support for
`VMComponentContext` and creates it as part of the instantiation
process. This moves a few maps that were tempora... | diff --git a/crates/environ/src/component/info.rs b/crates/environ/src/component/info.rs
index c3e3a6ef1..c930ac8d7 100644
--- a/crates/environ/src/component/info.rs
+++ b/crates/environ/src/component/info.rs
@@ -154,11 +154,21 @@ pub enum Initializer {
/// previously created module instance, and stored into the
... | 9 | 537 | 48 |
4c1339a8fa90b8805d80bd881684f18e1c324aa3 | Alex Crichton | 2022-06-03T17:37:59 | Refactor lifting/lowering to not require a `Func` (#4216)
When lifting and lowering for component host imports there won't be a
`Func` available to represent the options and such for the lowering.
That means that the current construction of the `ComponentValue` trait
won't be sufficient for host imports. This commi... | diff --git a/crates/wasmtime/src/component/func.rs b/crates/wasmtime/src/component/func.rs
index e33bb0863..91b3c8355 100644
--- a/crates/wasmtime/src/component/func.rs
+++ b/crates/wasmtime/src/component/func.rs
@@ -1,16 +1,69 @@
use crate::component::instance::InstanceData;
use crate::store::{StoreOpaque, Stored};
... | 5 | 400 | 303 |
3ed6fae7b3e6e2e80c7e89c5a4791d9cb0a0a9f1 | Alex Crichton | 2022-06-03T15:01:42 | Add trampoline compilation support for lowered imports (#4206)
* Add trampoline compilation support for lowered imports
This commit adds support to the component model implementation for
compiling trampolines suitable for calling host imports. Currently this
is purely just the compilation side of things, modifyin... | diff --git a/crates/cranelift/Cargo.toml b/crates/cranelift/Cargo.toml
index 66e8de85b..5807b4a6c 100644
--- a/crates/cranelift/Cargo.toml
+++ b/crates/cranelift/Cargo.toml
@@ -28,3 +28,4 @@ thiserror = "1.0.4"
[features]
all-arch = ["cranelift-codegen/all-arch"]
+component-model = ["wasmtime-environ/component-mode... | 17 | 748 | 58 |
44d1dee76e15f096da96c24d2a1a754a7fd8643f | Chris Fallin | 2022-06-02T20:34:10 | Fix failing cranelift-object tests: make panic message match more generic. (#4211)
Rust 1.61 changed the way `Debug` output looks for strings with null
bytes in them, which broke some expected-panic error message matches.
This makes the expectations more generic while still capturing the
important part ("has a null... | diff --git a/cranelift/object/tests/basic.rs b/cranelift/object/tests/basic.rs
index cf5eca527..9ed9c351a 100644
--- a/cranelift/object/tests/basic.rs
+++ b/cranelift/object/tests/basic.rs
@@ -199,9 +199,7 @@ fn libcall_function() {
}
#[test]
-#[should_panic(
- expected = "Result::unwrap()` on an `Err` value: Ba... | 1 | 2 | 6 |
9f5f978baaa487803bb4e85fc2990b38fc7b3bf9 | Alex Crichton | 2022-06-02T18:39:38 | Fix double-counting imports in `VMOffsets` calculations (#4209)
* Fix double-counting imports in `VMOffsets` calculations
This fixes an oversight in the initial creation of `VMOffsets` for a
module to avoid double-counting imported globals, tables, and memories
for calculating the size of the `VMContext`. Prior t... | diff --git a/crates/environ/src/vmoffsets.rs b/crates/environ/src/vmoffsets.rs
index f6f67cab9..9c0b97e80 100644
--- a/crates/environ/src/vmoffsets.rs
+++ b/crates/environ/src/vmoffsets.rs
@@ -62,8 +62,6 @@ pub struct VMOffsets<P> {
pub num_imported_memories: u32,
/// The number of imported globals in the mod... | 3 | 11 | 18 |
f638b390b6b88e9b48f5cf9c5942d14fb2153fa5 | Alex Crichton | 2022-06-01T20:39:53 | Refactor some internals of wasmtime-cranelift (#4202)
* Split `wasm_to_host_trampoline` into pieces
In the upcoming component model supoprt for imports my plan is to reuse
some of these pieces but not the entirety of the current
`wasm_to_host_trampoline`. In an effort to make that diff smaller this
commit splits... | diff --git a/crates/cranelift/src/compiler.rs b/crates/cranelift/src/compiler.rs
index 0ab260d94..1afbc25e8 100644
--- a/crates/cranelift/src/compiler.rs
+++ b/crates/cranelift/src/compiler.rs
@@ -1,13 +1,13 @@
use crate::builder::LinkOptions;
-use crate::debug::ModuleMemoryOffset;
+use crate::debug::{DwarfSectionRelo... | 3 | 358 | 341 |
704db02e00731106958087552d4710b553eb90a2 | Alex Crichton | 2022-06-01T19:46:21 | Add a first-class `StoreId` type to Wasmtime (#4204)
* Add a first-class `StoreId` type to Wasmtime
This commit adds a `StoreId` type to uniquely identify a store
internally within Wasmtime. This hasn't been created previously as it
was never really needed but I've run across a case for its usage in the
componen... | diff --git a/crates/wasmtime/src/store/data.rs b/crates/wasmtime/src/store/data.rs
index 896b67ede..f65c3a270 100644
--- a/crates/wasmtime/src/store/data.rs
+++ b/crates/wasmtime/src/store/data.rs
@@ -4,7 +4,7 @@ use std::fmt;
use std::marker;
use std::num::NonZeroU64;
use std::ops::{Index, IndexMut};
-use std::sync... | 1 | 67 | 30 |
2a4851ad2b5d77fce41597776157270187fae258 | Alex Crichton | 2022-06-01T16:00:43 | Change some `VMContext` pointers to `()` pointers (#4190)
* Change some `VMContext` pointers to `()` pointers
This commit is motivated by my work on the component model
implementation for imported functions. Currently all context pointers in
wasm are `*mut VMContext` but with the component model my plan is to
ma... | diff --git a/crates/environ/src/vmoffsets.rs b/crates/environ/src/vmoffsets.rs
index 36ff9c6c7..f6f67cab9 100644
--- a/crates/environ/src/vmoffsets.rs
+++ b/crates/environ/src/vmoffsets.rs
@@ -4,6 +4,7 @@
// Currently the `VMContext` allocation by field looks like this:
//
// struct VMContext {
+// magic: u32,
... | 9 | 155 | 38 |
4d9e10dae109ccac4af5690685126e16ee850605 | Alex Crichton | 2022-05-31T15:39:11 | Fix panics in the C API related to trap frames (#4196)
The `wasmtime-cpp` test suite uncovered an issue where asking for the
frames of a trap would fail immediately after the trap was created. In
addition to fixing this issue I've also updated the documentation of
`Trap::frames` to indicate when it returns `None`. | diff --git a/crates/c-api/src/trap.rs b/crates/c-api/src/trap.rs
index 213bb9740..6f60709fe 100644
--- a/crates/c-api/src/trap.rs
+++ b/crates/c-api/src/trap.rs
@@ -64,13 +64,7 @@ pub extern "C" fn wasm_trap_message(trap: &wasm_trap_t, out: &mut wasm_message_t
#[no_mangle]
pub extern "C" fn wasm_trap_origin(raw: &w... | 3 | 10 | 13 |
7d3639522ecc7795080f1f4a2933d35d1bc6aa2f | Alex Crichton | 2022-05-31T14:56:56 | Capture unresolved backtraces on traps (#4193)
I was running tests recently and was surprised that the `--test all`
test was taking more than a minute to run when I didn't recall it ever
taking more than a minute historically. A bisection pointed out #4183 as
the cause and after re-reviewing I realized I forgot tha... | diff --git a/crates/runtime/src/traphandlers.rs b/crates/runtime/src/traphandlers.rs
index caf1553f0..053d1261f 100644
--- a/crates/runtime/src/traphandlers.rs
+++ b/crates/runtime/src/traphandlers.rs
@@ -273,7 +273,7 @@ impl CallThreadState {
fn unwind_with(&self, reason: UnwindReason) -> ! {
let backt... | 1 | 2 | 2 |
a02a60952839d1eb7a8cbb5e02afa3a6f65148e7 | Alex Crichton | 2022-05-25T00:14:29 | Make `ValRaw` fields private (#4186)
* Make `ValRaw` fields private
Force accessing to go through constructors and accessors to localize the
knowledge about little-endian-ness. This is spawned since I made a
mistake in #4039 about endianness.
* Fix some tests
* Component model changes | diff --git a/benches/call.rs b/benches/call.rs
index e04aa16bf..22ba12650 100644
--- a/benches/call.rs
+++ b/benches/call.rs
@@ -160,7 +160,7 @@ fn bench_host_to_wasm<Params, Results>(
let untyped = instance.get_func(&mut *store, name).unwrap();
let params = typed_params.to_vals();
let result... | 7 | 187 | 93 |
3a7910ecb0df355ce4fc86a9e9b32c15a8688ceb | Benjamin Bouvier | 2022-05-24T09:03:01 | Reuse Cranelift codegen contexts across wasmtime compilations (#4181) | diff --git a/crates/cranelift/src/compiler.rs b/crates/cranelift/src/compiler.rs
index 8fc651e41..fbe9c0168 100644
--- a/crates/cranelift/src/compiler.rs
+++ b/crates/cranelift/src/compiler.rs
@@ -32,10 +32,24 @@ use wasmtime_environ::{
TrapCode, TrapEncodingBuilder, TrapInformation, Tunables, VMOffsets,
};
+st... | 1 | 62 | 20 |
6e828df63244e04657a0967ab51f2eabf1a7de67 | Benjamin Bouvier | 2022-05-23T16:27:28 | Remove unused `SourceLoc` in many `Mach` data structures (#4180)
* Remove unused srcloc in MachReloc
* Remove unused srcloc in MachTrap
* Use `into_iter` on array in bench code to suppress a warning
* Remove unused srcloc in MachCallSite | diff --git a/benches/instantiation.rs b/benches/instantiation.rs
index aad299cb3..356dbeb5a 100644
--- a/benches/instantiation.rs
+++ b/benches/instantiation.rs
@@ -200,7 +200,7 @@ fn bench_instantiation(c: &mut Criterion) {
}
fn strategies() -> impl Iterator<Item = InstanceAllocationStrategy> {
- std::array::In... | 11 | 82 | 222 |
985ed07c3f66f8c4f26f4b92cd3c41b2cea0142c | Alex Crichton | 2022-05-20T17:06:11 | Improve documentation around `ResourceLimiter` (#4173)
* Improve documentation around `ResourceLimiter`
This commit takes a pass through the `Store::limiter` method and related
types/traits to improve the documentation with an example and soup up
any recent developments in the documentation.
Closes #4138
* ... | diff --git a/crates/wasmtime/src/limits.rs b/crates/wasmtime/src/limits.rs
index 687f01371..de0e1ffac 100644
--- a/crates/wasmtime/src/limits.rs
+++ b/crates/wasmtime/src/limits.rs
@@ -7,8 +7,26 @@ pub const DEFAULT_MEMORY_LIMIT: usize = 10000;
/// Used by hosts to limit resource consumption of instances.
///
-/// ... | 2 | 127 | 30 |
6cf4c95585433383053a1bd10f7540c9897b326c | Alex Crichton | 2022-05-20T14:57:56 | Ensure `simd` is enabled for spectest fuzzing (#4172)
This is required now that the simd specification has been merged into
the upstream specification, so to run the spec tests this must always be
enabled instead of being left to the whims of the fuzzer about whether
to enable it or not. | diff --git a/crates/fuzzing/src/generators.rs b/crates/fuzzing/src/generators.rs
index 71cc53b1e..00f386d5d 100644
--- a/crates/fuzzing/src/generators.rs
+++ b/crates/fuzzing/src/generators.rs
@@ -346,6 +346,7 @@ impl Config {
config.bulk_memory_enabled = true;
config.reference_types_enabled = true;
... | 1 | 1 | 0 |
0a0c232a14e651f1457ced0ad0c950771de2f3c3 | Alex Crichton | 2022-05-19T15:44:45 | Fix CI for Rust 1.61.0 (#4164)
A new version of rustc was released this morning and we have a few small
breakages on our CI which need fixing:
* A new warning was coming out of the c-api crate about an unneeded
`unsafe` block.
* The panic message of a task in `cranelift-object` needed updating
since the sta... | diff --git a/cranelift/object/tests/basic.rs b/cranelift/object/tests/basic.rs
index 508947b2e..cf5eca527 100644
--- a/cranelift/object/tests/basic.rs
+++ b/cranelift/object/tests/basic.rs
@@ -200,7 +200,7 @@ fn libcall_function() {
#[test]
#[should_panic(
- expected = "Result::unwrap()` on an `Err` value: Backe... | 2 | 3 | 3 |
411f3d60f38859716d820bee0a2180684ee7396a | Alex Crichton | 2022-05-18T20:30:41 | Tweak CLI fallback to the `run` command (#4161)
I ran across a case in Wasmtime today where a poor error message came
out of the CLI. For example before this commit you would get:
$ cargo run wast --wasm-features component-model foo.wast
error: Invalid value "wast" for '<MODULE>': module name cannot be th... | diff --git a/src/bin/wasmtime.rs b/src/bin/wasmtime.rs
index c65245c74..f4b908ef0 100644
--- a/src/bin/wasmtime.rs
+++ b/src/bin/wasmtime.rs
@@ -59,11 +59,10 @@ impl Wasmtime {
fn main() -> Result<()> {
Wasmtime::try_parse()
.unwrap_or_else(|e| match e.kind() {
- ErrorKind::DisplayHelp
- ... | 1 | 4 | 5 |
f19d8cc8510535b03eb92e6eb9a643bd47f5314e | Jonathan Coates | 2022-05-16T12:28:23 | Run a callback when the interruption epoch is reached (#4152)
* Run a callback when the interruption epoch is reached
Adds Store::epoch_deadline_callback. This accepts a callback which, when
invoked, can mutate the store's contents. The callback can either return
an error (in which case we trap) or return a delta... | diff --git a/crates/wasmtime/src/config.rs b/crates/wasmtime/src/config.rs
index a4015eacd..9c1ed87ca 100644
--- a/crates/wasmtime/src/config.rs
+++ b/crates/wasmtime/src/config.rs
@@ -360,23 +360,27 @@ impl Config {
///
/// The [`Store`](crate::Store) tracks the deadline, and controls
/// what happens w... | 3 | 155 | 50 |
2e14a0ecc58f691837ae979ba7bf5f154547415a | Chris Fallin | 2022-05-12T19:55:00 | ISLE: provide locations in errors in basic non-miette mode. (#4151)
In #4143 we made ISLE compilation part of the normal build flow again,
to avoid the issues with the checked-in source. To make this acceptably
fast, we cut down dependencies of the ISLE compiler, so the "fancy"
error printing is now optional. When ... | diff --git a/cranelift/isle/isle/src/error.rs b/cranelift/isle/isle/src/error.rs
index 89c0ae434..39b6adcf8 100644
--- a/cranelift/isle/isle/src/error.rs
+++ b/cranelift/isle/isle/src/error.rs
@@ -2,6 +2,8 @@
use std::sync::Arc;
+use crate::lexer::Pos;
+
/// Either `Ok(T)` or `Err(isle::Error)`.
pub type Result<... | 5 | 49 | 10 |
c4eab2beb6cad47c8e814b6859e3f2cafa21b3ed | bjorn3 | 2022-05-12T18:49:20 | Avoid spurious build script runs (#4150)
* Don't attempt to track the generated clif.isle in cargo
This causes the build script to rerun every time for me.
* Put build script debug messages on stderr instead of stdout
This keeps stdout reserved for cargo build script directives | diff --git a/cranelift/codegen/build.rs b/cranelift/codegen/build.rs
index db9c2447c..701194611 100644
--- a/cranelift/codegen/build.rs
+++ b/cranelift/codegen/build.rs
@@ -166,6 +166,7 @@ struct IsleCompilations {
struct IsleCompilation {
output: std::path::PathBuf,
inputs: Vec<std::path::PathBuf>,
+ unt... | 2 | 13 | 7 |
9538336f829fadf64ec985b9ec4259ff6f3c6983 | bjorn3 | 2022-05-12T17:02:23 | Use HashMaps instead of BTreeMaps in isle where possible (#4147)
The HashMap implementation is significantly simpler than the BTreeMap
implementation. Because of this switching reduces compilation time of
cranelift-isle by about 10%.
# Before
$ hyperfine --prepare "cargo clean" "cargo build"
Benchmark 1: cargo ... | diff --git a/cranelift/isle/isle/src/codegen.rs b/cranelift/isle/isle/src/codegen.rs
index c157b1dd1..c94c0e97c 100644
--- a/cranelift/isle/isle/src/codegen.rs
+++ b/cranelift/isle/isle/src/codegen.rs
@@ -5,7 +5,8 @@ use crate::log;
use crate::sema::ExternalSig;
use crate::sema::{TermEnv, TermId, Type, TypeEnv, TypeI... | 4 | 94 | 19 |
7c5a56b8365817dfdb6724e7fa89541a139506da | Chris Fallin | 2022-05-11T18:10:02 | Cranelift: division/remainder CLIF ops are scalar-only. (#4141)
In #4104 we discussed whether it makes sense for the division and
remainder ops to support vector types. We concluded that because most
hardware doesn't support it directly, it probably is not ideal to force
all backends to polyfill it. In the future w... | diff --git a/cranelift/codegen/meta/src/shared/instructions.rs b/cranelift/codegen/meta/src/shared/instructions.rs
index c563e2908..901c48748 100644
--- a/cranelift/codegen/meta/src/shared/instructions.rs
+++ b/cranelift/codegen/meta/src/shared/instructions.rs
@@ -1913,68 +1913,77 @@ pub(crate) fn define(
.ope... | 1 | 64 | 55 |
52524d258c776174d4a813ceea2da9579f15cf83 | Saúl Cabrera | 2022-05-10T15:27:30 | Expose `TrapCode::Interrupt` on epoch based interruption (#4105) | diff --git a/crates/cranelift/src/func_environ.rs b/crates/cranelift/src/func_environ.rs
index da763a580..d30917294 100644
--- a/crates/cranelift/src/func_environ.rs
+++ b/crates/cranelift/src/func_environ.rs
@@ -593,7 +593,7 @@ impl<'module_environment> FuncEnvironment<'module_environment> {
// The reason is ... | 5 | 16 | 20 |
71fc16bbebc0801932d2651b964523900e0830b9 | Benjamin Bouvier | 2022-05-10T10:02:52 | Narrow `allow(dead_code)` declarations (#4116)
* Narrow `allow(dead_code)` declarations
Having module wide `allow(dead_code)` may hide some code that's really
dead. In this commit I just narrowed the declarations to the specific
enum variants that were not used (as it seems reasonable to keep them
and their hand... | diff --git a/cranelift/codegen/src/isa/aarch64/inst/args.rs b/cranelift/codegen/src/isa/aarch64/inst/args.rs
index 69f20f504..6bb97c945 100644
--- a/cranelift/codegen/src/isa/aarch64/inst/args.rs
+++ b/cranelift/codegen/src/isa/aarch64/inst/args.rs
@@ -1,8 +1,5 @@
//! AArch64 ISA definitions: instruction arguments.
... | 10 | 53 | 198 |
8bd507db652cff5e89a828045a638969b79dc17f | Benjamin Bouvier | 2022-05-09T17:22:34 | Partially rewrite the constant-phi-nodes pass to make it more idiomatic (#4111)
* Add [must_use] to the timer functions
And remove unused vcode_post_ra function
* Make remove-constant-phis code more idiomatic | diff --git a/cranelift/codegen/src/remove_constant_phis.rs b/cranelift/codegen/src/remove_constant_phis.rs
index 234d89c26..bff86832a 100644
--- a/cranelift/codegen/src/remove_constant_phis.rs
+++ b/cranelift/codegen/src/remove_constant_phis.rs
@@ -65,18 +65,20 @@ use std::vec::Vec;
// reducing the isel/regalloc cost ... | 2 | 60 | 52 |
4e6f3ea899efd6bbe8e77235fcba69b73257d23c | Conrad Watt | 2022-05-09T16:09:42 | bump spec interpreter commit to address performance issues (#4113) | diff --git a/crates/fuzzing/wasm-spec-interpreter/build.rs b/crates/fuzzing/wasm-spec-interpreter/build.rs
index 472ec0165..f98781cd2 100644
--- a/crates/fuzzing/wasm-spec-interpreter/build.rs
+++ b/crates/fuzzing/wasm-spec-interpreter/build.rs
@@ -12,7 +12,7 @@ const OCAML_DIR: &'static str = "ocaml";
const SPEC_DIR:... | 1 | 1 | 1 |
ccf834b4733b4f95cc7845106bcfe282845de7d6 | Alex Crichton | 2022-05-09T16:04:56 | Fix an issue where massive memory images are created (#4112)
This commit fixes an issue introduced in #4046 where the checks for
ensuring that the memory initialization image for a module was
constrained in its size failed to trigger and a very small module could
produce an arbitrarily large memory image.
The bu... | diff --git a/crates/environ/src/module.rs b/crates/environ/src/module.rs
index 50cf0214b..36dd99b9e 100644
--- a/crates/environ/src/module.rs
+++ b/crates/environ/src/module.rs
@@ -252,10 +252,12 @@ impl ModuleTranslation<'_> {
};
let info = &mut info[memory];
let data... | 2 | 64 | 4 |
92ee4c415ecf20892f5cdd2568b6f434da6b5d78 | Alex Crichton | 2022-05-05T17:11:44 | Remove `wasmtime-cli-flags` from public crates list (#4097)
We won't be promising that this crate has API-compatible patch releases
and this also fixes the execution of the release process since the bump
of version numbers failed due to this being in this list. | diff --git a/scripts/publish.rs b/scripts/publish.rs
index 3637fc95b..30d402b36 100644
--- a/scripts/publish.rs
+++ b/scripts/publish.rs
@@ -77,7 +77,6 @@ const PUBLIC_CRATES: &[&str] = &[
"wasmtime-wasi",
"wasmtime-wasi-nn",
"wasmtime-wasi-crypto",
- "wasmtime-cli-flags",
"wasmtime-cli",
//... | 1 | 0 | 1 |
e1f7b50a1278db9208aac113bf4fec15b51d6f65 | Ulrich Weigand | 2022-05-05T16:26:19 | Add ISA flag detection for s390x (#4101)
Adds support for s390x to check_compatible_with_isa_flag,
which fixes running the test suite on z15 and later. | diff --git a/crates/wasmtime/src/engine.rs b/crates/wasmtime/src/engine.rs
index dc6bf416a..c81ae6e67 100644
--- a/crates/wasmtime/src/engine.rs
+++ b/crates/wasmtime/src/engine.rs
@@ -390,7 +390,8 @@ impl Engine {
}
}
- let enabled;
+ #[allow(unused_assignments)]
+ let mut ... | 1 | 20 | 6 |
7fdc6163681e4ceb287a06582b338e66863ef734 | Alex Crichton | 2022-05-05T14:44:48 | Remove the `Paged` memory initialization variant (#4046)
* Remove the `Paged` memory initialization variant
This commit simplifies the `MemoryInitialization` enum by removing the
`Paged` variant. The `Paged` variant was originally added for uffd, but
that support has now been removed in #4040. This is no longer n... | diff --git a/crates/environ/src/module.rs b/crates/environ/src/module.rs
index 160e2016b..50cf0214b 100644
--- a/crates/environ/src/module.rs
+++ b/crates/environ/src/module.rs
@@ -144,43 +144,12 @@ pub enum MemoryInitialization {
/// This is the default memory initialization type.
Segmented(Vec<MemoryInitial... | 3 | 150 | 239 |
3dbdcfa220df1406b3627772194eff859104e17a | Andrew Brown | 2022-04-29T15:12:38 | runtime: refactor `Memory` to always use `Box<dyn RuntimeLinearMemory>` (#4086)
While working with the runtime `Memory` object, it became clear that
some refactoring was needed. In order to implement shared memory from
the threads proposal, we must be able to atomically change the memory
size. Previously, the split... | diff --git a/crates/runtime/src/instance/allocator/pooling.rs b/crates/runtime/src/instance/allocator/pooling.rs
index bb7ab1938..136a17da9 100644
--- a/crates/runtime/src/instance/allocator/pooling.rs
+++ b/crates/runtime/src/instance/allocator/pooling.rs
@@ -445,34 +445,25 @@ impl InstancePool {
instance_ind... | 3 | 176 | 168 |
871a9d93f24cfc50c42b5b832cda84be387626b3 | Alex Crichton | 2022-04-28T16:12:58 | Update some dependencies in `Cargo.lock` (#4081)
* Run a `cargo update` over our dependencies
This'll notably fix a `cargo audit` error where we have a pinned version
of the `regex` crate which has a CVE assigned to it.
* Update to `object` and `hashbrown` crates
Prune some duplicate versions showing up from... | diff --git a/Cargo.lock b/Cargo.lock
index 0c7c3228a..3ce97176e 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -54,9 +54,14 @@ dependencies = [
[[package]]
name = "ahash"
-version = "0.4.7"
+version = "0.7.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "739f4a8db6605981345c5654f3a85b0... | 11 | 174 | 158 |
321124ad21e40927934c2bee34293019aeca8035 | Dan Gohman | 2022-04-19T23:27:56 | Update to rustix 0.33.7. (#4052)
This pulls in the fix for bytecodealliance/rustix#285, which fixes a
failure in the WASI `time` APIs on powerpc64. | diff --git a/Cargo.lock b/Cargo.lock
index 39d3f1188..0c7c3228a 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2417,9 +2417,9 @@ dependencies = [
[[package]]
name = "rustix"
-version = "0.33.6"
+version = "0.33.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7ac32d9fc97153ca55305284c... | 10 | 11 | 11 |
90791a0e327db2e772661fa066e7d62e0133be8d | Alex Crichton | 2022-04-19T20:13:47 | Reduce contention on the global module rwlock (#4041)
* Reduce contention on the global module rwlock
This commit intendes to close #4025 by reducing contention on the global
rwlock Wasmtime has for module information during instantiation and
dropping a store. Currently registration of a module into this global
... | diff --git a/crates/jit/src/instantiate.rs b/crates/jit/src/instantiate.rs
index 164e06760..aafe62361 100644
--- a/crates/jit/src/instantiate.rs
+++ b/crates/jit/src/instantiate.rs
@@ -398,7 +398,7 @@ impl CompiledModule {
info: Option<CompiledModuleInfo>,
profiler: &dyn ProfilingAgent,
id_al... | 7 | 134 | 158 |
3394c2bb91e2f0fe9e7a193d311218f4f13bcf3c | Alex Crichton | 2022-04-19T19:23:36 | Reduce clones of `Arc<HostFunc>` during instantiation (#4051)
This commit implements an optimization to help improve concurrently
creating instances of a module on many threads simultaneously. One
bottleneck to this measured has been the reference count modification on
`Arc<HostFunc>`. Each host function stored wit... | diff --git a/crates/wasmtime/src/func.rs b/crates/wasmtime/src/func.rs
index 832aa99b1..0974aff43 100644
--- a/crates/wasmtime/src/func.rs
+++ b/crates/wasmtime/src/func.rs
@@ -224,6 +224,21 @@ enum FuncKind {
/// situations is `SharedHost` and `StoreOwned`, so this ideally isn't
/// larger than those two.
... | 4 | 163 | 14 |
988d6ef9ac2ff2935d0dada4fcd06c0bcf514611 | Nick Fitzgerald | 2022-04-19T01:27:13 | fuzzing: Combine the `compile` and `compile-mutate` fuzz targets (#4048)
We should still get the same amount of fuzzing using libfuzzer's mutators and
using `wasm-mutate` as a mutator now, but they can share the same corpus,
allowing mutations that one performed but the other didn't to reach new areas. | diff --git a/fuzz/Cargo.toml b/fuzz/Cargo.toml
index b9f51265a..af1cc7cc3 100644
--- a/fuzz/Cargo.toml
+++ b/fuzz/Cargo.toml
@@ -30,12 +30,6 @@ path = "fuzz_targets/compile.rs"
test = false
doc = false
-[[bin]]
-name = "compile-mutate"
-path = "fuzz_targets/compile-mutate.rs"
-test = false
-doc = false
-
[[bin]]
... | 3 | 20 | 27 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.