Skip to content

feat(js): embed opencv.js into priv and expose its URL/path - #332

Merged
cocoa-xu merged 1 commit into
mainfrom
cx/js-embed-opencv-js
Jul 19, 2026
Merged

feat(js): embed opencv.js into priv and expose its URL/path#332
cocoa-xu merged 1 commit into
mainfrom
cx/js-embed-opencv-js

Conversation

@cocoa-xu

Copy link
Copy Markdown
Owner

No description provided.

Add `config :evision, Evision.JS, embed_js: true` (or EVISION_EMBED_JS=true).
When set, a new compile step drops the CSP-clean opencv.js next to the NIF in
priv: it downloads the release asset (verifying opencv.sha256) on the
precompiled route, or builds it from the fetched OpenCV source via
scripts/build_opencv_js.sh on the from-source route. Defaults off, so existing
builds are unaffected.

Evision.JS now also exposes opencv_js_url/0,1 (where the matching opencv.js
lives) and opencv_js_path/0 (the embedded file, or :error), mirrored in the
Erlang evision_js module.
@cocoa-xu
cocoa-xu merged commit f1dc93b into main Jul 19, 2026
6 checks passed
@cocoa-xu
cocoa-xu deleted the cx/js-embed-opencv-js branch July 19, 2026 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant