Skip to content

feat: implement ResourceAny -> Resource<T> conversion#7712

Merged
alexcrichton merged 1 commit into
bytecodealliance:mainfrom
rvolosatovs:feat/resource-any-2-resource
Jan 4, 2024
Merged

feat: implement ResourceAny -> Resource<T> conversion#7712
alexcrichton merged 1 commit into
bytecodealliance:mainfrom
rvolosatovs:feat/resource-any-2-resource

Conversation

@rvolosatovs
Copy link
Copy Markdown
Member

@rvolosatovs rvolosatovs commented Dec 20, 2023

Closes #7704
Follow-up on #7688 (based on that PR for simplicity)

Once #7688 is merged, I'll rebase such that only 5b20daf would be in this PR. Also happy to move the commit to #7688 if you prefer

@rvolosatovs
Copy link
Copy Markdown
Member Author

cc @alexcrichton

@github-actions github-actions Bot added the wasmtime:api Related to the API of the `wasmtime` crate itself label Dec 20, 2023
@github-actions
Copy link
Copy Markdown

Subscribe to Label Action

cc @peterhuene

Details This issue or pull request has been labeled: "wasmtime:api"

Thus the following users have been cc'd because of the following labels:

  • peterhuene: wasmtime:api

To subscribe or unsubscribe from this label, edit the .github/subscribe-to-label.json configuration file.

Learn more.

@rvolosatovs rvolosatovs force-pushed the feat/resource-any-2-resource branch 3 times, most recently from accf39c to 00ca470 Compare December 22, 2023 13:53
@github-actions github-actions Bot added the cranelift Issues related to the Cranelift code generator label Dec 22, 2023
Copy link
Copy Markdown
Member

@alexcrichton alexcrichton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable to me, thanks!

There's one minor API-design question where it's not possible to recover from this method if it fails due to consumption of the ResourceAny input. That being said the main failure condition, the wrong type, can be tested manually ahead of time, so I think that's ok.

Comment thread crates/wasmtime/src/component/resources.rs Outdated
Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
@rvolosatovs rvolosatovs force-pushed the feat/resource-any-2-resource branch from 00ca470 to 6b72f00 Compare January 4, 2024 10:29
@rvolosatovs rvolosatovs marked this pull request as ready for review January 4, 2024 10:30
@rvolosatovs rvolosatovs requested a review from a team as a code owner January 4, 2024 10:30
@rvolosatovs rvolosatovs requested review from alexcrichton and pchickey and removed request for a team January 4, 2024 10:30
@alexcrichton alexcrichton added this pull request to the merge queue Jan 4, 2024
Merged via the queue into bytecodealliance:main with commit ae535f1 Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cranelift Issues related to the Cranelift code generator wasmtime:api Related to the API of the `wasmtime` crate itself

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement ResourceAny -> Resource<T> conversion

2 participants