Skip to content

Make vm::Instance::get_defined_table_with_lazy_init return a reference #11215

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

alexcrichton
Copy link
Member

This commit updates the get_defined_table_with_lazy_init method to return a safe reference instead of a raw reference. This then cascaded outwards to updating more locations to handle this new safe reference as well. While this makes some further progress on #11179 there are a number of locations that will require using raw pointers until more refactoring is done.

@alexcrichton alexcrichton requested a review from a team as a code owner July 10, 2025 20:04
@alexcrichton alexcrichton requested review from pchickey and removed request for a team July 10, 2025 20:04
@github-actions github-actions bot added the wasmtime:api Related to the API of the `wasmtime` crate itself label Jul 10, 2025
Copy link
Contributor

@pchickey pchickey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, this one fell off my radar.

This commit updates the `get_defined_table_with_lazy_init` method to
return a safe reference instead of a raw reference. This then
cascaded outwards to updating more locations to handle this new safe
reference as well. While this makes some further progress on bytecodealliance#11179
there are a number of locations that will require using raw pointers
until more refactoring is done.
@alexcrichton alexcrichton force-pushed the saaafer-get_defined_table_with_lazy_init branch from eb4b886 to e8289a5 Compare July 16, 2025 00:44
@alexcrichton alexcrichton enabled auto-merge July 16, 2025 00:44
@alexcrichton alexcrichton added this pull request to the merge queue Jul 16, 2025
Merged via the queue into bytecodealliance:main with commit ddfebe7 Jul 16, 2025
42 checks passed
@alexcrichton alexcrichton deleted the saaafer-get_defined_table_with_lazy_init branch July 16, 2025 01:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wasmtime:api Related to the API of the `wasmtime` crate itself
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants