feat(wasm): finish route C — bridge package, smoke, site embed L1
Canonical marqdo-bridge.js ships with wasm build, Node ABI smoke covers boot/call, and ext/web gains client_embed for head/static mounting. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
04890e0c73
commit
2445c290c9
11 files changed
+459
-38
No files matched your search
@@ -1,8 +1,11 @@
|
||||
/**
|
||||
* Official Marqdo browser bridge (route C). Host glue only — not app logic.
|
||||
* Canonical Marqdo browser bridge (route C). Host glue only — not app logic.
|
||||
* Copied to site dirs by `marqdo wasm build`.
|
||||
*
|
||||
* ABI: mq_alloc, mq_dealloc, mq_run, mq_boot, mq_call, mq_version
|
||||
* Packed results: u32le length + UTF-8 JSON { ok, stdout, error, value }
|
||||
*
|
||||
* Effects (ADR 0003): set_text, fetch, after
|
||||
*/
|
||||
|
||||
export function readCString(memory, ptr) {
|
||||
@@ -78,8 +81,6 @@ export function applyDomPatch(value) {
|
||||
|
||||
/**
|
||||
* Run sync DOM patches then schedule async effects (ADR 0003).
|
||||
* Returns a Promise that settles when immediate scheduling is done
|
||||
* (not when fetch/after callbacks finish).
|
||||
*/
|
||||
export function applyEffects(exports, value, { onError } = {}) {
|
||||
applyDomPatch(value);
|
||||
@@ -169,7 +170,6 @@ function runAfterEffect(exports, spec, onError) {
|
||||
/**
|
||||
* Wire events from `# main` return value.
|
||||
* Accepts a list of row maps, or `{ wire: [...] }`.
|
||||
* Row keys: 选择器|selector, 事件|event, 调用|call
|
||||
*/
|
||||
export function wireEvents(exports, bootValue, { onError } = {}) {
|
||||
let rows = [];
|
||||
|
||||
Reference in new issue
Block a user