Stream: wasmtime

Topic: Cached incremental compilation


view this post on Zulip Benjamin Bouvier (Mar 17 2022 at 17:23):

Hi all! I would like to start thinking and brainstorming the design of an incremental compilation cache in Cranelift/Wasmtime. The idea being that if a wasm function has already been compiled once in a wasm module, and it hasn't changed when trying to recompile it later, then we could reuse the compiled function's artifact. That would be beneficial in the following cases:

I'd like to discuss this topic in real-time to brainstorm about it, and mentioned that during today's Wasmtime call. @Chris Fallin expressed interest in being part of the conversation, and anyone interested is of course welcome. First probes into peoples' agendas indicate this could be a topic for the first Wasmtime or Cranelift meeting taking place in April.

Will add this topic to the Cranelift meeting happening April 4th, and we can discuss it then!

view this post on Zulip Chris Fallin (Mar 17 2022 at 17:24):

Thanks Ben for organizing this!

view this post on Zulip bjorn3 (Mar 17 2022 at 22:17):

Would this only apply to wasmtime or also to any cranelift user (eg cg_clif)?

view this post on Zulip Chris Fallin (Mar 17 2022 at 22:20):

@bjorn3 I suspect that most of the changes will be wasmtime-specific, as Cranelift is already function-centric. In a sense one could do this already by caching/memoizing the CLIF-to-machine-code translation; the more interesting bits are making Wasmtime generate CLIF that is somewhat invariant to perturbations in the input (e.g. add a new function that shifts all indices by one, or add a slot to the VMContext), maybe by more indirection. Certainly whatever techniques we come up with could be used by other CL frontends as well though!


Last updated: Nov 22 2024 at 16:03 UTC