0.1.1 • Published 11 months ago
@oligami/browser_wasi_shim-threads v0.1.1
A pure javascript shim for WASI Preview 1 threads
!WARNING The code in this directory is less production ready than the main browser_wasi_shim code. This code requires
SharedArrayBuffer,waitAsyncandAtomicsto be enabled in the browser, so it may not work in all browsers. For example, Firefox failed to run the demo in this directory. Chrome worked fine. This library requirecross-origin isolationto be enabled in the browser.
This project implement threads on browser_wasi_shim
Features
- thread creation
- Filesystem wrapper accessible by multiple workers
- thread pool
Building
$ npm install
$ npm run buildRunning the demo
$ git submodule update --init
$ cd examples && npm install && npm run devAnd visit http://localhost