Stream: wasmtime

Topic: Exposing compilation artifacts via API


view this post on Zulip Yury Delendik (Jul 14 2020 at 14:27):

How do we want to expose compilation via API? I'm entertaining Module::compile_and_serialize + ::deserialize(e.g. https://github.com/yurydelendik/wasmtime/commit/34a8d3dc1276aabb75eb501af85efd748e635187#diff-097fdd3945b906262e6a37c58dc4f01cR313-R342) Maybe there is a better idea.

Standalone JIT-style runtime for WebAsssembly, using Cranelift - yurydelendik/wasmtime

view this post on Zulip Yury Delendik (Jul 14 2020 at 14:29):

Also, there is a need to fingerprint Config to check if a compilation is compatible

view this post on Zulip Yury Delendik (Jul 14 2020 at 14:30):

/me thinking to just hash settings::Builder and triple

view this post on Zulip Alex Crichton (Jul 14 2020 at 14:35):

seems reasonable to start off with that, a serialize/deserialize API

view this post on Zulip Alex Crichton (Jul 14 2020 at 14:35):

which just goes between Module and Vec<u8>

view this post on Zulip Alex Crichton (Jul 14 2020 at 14:35):

I'm not sure if compile_and_serialize need to be bundled?

view this post on Zulip Alex Crichton (Jul 14 2020 at 14:35):

for a fingerprint I think ideally we'd implement Hash for Config and Eq for Config

view this post on Zulip Alex Crichton (Jul 14 2020 at 14:36):

er, I guess just Hash

view this post on Zulip Yury Delendik (Jul 14 2020 at 22:20):

Alright, I got PR 2020 https://github.com/bytecodealliance/wasmtime/pull/2020

Fixes #1779 This is final patch in series to allow direct access to the compiled code. Added compile_and_serialize API function that allows to save CompilationArtifacts object in binary format (+t...

Last updated: Oct 23 2024 at 20:03 UTC