Skip to content

Component: Unclear how to access exported resource returned by guest #9946

Description

@tliron

The exported resources example shows how to create a guest resource. Unfortunately it doesn't show how to actually send that resource to an exported client function.

But, to this issue, it doesn't show how to access a resource returned by a call to the guest.

The guest returns ResourceAny, and the documentation does make it clear that this is expected. However, now what?

It cannot be converted to a Resource, because try_into_resource only works on host resources. (That is also not clear in the documentation, I had to delve into the source code to figure that out.)

Also, it's also unclear to me if I must call resource_drop on the value returned by the guest. Or is that necessary just for host resources?

The documentation could be more specific, and the example is not especially useful. In any case, I do not know how to proceed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions