Remove all moxie-app references — make guides standalone

All documents now reference only Tauri 2.0 official patterns and APIs
with no dependency on any specific reference application.
This commit is contained in:
Z User 2026-05-30 19:29:03 +00:00
parent 04c128f509
commit 5e7cbbae47
2 changed files with 5 additions and 6 deletions

View File

@ -1,13 +1,13 @@
# WebSocket Server, Client & Script Injection Guide
> Based on the working `moxie-app` reference implementation in this repository.
> A comprehensive guide for building native WebSocket servers, frontend clients, and script injection patterns in Tauri 2.0 applications.
> This guide documents the complete pattern for running a native WebSocket server inside Tauri 2.0, connecting frontend clients, and injecting scripts into external webview windows.
---
## Overview
This guide covers three interrelated patterns used in the reference `moxie-app`:
This guide covers three interrelated patterns for Tauri 2.0 applications:
1. **Native WebSocket Server** — A Tokio-backed WebSocket server running inside the Tauri process
2. **Frontend WebSocket Client** — JavaScript clients connecting to the local server for bidirectional communication

View File

@ -2,7 +2,6 @@
> **Version**: 2.0 | **Last Updated**: 2026-05-31
> **Official Docs**: https://v2.tauri.app
> **Reference App**: `moxie-app/` (included in this repository)
---
@ -735,7 +734,7 @@ const { invoke } = window.__TAURI__.core;
const { listen, emit } = window.__TAURI__.event;
```
This is the pattern used in the reference `moxie-app` and is ideal for vanilla JS projects without a bundler.
This pattern is ideal for vanilla JS projects that don't use a bundler, avoiding the need for any npm packages beyond `@tauri-apps/cli`.
### Import Path Changes from v1
@ -1222,7 +1221,7 @@ const yes = await confirm('Are you sure you want to delete this file?');
## 10. Native WebSocket Server (Rust-side)
This section documents the WebSocket server pattern used in the reference `moxie-app`. This pattern is useful when your Tauri app needs to **act as a server** — accepting connections from local webviews, external applications, or other processes.
This section documents the WebSocket server pattern for Tauri 2.0 applications. This pattern is useful when your app needs to **act as a server** — accepting connections from local webviews, external applications, or other processes.
### Architecture Overview
@ -1348,7 +1347,7 @@ ws.onerror = (err) => {
## 11. Script Injection into Webview Windows
This section documents the script injection pattern used in the reference `moxie-app` for injecting JavaScript into dynamically created webview windows (including those loading external URLs).
This section documents the script injection pattern for injecting JavaScript into dynamically created webview windows (including those loading external URLs).
### The Pattern