Stream: git-wasmtime

Topic: wasmtime / issue #4437 How to use AOT mode and JIT mode i...


view this post on Zulip Wasmtime GitHub notifications bot (Jul 13 2022 at 07:12):

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 ?

view this post on Zulip Wasmtime GitHub notifications bot (Jul 13 2022 at 07:12):

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 ?

view this post on Zulip Wasmtime GitHub notifications bot (Jul 13 2022 at 07:25):

bjorn3 commented on issue #4437:

You can use Module::new, Module::from_file or Module::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 use Module::deserialize or Module::deserialize_file to load the serialized module into memory again.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 13 2022 at 07:26):

Zhangyx24 commented on issue #4437:

Thanks for your answer !

view this post on Zulip Wasmtime GitHub notifications bot (Jul 13 2022 at 07:26):

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: Dec 23 2024 at 13:07 UTC