wasm-futures-executor
objectbuffer
wasm-futures-executor | objectbuffer | |
---|---|---|
3 | 4 | |
29 | 161 | |
- | - | |
0.0 | 2.9 | |
almost 2 years ago | 5 days ago | |
Rust | TypeScript | |
Apache License 2.0 | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
wasm-futures-executor
-
How to enable Bulk Memory Operations when compiling to WebAssembly?
RUSTFLAGS='-C target-feature=+bulk-memory' should work according to the readme of https://github.com/wngr/wasm-futures-executor
-
Threading for WASM target
I recommend using it through the wasm-futures-executor crate: https://github.com/wngr/wasm-futures-executor.
-
Web Crypto API
By the way, I built something similar (?): A Rust library that mimics the API of the `futures-executor` crate, but each worker thread is a single WebWorker.
https://github.com/wngr/wasm-futures-executor
objectbuffer
-
JavaScript APIs You Don’t Know About
is a great example, which I also tried to (poorly) reimplement myself.
It creates a new data structures that behave as an object for the user but is backed by SharedArrayBuffer in order to support parallel computation over it.
- [0]: https://github.com/Bnaya/objectbuffer
- Web Crypto API
-
isoworker - universal multithreading with main-thread dependencies, 6kB
There is a lot of complexity involved in representing arbitrary javascript objects inside an ArrayBuffer whilst making them thread-safe. I'd first point to a library like objectbuffer. There's also more fixed struct-like options such as Google's FlatBuffers or buffer-backed-object.
What are some alternatives?
wireworld-player - A multithreaded web app for loading and simulating instances of the Wireworld cellular automaton
proposal-atomics-wait-async - "asynchronous atomic wait" for ECMAScript
yew - Rust / Wasm framework for creating reliable and efficient web applications
d2-checklist - Source for www.d2checklist.com, written in Angular and using the Bungie API
worktank - A simple isomorphic library for executing functions inside WebWorkers or Node Threads pools.
comlink - Comlink makes WebWorkers enjoyable.
pasts - Minimal and simpler alternative to the futures crate.
worktank-loader - WebPack plugin for WorkTank which enables you to execute whole files in a worker pool, transparently.
taskwork - Efficient multi-threaded task scheduler using generic re-usable WebWorkers.