Skip to content

Example where comlink wraps a class instance #1

@clbarnes

Description

@clbarnes

This is a great repo which demonstrates features which seem very poorly documented in wasm-pack, webpack, comlink, and webworkers...

Do you have any idea whether it's possible, or how easy it would be, to use a similar pattern to wrap some instance of a class where all the logic is going to happen? Basically something like the output of https://github.com/blingboot/comlink-loader-webpack5 (which seems to fail at incorporating wasm). I have a rust struct exposed over wasm, which should execute inside a webworker, but needs its state to be updated by method calls made from the main thread.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions