alexcrichton opened PR #11628 from alexcrichton:imports-with-store to bytecodealliance:main:
This commit adds support to accessing the store in
bindgen!-generated
import functions in traits. Since the inception ofbindgen!this has
never been possible and access to the store requires manually working
withLinker, for example. This is not easy to do because it requires
surgically editing code or working around what bindings generation parts
you do want.The implementation here is a small step away from what
component-model-async has already implemented for async functions.
Effectively it's a small extension of the*WithStoretraits to also
have synchronous functions withAccessparameters instead ofasync
functions with anAccessorparameter.This is something we're going to want for the WASIp3 implementation
where I've noticed some resource destructors are going to want access to
the store to close out streams and such and this'll provide the bindings
necessary for that.Closes https://github.com/bytecodealliance/wasmtime/issues/11590
alexcrichton requested fitzgen for a review on PR #11628.
alexcrichton requested wasmtime-core-reviewers for a review on PR #11628.
fitzgen submitted PR review.
alexcrichton merged PR #11628.
rvolosatovs submitted PR review.
rvolosatovs created PR review comment:
Accessconstructed this way does not have anInstance, which causes the panic in #11651
Last updated: Dec 06 2025 at 06:05 UTC