-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add Engine::detect_precompiled_file()
#6937
Conversation
This is handy for users of `deserialize_file()` to determine which version to call.
I'm handing review of this off to Alex as the author of the API you're extending. I had hoped that the |
Subscribe to Label Actioncc @peterhuene
This issue or pull request has been labeled: "wasmtime:api"
Thus the following users have been cc'd because of the following labels:
To subscribe or unsubscribe from this label, edit the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems reasonable to me, thanks!
I had hoped that the
from_trusted_file
entry-point or similar would suffice to avoid embedders needing to detect for themselves whether they were holding on to a precompiled module
Ah yeah I tried to use this when I originally refactored the CLI to take components, but the main reason I couldn't use it was that the CLI needed to dispatch to either Component::deserialize
or Module::deserialize
depending on what the compiled bytes were. I initially hoped to avoid ModuleOrComponent
in the wasmtime
crate's API but I think from_trusted_file
would work there.
Overall at least from the CLI I felt that our API for loading modules/components is still kinda clunky. I couldn't really figure out a better replacement though so I gave up and added detect_precompiled
. I'm definitely all-ears though for other suggestions!
I'm still getting acquainted with the component side of the crate API, but it seems like a |
This is handy for users of `deserialize_file()` to determine which version to call.
This is handy for users of
deserialize_file()
to determine which version to call.