Files
fivenode_go/go.mod
CharlesKWON f2eada1a33 feat(napi P1): Go-implemented libfivenode (c-shared) for the N-API bridge
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>
2026-06-15 22:25:46 +09:00

19 lines
389 B
Modula-2

module fivenode_go
go 1.25.0
require (
five v0.0.0
github.com/jackc/pgx/v5 v5.9.2
)
require (
github.com/jackc/pgpassfile v1.0.0 // indirect
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect
github.com/jackc/puddle/v2 v2.2.2 // indirect
golang.org/x/sync v0.17.0 // indirect
golang.org/x/text v0.29.0 // indirect
)
replace five => ../../fivedev/five