feat(app): UDS bridge (channel/invoke/emit) + xterm.js terminal, M0 e2e works

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-09 20:24:57 +07:00
parent 1579686fdd
commit 56893c51d0
7 changed files with 447 additions and 3 deletions
+25
View File
@@ -1,6 +1,31 @@
mod bridge;
use tauri::Manager;
#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
tauri::Builder::default()
.setup(|app| {
let handle = app.handle().clone();
// Connect the bridge on a tokio runtime, then manage it.
tauri::async_runtime::block_on(async move {
let bridge = bridge::Bridge::connect(handle.clone())
.await
.expect("failed to connect to spaceshd");
handle.manage(bridge);
});
Ok(())
})
.invoke_handler(tauri::generate_handler![
bridge::open,
bridge::new_surface,
bridge::input,
bridge::resize,
bridge::attach,
bridge::detach,
bridge::status,
bridge::close_surface,
])
.run(tauri::generate_context!())
.expect("error while running spacesh");
}