Problem
I'm attempting to use Semaphore with Bun to generate proofs, but encountering the following error:
Argument 1 ('event') to EventTarget.dispatchEvent must be an instance of Event
Root Cause
After investigation, this error occurs because Bun does not currently support multithreading/worker threads (see bun#11005).
Proposed Solution
I noticed that snarkjs provides an option to disable multithreading for execution environments that don't support worker threads:
Request
Would it be possible for Semaphore to expose a similar option to switch to single-threaded mode for proof generation? This would enable compatibility with runtimes like Bun that don't support worker threads.
Environment
- Runtime: Bun v1.3.2
- Semaphore version: v4.14.0
Problem
I'm attempting to use Semaphore with Bun to generate proofs, but encountering the following error:
Root Cause
After investigation, this error occurs because Bun does not currently support multithreading/worker threads (see bun#11005).
Proposed Solution
I noticed that snarkjs provides an option to disable multithreading for execution environments that don't support worker threads:
Request
Would it be possible for Semaphore to expose a similar option to switch to single-threaded mode for proof generation? This would enable compatibility with runtimes like Bun that don't support worker threads.
Environment