yurydelendik opened PR #2065 from refactor-cache
to main
:
Currently, it is a responsibility of the compiler to do caching. Moving this logic to the
CompiledModule
level. This allows early access to all compilation artifacts without analyzing the wasm file (only bytes hash).
yurydelendik updated PR #2065 from refactor-cache
to main
:
Currently, it is a responsibility of the compiler to do caching. Moving this logic to the
CompiledModule
level. This allows early access to all compilation artifacts without analyzing the wasm file (only bytes hash).
yurydelendik updated PR #2065 from refactor-cache
to main
:
Currently, it is a responsibility of the compiler to do caching. Moving this logic to the
CompiledModule
level. This allows early access to all compilation artifacts without analyzing the wasm file (only bytes hash).
yurydelendik has marked PR #2065 as ready for review.
alexcrichton submitted PR Review.
alexcrichton submitted PR Review.
alexcrichton created PR Review Comment:
Could
Compiler
perhaps directly implementHash
?
alexcrichton created PR Review Comment:
It makes me happy to see this go :fire:
alexcrichton created PR Review Comment:
Would it be possible to do this in the
wasmtime
crate itself? The caching architecture is a pretty high-level concern so I think it'd be best if we could migrate it out of thewasmtime-environ
crate (or maybe even migrate it to its own crate). It'd be pretty neat if this could be:let result = cache_entry.get_data((compiler, wasm), CompilationArtifacts::build);
(in wasmtime)
yurydelendik updated PR #2065 from refactor-cache
to main
:
Currently, it is a responsibility of the compiler to do caching. Moving this logic to the
CompiledModule
level. This allows early access to all compilation artifacts without analyzing the wasm file (only bytes hash).
yurydelendik submitted PR Review.
yurydelendik created PR Review Comment:
done
alexcrichton submitted PR Review.
alexcrichton submitted PR Review.
alexcrichton created PR Review Comment:
Is the
Env
wrapper here needed? I think a tuple of hashtable types shoudl be hashable here
alexcrichton created PR Review Comment:
Can this pass
CompilationArtifacts::build
as a bare function instead of making a closure?
alexcrichton created PR Review Comment:
Could this use destructuring like:
let Compiler { field1, field2, } = self;
and then hash each individual field? That way we can be sure we're not forgetting anything if the contents change over time.
yurydelendik updated PR #2065 from refactor-cache
to main
:
Currently, it is a responsibility of the compiler to do caching. Moving this logic to the
CompiledModule
level. This allows early access to all compilation artifacts without analyzing the wasm file (only bytes hash).
yurydelendik submitted PR Review.
yurydelendik created PR Review Comment:
remove
Env
, but I do not see how to unwrap tuple to pass to CompilationArtifacts::build as params
yurydelendik edited PR Review Comment.
yurydelendik updated PR #2065 from refactor-cache
to main
:
Currently, it is a responsibility of the compiler to do caching. Moving this logic to the
CompiledModule
level. This allows early access to all compilation artifacts without analyzing the wasm file (only bytes hash).
alexcrichton created PR Review Comment:
Oops, indeed!
alexcrichton submitted PR Review.
alexcrichton merged PR #2065.
Last updated: Dec 23 2024 at 12:05 UTC