cfallin requested alexcrichton for a review on PR #12645.
cfallin opened PR #12645 from cfallin:debugging-entity-ids to bytecodealliance:main:
When building an introspection API for use by a debugger, we need a way to expose identity: that is, to give some way of knowing that a given
Memory,Instance, etc. is this one and not that one. Our handle types variously have eitherEqimplementations or e.g.Module::samefor the ones that wrap anArcunder-the-covers; but that's not enough to allow a debugger to e.g. build a hashmap for whatever metadata that it might expose via whatever debugging protocol.For maximal generality and flexibility, we should expose the unique IDs that already more-or-less exist: for instances, that is their instance ID directly; for entities owned by instances, we can build a
u64with the instance ID in the upper 32 bits and the defined-index in the lower 32 bits. IDs for all entities except modules are unique-within-a-Store (and this is all that is needed); IDs for modules happen to reuse theCompiledModuleIdand so are unique-within-an-Engine.I've opted to name these
debug_index_within_storeto scope the feature and intended use-case clearly, but if there's a desire, I could easily rename them to simplyindex. I shied away from that here because I didn't want to give a notion that these indices are somehow canonical or correspond to some order or other.<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
cfallin requested wasmtime-core-reviewers for a review on PR #12645.
cfallin commented on PR #12645:
(I'll note as an aside that this is I believe the last PR I need to the
wasmtimecrate to build a functional debugger top-half; all the rest of my work is in thedebuggercrate and the guest debugger component. Thanks for all the reviews so far!)
github-actions[bot] added the label wasmtime:api on PR #12645.
alexcrichton submitted PR review.
cfallin updated PR #12645.
cfallin has enabled auto merge for PR #12645.
cfallin updated PR #12645.
cfallin updated PR #12645.
cfallin added PR #12645 Debugging: add unique-within-store IDs for every entity. to the merge queue
cfallin commented on PR #12645:
Just to record CI breakage for the record: this job in the merge queue is failing with
2026-02-24T17:57:36.054084Z WARN oci_client::token_cache: Invalid bearer token error=Error(InvalidToken) Error: registry error: HTTP status server error (503 Egress is over the account limit.)when trying to fetch WITs from a registry. I'll retry and see if it's ephemeral or if the limit reached is real.
cfallin removed PR #12645 Debugging: add unique-within-store IDs for every entity. from the merge queue
cfallin added PR #12645 Debugging: add unique-within-store IDs for every entity. to the merge queue
cfallin commented on PR #12645:
It's failing again here -- cc @alexcrichton @pchickey, it looks like we have CI blocked (just after all the security releases merged fortunately?) from
wkghitting an account limit. Should we delete the check for now?
alexcrichton commented on PR #12645:
Keep throwing it at the queue, we'll deal with the root cause later.
cfallin merged PR #12645.
cfallin removed PR #12645 Debugging: add unique-within-store IDs for every entity. from the merge queue
Last updated: Mar 23 2026 at 16:19 UTC