Stream: general

Topic: From wasm to cranelift IR


view this post on Zulip Maik Klein (Apr 15 2020 at 16:21):

I was looking at cranelift-wasm https://docs.rs/cranelift-wasm/0.62.0/cranelift_wasm/fn.translate_module.html Are the docs outdated? I am not seeing an obvious way here to get a list ofcranelift_codegen::ir::function::Function.

view this post on Zulip Yury Delendik (Apr 15 2020 at 16:32):

@Maik Klein Looks incomplete, yes. ModuleEnvironment will get functions body via define_function_body and, then, it will be forwarded to https://docs.rs/cranelift-wasm/0.62.0/cranelift_wasm/struct.FuncTranslator.html

view this post on Zulip Yury Delendik (Apr 15 2020 at 16:34):

check wasmtime's environ crate as the example

view this post on Zulip Maik Klein (Apr 15 2020 at 16:43):

Thanks that is indeed what I was looking for.


Last updated: Dec 23 2024 at 12:05 UTC