From b6ba44d81d700fe35ab735abd55156279e9f8252 Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Mon, 20 Jul 2020 15:44:57 -0300 Subject: [PATCH] chore(tauri) use published webview binding v0.0.1 (#870) --- tauri/Cargo.toml | 2 +- tauri/src/app.rs | 2 +- tauri/src/app/runner.rs | 2 +- tauri/src/endpoints.rs | 2 +- tauri/src/endpoints/asset.rs | 2 +- tauri/src/endpoints/dialog.rs | 2 +- tauri/src/endpoints/file_system.rs | 2 +- tauri/src/endpoints/http.rs | 2 +- tauri/src/endpoints/notification.rs | 2 +- tauri/src/endpoints/salt.rs | 2 +- tauri/src/event.rs | 2 +- tauri/src/lib.rs | 2 +- tauri/src/plugin.rs | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/tauri/Cargo.toml b/tauri/Cargo.toml index dc9ef92ac..b65c0601a 100644 --- a/tauri/Cargo.toml +++ b/tauri/Cargo.toml @@ -20,7 +20,7 @@ features = [ "all-api" ] [dependencies] serde_json = "1.0" serde = { version = "1.0", features = [ "derive" ] } -webview_rust = { version = "0.1", git = "https://github.com/webview/webview_rust.git", branch = "dev" } +webview_official = "0.0.1" tauri_includedir = "0.6.0" phf = "0.8.0" base64 = "0.12.3" diff --git a/tauri/src/app.rs b/tauri/src/app.rs index d8cc16223..41269129e 100644 --- a/tauri/src/app.rs +++ b/tauri/src/app.rs @@ -1,4 +1,4 @@ -use webview_rust_sys::Webview; +use webview_official::Webview; mod runner; diff --git a/tauri/src/app/runner.rs b/tauri/src/app/runner.rs index 302dc753d..519d43a1e 100644 --- a/tauri/src/app/runner.rs +++ b/tauri/src/app/runner.rs @@ -7,7 +7,7 @@ use std::{ thread::spawn, }; -use webview_rust_sys::{SizeHint, Webview, WebviewBuilder}; +use webview_official::{SizeHint, Webview, WebviewBuilder}; use super::App; #[cfg(embedded_server)] diff --git a/tauri/src/endpoints.rs b/tauri/src/endpoints.rs index 8a281dbe5..21984ba4c 100644 --- a/tauri/src/endpoints.rs +++ b/tauri/src/endpoints.rs @@ -15,7 +15,7 @@ mod http; #[cfg(notification)] mod notification; -use webview_rust_sys::Webview; +use webview_official::Webview; #[allow(unused_variables)] pub(crate) fn handle(webview: &mut Webview, arg: &str) -> crate::Result<()> { diff --git a/tauri/src/endpoints/asset.rs b/tauri/src/endpoints/asset.rs index c853144dc..3eb8939a5 100644 --- a/tauri/src/endpoints/asset.rs +++ b/tauri/src/endpoints/asset.rs @@ -1,5 +1,5 @@ use std::path::PathBuf; -use webview_rust_sys::Webview; +use webview_official::Webview; pub fn load( webview: &mut Webview, diff --git a/tauri/src/endpoints/dialog.rs b/tauri/src/endpoints/dialog.rs index b22301dc9..7a8d3a322 100644 --- a/tauri/src/endpoints/dialog.rs +++ b/tauri/src/endpoints/dialog.rs @@ -4,7 +4,7 @@ use crate::api::dialog::{ DialogSelection, Response, }; use serde_json::Value as JsonValue; -use webview_rust_sys::Webview; +use webview_official::Webview; /// maps a dialog response to a JS value to eval #[cfg(any(open_dialog, save_dialog))] diff --git a/tauri/src/endpoints/file_system.rs b/tauri/src/endpoints/file_system.rs index f6ba59521..6528c9dcb 100644 --- a/tauri/src/endpoints/file_system.rs +++ b/tauri/src/endpoints/file_system.rs @@ -1,4 +1,4 @@ -use webview_rust_sys::Webview; +use webview_official::Webview; use tauri_api::dir; use tauri_api::file; diff --git a/tauri/src/endpoints/http.rs b/tauri/src/endpoints/http.rs index cc99e673f..c0c90e75d 100644 --- a/tauri/src/endpoints/http.rs +++ b/tauri/src/endpoints/http.rs @@ -1,5 +1,5 @@ use tauri_api::http::{make_request as request, HttpRequestOptions}; -use webview_rust_sys::Webview; +use webview_official::Webview; /// Makes an HTTP request and resolves the response to the webview pub fn make_request( diff --git a/tauri/src/endpoints/notification.rs b/tauri/src/endpoints/notification.rs index 57ad2a15d..67c11a181 100644 --- a/tauri/src/endpoints/notification.rs +++ b/tauri/src/endpoints/notification.rs @@ -1,6 +1,6 @@ use super::cmd::NotificationOptions; use serde_json::Value as JsonValue; -use webview_rust_sys::Webview; +use webview_official::Webview; pub fn send(webview: &mut Webview, options: NotificationOptions, callback: String, error: String) { crate::execute_promise( diff --git a/tauri/src/endpoints/salt.rs b/tauri/src/endpoints/salt.rs index ca5b2be0d..d58044203 100644 --- a/tauri/src/endpoints/salt.rs +++ b/tauri/src/endpoints/salt.rs @@ -1,4 +1,4 @@ -use webview_rust_sys::Webview; +use webview_official::Webview; /// Validates a salt. pub fn validate( diff --git a/tauri/src/event.rs b/tauri/src/event.rs index 43418b346..af0c2bbea 100644 --- a/tauri/src/event.rs +++ b/tauri/src/event.rs @@ -6,7 +6,7 @@ use lazy_static::lazy_static; use once_cell::sync::Lazy; use serde::Serialize; use serde_json::Value as JsonValue; -use webview_rust_sys::WebviewMut; +use webview_official::WebviewMut; /// An event handler. struct EventHandler { diff --git a/tauri/src/lib.rs b/tauri/src/lib.rs index eeb36d435..f9998e266 100644 --- a/tauri/src/lib.rs +++ b/tauri/src/lib.rs @@ -39,7 +39,7 @@ mod salt; pub use anyhow::Result; pub use app::*; pub use tauri_api as api; -pub use webview_rust_sys::{Webview, WebviewMut}; +pub use webview_official::{Webview, WebviewMut}; use std::process::Stdio; diff --git a/tauri/src/plugin.rs b/tauri/src/plugin.rs index 7de3bcc08..49d63e559 100644 --- a/tauri/src/plugin.rs +++ b/tauri/src/plugin.rs @@ -1,5 +1,5 @@ use std::sync::{Arc, Mutex}; -use webview_rust_sys::Webview; +use webview_official::Webview; /// The plugin interface. pub trait Plugin {