fix: export dedup + shared resource types + disable handle tables#89
Merged
fix: export dedup + shared resource types + disable handle tables#89
Conversation
…tables Three interconnected fixes for 3-component resource chain support: 1. Export dedup suffixing (multi-memory mode): suffix duplicate export names with $comp_idx instead of dropping them. Prevents the fixup module from being wired to the wrong component's indirect table. 2. Shared resource types: key resource types by resource name only (not interface+name). Re-exporters import and export the same resource under different interface names (imports, exports, test:…/test) and must share one wasmtime handle table. 3. Disable handle table allocation: with shared canonical resource types, all components use wasmtime's built-in handle tables. Custom per-component handle tables are no longer needed. The 3 resource chain tests still fail with an unreachable trap in the leaf's allocator — this is a separate bug in how the intermediate component's code path interacts with the leaf's internal functions. Part of #69. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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
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.
Summary
Three interconnected fixes for 3-component resource chain support:
Export dedup suffixing: In multi-memory mode, suffix duplicate export names with
$comp_idxinstead of silently dropping them. Previously, the fixup module's indirect table was wired to the wrong component's functions due to export name collisions ("0", "1", "$imports" etc.).Shared resource types: Key resource types by resource name only (not interface+name). Re-exporters import and export the same resource under different interface names but must share one canonical wasmtime handle table.
Disable handle table allocation: With shared canonical resource types, all components use wasmtime's built-in handle tables. Custom per-component handle tables are no longer needed (code preserved with
#[allow(dead_code)]for potential future use).Part of #69.
Test plan
🤖 Generated with Claude Code