#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

#60 in WebAssembly

Download history 425/week @ 2024-07-02 640/week @ 2024-07-09 515/week @ 2024-07-16 726/week @ 2024-07-23 748/week @ 2024-07-30 351/week @ 2024-08-06 536/week @ 2024-08-13 671/week @ 2024-08-20 935/week @ 2024-08-27 1490/week @ 2024-09-03 950/week @ 2024-09-10 466/week @ 2024-09-17 733/week @ 2024-09-24 563/week @ 2024-10-01 486/week @ 2024-10-08 685/week @ 2024-10-15

2,506 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–31MB
~425K SLoC