File tree Expand file tree Collapse file tree 2 files changed +29
-1
lines changed
Expand file tree Collapse file tree 2 files changed +29
-1
lines changed Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
2-
32set -Eeuo pipefail
43
4+ # Description:
5+ # Builds the Js_of_OCaml (JSOO) Node bindings for o1js. This script:
6+ # - Compiles the OCaml `jsoo_exports` target using Dune to produce the
7+ # `o1js_node.bc.js` JavaScript output.
8+ # - Copies the generated artifact to `src/bindings/compiled/node_bindings/`
9+ # for use by the Node.js runtime (after getting copied again later to dist/node/).
10+ # - Creates a placeholder TypeScript declaration file (`.d.cts`) for type resolution.
11+ # - Renames the output to CommonJS format (`.cjs`) and fixes internal references:
12+ # - Updates WASM import paths.
13+ # - Adjusts error-handling functions for Node compatibility.
14+ #
15+ # Usage:
16+ # npm run build:jsoo:node
17+
18+
519source ./scripts/lib/ux.sh
620
721JSOO_PATH=./src/bindings/ocaml/jsoo_exports/
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22set -Eeuo pipefail
33
4+ # Description:
5+ # Builds the Js_of_OCaml (JSOO) Web bindings for o1js. This script:
6+ # - Compiles the OCaml `jsoo_exports` target using Dune via Js_of_OCaml,
7+ # producing the `o1js_web.bc.js` JavaScript output for browser environments.
8+ # - Copies the generated artifact to `src/bindings/compiled/web_bindings/`
9+ # for inclusion in the o1js web distribution (after getting copied again later to dist/web/).
10+ # - Transforms OCaml-style exceptions into standard JavaScript `Error` objects
11+ # to improve debugging and runtime compatibility.
12+ # - Minifies the resulting JavaScript using `esbuild` for smaller bundle size.
13+ #
14+ # Usage:
15+ # npm run build:jsoo:web
16+
17+
418source ./scripts/lib/ux.sh
519
620JSOO_PATH=./src/bindings/ocaml/jsoo_exports/
You can’t perform that action at this time.
0 commit comments