feat(wasm): C2/C3 session boot, wire events, and interact demo
Add BrowserSession with shared entry env, mq_boot/mq_call exports, marqdo wasm build, and a counter page driven only by counter.mq.md. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
fb037022ba
commit
aac896b044
17 files changed
+698
-168
No files matched your search
+21
@@ -124,6 +124,11 @@ enum Commands {
|
||||
#[arg(long)]
|
||||
check: bool,
|
||||
},
|
||||
/// Build browser WASM artifact (route C)
|
||||
Wasm {
|
||||
#[command(subcommand)]
|
||||
action: WasmAction,
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Subcommand, Debug)]
|
||||
@@ -142,6 +147,16 @@ enum ExtAction {
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Subcommand, Debug)]
|
||||
enum WasmAction {
|
||||
/// `cargo build -p marqdo-wasm --target wasm32-unknown-unknown --release` and copy `.wasm`
|
||||
Build {
|
||||
/// Destination directory (default: examples/browser-hello)
|
||||
#[arg(short = 'o', long = "out", default_value = "examples/browser-hello")]
|
||||
out: PathBuf,
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Subcommand, Debug)]
|
||||
enum ViewAction {
|
||||
/// Write static HTML documentation site
|
||||
@@ -282,5 +297,11 @@ fn try_main() -> Result<i32> {
|
||||
}
|
||||
Ok(0)
|
||||
}
|
||||
Commands::Wasm { action } => match action {
|
||||
WasmAction::Build { out } => {
|
||||
marqdo::wasm_cli::build_wasm(&out)?;
|
||||
Ok(0)
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user