• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

RobotWebTools / rclnodejs / 27934298845
91%

Build:
DEFAULT BRANCH: develop
Ran 22 Jun 2026 06:53AM UTC
Jobs 1
Files 65
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

22 Jun 2026 06:36AM UTC coverage: 91.143% (-0.08%) from 91.22%
27934298845

push

github

web-flow
[Demo][Electron] Load prebuilt binaries at runtime (#1546)

## Summary
Make the Electron demos load the prebuilt `rclnodejs` native binary at runtime instead of recompiling it during `electron-forge` packaging, fix the `turtle_tf2` demo's stuck loading screen on GPU-less environments (WSL2/headless), shorten the demo READMEs, and harden the native-loader unit tests.

## Native loader (`lib/native_loader.js`)
- Add `mirrorPrebuiltToBuildRelease()`: when an exact-match prebuilt binary is found, copy it into `build/Release/rclnodejs.node` so standard `bindings` resolution (and packaged Electron apps where `ROS_DISTRO` may be unset at runtime) can locate it. Non-destructive — never overwrites an existing build output, preserving local source builds.
- Extract `buildFromSource()` and make it Electron-aware: when running under Electron, target Electron's headers/ABI via `npm_config_target`, `npm_config_dist_url`, and `npm_config_arch` so the compiled addon matches the runtime (the addon links libuv directly, so host runtime matters).
- Replace the two duplicated inline `npm run rebuild` `execSync` calls (forced build + fallback build paths) with the shared `buildFromSource()` helper.

## Electron demos — load prebuilt at packaging time
- `demo/electron/{car,manipulator,topics,turtle_tf2}/package.json`: Remove the `"rebuild": "electron-rebuild"` script; add `forge.rebuildConfig.ignoreModules: ["rclnodejs"]` so `electron-forge` does not recompile `rclnodejs`, using the shipped prebuilt binary instead.

## `turtle_tf2` demo — WebGL / loading-screen fixes
- `main.js`: append `ignore-gpu-blocklist` and `enable-unsafe-swiftshader` command-line switches so WebGL works on systems without a usable GPU (WSL2, headless, VMs) where Chromium blocklists hardware WebGL.
- `renderer.js`: register ROS2 status listeners before 3D scene setup so the loading screen always reflects initialization progress, and wrap `initializeScene()/setupEventListeners()/setupKeyboardControls(... (continued)

2047 of 2409 branches covered (84.97%)

Branch coverage included in aggregate %.

39 of 61 new or added lines in 1 file covered. (63.93%)

16722 of 18184 relevant lines covered (91.96%)

226.37 hits per line

Uncovered Changes

Lines Coverage ∆ File
22
73.45
-2.41% lib/native_loader.js
Jobs
ID Job ID Ran Files Coverage
1 27934298845.1 22 Jun 2026 06:53AM UTC 65
91.14
GitHub Action Run
Source Files on build 27934298845
  • Tree
  • List 65
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #27934298845
  • 24dabc41 on github
  • Prev Build on develop (#27677718609)
  • Next Build on develop (#28013438640)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc