Crate leptos_workers

source ·
Expand description

This is an abstraction layer on top of Web Workers to make them easier to work with. Web workers are useful to offload heavy computations from the main rendering thread, keeping the user interface interactive even if the computation is an intense synchronous loop.

To get started, take a look at the documentation for the worker macro.

Note: The crate relies on having support for ECMAScript modules in workers, so keep that in mind with regards to compatibility.

For support, check out the #libraries channel on the official Leptos Discord Channel. Feel free to ping @Jinxit.

Re-exports

  • pub use flume::Receiver;
  • pub use flume::Sender;
  • pub use futures::stream::Stream;

Modules

  • This module contains implementations of executors.
  • This module contains all the available flavours of workers.

Enums

Attribute Macros

  • The main macro powering worker functions.