|
Revision tags: dev, v36.0.9, v44.0.1, v43.0.2, v36.0.8, v24.0.8, v44.0.0, v43.0.1, v42.0.2, v36.0.7, v24.0.7 |
|
| #
ab78bd82 |
| 22-Mar-2026 |
Ho Kim <[email protected]> |
fix: correct various typos (#12807)
Signed-off-by: Ho Kim <[email protected]>
|
|
Revision tags: v43.0.0, v42.0.1, v41.0.4, v42.0.0, v40.0.4, v36.0.6, v24.0.6, v41.0.3, v41.0.2, v41.0.1, v36.0.5, v40.0.3, v41.0.0, v36.0.4, v39.0.2, v40.0.2, v40.0.1 |
|
| #
96e19700 |
| 07-Jan-2026 |
Nick Fitzgerald <[email protected]> |
Migrate the `wasmtime` crate to `wasmtime_environ::error::*` (#12231)
* Migrate the `wasmtime` crate to `wasmtime_environ::error::*`
Instead of `anyhow::Error`.
This commit re-exports the `wasmtim
Migrate the `wasmtime` crate to `wasmtime_environ::error::*` (#12231)
* Migrate the `wasmtime` crate to `wasmtime_environ::error::*`
Instead of `anyhow::Error`.
This commit re-exports the `wasmtime_environ::error` as the `wasmtime::error` module, updates the prelude to include these new error-handling types, redirects our top-level `wasmtime::{Error, Result}` re-exports to re-export `wasmtime::error::{Error, Result}`, and updates various use sites that were directly using `anyhow` to use the new `wasmtime` versions.
This process also required updating the component macro and wit-bindgen macro to use the new error types instead of `anyhow`.
Part of https://github.com/bytecodealliance/wasmtime/issues/12069
* Replace wasmtime::error::Thing with wasmtime::Thing where it makes sense
* cargo fmt
* Move `crate::error::Thing` to `crate::Thing` where it makes sense
show more ...
|
|
Revision tags: v40.0.0, v39.0.1, v39.0.0, v38.0.4, v37.0.3, v36.0.3, v24.0.5, v38.0.3, v38.0.2, v38.0.1, v37.0.2, v37.0.1, v37.0.0 |
|
| #
5245e1f8 |
| 12-Sep-2025 |
Nick Fitzgerald <[email protected]> |
Remove `AllCallFunc` (#11694)
* Remove `AllCallFunc`
And add `FuncKeyKind` and `FuncKeyNamespace` types.
Split out from https://github.com/bytecodealliance/wasmtime/pull/11630
* fix warning and d
Remove `AllCallFunc` (#11694)
* Remove `AllCallFunc`
And add `FuncKeyKind` and `FuncKeyNamespace` types.
Split out from https://github.com/bytecodealliance/wasmtime/pull/11630
* fix warning and disriminant gap
* add module arg to `Module::new()` calls in tests
show more ...
|
| #
a631d20a |
| 04-Sep-2025 |
Paul Osborne <[email protected]> |
cranelift: stack-switching support (#11003)
* cranelift: stack-switching support
This initial commit represents the "pr2" base commit with minimal merge conflicts resolved. Due to OOB conflicts, t
cranelift: stack-switching support (#11003)
* cranelift: stack-switching support
This initial commit represents the "pr2" base commit with minimal merge conflicts resolved. Due to OOB conflicts, this commit is not functional as-is, but using it as a base in order to allow for easier reviewing of the delta from this commit to what will be used for the PR against upstream.
Co-authored-by: Daniel Hillerström <[email protected]> Co-authored-by: Paul Osborne <[email protected]>
* cranelift: stack-switching updates pass 1
This first set of changes updates the base pr in order to compiled and pass basic checks (compile, clippy, fmt) with the biggest part of the change being to eliminate injection of tracing/assertions in JIT'ed code.
* cranelift: stack-switching: restore original visibility for a few func_environ members
* cranelift: stack-switching conditional compilation
At this point, the only bit we really branch on is what we do in order to avoid problems tying into wasmtime_environ. This is basd on the approach and macro used by the gc code for converting presence/absence of the cranelift feature flag to cranelift compile time. This is a bit of a half-measure for now as we still compile most stack-switching code in cranelift, but this does enough to avoid causing problems with missing definitions in wasmtime_environ.
* cranelift: avoid "as" casts in stack-switching
Replace either with infallible From or fallible, panicing TryFrom alternatives where required.
* cranelift: cleanup stack-switching control_effect signatures
After removing emission of runtime trace logging and assertions, there were several unused parameters. Remove those from the ControlEffect signatures completely.
* cranelift: rename stack-switching VMArray to VMHostArray
This matches a change to the mirrored runtime type in the upstream changes.
* stack-switching: fix typo
Co-authored-by: Daniel Hillerström <[email protected]>
* stack-switching: used Index impl for get_stack_slot_data
* stack-switching: use smallvec over vec in several cases
* stack-switching: avoid resumetable naming confusion
* stack-switching: cleanup unused params from unchecked_get_continuation
The extra parameters here used to be used for emitting runtime assertions, but with those gone we just had unused params and lifetimes, clean those out.
* stack_switching: simplify store_data_entries assertion
* stack-switching: simplify translate_table_{grow,fill} control flow
* stack-switching: remove translate_resume_throw stub
There's already a stub elsewhere and this is not called, when exceptions are added and it is time to revisit, this method can be restored.
* stack-switching: compute control_context_size based on target triple
* stack-switching: VMHostArrayRef updates
Rename VMHostArray -> VMHostArrayRef Change impl to compute address with offset upfront rather than on each load.
* stack-switching: move cranelift code to live under func_environ
This matches the directory structure for gc and aids in visibility for a few members required by stack-switching code in cranelift.
* stack-switching: formatting fix
* stack-switching: reduce visibility on a few additional items
* stack-switching: simplify contobj fatptr con/de-struction
* stack-switching: add disas tests to cover new instructions
* stack-switching: fix layout of VMContObj
In the course of the various runtime updates, the layout of the runtime VMContObj got switched around. This resulted in failures when doing certain table operations on continuations.
This change fixes that layout problem and adds some tests with offsets to avoid the problem. Due to the way that we interact with the VMContObj in cranelift, we don't use these offsets outside of the tests.
* Fix formatting of merge conflict resolution
* cranelift: remove ir::function::get_stack_slot_data
This method isn't required as sized_stack_slots is already pub.
* stack-switching: reduce visibility of a couple func_environ methods
* stack-switching: define VMContObj as two words
This change migrates VMContObj and its usages in cranelift and runtime to work with the VMContObj fat pointer as two words in order to better target different architectures (still gated to x86_64 for now).
To support this, a size type was plumbed into the builtins function signature types (as is done for component types) that maps to usize.
* fixup! stack-switching: define VMContObj as two words
* stack-switching: add stub Val::ContRef
This type is not fully complete until continuation/gc integration is revisited (#10248) but without these changes, test cases are now failing on panics as we need some representation of continuation references in the runtime Val enumeration.
Runtime errors with TODO notes are added for the stubbed code paths to revisit later.
* fixup! stack-switching: add stub Val::ContRef
* fixup! stack-switching: add stub Val::ContRef
* fixup! stack-switching: define VMContObj as two words
prtest:full
* stack-switching: don't conflate host and target pointer sizes
Disas tests were failing on i686 targeting x86_64 as the size of the host pointer was leaking into what we were using to do codegen in a few paths. This patch is a bit of a hack as it seems like using a generic <T> for T: *mut u8 (as an example) is a bit questionable. To keep things small, I do a hacky typecheck to map pointers to the target pointer size here.
* stack-switching: VMHostArray entry sizes based off env PtrSize
Revisiting the previous commit with an approach that should be less brittle.
---------
Co-authored-by: Frank Emrich <[email protected]> Co-authored-by: Daniel Hillerström <[email protected]>
show more ...
|
|
Revision tags: v36.0.2 |
|
| #
900370bc |
| 21-Aug-2025 |
Alex Crichton <[email protected]> |
Make core wasm libcalls sound (#11496)
* Make core wasm libcalls sound
This commit updates the signature of core wasm libcalls to look more like component libcalls where the instance argument is ju
Make core wasm libcalls sound (#11496)
* Make core wasm libcalls sound
This commit updates the signature of core wasm libcalls to look more like component libcalls where the instance argument is just an id, not an actual pointer. This is required to make them sound because otherwise it's possible to, in safe Rust, acquire two mutable pointers to the same instance. Implementing this change is made possible by the many many previous refactors to how all of these internals work. All that was required here was changing type signatures and minor updates to the order of operations inside of libcalls.
Closes #11178
* Fix wmemcheck build
show more ...
|
|
Revision tags: v36.0.1 |
|
| #
2d25f862 |
| 21-Aug-2025 |
Chris Fallin <[email protected]> |
WebAssembly exception-handling support. (#11326)
* WebAssembly exception-handling support.
This PR introduces support for the [Wasm exception-handling proposal], which introduces a conventional try
WebAssembly exception-handling support. (#11326)
* WebAssembly exception-handling support.
This PR introduces support for the [Wasm exception-handling proposal], which introduces a conventional try/catch mechanism to WebAssembly. The PR supports modules that use `try_table` to register handlers for a lexical scope; and provides `throw` and `throw_ref` that allocate (in the first case) and throw exception objects.
This PR builds on top of the work in #10510 for Cranelift-level exception support, #10919 for an unwinder, and #11230 for exception objects built on top of GC, in addition a bunch of smaller fix and enabling PRs around those.
[Wasm exception-handling proposal]: https://github.com/WebAssembly/exception-handling/
prtest:full
* Permit UnwindToWasm to have unused fields in Pulley builds (for now).
* Resolve miri-caught reborrowing issue.
* Ignore exceptions tests in miri for now (Pulley not supported).
* Use wasmtime_test on exceptions tests.
* Get tests passing on pulley platforms
* Add a check to `supports_host` for the generated test and assert failure also when that is false. * Remove `pulley_unsupported` test as it falls out of `#[wasmtime_test]` * Remove `exceptions_store` helper as it falls out of `#[wasmtime_test]` * Remove miri annotations as they fall out of `#[wasmtime_test]`
* Remove dead import
* Skip some unsupported tests entirely in `#[wasmtime_test]`
If the selected compiler doesn't support the host at all then there's no need to run it. Actually running it could misinterpret `CraneliftNative` as "run with pulley" otherwise, so avoid such false negatives.
* Cranelift: dynamic contexts: account for outgoing-args area.
---------
Co-authored-by: Alex Crichton <[email protected]>
show more ...
|
|
Revision tags: v36.0.0, v35.0.0, v24.0.4, v33.0.2, v34.0.2 |
|
| #
2bac6574 |
| 07-Jul-2025 |
Alex Crichton <[email protected]> |
Update the `log` dependency (#11197)
* Update the `log` dependency
This enables getting warnings about formatting strings in the `log` crate directives which are then additionally fixed here as wel
Update the `log` dependency (#11197)
* Update the `log` dependency
This enables getting warnings about formatting strings in the `log` crate directives which are then additionally fixed here as well.
* Update dependency directive in `Cargo.toml`
show more ...
|
| #
838ed2d0 |
| 07-Jul-2025 |
Alex Crichton <[email protected]> |
Enable `allow_attributes_without_reason` (#11195)
* Enable `allow_attributes_without_reason`
This commit enables the `clippy::allow_attributes_without_reason` for the `wasmtime` crate which previou
Enable `allow_attributes_without_reason` (#11195)
* Enable `allow_attributes_without_reason`
This commit enables the `clippy::allow_attributes_without_reason` for the `wasmtime` crate which previously forcibly allowed it. The reason this was allowed was that when the workspace was first migrated the Wasmtime crate had too many instances that I was willing to fix. I've now come back around and tried to fix everything.
In short: ideally delete `#[allow]`, otherwise use `#[expect]`, otherwise use `#[allow]`.
prtest:full
* Adjust some directives
* Fix some warnings
* Fix stack switching size tests on unix
* Don't have a conditional `Drop` impl
* Force `testing_freelist` method to be used
Too lazy to write `#[cfg]`, but not too lazy to write a test.
show more ...
|
| #
e16780de |
| 30-Jun-2025 |
fuder.eth <[email protected]> |
fix typos in Runtime VM Source Files (#11158)
* Update debug_builtins.rs
* Update libcalls.rs
* Update stack_switching.rs
|
|
Revision tags: v34.0.1, v33.0.1, v24.0.3, v32.0.1, v34.0.0 |
|
| #
6ae11835 |
| 06-Jun-2025 |
Paul Osborne <[email protected]> |
stack-switching: update vmoffsets naming for VMHostArray (#10964)
VMArray from the original stack switching impl was renamed to VMHostArray, but the prefixes used in vmoffsets didn't get updated.
O
stack-switching: update vmoffsets naming for VMHostArray (#10964)
VMArray from the original stack switching impl was renamed to VMHostArray, but the prefixes used in vmoffsets didn't get updated.
Original Discussion: https://github.com/bytecodealliance/wasmtime/pull/10388#discussion_r2114329856
Original (incomplete) Change: 22bf039e801f0e92048a2ce508dc27289fbb27ae
show more ...
|
| #
aad93a48 |
| 06-Jun-2025 |
Alex Crichton <[email protected]> |
Crack down on mutability and ownership of `vm::Instance` (#10943)
* Crack down on mutability and ownership of `vm::Instance`
This commit represents more effort to bring safety to `vm::Instance` and
Crack down on mutability and ownership of `vm::Instance` (#10943)
* Crack down on mutability and ownership of `vm::Instance`
This commit represents more effort to bring safety to `vm::Instance` and, eventually, `ComponentInstance`. This is specifically addressing two points of safety around `vm::Instance`:
* Previously ownership of this was murky where `InstanceHandle` sort of represented ownership but sort of didn't either through the `InstanceHandle::clone` method. Now `InstanceHandle` has a destructor for instances and no longer has `clone`, so there's one exclusive owner of an instance.
* Previously `&mut Instance` was liberally passed around, but this is not sound because certain fields cannot be mutated (e.g. runtime offset information). While not a perfect solution this PR switches to using `Pin<&mut Instance>` everywhere instead. This prevents safe access to `&mut Instance` and we hand-write accessors to individual fields. Notably we omit mutable access to the `runtime_info` field.
This naturally involved a lot of refactoring internally, but notably this started bringing up preexisting issues around how there are locations in the codebase that simultaneously have `&mut Instance` and `&mut StoreOpaque` which is technically not sound due to being able to get back to the instance from the store. Some issues here were address by passing around indices more often such as in instance initialization and const-expr evaluation.
Note that all proxy methods on `InstanceHandle` are also all removed now and there's now only two: `get` and `get_mut`. This reflects how `InstanceHandle` should in general no longer be used and instead `Instance` itself, and some pointer-to thereof, should be exclusively used.
cc #10933
* Fix stack-switching-less build
* Fix wmemcheck build
show more ...
|
| #
63d482c8 |
| 04-Jun-2025 |
Frank Emrich <[email protected]> |
Stack switching: Infrastructure and runtime support (#10388)
* [pr1] base
* prtest:full
* make sure to use ControlFlow result in trace_suspended_continuation
* stack-switching: cleanup: remove st
Stack switching: Infrastructure and runtime support (#10388)
* [pr1] base
* prtest:full
* make sure to use ControlFlow result in trace_suspended_continuation
* stack-switching: cleanup: remove stray c-api changes
These are remnants of unrelated wasmfx wasmtime experiments, possibly suitable for later submission against upstream.
* stack-switching: reuse async_stack_size
* stack-switching: delete delete_me debugging
* stack-switching: address feedback in environ::types
* stack-switching: remove unused code from vmoffsets
* stack-switching: drop dependency on std
* stack-switching: add compilation checks to ci matrix
* stack-switching: remove debug_println cruft
* stack-switching: export environ consts consistently
* stack-switching: export vm pub items consistently
* table_pool: reduced capacity for large elements
VMContRef elements which takes up two words and we don't want to double the size of all tables in order to support storing these. This change changes the table to target storing the requested max number of elements if they are "nominally" sized with (potentially) reduced capacity for non-nominally sized types when encountered.
Continuations are the only type of element which may result in fewer table slots being available than requested.
* stack-switching: extend conditional compilation
A fair bit of the definitions for stack switching are still enabled, but this patch takes things a bit further to avoid compilation problems; notably, cont_new is now not compiled in unless the feature is enabled.
* stack-switching: formatting fixes
* stack-switching: address new clippy checks
In addition, to get clippy to fully pass, plumbed in additional config to make winch paths happy; there's no impl for winch yet but plumbing through the feature is required to make paths incorporating macros at various layers satisfied (and it is expected we'll use the features in the future).
* stack-switching: more conditional compilation fixes
* stack-switching: additional conditional compile on table builtins for continuations
* stack-switching: additional conditional compile fixes
* stack-switching: additional conditional compile in store
* stack-switching: remove overly strict assertion
* stack-switching: remove errantly dropped no_mangle in config c-api
* stack-switching: VMContObj::from_raw_parts
* stack-switching: remove duplicate async_stack_size feature check
* stack-switching: VMArray -> VMHostArray
* stack-switching: remove unnecessary clippy exception
* stack-switching: fix docs referenced VMRuntimeLimits
* stack-switching: fix doc typo
* stack-switching: follow recommendations for type casts
* stack-switching: use usize::next_multiple_of
* stack-switching: update outdated comment
* stack-switching: use feature gate instead of allow(dead_code)
* stack-switching: rework backtrace using chunks/zip
* stack-switching: move tests to footer module
This is a bit more consistent with the prevailing style in tree and (subjectively) makes finding the tests as a reader more straightforward.
Tests left unchanged sans some import cleanup.
* stack-swictchding: verify stack_chain offsets at runtime
* fixup! stack-switching: use feature gate instead of allow(dead_code)
* stack-switching: document continuation roots tracing using match arms
---------
Co-authored-by: Paul Osborne <[email protected]>
show more ...
|