mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-06-10 14:13:55 +02:00
update example app
This commit is contained in:
+641
-1566
File diff suppressed because it is too large
Load Diff
@@ -1,22 +1,23 @@
|
||||
[package]
|
||||
name = "app"
|
||||
name = "websocket-example"
|
||||
version = "0.1.0"
|
||||
description = "A Tauri App"
|
||||
authors = [ "Tauri Programme within The Commons Conservancy" ]
|
||||
repository = ""
|
||||
edition = "2018"
|
||||
# authors.workspace = true
|
||||
license.workspace = true
|
||||
edition.workspace = true
|
||||
rust-version.workspace = true
|
||||
|
||||
[dependencies]
|
||||
serde_json = "1.0"
|
||||
serde = { version = "1.0", features = [ "derive" ] }
|
||||
tauri = { version = "1.0.0-rc.1", features = ["api-all"] }
|
||||
serde.workspace = true
|
||||
serde_json.workspace = true
|
||||
tauri = {workspace = true, features = [] }
|
||||
tokio = { version = "1.11", features = ["net"] }
|
||||
futures-util = "0.3"
|
||||
tauri-plugin-websocket = { path = "../../../" }
|
||||
tokio-tungstenite = "0.15"
|
||||
|
||||
[build-dependencies]
|
||||
tauri-build = "1.0.0-rc.0"
|
||||
tauri-build = {workspace = true, features = [] }
|
||||
|
||||
[features]
|
||||
default = [ "custom-protocol" ]
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
)]
|
||||
|
||||
use futures_util::StreamExt;
|
||||
use tauri_plugin_websocket::TauriWebsocket;
|
||||
use tokio::net::{TcpListener, TcpStream};
|
||||
|
||||
async fn start_server() {
|
||||
@@ -33,7 +32,7 @@ async fn accept_connection(stream: TcpStream) {
|
||||
fn main() {
|
||||
tauri::async_runtime::spawn(start_server());
|
||||
tauri::Builder::default()
|
||||
.plugin(TauriWebsocket::default())
|
||||
.plugin(tauri_plugin_websocket::init())
|
||||
.run(tauri::generate_context!())
|
||||
.expect("error while running tauri application");
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"build": {
|
||||
"distDir": "../public",
|
||||
"devPath": "http://localhost:5000",
|
||||
"beforeDevCommand": "yarn dev",
|
||||
"beforeBuildCommand": "yarn build",
|
||||
"withGlobalTauri": true
|
||||
"distDir": "../dist",
|
||||
"devPath": "http://localhost:5173/",
|
||||
"beforeDevCommand": "pnpm dev",
|
||||
"beforeBuildCommand": "pnpm build",
|
||||
"withGlobalTauri": false
|
||||
},
|
||||
"tauri": {
|
||||
"bundle": {
|
||||
@@ -25,18 +25,16 @@
|
||||
"shortDescription": "",
|
||||
"longDescription": "",
|
||||
"deb": {
|
||||
"depends": [],
|
||||
"useBootstrapper": false
|
||||
"depends": []
|
||||
},
|
||||
"macOS": {
|
||||
"frameworks": [],
|
||||
"minimumSystemVersion": "",
|
||||
"useBootstrapper": false,
|
||||
"exceptionDomain": ""
|
||||
}
|
||||
},
|
||||
"allowlist": {
|
||||
"all": true
|
||||
"all": false
|
||||
},
|
||||
"windows": [
|
||||
{
|
||||
@@ -48,7 +46,7 @@
|
||||
}
|
||||
],
|
||||
"security": {
|
||||
"csp": "default-src blob: data: filesystem: ws: http: https: 'unsafe-eval' 'unsafe-inline'"
|
||||
"csp": null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user