Stream: git-wasmtime

Topic: wasmtime / PR #7920 Make `RegisteredType` hold a whole `E...


view this post on Zulip Wasmtime GitHub notifications bot (Feb 12 2024 at 19:32):

fitzgen opened PR #7920 from fitzgen:registry-in-engine-directly to bytecodealliance:main:

Rather than an Arc<RwLock<TypeRegistryInner>>.

This also removes the Arc inside TypeRegistry and we effectively reuse Engine's internal Arc instead.

Also, to avoid various TypeRegistry methods needing to take an Engine to construct their RegisteredType results, but then needing to assert that the given engine is this registry's engine, I turned the methods into TypeRegistry constructors. These constructors take just an &Engine and then access the underlying TypeRegistry as needed, effectively making that property hold statically.

This is a minor clean up on its own, but is a big help for follow up work I am doing for Wasm GC and typed function references, where being able to grab a reference to the engine that a FuncType is registered within will prevent needing to thread in additional engine parameters to various places and then assert that the engine is the engine that the type is registered within, and etc...

<!--
Please make sure you include the following information:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

view this post on Zulip Wasmtime GitHub notifications bot (Feb 12 2024 at 19:32):

fitzgen requested alexcrichton for a review on PR #7920.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 12 2024 at 19:32):

fitzgen requested wasmtime-core-reviewers for a review on PR #7920.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 12 2024 at 19:40):

pchickey submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 12 2024 at 19:40):

fitzgen has enabled auto merge for PR #7920.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 12 2024 at 20:33):

fitzgen merged PR #7920.


Last updated: Oct 23 2024 at 20:03 UTC