acfoltzer opened PR #6937 from bytecodealliance:acf/detect-precompiled-file
to bytecodealliance:main
:
This is handy for users of
deserialize_file()
to determine which version to call.
acfoltzer requested jameysharp for a review on PR #6937.
jameysharp requested alexcrichton for a review on PR #6937.
acfoltzer requested wasmtime-core-reviewers for a review on PR #6937.
alexcrichton submitted PR review:
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 moduleAh 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
orModule::deserialize
depending on what the compiled bytes were. I initially hoped to avoidModuleOrComponent
in thewasmtime
crate's API but I thinkfrom_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!
acfoltzer merged PR #6937.
Last updated: Dec 23 2024 at 12:05 UTC