feat: route re-exporter resource imports to handle table functions#80
Merged
feat: route re-exporter resource imports to handle table functions#80
Conversation
Wire the handle table functions into the P2 wrapper: 1. Add component_idx to MergedImport so the wrapper knows which component each import belongs to. 2. Export handle table functions ($ht_new_N, $ht_rep_N, $ht_drop_N) from the fused module so the wrapper can alias them. 3. In LocalResource import resolution, check if the import's component has a handle table. If so, alias the handle table export instead of emitting canon resource.new/rep/drop on a shared type. This completes the critical path: re-exporter components now use per-component in-memory handle tables with 4-byte-aligned addresses instead of sequential canonical indices. Part of #69, closes #72. 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
component_idxtoMergedImportto track which component each import belongs to$ht_new_N,$ht_rep_N,$ht_drop_N) from the fused modulecomponent_wrap.rs, routeLocalResourceimports from re-exporter components to handle table function aliases instead ofcanon resource.new/rep/dropThis is the critical wiring step: re-exporter components now use per-component in-memory handle tables with 4-byte-aligned addresses instead of sequential canonical indices.
Part of #69, closes #72.
Test plan
🤖 Generated with Claude Code