objectbuffer
wasm-futures-executor
objectbuffer | wasm-futures-executor | |
---|---|---|
4 | 3 | |
163 | 29 | |
- | - | |
2.9 | 0.0 | |
17 days ago | almost 2 years ago | |
TypeScript | Rust | |
MIT License | Apache License 2.0 |
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.
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.
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
What are some alternatives?
proposal-atomics-wait-async - "asynchronous atomic wait" for ECMAScript
wireworld-player - A multithreaded web app for loading and simulating instances of the Wireworld cellular automaton
d2-checklist - Source for www.d2checklist.com, written in Angular and using the Bungie API
yew - Rust / Wasm framework for creating reliable and efficient web applications
comlink - Comlink makes WebWorkers enjoyable.
worktank - A simple isomorphic library for executing functions inside WebWorkers or Node Threads pools.
worktank-loader - WebPack plugin for WorkTank which enables you to execute whole files in a worker pool, transparently.
pasts - Minimal and simpler alternative to the futures crate.
taskwork - Efficient multi-threaded task scheduler using generic re-usable WebWorkers.