Zhangyx24 opened issue #4437:
Cli
As shown in documentation, there are 2 ways to execute wasm, JIT and AOT.
(1) JIT
wasmtime run xxx.wasm
(2)AOT
wasmtime compile xxx.wasm
wasmtime run --precompiled xxx.cwasm
Are these two ways different ?Rust api
How to execute in rust api through JIT and AOT ?
Zhangyx24 edited issue #4437:
Cli
As shown in documentation, there are 2 ways to execute wasm, JIT and AOT.
(1) JIT
wasmtime run xxx.wasm
(2)AOT
wasmtime compile xxx.wasm
wasmtime run --allow-precompiled xxx.cwasm
Are these two ways different ?Rust api
How to execute in rust api through JIT and AOT ?
bjorn3 commented on issue #4437:
You can use
Module::new
,Module::from_file
orModule::from_binary
for JIT compilation. For AOT compilation you first JIT compile and then call.serialize()
on the resulting compiled module to get a blob you can write to a file (eg with the.cwasm
extension). You can then useModule::deserialize
orModule::deserialize_file
to load the serialized module into memory again.
Zhangyx24 commented on issue #4437:
Thanks for your answer !
Zhangyx24 closed issue #4437:
Cli
As shown in documentation, there are 2 ways to execute wasm, JIT and AOT.
(1) JIT
wasmtime run xxx.wasm
(2)AOT
wasmtime compile xxx.wasm
wasmtime run --allow-precompiled xxx.cwasm
Are these two ways different ?Rust api
How to execute in rust api through JIT and AOT ?
Last updated: Nov 22 2024 at 16:03 UTC