Stream: git-wasmtime

Topic: wasmtime / PR #6307 Add an `--emit-clif` option to `wasmt...


view this post on Zulip Wasmtime GitHub notifications bot (Apr 28 2023 at 23:46):

elliottt edited PR #6307:

Add the --emit-clif <PATH> option to wasmtime compile, making it easier to inspect the intermediate clif produced when compiling a wasm module. The path argument is a directory that will be created if its missing, and it will be populated with files named wasm_func_<idx>.clif, where <idx> is the function index in the wasm module.

Currently this option is only supported when using cranelift to compile a wasm module, and an error will be raised if winch is used instead.
<!--
Please make sure you include the following information:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

view this post on Zulip Wasmtime GitHub notifications bot (May 01 2023 at 14:58):

itsrainy submitted PR review:

This looks good to me! Just a couple small comments.

view this post on Zulip Wasmtime GitHub notifications bot (May 01 2023 at 14:58):

itsrainy submitted PR review:

This looks good to me! Just a couple small comments.

view this post on Zulip Wasmtime GitHub notifications bot (May 01 2023 at 14:58):

itsrainy created PR review comment:

If the user passes an existing file instead of a directory to emit-clif, this will error with Error: File exists (os error 17). It might be worth checking for that case and passing a slightly more helpful error message.

view this post on Zulip Wasmtime GitHub notifications bot (May 01 2023 at 14:58):

itsrainy created PR review comment:

The wording here doesn't quite seem right.

    /// Emit one clif file into this directory for each compiled function

or maybe

    /// The directory path to write clif files into

view this post on Zulip Wasmtime GitHub notifications bot (May 01 2023 at 16:04):

elliottt created PR review comment:

That's a great point, I'll add a better message for that case!

view this post on Zulip Wasmtime GitHub notifications bot (May 01 2023 at 16:11):

elliottt updated PR #6307.

view this post on Zulip Wasmtime GitHub notifications bot (May 01 2023 at 16:11):

elliottt created PR review comment:

I took your second suggestion, and added , one clif file per wasm function. to the end. Thanks!

view this post on Zulip Wasmtime GitHub notifications bot (May 01 2023 at 16:12):

elliottt updated PR #6307.

view this post on Zulip Wasmtime GitHub notifications bot (May 01 2023 at 21:44):

elliottt updated PR #6307.

view this post on Zulip Wasmtime GitHub notifications bot (May 01 2023 at 21:45):

elliottt has enabled auto merge for PR #6307.

view this post on Zulip Wasmtime GitHub notifications bot (May 01 2023 at 22:46):

elliottt merged PR #6307.


Last updated: Dec 23 2024 at 12:05 UTC