上一个提交误带入 plugins/web/go.mod 变更:构建 libweb 时用了 -mod=mod, Go 把 jackc/pgx/v5 与 yuin/goldmark 从 indirect 提升为 direct。 这与本次文档提交无关,属于构建副产物,还原为提交前状态(内容与版本不变, 仅 require 块归类复原)。
Marqdo plugins/web — Go (C ABI v2)
施工图:doc/design/ext-web-go-rewrite.md · ADR:0004
Default native web plugin (W-G13). plugin.native_path name=web resolves plugins/web/build/libweb.so (and copies under target/{debug,release}/).
Build
./scripts/build-web-plugin.sh
# → plugins/web/build/libweb.so
# → also copied to target/debug|release/libweb.so
Requires Go 1.22+ with cgo (CGO_ENABLED=1) and a C toolchain.
Override path: export MARQDO_WEB_PLUGIN=$PWD/plugins/web/build/libweb.so
Layout
| Path | Role |
|---|---|
plugin.go / abi_*.go |
//export ABI entry + registration |
abi/marqdo_abi_cgo.h |
C contract for cgo |
internal/* |
page / db / http / ws / … |
Rust reference (not built by default): plugins/web-rust-archive/.