Stream: git-wasmtime

Topic: wasmtime / PR #11304 Allow compiling debug-builtins in no...


view this post on Zulip Wasmtime GitHub notifications bot (Jul 22 2025 at 19:32):

dblnz opened PR #11304 from dblnz:no-std-debug-builtins to bytecodealliance:main:

Description

This PR takes care of enabling the compilation of gdb_jit_int module in the jit-debug crate to ensure the native debugging also works in no_std environments.

The

This work has been discussed in #wasmtime > Debugging a wasm module in a hyperlight guest.

Summary

<!--
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 (Jul 22 2025 at 19:32):

dblnz requested alexcrichton for a review on PR #11304.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 22 2025 at 19:32):

dblnz requested wasmtime-core-reviewers for a review on PR #11304.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 22 2025 at 19:32):

dblnz requested wasmtime-default-reviewers for a review on PR #11304.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 22 2025 at 19:55):

dblnz updated PR #11304.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 22 2025 at 21:03):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 22 2025 at 21:03):

alexcrichton created PR review comment:

I forget how we ended up at the organization

view this post on Zulip Wasmtime GitHub notifications bot (Jul 22 2025 at 21:03):

alexcrichton edited PR review comment.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 22 2025 at 21:03):

alexcrichton edited PR review comment.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 22 2025 at 21:04):

alexcrichton edited PR review comment.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 23 2025 at 12:04):

dblnz edited PR #11304:

Description

This PR takes care of enabling the compilation of gdb_jit_int module in the jit-debug crate to ensure the native debugging also works in no_std environments.

My aim is to have this in for the LTS version 36.0.0 :smiley:

This work has been discussed in #wasmtime > Debugging a wasm module in a hyperlight guest.

Summary

<!--
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 (Jul 23 2025 at 17:27):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 23 2025 at 17:27):

alexcrichton created PR review comment:

Can this condition be massaged a bit to still include the has_host_compiler_backend conditional somehow? (or something like that)

Previously it was a nice property that compiling Wasmtime to an unknown/unsupported platform wouldn't involve compiling any C code and I'd ideally like to preserve that. An example situation where C code is not needed is a platform using Pulley even when debug-builtins is enabled because in such a situation the builtins aren't actually used by anything.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 23 2025 at 17:27):

alexcrichton created PR review comment:

This unfortunately is a dependency we cannot use. Spinning on contention is almost never the right concurrency primitive as it's only particularly useful in a kernel setting when interrupts are disabled for example. I also unfortunately do not have a great answer of what to do as an alternative. The best I can think of is "panic on contention" in no_std mode but still use a real std::sync::Mutex in std mode.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 23 2025 at 17:27):

alexcrichton created PR review comment:

I think it'd be best to skip this feature and have this force-enabled as part of the profiling feature, this separate feature doesn't actually enable anything otherwise in Wasmtime itself

view this post on Zulip Wasmtime GitHub notifications bot (Jul 23 2025 at 19:08):

dblnz submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 23 2025 at 19:08):

dblnz created PR review comment:

Ok, thanks for the comment. I wasn't sure what the right decision was here.
I think panic in no_std mode should be fine

view this post on Zulip Wasmtime GitHub notifications bot (Jul 23 2025 at 19:09):

dblnz edited PR review comment.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 23 2025 at 19:27):

dblnz submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 23 2025 at 19:27):

dblnz created PR review comment:

Hmm, I see, I followed the debug-builtins feature and noticed it depends on some symbols from the C, and I thought that for debug-builtins this will be needed.
I'll have another look

view this post on Zulip Wasmtime GitHub notifications bot (Jul 24 2025 at 23:07):

dblnz updated PR #11304.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 24 2025 at 23:21):

dblnz updated PR #11304.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 24 2025 at 23:25):

dblnz submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 24 2025 at 23:25):

dblnz created PR review comment:

The idea I had in mind was that before this change, debug-builtins also enabled the perf_jitdump, so when compiling wasmtime-cli and providing --features debug-builtins now it won't enable the perf_jitdump anymore.
I had added a perf-builtins so that this option could be enabled from the wasmtime-cli.

I have taken your advice and force-enabled perf_jitdump as part of profiling. Let me know if you'd like to change

view this post on Zulip Wasmtime GitHub notifications bot (Jul 24 2025 at 23:30):

dblnz updated PR #11304.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 24 2025 at 23:36):

dblnz updated PR #11304.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 25 2025 at 12:27):

dblnz requested alexcrichton for a review on PR #11304.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 25 2025 at 18:19):

alexcrichton updated PR #11304.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 25 2025 at 18:20):

alexcrichton commented on PR #11304:

I've pushed a few commits as feedback here. Mind double-checking them and confirming they're ok for you?

view this post on Zulip Wasmtime GitHub notifications bot (Jul 28 2025 at 13:17):

dblnz commented on PR #11304:

I've pushed a few commits as feedback here. Mind double-checking them and confirming they're ok for you?

It looks good from my point of view.

Nice touch with the use of optional feature enablement.

"wasmtime-jit-debug?/std",

view this post on Zulip Wasmtime GitHub notifications bot (Jul 28 2025 at 13:56):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 29 2025 at 17:16):

dblnz updated PR #11304.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 29 2025 at 20:47):

alexcrichton merged PR #11304.


Last updated: Dec 06 2025 at 06:05 UTC