fix(native-host): use host-specific tt-native resolution so Linux binary loads addon
CI / Build & Test (push) Successful in 3m50s
CI / Build & Test (push) Successful in 3m50s
When building with --all, the bundle used a single addon resolution (darwin-arm64), so the Linux binary tried to load the wrong prebuild and tt-native failed. Patch tt-native binding with a nested resolution map (addon → bare → node → platform → arch) so the runtime selects the correct prebuild per platform; SSH PTY then works on Linux. - scripts/build-distributable.js: build host-specific addonResolutions, write binding with full map; update comments - docs/ARCHITECTURE.md, CONTRIBUTING.md: document addon resolution patch - CHANGELOG.md: add entry under bug fixes
This commit is contained in:
+2
-1
@@ -21,7 +21,8 @@ All notable changes to Holesail Browser are documented here.
|
||||
- Lookup results now display in a modal showing host, port, protocol, and privacy status
|
||||
- Uses `Holesail.lookup()` to return structured connection metadata
|
||||
|
||||
**Bug fixes and stability (35 issues resolved)**
|
||||
**Bug fixes and stability (36 issues resolved)**
|
||||
- Fixed tt-native not available on Linux (SSH PTY disabled): build script now sets a host-specific addon resolution map so each platform binary loads the correct tt-native prebuild instead of the first host’s (darwin-arm64).
|
||||
- Fixed `ReferenceError` for undeclared `regenerated` variable in `certificate-authority.js` on Windows
|
||||
- Added `hs.removeAllListeners()` in error paths of `setVirtualHost` and `startServiceTunnel` to prevent stale listener leaks
|
||||
- Cleared `reconnectTimer` when replacing an existing virtual host or service tunnel entry
|
||||
|
||||
@@ -364,6 +364,6 @@ The native host is built with the [Bare](https://github.com/holepunchto/bare) ru
|
||||
|
||||
1. `bare-pack` bundles the JS module graph (resolving `node:*` imports via `bare-node-*` shims)
|
||||
2. `bare-build` embeds the bundle into a pre-built Bare runtime binary, producing a self-contained executable
|
||||
3. Native addons (`.bare` files) are embedded and extracted to a content-addressed temp directory at runtime
|
||||
3. Native addons (`.bare` files) are embedded and extracted to a content-addressed temp directory at runtime. The build script patches addons that bare-pack cannot detect (e.g. tt-native’s `load-addon` pattern) with a host-specific resolution map so each platform binary loads the correct prebuild (e.g. Linux gets `linux-x64/tt-native.bare`, not darwin).
|
||||
|
||||
Targets: `darwin-arm64`, `darwin-x64`, `linux-arm64`, `linux-x64`, `win32-x64`.
|
||||
|
||||
@@ -106,6 +106,7 @@ Produces self-contained native host binaries using the `bare-pack` + `bare-build
|
||||
|
||||
1. `bare-pack` bundles the entire JS module graph (with optional-dep stubs) into a single `.bundle` file
|
||||
2. `bare-build` embeds the bundle into a pre-built Bare runtime binary for the target platform
|
||||
3. The script patches tt-native’s binding with a host-specific addon resolution map so each platform (including Linux) loads the correct prebuild; without this, the Linux binary would try to load the first host’s prebuild (e.g. darwin) and tt-native would be unavailable (SSH PTY disabled).
|
||||
|
||||
Output goes to `releases/<platform>/holesail-browser-host[.exe]`. Supported targets: `darwin-arm64`, `darwin-x64`, `linux-arm64`, `linux-x64`, `win32-x64`.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user