Stream: git-wasmtime

Topic: wasmtime / PR #6937 Add `Engine::detect_precompiled_file()`


view this post on Zulip Wasmtime GitHub notifications bot (Aug 30 2023 at 18:48):

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.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 30 2023 at 19:18):

acfoltzer requested jameysharp for a review on PR #6937.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 30 2023 at 19:57):

jameysharp requested alexcrichton for a review on PR #6937.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 30 2023 at 19:59):

acfoltzer requested wasmtime-core-reviewers for a review on PR #6937.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 30 2023 at 22:48):

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 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!

view this post on Zulip Wasmtime GitHub notifications bot (Aug 30 2023 at 23:35):

acfoltzer merged PR #6937.


Last updated: Nov 22 2024 at 17:03 UTC