Conversation
Adapters now call [resource-rep] to convert borrow<T> handles to their raw representation before forwarding to callee core functions. Per the canonical ABI, lower_borrow returns the representation (not the handle) when T is defined by the callee instance. own<T> params are left as handles since the callee calls from_handle/resource.rep internally. Key changes: - adapter/mod.rs: add resource_rep_calls field (borrow params only) - adapter/fact.rs: Phase 0 resource.rep conversion in all four generator functions; guard early-return "no copying needed" path to not skip Phase 0; build_resource_import_map for [resource-rep] lookup - parser.rs: resource_param_positions(), resource_result_positions() - resolver.rs: ResolvedResourceOp, build_resource_type_to_import(), resolve_resource_positions() with borrow/own distinction Resources fixture promoted from graceful degradation to hard assertion. 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
[resource-rep]to convertborrow<T>handles to raw representations before forwarding to callee core functions, per the canonical ABI'slower_borrowsemanticsown<T>params are correctly left as handles — the callee callsfrom_handle/resource.repinternallygenerate_memory_copy_adapterskipped Phase 0, producing simple passthroughs for functions with only resource paramsTest plan
🤖 Generated with Claude Code