https://github.com/aandreba/js-threads
https://github.com/aandreba/js-threads
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/aandreba/js-threads
- Owner: Aandreba
- Created: 2023-05-31T10:15:46.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-06-03T21:38:50.000Z (almost 3 years ago)
- Last Synced: 2025-02-05T08:51:28.301Z (over 1 year ago)
- Language: Zig
- Size: 69.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Usage
- From your main file, export a variable named `env` with all the functions you wish to import to your WASM module
## Known issues
- Build option `import_memory` will have to be set to `true`, requiring you to specify both inital and maximum Wasm memory on both your build file, and when calling `load` on your Js project.
- `@memcpy` panics if copying out-of-bounds pointers, even in zero-sized copies.
- See [this issue](https://github.com/ziglang/zig/issues/15920)
- Futexes executed on the main thread will operate in busy-wait, as `Atomics.wait` panics on the main thread. In either case,
blocking the main thread for long periods of time isn't recommended.