|
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, 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, 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 |
|
| #
7f7b39cb |
| 19-Oct-2025 |
siaeyy <[email protected]> |
EqRef from_i31 implementation (#11884)
* feat(gc/eqref): from_i31 implementation
Copy of AnyRef's from_i31, exact same thing.
* test: case for EqRef's from_i31 implementation
|
|
Revision tags: v37.0.2, v37.0.1, v37.0.0 |
|
| #
9826719a |
| 26-Aug-2025 |
Chris Fallin <[email protected]> |
GC: replace ManuallyRooted with OwnedRooted. (#11514)
* GC: replace ManuallyRooted with OwnedRooted.
This implements the ideas from #11445: it replaces `ManuallyRooted`, which requires an explicit
GC: replace ManuallyRooted with OwnedRooted. (#11514)
* GC: replace ManuallyRooted with OwnedRooted.
This implements the ideas from #11445: it replaces `ManuallyRooted`, which requires an explicit unroot action with a mut borrow of the store (making it impossible to implement in a standard `Drop` impl), with `OwnedRooted`, which holds an `Arc` only to a small auxiliary memory allocation (an `Arc<()>`) and uses this externalized "liveness flag" to allow for a `Store`-less drop. These liveness flags are scanned during a "trim" pass, which happens both when new owned roots are created, and just before a GC.
This should greatly increase safety for host-side users of GC: it provides a way to have a handle whose ownership works like any other Rust value, alive until dropped. It is still not quite as efficient as LIFO-scoped handles (by analogy, for the same reason that individually-freed RAII types are not as efficient as arena allocation), so those remain for efficiency-minded users that have a clear picture of reference lifetimes.
At some later time we may wish to use `OwnedRooted` exclusively in our public APIs rather than `Rooted`, and we may wish to rename `Rooted` to `ScopedRooted`, but I haven't done either of those things yet.
I opted to *replace* `ManuallyRooted` rather than add a third kind of root, after discussion with fitzgen. One implication of this is that the C API's `anyref` and `externref` types are now 24 or 20 bytes rather than 16 (because of the `Arc` pointer), and correspondingly the Val union grew to that size. I *believe* this is an acceptable tradeoff, but I'm happy to put `ManuallyRooted` back if not.
Fixes #11445.
* Review feedback.
* Fix for riscv32imac: loosen asserts on struct size slightly to allow for different padding.
* C API: use a `*const ()` to pass the liveness-flag Arc through C.
* Add some additional documentation warning about unrooting in the C API.
* Fix size-of test on 32-bit platforms.
* New amortized algorithm for root trimming.
* core::cmp, not std::cmp
* Always set high-water mark, even if eager.
* Make val size-assert tolerant of padding bytes in crates/c-api/src/val.rs too.
show more ...
|
|
Revision tags: v36.0.2, v36.0.1, v36.0.0 |
|
| #
c6dddeaf |
| 11-Aug-2025 |
Alex Crichton <[email protected]> |
Minimize lazy allocation of the GC store (#11411)
* Minimize lazy allocation of the GC store
This commit is an effort to minimize the number of entrypoints which might lazily allocate a GC store. T
Minimize lazy allocation of the GC store (#11411)
* Minimize lazy allocation of the GC store
This commit is an effort to minimize the number of entrypoints which might lazily allocate a GC store. The is currently done through `StoreOpaque::gc_store_mut` but this method is very commonly used meaning that there are many many places to audit for lazily allocating a GC store. The reason that this needs an audit is that lazy allocation is an async operation right now that must be on a fiber and is something I'm looking to fix as part of #11262.
This commit performs a few refactorings to achieve this:
* `gc_store_mut` is renamed to `ensure_gc_store`. This is intended to be an `async` function in the future and clearly demarcates where lazy allocation of a GC store is occurring.
* `require_gc_store{,_mut}` is now added which is a pure accessor of the GC store with no lazy allocation. Most locations previously using `gc_store_mut` are updated to use this instead.
Documentation is added to store methods to clearly indicate which ones are allocating and which ones should only be called in a context where allocation should already have happened.
* Fix configured build
* Relax GC store restrictions in more places
* Review comments on documentation
* Move `ensure_gc_store` calls during instantiation
Instead update `needs_gc_heap` with the tables that are added to a module and rely on instantiation to create the GC heap.
* Shuffle around some code
* Fix CI and review comments
* Add in a few more i31 cases for externref
show more ...
|
|
Revision tags: v35.0.0, v24.0.4, v33.0.2, v34.0.2 |
|
| #
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 ...
|
|
Revision tags: v34.0.1, v33.0.1, v24.0.3, v32.0.1, v34.0.0, v33.0.0 |
|
| #
90ac295e |
| 19-May-2025 |
Alex Crichton <[email protected]> |
Update Wasmtime to the 2024 Rust Edition (#10806)
* Update Wasmtime to the 2024 Rust Edition
Now that our MSRV supports the 2024 edition it's possible to make this switch. This commit moves Wasmtim
Update Wasmtime to the 2024 Rust Edition (#10806)
* Update Wasmtime to the 2024 Rust Edition
Now that our MSRV supports the 2024 edition it's possible to make this switch. This commit moves Wasmtime to the 2024 Edition to keep up-to-date with Rust idioms and access many of the edition features exclusive to the 2024 edition.
prtest:full
* Reformat with the 2024 edition
show more ...
|
|
Revision tags: v32.0.0, v31.0.0, v30.0.2, v30.0.1, v30.0.0, v29.0.1, v29.0.0, v28.0.1, v28.0.0, v27.0.0, v26.0.1, v25.0.3, v24.0.2, v26.0.0, v21.0.2, v22.0.1, v23.0.3, v25.0.2, v24.0.1, v25.0.1, v25.0.0 |
|
| #
c16414fb |
| 19-Sep-2024 |
Nick Fitzgerald <[email protected]> |
Introduce the `wasmtime::EqRef` type (#9285)
* Introduce the `wasmtime::EqRef` type
This commit introduces the `wasmtime::EqRef` type, which corresponds to Wasm's `(ref eq)` type, and statically re
Introduce the `wasmtime::EqRef` type (#9285)
* Introduce the `wasmtime::EqRef` type
This commit introduces the `wasmtime::EqRef` type, which corresponds to Wasm's `(ref eq)` type, and statically represents Wasm references that can be tested for equality.
* fix no-gc builds
show more ...
|