feat(web): W-G13 default to Go libweb in CLI, gold, and release

Switch ext add / gold / release builds to scripts/build-web-plugin.sh,
drop the Rust archive from the Cargo workspace, and resolve libweb from
plugins/web/build (and target copies) without MARQDO_WEB_PLUGIN.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
cflmyandCursor committed 2026-09-10 20:18:41 +08:00
1 parent 7fab85b389
commit c4a726397d
11 files changed
+222 -1614

No files matched your search

+9
View File
@@ -0,0 +1,9 @@
# web-rust-archive
Former Rust/axum implementation of the Marqdo web plugin (`marqdo_plugin_web`).
**Status (W-G13):** archived reference only. The official plugin is Go under
[`plugins/web/`](../web/). This crate is **not** a Cargo workspace member and is
not built by CI or `marqdo ext add web`.
Do not evolve features here — see [ext-web-go-rewrite.md](../../doc/design/ext-web-go-rewrite.md) C5 / ADR 0004.
+9 -5
View File
@@ -2,22 +2,26 @@
施工图:[doc/design/ext-web-go-rewrite.md](../../doc/design/ext-web-go-rewrite.md) · ADR:[0004](../../doc/adr/0004-web-plugin-go.md)
**Default native web plugin (W-G13).** `plugin.native_path name=web` resolves `plugins/web/build/libweb.so` (and copies under `target/{debug,release}/`).
## Build
```bash
./scripts/build-web-plugin.sh
# → plugins/web/build/libweb.so (also copied to target/debug|release)
export MARQDO_WEB_PLUGIN=$PWD/plugins/web/build/libweb.so
# → 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` | `//export` ABI entry + registration |
| `abi/marqdo_abi.h` | C contract (from `include/`) |
| `plugin.go` / `abi_*.go` | `//export` ABI entry + registration |
| `abi/marqdo_abi_cgo.h` | C contract for cgo |
| `internal/*` | page / db / http / ws / … |
迁移期 Rust 参考实现:`plugins/web-rust-archive/`(勿再演进)。
Rust reference (not built by default): `plugins/web-rust-archive/`.