-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Allow compiling debug-builtins in no_std environment to enable gdb jit #11304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
alexcrichton
merged 8 commits into
bytecodealliance:main
from
dblnz:no-std-debug-builtins
Jul 29, 2025
Merged
Allow compiling debug-builtins in no_std environment to enable gdb jit #11304
alexcrichton
merged 8 commits into
bytecodealliance:main
from
dblnz:no-std-debug-builtins
Jul 29, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
b63d425 to
21981ef
Compare
8a8c03b to
6bb53bf
Compare
- Make jit-debug crate #![no_std] when `std` feature is not enabled - Make gdb_jit_int module build in no_std environment - Use std when perf_jitdebug is enabled because the perf_jitdebug module does not run in no_std environment - Change debug-builtins feature to only enable gdb_jit_int - The perf_jitdebug feature is enabled in profiling mode only Signed-off-by: Doru Blânzeanu <[email protected]>
6bb53bf to
9363203
Compare
These are otherwise present via `std`.
* Enable `wasmtime-jit-debug/std` from wasmtime's `std` feature * Only enable `perf_jitdump` from `profiling` as that's all that's explicitly needed.
|
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", |
alexcrichton
approved these changes
Jul 28, 2025
Signed-off-by: Doru Blânzeanu <[email protected]>
bongjunj
pushed a commit
to prosyslab/wasmtime
that referenced
this pull request
Oct 20, 2025
bytecodealliance#11304) * Allow compiling debug-builtins in no_std environment to enable gdb jit - Make jit-debug crate #![no_std] when `std` feature is not enabled - Make gdb_jit_int module build in no_std environment - Use std when perf_jitdebug is enabled because the perf_jitdebug module does not run in no_std environment - Change debug-builtins feature to only enable gdb_jit_int - The perf_jitdebug feature is enabled in profiling mode only Signed-off-by: Doru Blânzeanu <[email protected]> * Remove feature listing from `default` These are otherwise present via `std`. * Shuffle around some features * Enable `wasmtime-jit-debug/std` from wasmtime's `std` feature * Only enable `perf_jitdump` from `profiling` as that's all that's explicitly needed. * Remove empty features list * Cut down on some `#[cfg]` usage * Update comments in gdb_jit_int module * Add CI checks that `debug-builtins` builds on no_std * Fix missing has_host_compiler_backend when debug-builtins enabled Signed-off-by: Doru Blânzeanu <[email protected]> --------- Signed-off-by: Doru Blânzeanu <[email protected]> Co-authored-by: Alex Crichton <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR takes care of enabling the compilation of
gdb_jit_intmodule in thejit-debugcrate to ensure the native debugging also works inno_stdenvironments.My aim is to have this in for the LTS version 36.0.0 😃
This work has been discussed in #wasmtime > Debugging a wasm module in a hyperlight guest.
Summary
jit-debugcrate#![no_std]whenperf_jitdebugis not enabledgdb_jit_intmodule build inno_stdenvironmentperf_jitdebugis enabled because theperf_jitdebugmodule does not run inno_stdenvironmentdebug-builtinsfeature intodebug-builtinsandperf-builtinsto individually toggle:no_stdgdb_jit_intmodule by usingdebug-builtinsperf_jitdebugmodule usingperf-builtins. NOTE: They can be both enabled, but it won't supportno_std.