Skip to content

Ship a Node entry in the npm package #2

Closed

Description

@Project516

The npm package ships only the browser files (dist/). Programs and test suites that want to run Java under Node have to use a source checkout: src/node.ts exports runNode and the CLI, but it runs as TypeScript and reads the exploded build/jdk image that pnpm jdk builds.

Proposal: ship a built Node entry in the package, for example dist/node.js exporting runNode, plus a bin, that runs on Node 23.6 or newer against the packaged dist/boot.pack and dist/jdk/<module>.jar files instead of build/jdk.

Open questions:

  • Reading classes and resources from the per-module jars on disk, as the browser does over HTTP, instead of the exploded image.
  • Which runNode options are public API.
  • Package size: the Node entry adds little, since it reuses the same jdk/ files.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions