Skip to content

wasmtime: Remove lifetime and type parameter from exports #374

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

Merged
merged 1 commit into from
Oct 13, 2022

Conversation

alexcrichton
Copy link
Member

This commit removes the type parameter since it's unused at this time. It was historically used for handles but that's under development again so it's no longer needed. This commit then additionally removes the lifetime parameter from the structure, opting to store Func instead of TypedFunc to avoid the need to name types and their lifetime parameters. Functions internally then use TypedFunc::new_unchecked to re-acquire the typed view with appropriate anonymous lifetimes in parameters.

This commit removes the type parameter since it's unused at this time.
It was historically used for handles but that's under development again
so it's no longer needed. This commit then additionally removes the
lifetime parameter from the structure, opting to store `Func` instead of
`TypedFunc` to avoid the need to name types and their lifetime
parameters. Functions internally then use `TypedFunc::new_unchecked` to
re-acquire the typed view with appropriate anonymous lifetimes in
parameters.
@alexcrichton alexcrichton requested a review from pchickey October 13, 2022 18:23
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.

Yep, this is a better design.

@pchickey pchickey merged commit 0dd45bf into bytecodealliance:main Oct 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants