#browser #utilities #array #buffer #event-listener #events

workflow-wasm

WASM utilities for in-browser use (timers, callbacks, etc.)

37 releases (15 breaking)

0.18.0 Sep 7, 2024
0.15.0 Jul 26, 2024
0.11.0 Feb 25, 2024
0.10.2 Dec 24, 2023
0.1.0 Sep 21, 2022

#70 in WebAssembly

Download history 690/week @ 2024-07-29 387/week @ 2024-08-05 414/week @ 2024-08-12 768/week @ 2024-08-19 867/week @ 2024-08-26 1372/week @ 2024-09-02 1073/week @ 2024-09-09 567/week @ 2024-09-16 693/week @ 2024-09-23 571/week @ 2024-09-30 483/week @ 2024-10-07 753/week @ 2024-10-14 643/week @ 2024-10-21 566/week @ 2024-10-28 311/week @ 2024-11-04 709/week @ 2024-11-11

2,358 downloads per month
Used in 58 crates (30 directly)

MIT/Apache

225KB
4.5K SLoC

workflow-wasm

Part of the workflow-rs application framework.


WASM (browser) functionality

github crates.io docs.rs license

Features

  • timer and interval functions that wrap JavaScript setTimeout() and setInterval() returning a handle that encapsulates the JavaScript handle and the callback closure. Dropping this handle results in the closing of the timeout or interval as well as destruction of the closure. (This is useful to prevent memory leaks when creating JavaScript Closures and using closure.forget() functionality)
  • Callback struct that encapsulates a JavaScript event listener (callback) closure making it easier to creaet and retain JavaScript closures.
  • Utility functions that simplify accessing JavaScript object properties and function invocations (based on top of web-sys and js-sys APIs).

Dependencies

~12–27MB
~418K SLoC