Skip to content

Components: Implementing traits in library without dyn #8764

Closed
@MendyBerger

Description

@MendyBerger

Currently, if you wanna implement the traits generated by component::bindgen in a library that other's are gonna use with custom types, you can't do it on T: YourTrait, you have to implement it on dyn YourTrait. At least that's what I gather from what wasi-http is doing.

I'm working on wasi-webgpu, where we'd really like one of our methods to be generic, but generics are not object-safe. Is there any way we can do that?

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