Skip to content

Request: Browser-compatible bundle for Java/GraalVM integration #1131

Open

Description

@rgopi2win

Title

Request: Browser-compatible bundle for Java/GraalVM integration

Description

I'm working on a Java wrapper for the AsyncAPI parser using GraalVM's JavaScript engine. The current @asyncapi/parser package (v3.6.0) cannot be bundled for use in GraalVM because it depends on Node.js-specific APIs (fetch, Headers, etc.) that aren't available in GraalVM's JavaScript environment.

Current Situation

  • The old bundle-es5.js only supports AsyncAPI 2.4.0
  • The new @asyncapi/parser v3.x requires fetch API and browser globals
  • When bundled with webpack, it fails with: TypeError: Cannot set property 'Headers' of undefined

Request

Could you provide or help create a browser-compatible bundle that:

  1. Supports both AsyncAPI v2.x and v3.x
  2. Works in environments without fetch API (or includes polyfills)
  3. Can run in GraalVM's JavaScript engine
  4. Doesn't depend on Node.js-specific modules

Use Case

Java applications that need to parse AsyncAPI documents without spawning Node.js processes or using native V8 bindings (which don't support macOS ARM).

Alternative Solutions Considered

  • Using Playwright/Puppeteer (too heavy)
  • Using J2V8 (no macOS ARM support)
  • Creating custom bundle with webpack (fails due to fetch dependency)

Environment

  • GraalVM JS engine via javax.script
  • Target: Java 11+
  • Platform: macOS ARM, Linux, Windows

Would appreciate guidance on:

  1. How to properly bundle the parser for non-browser/non-Node environments
  2. If there's an existing standalone bundle
  3. If this use case is supported

Activity

  1. github-actions commented on Feb 17, 2026

    @github-actions

    Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request.
    Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

  2. github-actions commented on Jun 18, 2026

    @github-actions

    This issue has been automatically marked as stale because it has not had recent activity 😴

    It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

    There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

    Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

    Thank you for your patience ❤️

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions