docs.rs failed to build tauri-remote-ui-0.10.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Tauri Remote UI
Tauri Remote UI is a plugin that allows you to expose your Tauri application's UI to any web browser, enabling seamless remote interaction for development and end-to-end testing. The plugin bridges your native app and commercial browsers, letting you use standard web automation tools for testing and debugging—without modifying your app's logic.
Badges
Features
- Remote UI Exposure: Interact with your Tauri app from any browser.
- Seamless Development: Enable Development debug attachment for fronend debugging.
- Seamless E2E Testing: Use existing web automation/testing tools.
- Automatic Transport Switching: IPC for WebView, WebSocket for browsers—handled transparently.
- Customizable Security: Control and secure remote access as needed.
- Future Compatibility For Test Migration: When CEF-RS becomes available, the same E2E tests (e.g., written with Playwright or similar tools that use the Chromium debug port) will work seamlessly in debug mode, ensuring long-term support for modern testing workflows.
Completed Features
Javascript
- api/core -
invoke
- api/event -
listen
- api/app
defaultWindowIcon
,fetchDataStoreIdentifiers
,getBundleType
,getIdentifier
,getName
,getTauriVersion
,getVersion
,hide
,removeDataStore
,setDockVisibility
,setTheme
,show
Rust
emit
- Emit method is updated to handle in this plugin.
Operation Flow
- WebView: Uses IPC for communication between frontend and backend.
- Commercial Browser: Uses WebSocket (WS) for remote frontend-backend communication.
- Automatic Switching: The Rust backend plugin and npm frontend wrapper handle transport selection automatically.
- Security: The exposure of the web app can be secured and customized by the end user.
Usage
- Install the Rust plugin in your Tauri project
cargo add tauri-remote-ui
. - Initialize the Rust plugin
- Replace Emitter trait
use Emitter;
webview_window.emit
To
use EmitterExt;
webview_window.emit.await
- Start/Stop Server
async
async
- Install the NPM plugin in your frontend
npm i tauri-remote-ui
. - Replace the NPM package
import { invoke } from "@tauri-apps/api/core";
import { listen } from "@tauri-apps/api/event";
To
import { invoke } from "tauri-remote-ui/api/core";
import { listen } from "tauri-remote-ui/api/event";
- Development WebSocket Proxy
/remote_ui_ws
proxy remote_ui url ws to your dev server like vite. - Enable Source Map and update lauch.json setup in vscode to debug frontend
Plugin Development
- Build Rust:
cargo build
- Build JS:
cd guest-js && pnpm build
- Example app: See
examples/tauri-app/
License
MIT