Skip to content

Support for single-threaded proof generation (Bun compatibility) #1072

Open

Description

@johnson86tw

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions