refactor(web): start Go ABI rewrite of plugins/web (W-G0)

Archive the Rust web plugin and add a Go c-shared skeleton with ABI v2
bridge, build script, design doc/ADR, and smoke test so multi-language
plugins and full web parity can proceed wave by wave.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
cflmyandCursor committed 2026-09-10 14:47:43 +08:00
1 parent fb6254e501
commit ca40c698a2
42 files changed
+955 -3

No files matched your search

+29
View File
@@ -0,0 +1,29 @@
package page_test
import (
"testing"
"github.com/marqdo/marqdo/plugins/web/internal/page"
)
func TestNewDefaults(t *testing.T) {
p := page.New(map[string]any{})
if p["title"] != "Marqdo Web" {
t.Fatalf("title=%v", p["title"])
}
if p["intro"] != "" {
t.Fatalf("intro=%v", p["intro"])
}
}
func TestNewZhAliases(t *testing.T) {
p := page.New(map[string]any{
"title": "T",
"壳样式": "minimal",
"布局": "bare",
"资源版本": "v1",
})
if p["shell_css"] != "minimal" || p["layout"] != "bare" || p["asset_version"] != "v1" {
t.Fatalf("%v", p)
}
}