Skip to content

Add Node.js binding and Node-RED contrib package#694

Merged
1technophile merged 1 commit into
developmentfrom
add-nodejs-and-node-red-packages
May 10, 2026
Merged

Add Node.js binding and Node-RED contrib package#694
1technophile merged 1 commit into
developmentfrom
add-nodejs-and-node-red-packages

Conversation

@1technophile
Copy link
Copy Markdown
Member

Description:

Ship the decoder as two new npm packages alongside the existing Python binding:

  • theengs-decoder base Node.js binding
  • node-red-contrib-theengs-decoder Node-RED palette node

The decoder is compiled to WebAssembly via Emscripten (single-file output, embind), so installation is pure-JS on every OS, Node version, and CPU arch — no node-gyp toolchain required on the user's machine.

Layout mirrors the existing python/ directory under a new nodejs/. The root CMakeLists.txt gains a BUILD_WASM branch alongside SKBUILD that reuses src/decoder.cpp.

CI: PR_build.yml installs Emscripten, builds the wasm module, and runs both packages' test suites (5 base + 5 wrapper). publish_npm.yml is release-triggered, stamps versions from the git tag, and publishes both packages to npm with provenance — same release event that already fires the PyPI publish.

Docs: new "Using with Node.js" and "Using with Node-RED" pages added to the use/ section of the VitePress site.

Checklist:

  • The pull request is done against the latest development branch
  • Only one feature/fix was added per PR and the code change compiles without warnings
  • I accept the DCO.

Ship the decoder as two new npm packages alongside the existing Python
binding:

  * theengs-decoder            base Node.js binding
  * node-red-contrib-theengs-decoder    Node-RED palette node

The decoder is compiled to WebAssembly via Emscripten (single-file output,
embind), so installation is pure-JS on every OS, Node version, and CPU
arch — no node-gyp toolchain required on the user's machine.

Layout mirrors the existing python/ directory under a new nodejs/. The
root CMakeLists.txt gains a BUILD_WASM branch alongside SKBUILD that
reuses src/decoder.cpp.

CI: PR_build.yml installs Emscripten, builds the wasm module, and runs
both packages' test suites (5 base + 5 wrapper). publish_npm.yml is
release-triggered, stamps versions from the git tag, and publishes both
packages to npm with provenance — same release event that already fires
the PyPI publish.

Docs: new "Using with Node.js" and "Using with Node-RED" pages added to
the use/ section of the VitePress site.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@1technophile 1technophile merged commit 1c6655a into development May 10, 2026
16 checks passed
@1technophile 1technophile deleted the add-nodejs-and-node-red-packages branch May 10, 2026 22:12
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