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

+16
View File
@@ -0,0 +1,16 @@
//! Markdown → HTML for article bodies (GFM subset via pulldown-cmark).
use pulldown_cmark::{html, Options, Parser};
pub fn to_html(md: &str) -> String {
let mut opts = Options::empty();
opts.insert(
Options::ENABLE_STRIKETHROUGH
| Options::ENABLE_TABLES
| Options::ENABLE_TASKLISTS,
);
let parser = Parser::new_ext(md, opts);
let mut html_out = String::new();
html::push_html(&mut html_out, parser);
format!("<div class=\"article-body md\">{html_out}</div>")
}