Faithful port of the C++ fivenode topology — node hosts the existing N-API
addon, which now links a libfivenode implemented in Go (CGO c-shared)
instead of the Harbour-C core. cmd/libfivenode exports the C ABI the addon
expects (hb_bridge_init/shutdown/handle_request/last_error/set_auth/
clear_auth/free, tfn_register_callbacks). Build:
go build -buildmode=c-shared \
-ldflags="-extldflags=-Wl,-install_name,@rpath/libfivenode.dylib" \
-o native/output/darwin/libfivenode.dylib ./cmd/libfivenode
P1 proven: node → addon → Go hb_bridge_handle_request round-trips a
response in-process (no Harbour-C, no subprocess). P2 wires the real PRG
dispatcher; P3 the npm callbacks (tfn_register_callbacks → Require); P4
the node main-thread marshaling. (goja probe removed — pure-JS only,
insufficient for full npm.)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
389 B
389 B