Initial bootstrap: fnode CLI + hbrtl_ext pipeline

* cmd/fnode — build/run CLI that drives Five's compiler packages
  (pp, parser, analyzer, gengo) and stitches generated prg_*.go
  together with fivenode_go's own hbrtl_ext/* packages in a temp
  module. Result is one self-contained Go binary; no FFI, no Node.

* hbrtl_ext/hello — bootstrap RTL extension proving the
  blank-import-init() registration path works end-to-end. Exposes
  FNODE_HELLO() to PRG.

* app/hello.prg — minimum end-to-end test: calls Date() (Five RTL)
  and FNODE_HELLO() (fivenode_go RTL) from the same binary.

Verified: ./fnode build app/hello.prg -o hello_app → 17 MB single
binary that prints both lines. The same pattern will host the
HTTP server, bridge capi helpers, and PostgreSQL client coming
in 1a.2b–1a.4.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-27 10:07:47 +09:00
commit aeccfe5c48
6 changed files with 459 additions and 0 deletions

41
README.md Normal file
View File

@@ -0,0 +1,41 @@
# fivenode_go
FiveNode for [Five](https://gitea.fivego.org/fivedev/five) — a Harbour-compatible
web framework that compiles to a **single Go binary**. No Node.js, no FFI,
no Apache. PRG sources go in, one executable comes out.
Successor to the koffi/N-API based [fivenode](https://gitea.fivego.org/fivenode/fivenode)
framework, rebuilt on the Five Pure-Go runtime.
## Status
Early bootstrap — Phase 1a in progress.
## Architecture
```
Browser ──── HTTP/HTTPS ──── fivenode_go single binary
├─ Five hbrt VM (PRG interpreter / compiled)
├─ Five hbrtl (483 standard RTL functions)
├─ hbrtl_ext/httpserver — HTTP server RTL
├─ hbrtl_ext/capi — bridge_*.prg helpers
├─ hbrtl_ext/pgrtl — PostgreSQL client RTL
├─ app/ — bridge_*.prg + app PRG
└─ go:embed — static assets
```
`fnode build api/*.prg --extra-rtl=hbrtl_ext/... -o myapp` produces a
self-contained binary. No external dependencies beyond what the app code
itself opens (e.g. a Postgres connection).
## Build
```bash
go build -o fnode ./cmd/fnode
./fnode build app/hello.prg -o hello
./hello
```
## License
Copyright (c) 2026 Charles KWON OhJun. All rights reserved.