fitzgen opened PR #7920 from fitzgen:registry-in-engine-directly to bytecodealliance:main:
Rather than an
Arc<RwLock<TypeRegistryInner>>.This also removes the
ArcinsideTypeRegistryand we effectively reuseEngine's internalArcinstead.Also, to avoid various
TypeRegistrymethods needing to take anEngineto construct theirRegisteredTyperesults, but then needing to assert that the given engine is this registry's engine, I turned the methods intoTypeRegistryconstructors. These constructors take just an&Engineand then access the underlyingTypeRegistryas 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
FuncTypeis 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:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
fitzgen requested alexcrichton for a review on PR #7920.
fitzgen requested wasmtime-core-reviewers for a review on PR #7920.
pchickey submitted PR review.
fitzgen has enabled auto merge for PR #7920.
fitzgen merged PR #7920.
Last updated: Jan 10 2026 at 02:36 UTC