From 99ecf7bb3e8da6e611b57c6680a14b65179f8a35 Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Mon, 8 Feb 2021 11:19:22 -0300 Subject: [PATCH] feat(tauri): use WRY as webview engine (#1190) --- .changes/wry.md | 5 + api/src/tauri.ts | 2 +- cli/core/src/templates/tauri.js | 16 +- cli/tauri.js/templates/src-tauri/src/main.rs | 2 +- .../test/jest/fixtures/app/dist/index.html | 8 +- tauri-api/src/rpc.rs | 16 +- tauri/Cargo.toml | 3 +- tauri/examples/api/src-tauri/Cargo.lock | 1677 ++++++++++++++--- tauri/examples/api/src-tauri/src/main.rs | 2 +- tauri/examples/api/src-tauri/tauri.conf.json | 2 +- tauri/examples/communication/dist/__tauri.js | 18 +- .../communication/src-tauri/Cargo.lock | 1396 ++++++++++++-- .../communication/src-tauri/src/main.rs | 2 +- .../communication/src-tauri/tauri.conf.json | 2 +- tauri/src/app.rs | 44 +- tauri/src/app/runner.rs | 235 +-- tauri/src/endpoints.rs | 134 +- tauri/src/endpoints/asset.rs | 34 +- tauri/src/endpoints/dialog.rs | 38 +- tauri/src/endpoints/file_system.rs | 64 +- tauri/src/endpoints/http.rs | 8 +- tauri/src/endpoints/notification.rs | 26 +- tauri/src/endpoints/path.rs | 8 +- tauri/src/endpoints/salt.rs | 10 +- tauri/src/event.rs | 22 +- tauri/src/lib.rs | 50 +- tauri/src/plugin.rs | 44 +- tauri/src/webview.rs | 156 +- tauri/src/webview/official.rs | 143 -- tauri/src/webview/wry.rs | 225 +++ 30 files changed, 3416 insertions(+), 976 deletions(-) create mode 100644 .changes/wry.md mode change 100755 => 100644 tauri/examples/api/src-tauri/Cargo.lock delete mode 100644 tauri/src/webview/official.rs create mode 100644 tauri/src/webview/wry.rs diff --git a/.changes/wry.md b/.changes/wry.md new file mode 100644 index 00000000000..4158a8d07ff --- /dev/null +++ b/.changes/wry.md @@ -0,0 +1,5 @@ +--- +"tauri": minor +--- + +Use [WRY](https://github.com/tauri-apps/wry) as Webview interface, thanks to @wusyong. diff --git a/api/src/tauri.ts b/api/src/tauri.ts index 0422dffcccc..1fe13114332 100644 --- a/api/src/tauri.ts +++ b/api/src/tauri.ts @@ -34,7 +34,7 @@ function uid(): string { * @param args */ function invoke(args: any): void { - window.__TAURI_INVOKE_HANDLER__(args); + window.__TAURI_INVOKE_HANDLER__(JSON.stringify(args)); } function transformCallback( diff --git a/cli/core/src/templates/tauri.js b/cli/core/src/templates/tauri.js index 8822d4f3717..938be9bb405 100644 --- a/cli/core/src/templates/tauri.js +++ b/cli/core/src/templates/tauri.js @@ -118,24 +118,24 @@ if (!String.prototype.startsWith) { if (window.__TAURI_INVOKE_HANDLER__) { window.__TAURI_INVOKE_HANDLER__( - _objectSpread( + JSON.stringify(_objectSpread( { callback: callback, error: error }, args - ) + )) ) } else { window.addEventListener('DOMContentLoaded', function () { window.__TAURI_INVOKE_HANDLER__( - _objectSpread( + JSON.stringify(_objectSpread( { callback: callback, error: error }, args - ) + )) ) }) } @@ -182,10 +182,10 @@ if (!String.prototype.startsWith) { target.href.startsWith('http') && target.target === '_blank' ) { - window.__TAURI_INVOKE_HANDLER__({ + window.__TAURI_INVOKE_HANDLER__(JSON.stringify({ cmd: 'open', uri: target.href - }) + })) e.preventDefault() } break @@ -294,10 +294,10 @@ if (!String.prototype.startsWith) { }) window.alert = function (message) { - window.__TAURI_INVOKE_HANDLER__({ + window.__TAURI_INVOKE_HANDLER__(JSON.stringify({ cmd: 'messageDialog', message: message - }) + })) } window.confirm = function (message) { diff --git a/cli/tauri.js/templates/src-tauri/src/main.rs b/cli/tauri.js/templates/src-tauri/src/main.rs index 322d1125f55..b1b0ce7aa3a 100755 --- a/cli/tauri.js/templates/src-tauri/src/main.rs +++ b/cli/tauri.js/templates/src-tauri/src/main.rs @@ -6,7 +6,7 @@ mod cmd; fn main() { - tauri::AppBuilder::::new() + tauri::AppBuilder::::new() .invoke_handler(|_webview, arg| async move { use cmd::Cmd::*; match serde_json::from_str(&arg) { diff --git a/cli/tauri.js/test/jest/fixtures/app/dist/index.html b/cli/tauri.js/test/jest/fixtures/app/dist/index.html index 7f0aed0069a..977f02d77ef 100644 --- a/cli/tauri.js/test/jest/fixtures/app/dist/index.html +++ b/cli/tauri.js/test/jest/fixtures/app/dist/index.html @@ -136,9 +136,11 @@ }) setTimeout(function () { - window.__TAURI_INVOKE_HANDLER__({ - cmd: 'exit' - }) + window.__TAURI_INVOKE_HANDLER__( + JSON.stringify({ + cmd: 'exit' + }) + ) }, 15000) diff --git a/tauri-api/src/rpc.rs b/tauri-api/src/rpc.rs index 17c3fd04e38..319c3e1488f 100644 --- a/tauri-api/src/rpc.rs +++ b/tauri-api/src/rpc.rs @@ -1,6 +1,5 @@ use serde::Serialize; use serde_json::Value as JsonValue; -use std::fmt::Display; /// Formats a function name and argument to be evaluated as callback. /// @@ -25,10 +24,7 @@ use std::fmt::Display; /// }).expect("failed to serialize")); /// assert!(cb.contains(r#"window["callback-function-name"]({"value":"some value"})"#)); /// ``` -pub fn format_callback, S: AsRef + Display>( - function_name: S, - arg: T, -) -> String { +pub fn format_callback, S: AsRef>(function_name: S, arg: T) -> String { format!( r#" if (window["{fn}"]) {{ @@ -37,7 +33,7 @@ pub fn format_callback, S: AsRef + Display>( console.warn("[TAURI] Couldn't find callback id {fn} in window. This happens when the app is reloaded while Rust is running an asynchronous operation.") }} "#, - fn = function_name, + fn = function_name.as_ref(), arg = arg.into().to_string() ) } @@ -57,17 +53,17 @@ pub fn format_callback, S: AsRef + Display>( /// ``` /// use tauri_api::rpc::format_callback_result; /// let res: Result = Ok(5); -/// let cb = format_callback_result(res, "success_cb".to_string(), "error_cb".to_string()).expect("failed to format"); +/// let cb = format_callback_result(res, "success_cb", "error_cb").expect("failed to format"); /// assert!(cb.contains(r#"window["success_cb"](5)"#)); /// /// let res: Result<&str, &str> = Err("error message here"); -/// let cb = format_callback_result(res, "success_cb".to_string(), "error_cb".to_string()).expect("failed to format"); +/// let cb = format_callback_result(res, "success_cb", "error_cb").expect("failed to format"); /// assert!(cb.contains(r#"window["error_cb"]("error message here")"#)); /// ``` pub fn format_callback_result( result: Result, - success_callback: String, - error_callback: String, + success_callback: impl AsRef, + error_callback: impl AsRef, ) -> crate::Result { let rpc = match result { Ok(res) => format_callback(success_callback, serde_json::to_value(res)?), diff --git a/tauri/Cargo.toml b/tauri/Cargo.toml index 7df00ffb000..f1f7b06b7c1 100644 --- a/tauri/Cargo.toml +++ b/tauri/Cargo.toml @@ -20,7 +20,6 @@ features = [ "all-api" ] [dependencies] serde_json = "1.0" serde = { version = "1.0", features = [ "derive" ] } -webview_official = "0.2.0" tauri_includedir = "0.6.0" phf = "0.8.0" base64 = "0.13.0" @@ -33,10 +32,10 @@ async-trait = "0.1" uuid = { version = "0.8.2", features = [ "v4" ] } anyhow = "1.0.38" thiserror = "1.0.23" -envmnt = "0.8.4" once_cell = "1.5.2" tauri-api = { version = "0.7.5", path = "../tauri-api" } urlencoding = "1.1.1" +wry = { git = "https://github.com/tauri-apps/wry", rev = "42f4f2133f7921ed5adc47908787094da8abeac5" } [target."cfg(target_os = \"windows\")".dependencies] runas = "0.2" diff --git a/tauri/examples/api/src-tauri/Cargo.lock b/tauri/examples/api/src-tauri/Cargo.lock old mode 100755 new mode 100644 index ced25790f93..4aa9f38b66d --- a/tauri/examples/api/src-tauri/Cargo.lock +++ b/tauri/examples/api/src-tauri/Cargo.lock @@ -1,5 +1,11 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. +[[package]] +name = "ab_glyph_rasterizer" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9fe5e32de01730eb1f6b7f5b51c17e03e2325bf40a74f754f04f130043affff" + [[package]] name = "addr2line" version = "0.14.1" @@ -11,9 +17,9 @@ dependencies = [ [[package]] name = "adler" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccc9a9dd069569f212bc4330af9f17c4afb5e8ce185e83dbb14f1349dda18b10" +checksum = "ee2a4ec343196209d6594e19543ae87a39f96d5534d7174822a3ad825dd6ed7e" [[package]] name = "adler32" @@ -21,6 +27,19 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234" +[[package]] +name = "andrew" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c4afb09dd642feec8408e33f92f3ffc4052946f6b20f32fb99c1f58cd4fa7cf" +dependencies = [ + "bitflags 1.2.1", + "rusttype", + "walkdir", + "xdg", + "xml-rs 0.8.3", +] + [[package]] name = "anyhow" version = "1.0.38" @@ -45,9 +64,9 @@ checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" [[package]] name = "arrayvec" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cff77d8686867eceff3105329d4698d96c2391c176d5d03adc90c7389162b5b8" +checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" [[package]] name = "ascii" @@ -62,10 +81,36 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d3a45e77e34375a7923b1e8febb049bb011f064714a8e17a1a616fef01da13d" dependencies = [ "proc-macro2", - "quote 1.0.7", + "quote 1.0.8", "syn 1.0.60", ] +[[package]] +name = "atk" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "812b4911e210bd51b24596244523c856ca749e6223c50a7fbbba3f89ee37c426" +dependencies = [ + "atk-sys", + "bitflags 1.2.1", + "glib", + "glib-sys", + "gobject-sys", + "libc", +] + +[[package]] +name = "atk-sys" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f530e4af131d94cc4fa15c5c9d0348f0ef28bac64ba660b6b2a1cf2605dedfce" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + [[package]] name = "attohttpc" version = "0.16.1" @@ -92,35 +137,29 @@ checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ "hermit-abi", "libc", - "winapi", + "winapi 0.3.9", ] [[package]] name = "autocfg" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" +checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" [[package]] name = "backtrace" -version = "0.3.55" +version = "0.3.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef5140344c85b01f9bbb4d4b7288a8aa4b3287ccef913a14bcc78a1063623598" +checksum = "9d117600f438b1707d4e4ae15d3595657288f8235a0eb593e80ecc98ab34e1bc" dependencies = [ "addr2line", "cfg-if 1.0.0", "libc", - "miniz_oxide 0.4.0", + "miniz_oxide 0.4.3", "object", "rustc-demangle", ] -[[package]] -name = "base64" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7" - [[package]] name = "base64" version = "0.13.0" @@ -141,9 +180,9 @@ checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" [[package]] name = "blake2b_simd" -version = "0.5.10" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8fb2d74254a3a0b5cac33ac9f8ed0e44aa50378d9dbb2e5d83bd21ed1dc2c8a" +checksum = "afa748e348ad3be8263be728124b24a24f268266f6f5d58af9d75f6a40b5c587" dependencies = [ "arrayref", "arrayvec", @@ -170,12 +209,9 @@ checksum = "ae44d1a3d5a19df61dd0c8beb138458ac2a53a7ac09eba97d55592540004306b" [[package]] name = "bytes" -version = "0.5.5" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "118cf036fbb97d0816e3c34b2d7a1e8cfc60f68fcf63d550ddbe9bd5f59c213b" -dependencies = [ - "loom", -] +checksum = "b700ce4376041dcd0a327fd0097c41095743c4c8af8887265942faf1100bd040" [[package]] name = "bzip2" @@ -189,26 +225,62 @@ dependencies = [ [[package]] name = "bzip2-sys" -version = "0.1.9+1.0.8" +version = "0.1.10+1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad3b39a260062fca31f7b0b12f207e8f2590a67d32ec7d59c20484b07ea7285e" +checksum = "17fa3d1ac1ca21c5c4e36a97f3c3eb25084576f6fc47bf0139c1123434216c6c" dependencies = [ "cc", "libc", "pkg-config", ] +[[package]] +name = "cairo-rs" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5c0f2e047e8ca53d0ff249c54ae047931d7a6ebe05d00af73e0ffeb6e34bdb8" +dependencies = [ + "bitflags 1.2.1", + "cairo-sys-rs", + "glib", + "glib-sys", + "gobject-sys", + "libc", + "thiserror", +] + +[[package]] +name = "cairo-sys-rs" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ed2639b9ad5f1d6efa76de95558e11339e7318426d84ac4890b86c03e828ca7" +dependencies = [ + "glib-sys", + "libc", + "system-deps", +] + +[[package]] +name = "calloop" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b036167e76041694579972c28cf4877b4f92da222560ddb49008937b6a6727c" +dependencies = [ + "log", + "nix", +] + [[package]] name = "cc" -version = "1.0.57" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fde55d2a2bfaa4c9668bbc63f531fbdeee3ffe188f4662511ce2c22b3eedebe" +checksum = "4c0496836a84f8d0495758516b8621a622beb77c0fed418570e50764093ced48" [[package]] name = "cfg-if" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b486ce3ccf7ffd79fdeb678eac06a9e6c09fc88d33836340becb8fffe87c5e33" +checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" [[package]] name = "cfg-if" @@ -224,20 +296,22 @@ checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" [[package]] name = "chrono" -version = "0.4.12" +version = "0.4.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0fee792e164f78f5fe0c296cc2eb3688a2ca2b70cdff33040922d298203f0c4" +checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73" dependencies = [ + "libc", "num-integer", "num-traits", "time", + "winapi 0.3.9", ] [[package]] name = "chunked_transfer" -version = "1.2.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d29eb15132782371f71da8f947dba48b3717bdb6fa771b9b434d645e40a7193" +checksum = "fff857943da45f546682664a79488be82e69e43c1a7a2307679ab9afb3a66d2e" [[package]] name = "clap" @@ -250,7 +324,7 @@ dependencies = [ "indexmap", "lazy_static", "os_str_bytes", - "strsim", + "strsim 0.10.0", "termcolor", "textwrap", "unicode-width", @@ -265,10 +339,53 @@ dependencies = [ "heck", "proc-macro-error", "proc-macro2", - "quote 1.0.7", + "quote 1.0.8", "syn 1.0.60", ] +[[package]] +name = "cocoa" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f63902e9223530efb4e26ccd0cf55ec30d592d3b42e21a28defc42a9586e832" +dependencies = [ + "bitflags 1.2.1", + "block", + "cocoa-foundation", + "core-foundation 0.9.1", + "core-graphics 0.22.2", + "foreign-types", + "libc", + "objc", +] + +[[package]] +name = "cocoa-foundation" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ade49b65d560ca58c403a479bb396592b155c0185eada742ee323d1d68d6318" +dependencies = [ + "bitflags 1.2.1", + "block", + "core-foundation 0.9.1", + "core-graphics-types", + "foreign-types", + "libc", + "objc", +] + +[[package]] +name = "const-sha1" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb58b6451e8c2a812ad979ed1d83378caa5e927eef2622017a45f251457c2c9d" + +[[package]] +name = "const_fn" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28b9d6de7f49e22cf97ad17fc4036ece69300032f45f78f30b4a4482cdc3f4a6" + [[package]] name = "constant_time_eq" version = "0.1.5" @@ -281,7 +398,17 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57d24c7a13c43e870e37c1556b74555437870a04514f7685f5b354e090567171" dependencies = [ - "core-foundation-sys", + "core-foundation-sys 0.7.0", + "libc", +] + +[[package]] +name = "core-foundation" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a89e2ae426ea83155dccf10c0fa6b1463ef6d5fcb44cee0b224a408fa640a62" +dependencies = [ + "core-foundation-sys 0.8.2", "libc", ] @@ -291,61 +418,150 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b3a71ab494c0b5b860bdc8407ae08978052417070c2ced38573a9157ad75b8ac" +[[package]] +name = "core-foundation-sys" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea221b5284a47e40033bf9b66f35f984ec0ea2931eb03505246cd27a963f981b" + +[[package]] +name = "core-graphics" +version = "0.19.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3889374e6ea6ab25dba90bb5d96202f61108058361f6dc72e8b03e6f8bbe923" +dependencies = [ + "bitflags 1.2.1", + "core-foundation 0.7.0", + "foreign-types", + "libc", +] + +[[package]] +name = "core-graphics" +version = "0.22.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "269f35f69b542b80e736a20a89a05215c0ce80c2c03c514abb2e318b78379d86" +dependencies = [ + "bitflags 1.2.1", + "core-foundation 0.9.1", + "core-graphics-types", + "foreign-types", + "libc", +] + +[[package]] +name = "core-graphics-types" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a68b68b3446082644c91ac778bf50cd4104bfb002b5a6a7c44cca5a2c70788b" +dependencies = [ + "bitflags 1.2.1", + "core-foundation 0.9.1", + "foreign-types", + "libc", +] + +[[package]] +name = "core-video-sys" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34ecad23610ad9757664d644e369246edde1803fcb43ed72876565098a5d3828" +dependencies = [ + "cfg-if 0.1.10", + "core-foundation-sys 0.7.0", + "core-graphics 0.19.2", + "libc", + "objc", +] + [[package]] name = "crc32fast" -version = "1.2.0" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81156fece84ab6a9f2afdb109ce3ae577e42b1228441eded99bd77f627953b1a" +dependencies = [ + "cfg-if 1.0.0", +] + +[[package]] +name = "crossbeam-channel" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" +checksum = "dca26ee1f8d361640700bde38b2c37d8c22b3ce2d360e1fc1c74ea4b0aa7d775" dependencies = [ - "cfg-if 0.1.9", + "cfg-if 1.0.0", + "crossbeam-utils", ] [[package]] name = "crossbeam-deque" -version = "0.7.3" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f02af974daeee82218205558e51ec8768b48cf524bd01d550abe5573a608285" +checksum = "94af6efb46fef72616855b036a624cf27ba656ffc9be1b9a3c931cfc7749a9a9" dependencies = [ + "cfg-if 1.0.0", "crossbeam-epoch", "crossbeam-utils", - "maybe-uninit", ] [[package]] name = "crossbeam-epoch" -version = "0.8.2" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace" +checksum = "a1aaa739f95311c2c7887a76863f500026092fb1dce0161dab577e559ef3569d" dependencies = [ - "autocfg", - "cfg-if 0.1.9", + "cfg-if 1.0.0", + "const_fn", "crossbeam-utils", "lazy_static", - "maybe-uninit", "memoffset", "scopeguard", ] [[package]] -name = "crossbeam-queue" -version = "0.2.3" +name = "crossbeam-utils" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "774ba60a54c213d409d5353bda12d49cd68d14e45036a285234c8d6f91f92570" +checksum = "02d96d1e189ef58269ebe5b97953da3274d83a93af647c2ddd6f9dab28cedb8d" dependencies = [ - "cfg-if 0.1.9", - "crossbeam-utils", - "maybe-uninit", + "autocfg", + "cfg-if 1.0.0", + "lazy_static", ] [[package]] -name = "crossbeam-utils" -version = "0.7.2" +name = "darling" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" +checksum = "0d706e75d87e35569db781a9b5e2416cff1236a47ed380831f959382ccd5f858" dependencies = [ - "autocfg", - "cfg-if 0.1.9", - "lazy_static", + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0c960ae2da4de88a91b2d920c2a7233b400bc33cb28453a2987822d8392519b" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote 1.0.8", + "strsim 0.9.3", + "syn 1.0.60", +] + +[[package]] +name = "darling_macro" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b5a2f4ac4969822c62224815d069952656cadc7084fdca9751e6d959189b72" +dependencies = [ + "darling_core", + "quote 1.0.8", + "syn 1.0.60", ] [[package]] @@ -358,6 +574,17 @@ dependencies = [ "libdbus-sys", ] +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote 1.0.8", + "syn 1.0.60", +] + [[package]] name = "dirs" version = "1.0.5" @@ -365,8 +592,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fd78930633bd1c6e35c4b42b1df7b0cbc6bc191146e512bb3bedf243fcc3901" dependencies = [ "libc", - "redox_users 0.3.4", - "winapi", + "redox_users 0.3.5", + "winapi 0.3.9", ] [[package]] @@ -387,7 +614,22 @@ checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" dependencies = [ "libc", "redox_users 0.4.0", - "winapi", + "winapi 0.3.9", +] + +[[package]] +name = "dispatch" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" + +[[package]] +name = "dlib" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b11f15d1e3268f140f68d390637d5e76d849782d971ae7063e0da69fe9709a76" +dependencies = [ + "libloading", ] [[package]] @@ -396,11 +638,17 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" +[[package]] +name = "downcast-rs" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" + [[package]] name = "dtoa" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "134951f4028bdadb9b84baf4232681efbf277da25144b9b0ad65df75946c422b" +checksum = "88d7ed2934d741c6b37e33e3832298e8850b53fd2d2bea03873375596c7cea4e" [[package]] name = "either" @@ -408,16 +656,6 @@ version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" -[[package]] -name = "envmnt" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2d328fc287c61314c4a61af7cfdcbd7e678e39778488c7cb13ec133ce0f4059" -dependencies = [ - "fsio", - "indexmap", -] - [[package]] name = "failure" version = "0.1.8" @@ -429,14 +667,14 @@ dependencies = [ [[package]] name = "filetime" -version = "0.2.10" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "affc17579b132fc2461adf7c575cc6e8b134ebca52c51f5411388965227dc695" +checksum = "1d34cfa13a63ae058bfa601fe9e313bbdb3746427c1459185464ce0fcf62e1e8" dependencies = [ - "cfg-if 0.1.9", + "cfg-if 1.0.0", "libc", - "redox_syscall 0.1.56", - "winapi", + "redox_syscall 0.2.4", + "winapi 0.3.9", ] [[package]] @@ -445,7 +683,7 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2cfff41391129e0a856d6d822600b8d71179d46879e310417eb9c762eb178b42" dependencies = [ - "cfg-if 0.1.9", + "cfg-if 0.1.10", "crc32fast", "libc", "miniz_oxide 0.3.7", @@ -473,10 +711,30 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] -name = "fsio" -version = "0.1.2" +name = "form_urlencoded" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ece68d15c92e84fa4f19d3780f1294e5ca82a78a6d515f1efaabcc144688be00" +dependencies = [ + "matches", + "percent-encoding", +] + +[[package]] +name = "fuchsia-zircon" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" +dependencies = [ + "bitflags 1.2.1", + "fuchsia-zircon-sys", +] + +[[package]] +name = "fuchsia-zircon-sys" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2131cb03096f67334dfba2f0bc46afc5564b08a919d042c6e217e2665741fc54" +checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" [[package]] name = "futures" @@ -534,7 +792,7 @@ checksum = "c287d25add322d9f9abdcdc5927ca398917996600182178774032e9f8258fedd" dependencies = [ "proc-macro-hack", "proc-macro2", - "quote 1.0.7", + "quote 1.0.8", "syn 1.0.60", ] @@ -574,51 +832,245 @@ dependencies = [ ] [[package]] -name = "gcc" -version = "0.3.55" +name = "gcc" +version = "0.3.55" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2" + +[[package]] +name = "gdk" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db00839b2a68a7a10af3fa28dfb3febaba3a20c3a9ac2425a33b7df1f84a6b7d" +dependencies = [ + "bitflags 1.2.1", + "cairo-rs", + "cairo-sys-rs", + "gdk-pixbuf", + "gdk-sys", + "gio", + "gio-sys", + "glib", + "glib-sys", + "gobject-sys", + "libc", + "pango", +] + +[[package]] +name = "gdk-pixbuf" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f6dae3cb99dd49b758b88f0132f8d401108e63ae8edd45f432d42cdff99998a" +dependencies = [ + "gdk-pixbuf-sys", + "gio", + "gio-sys", + "glib", + "glib-sys", + "gobject-sys", + "libc", +] + +[[package]] +name = "gdk-pixbuf-sys" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3bfe468a7f43e97b8d193a762b6c5cf67a7d36cacbc0b9291dbcae24bfea1e8f" +dependencies = [ + "gio-sys", + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + +[[package]] +name = "gdk-sys" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a9653cfc500fd268015b1ac055ddbc3df7a5c9ea3f4ccef147b3957bd140d69" +dependencies = [ + "cairo-sys-rs", + "gdk-pixbuf-sys", + "gio-sys", + "glib-sys", + "gobject-sys", + "libc", + "pango-sys", + "pkg-config", + "system-deps", +] + +[[package]] +name = "getrandom" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", +] + +[[package]] +name = "getrandom" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9495705279e7140bf035dde1f6e750c162df8b625267cd52cc44e0b156732c8" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "wasi 0.10.2+wasi-snapshot-preview1", +] + +[[package]] +name = "gimli" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6503fe142514ca4799d4c26297c4248239fe8838d827db6bd6065c6ed29a6ce" + +[[package]] +name = "gio" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fb60242bfff700772dae5d9e3a1f7aa2e4ebccf18b89662a16acb2822568561" +dependencies = [ + "bitflags 1.2.1", + "futures", + "futures-channel", + "futures-core", + "futures-io", + "futures-util", + "gio-sys", + "glib", + "glib-sys", + "gobject-sys", + "libc", + "once_cell", + "thiserror", +] + +[[package]] +name = "gio-sys" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e24fb752f8f5d2cf6bbc2c606fd2bc989c81c5e2fe321ab974d54f8b6344eac" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps", + "winapi 0.3.9", +] + +[[package]] +name = "glib" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c685013b7515e668f1b57a165b009d4d28cb139a8a989bbd699c10dad29d0c5" +dependencies = [ + "bitflags 1.2.1", + "futures-channel", + "futures-core", + "futures-executor", + "futures-task", + "futures-util", + "glib-macros", + "glib-sys", + "gobject-sys", + "libc", + "once_cell", +] + +[[package]] +name = "glib-macros" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41486a26d1366a8032b160b59065a59fb528530a46a49f627e7048fb8c064039" +dependencies = [ + "anyhow", + "heck", + "itertools", + "proc-macro-crate", + "proc-macro-error", + "proc-macro2", + "quote 1.0.8", + "syn 1.0.60", +] + +[[package]] +name = "glib-sys" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2" +checksum = "c7e9b997a66e9a23d073f2b1abb4dbfc3925e0b8952f67efd8d9b6e168e4cdc1" +dependencies = [ + "libc", + "system-deps", +] [[package]] -name = "generator" -version = "0.6.21" +name = "gobject-sys" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "add72f17bb81521258fcc8a7a3245b1e184e916bfbe34f0ea89558f440df5c68" +checksum = "952133b60c318a62bf82ee75b93acc7e84028a093e06b9e27981c2b6fe68218c" dependencies = [ - "cc", + "glib-sys", "libc", - "log", - "rustc_version", - "winapi", + "system-deps", ] [[package]] -name = "getrandom" -version = "0.1.14" +name = "gtk" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb" +checksum = "2f022f2054072b3af07666341984562c8e626a79daa8be27b955d12d06a5ad6a" dependencies = [ - "cfg-if 0.1.9", + "atk", + "bitflags 1.2.1", + "cairo-rs", + "cairo-sys-rs", + "cc", + "gdk", + "gdk-pixbuf", + "gdk-pixbuf-sys", + "gdk-sys", + "gio", + "gio-sys", + "glib", + "glib-sys", + "gobject-sys", + "gtk-sys", "libc", - "wasi 0.9.0+wasi-snapshot-preview1", + "once_cell", + "pango", + "pango-sys", + "pkg-config", ] [[package]] -name = "getrandom" -version = "0.2.2" +name = "gtk-sys" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9495705279e7140bf035dde1f6e750c162df8b625267cd52cc44e0b156732c8" +checksum = "89acda6f084863307d948ba64a4b1ef674e8527dddab147ee4cdcc194c880457" dependencies = [ - "cfg-if 1.0.0", + "atk-sys", + "cairo-sys-rs", + "gdk-pixbuf-sys", + "gdk-sys", + "gio-sys", + "glib-sys", + "gobject-sys", "libc", - "wasi 0.10.2+wasi-snapshot-preview1", + "pango-sys", + "system-deps", ] [[package]] -name = "gimli" -version = "0.23.0" +name = "hashbrown" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6503fe142514ca4799d4c26297c4248239fe8838d827db6bd6065c6ed29a6ce" +checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04" [[package]] name = "heck" @@ -631,29 +1083,35 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.1.14" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9586eedd4ce6b3c498bc3b4dd92fc9f11166aa908a914071953768066c67909" +checksum = "322f4de77956e22ed0e5032c359a0f1273f1f7f0d79bfa3b8ffbc730d7fbcc5c" dependencies = [ "libc", ] [[package]] name = "http" -version = "0.2.1" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d569972648b2c512421b5f2a405ad6ac9666547189d0c5477a3f200f3e02f9" +checksum = "7245cd7449cc792608c3c8a9eaf69bd4eabbabf802713748fd739c98b82f0747" dependencies = [ "bytes", "fnv", "itoa", ] +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + [[package]] name = "idna" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" +checksum = "de910d521f7cc3135c4de8db1cb910e0b5ed1dc6f57c381cd07e8e661ce10094" dependencies = [ "matches", "unicode-bidi", @@ -662,18 +1120,71 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.4.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c398b2b113b55809ceb9ee3e753fcbac793f1956663f3c36549c1346015c2afe" +checksum = "4fb1fa934250de4de8aef298d81c729a7d33d8c239daa3a7575e6b92bfc7313b" dependencies = [ "autocfg", + "hashbrown", +] + +[[package]] +name = "instant" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61124eeebbd69b8190558df225adf7e4caafce0d743919e5d6b19652314ec5ec" +dependencies = [ + "cfg-if 1.0.0", +] + +[[package]] +name = "iovec" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" +dependencies = [ + "libc", +] + +[[package]] +name = "itertools" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b" +dependencies = [ + "either", ] [[package]] name = "itoa" -version = "0.4.6" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736" + +[[package]] +name = "javascriptcore-rs" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ecc697657edc9cd3d85d5ec6941f74cc9bb2ae84bec320f55c9397c5a8d8722" +dependencies = [ + "glib", + "javascriptcore-rs-sys", +] + +[[package]] +name = "javascriptcore-rs-sys" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f46ada8a08dcd75a10afae872fbfb51275df4a8ae0d46b8cc7c708f08dd2998" +dependencies = [ + "libc", +] + +[[package]] +name = "jni-sys" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc6f3ad7b9d11a0c00842ff8de1b60ee58661048eb8049ed33c73594f359d7e6" +checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" [[package]] name = "js-sys" @@ -684,17 +1195,33 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "kernel32-sys" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" +dependencies = [ + "winapi 0.2.8", + "winapi-build", +] + [[package]] name = "lazy_static" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +[[package]] +name = "lazycell" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" + [[package]] name = "libc" -version = "0.2.71" +version = "0.2.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9457b06509d27052635f90d6466700c65095fdf75409b3fbdd903e988b886f49" +checksum = "7ccac4b00700875e6a07c6cde370d44d32fa01c5a65cdd2fca6858c479d28bb3" [[package]] name = "libdbus-sys" @@ -706,23 +1233,31 @@ dependencies = [ ] [[package]] -name = "log" -version = "0.4.8" +name = "libloading" +version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" +checksum = "351a32417a12d5f7e82c368a66781e307834dae04c6ce0cd4456d52989229883" dependencies = [ - "cfg-if 0.1.9", + "cfg-if 1.0.0", + "winapi 0.3.9", ] [[package]] -name = "loom" -version = "0.3.4" +name = "lock_api" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ecc775857611e1df29abba5c41355cdf540e7e9d4acfdf0f355eefee82330b7" +checksum = "dd96ffd135b2fd7b973ac026d28085defbe8983df057ced3eb4f2130b0831312" dependencies = [ - "cfg-if 0.1.9", - "generator", - "scoped-tls", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" +dependencies = [ + "cfg-if 1.0.0", ] [[package]] @@ -764,11 +1299,20 @@ version = "2.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525" +[[package]] +name = "memmap2" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b70ca2a6103ac8b665dc150b142ef0e4e89df640c9e6cf295d189c3caebe5a" +dependencies = [ + "libc", +] + [[package]] name = "memoffset" -version = "0.5.5" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c198b026e1bbf08a937e94c6c60f9ec4a2267f5b0d2eec9c1b21b061ce2be55f" +checksum = "157b4208e3059a8f9e78d559edc658e13df41410cb3ae03979c83130067fdd87" dependencies = [ "autocfg", ] @@ -784,18 +1328,62 @@ dependencies = [ [[package]] name = "miniz_oxide" -version = "0.4.0" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be0f75932c1f6cfae3c04000e40114adf955636e19040f9c0a2c380702aa1c7f" +checksum = "0f2d26ec3309788e423cfbf68ad1800f061638098d76a83681af979dc4eda19d" dependencies = [ "adler", + "autocfg", +] + +[[package]] +name = "mio" +version = "0.6.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4afd66f5b91bf2a3bc13fad0e21caedac168ca4c707504e75585648ae80e4cc4" +dependencies = [ + "cfg-if 0.1.10", + "fuchsia-zircon", + "fuchsia-zircon-sys", + "iovec", + "kernel32-sys", + "libc", + "log", + "miow", + "net2", + "slab", + "winapi 0.2.8", +] + +[[package]] +name = "mio-extras" +version = "2.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52403fe290012ce777c4626790c8951324a2b9e3316b3143779c72b029742f19" +dependencies = [ + "lazycell", + "log", + "mio", + "slab", +] + +[[package]] +name = "miow" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebd808424166322d4a38da87083bfddd3ac4c131334ed55856112eb06d46944d" +dependencies = [ + "kernel32-sys", + "net2", + "winapi 0.2.8", + "ws2_32-sys", ] [[package]] name = "native-tls" -version = "0.2.4" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b0d88c06fe90d5ee94048ba40409ef1d9315d86f6f38c2efdaad4fb50c58b2d" +checksum = "b8d96b2e1c8da3957d58100b09f102c6d9cfdfced01b7ec5a8974044bb09dbd4" dependencies = [ "lazy_static", "libc", @@ -809,6 +1397,62 @@ dependencies = [ "tempfile", ] +[[package]] +name = "ndk" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5eb167c1febed0a496639034d0c76b3b74263636045db5489eee52143c246e73" +dependencies = [ + "jni-sys", + "ndk-sys", + "num_enum", + "thiserror", +] + +[[package]] +name = "ndk-glue" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdf399b8b7a39c6fb153c4ec32c72fd5fe789df24a647f229c239aa7adb15241" +dependencies = [ + "lazy_static", + "libc", + "log", + "ndk", + "ndk-macro", + "ndk-sys", +] + +[[package]] +name = "ndk-macro" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05d1c6307dc424d0f65b9b06e94f88248e6305726b14729fd67a5e47b2dc481d" +dependencies = [ + "darling", + "proc-macro-crate", + "proc-macro2", + "quote 1.0.8", + "syn 1.0.60", +] + +[[package]] +name = "ndk-sys" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c44922cb3dbb1c70b5e5f443d63b64363a898564d739ba5198e3a9138442868d" + +[[package]] +name = "net2" +version = "0.2.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "391630d12b68002ae1e25e8f974306474966550ad82dac6886fb8910c19568ae" +dependencies = [ + "cfg-if 0.1.10", + "libc", + "winapi 0.3.9", +] + [[package]] name = "nfd" version = "0.0.4" @@ -818,6 +1462,28 @@ dependencies = [ "gcc", ] +[[package]] +name = "nix" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83450fe6a6142ddd95fb064b746083fc4ef1705fe81f64a64e1d4b39f54a1055" +dependencies = [ + "bitflags 1.2.1", + "cc", + "cfg-if 0.1.10", + "libc", +] + +[[package]] +name = "nom" +version = "6.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab6f70b46d6325aa300f1c7bb3d470127dfc27806d8ea6bf294ee0ce643ce2b1" +dependencies = [ + "memchr", + "version_check", +] + [[package]] name = "notify-rust" version = "4.2.2" @@ -831,18 +1497,18 @@ dependencies = [ [[package]] name = "ntapi" -version = "0.3.4" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a31937dea023539c72ddae0e3571deadc1414b300483fa7aaec176168cfa9d2" +checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44" dependencies = [ - "winapi", + "winapi 0.3.9", ] [[package]] name = "num-integer" -version = "0.1.43" +version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d59457e662d541ba17869cf51cf177c0b5f0cbf476c66bdc90bf1edac4f875b" +checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" dependencies = [ "autocfg", "num-traits", @@ -850,9 +1516,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.12" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac267bcc07f48ee5f8935ab0d24f316fb722d7a1292e2913f0cc196b29ffd611" +checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" dependencies = [ "autocfg", ] @@ -867,6 +1533,28 @@ dependencies = [ "libc", ] +[[package]] +name = "num_enum" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca565a7df06f3d4b485494f25ba05da1435950f4dc263440eda7a6fa9b8e36e4" +dependencies = [ + "derivative", + "num_enum_derive", +] + +[[package]] +name = "num_enum_derive" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffa5a33ddddfee04c0283a7653987d634e880347e96b5b2ed64de07efb59db9d" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote 1.0.8", + "syn 1.0.60", +] + [[package]] name = "objc" version = "0.2.7" @@ -898,9 +1586,9 @@ dependencies = [ [[package]] name = "object" -version = "0.22.0" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d3b63360ec3cb337817c2dbd47ab4a0f170d285d8e5a2064600f3def1402397" +checksum = "a9a7ab5d64814df0fe4a4b5ead45ed6c5f181ee3ff04ba344313a6c80446c5d4" [[package]] name = "once_cell" @@ -910,12 +1598,12 @@ checksum = "13bd41f508810a131401606d54ac32a467c97172d74ba7662562ebba5ad07fa0" [[package]] name = "openssl" -version = "0.10.30" +version = "0.10.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d575eff3665419f9b83678ff2815858ad9d11567e082f5ac1814baba4e2bcb4" +checksum = "038d43985d1ddca7a9900630d8cd031b56e4794eecc2e9ea39dd17aa04399a70" dependencies = [ "bitflags 1.2.1", - "cfg-if 0.1.9", + "cfg-if 1.0.0", "foreign-types", "lazy_static", "libc", @@ -930,9 +1618,9 @@ checksum = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" [[package]] name = "openssl-sys" -version = "0.9.58" +version = "0.9.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a842db4709b604f0fe5d1170ae3565899be2ad3d9cbc72dedc789ac0511f78de" +checksum = "921fc71883267538946025deffb622905ecad223c28efbfdef9bb59a0175f3e6" dependencies = [ "autocfg", "cc", @@ -947,6 +1635,67 @@ version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "afb2e1c3ee07430c2cf76151675e583e0f19985fa6efae47d6848a3e2c824f85" +[[package]] +name = "owned_ttf_parser" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f923fb806c46266c02ab4a5b239735c144bdeda724a50ed058e5226f594cde3" +dependencies = [ + "ttf-parser", +] + +[[package]] +name = "pango" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9937068580bebd8ced19975938573803273ccbcbd598c58d4906efd4ac87c438" +dependencies = [ + "bitflags 1.2.1", + "glib", + "glib-sys", + "gobject-sys", + "libc", + "once_cell", + "pango-sys", +] + +[[package]] +name = "pango-sys" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d2650c8b62d116c020abd0cea26a4ed96526afda89b1c4ea567131fdefc890" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + +[[package]] +name = "parking_lot" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d7744ac029df22dca6284efe4e898991d28e3085c706c972bcd7da4a27a15eb" +dependencies = [ + "instant", + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ccb628cad4f84851442432c60ad8e1f607e29752d0bf072cbd0baf28aa34272" +dependencies = [ + "cfg-if 1.0.0", + "instant", + "libc", + "redox_syscall 0.1.57", + "smallvec", + "winapi 0.3.9", +] + [[package]] name = "percent-encoding" version = "2.1.0" @@ -1014,15 +1763,24 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" -version = "0.3.17" +version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05da548ad6865900e60eaba7f589cc0783590a92e940c26953ff81ddbab2d677" +checksum = "3831453b3449ceb48b6d9c7ad7c96d5ea673e9b470a1dc578c2ce6521230884c" [[package]] name = "ppv-lite86" -version = "0.2.8" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" + +[[package]] +name = "proc-macro-crate" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "237a5ed80e274dbc66f86bd59c1e25edc039660be53194b5fe0a482e0f2612ea" +checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" +dependencies = [ + "toml", +] [[package]] name = "proc-macro-error" @@ -1032,7 +1790,7 @@ checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ "proc-macro-error-attr", "proc-macro2", - "quote 1.0.7", + "quote 1.0.8", "syn 1.0.60", "version_check", ] @@ -1044,7 +1802,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ "proc-macro2", - "quote 1.0.7", + "quote 1.0.8", "version_check", ] @@ -1077,9 +1835,9 @@ checksum = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a" [[package]] name = "quote" -version = "1.0.7" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37" +checksum = "991431c3519a3f36861882da93630ce66b52918dcf1b8e2fd66b397fc96f28df" dependencies = [ "proc-macro2", ] @@ -1090,7 +1848,7 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" dependencies = [ - "getrandom 0.1.14", + "getrandom 0.1.16", "libc", "rand_chacha 0.2.2", "rand_core 0.5.1", @@ -1136,7 +1894,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" dependencies = [ - "getrandom 0.1.14", + "getrandom 0.1.16", ] [[package]] @@ -1175,11 +1933,20 @@ dependencies = [ "rand_core 0.5.1", ] +[[package]] +name = "raw-window-handle" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a441a7a6c80ad6473bd4b74ec1c9a4c951794285bf941c2126f607c72e48211" +dependencies = [ + "libc", +] + [[package]] name = "rayon" -version = "1.3.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62f02856753d04e03e26929f820d0a0a337ebe71f849801eea335d464b349080" +checksum = "8b0d8e0819fadc20c74ea8373106ead0600e3a67ef1fe8da56e39b9ae7275674" dependencies = [ "autocfg", "crossbeam-deque", @@ -1189,12 +1956,12 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.7.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e92e15d89083484e11353891f1af602cc661426deb9564c298b270c726973280" +checksum = "9ab346ac5921dc62ffa9f89b7a773907511cdfa5490c572ae9be1be33e8afa4a" dependencies = [ + "crossbeam-channel", "crossbeam-deque", - "crossbeam-queue", "crossbeam-utils", "lazy_static", "num_cpus", @@ -1202,9 +1969,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.1.56" +version = "0.1.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" +checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" [[package]] name = "redox_syscall" @@ -1217,12 +1984,12 @@ dependencies = [ [[package]] name = "redox_users" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09b23093265f8d200fa7b4c2c76297f47e681c655f6f1285a8780d6a022f7431" +checksum = "de0737333e7a9502c789a36d7c7fa6092a49895d4faa31ca5df163857ded2e9d" dependencies = [ - "getrandom 0.1.14", - "redox_syscall 0.1.56", + "getrandom 0.1.16", + "redox_syscall 0.1.57", "rust-argon2", ] @@ -1242,7 +2009,7 @@ version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" dependencies = [ - "winapi", + "winapi 0.3.9", ] [[package]] @@ -1257,11 +2024,11 @@ dependencies = [ [[package]] name = "rust-argon2" -version = "0.7.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bc8af4bda8e1ff4932523b94d3dd20ee30a87232323eda55903ffd71d2fb017" +checksum = "4b18820d944b33caa75a71378964ac46f58517c92b6ae5f762636247c09e78fb" dependencies = [ - "base64 0.11.0", + "base64", "blake2b_simd", "constant_time_eq", "crossbeam-utils", @@ -1274,12 +2041,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e3bad0ee36814ca07d7968269dd4b7ec89ec2da10c4bb613928d3077083c232" [[package]] -name = "rustc_version" -version = "0.2.3" +name = "rusttype" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" +checksum = "dc7c727aded0be18c5b80c1640eae0ac8e396abf6fa8477d96cb37d18ee5ec59" dependencies = [ - "semver 0.9.0", + "ab_glyph_rasterizer", + "owned_ttf_parser", ] [[package]] @@ -1304,14 +2072,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75" dependencies = [ "lazy_static", - "winapi", + "winapi 0.3.9", ] [[package]] name = "scoped-tls" -version = "0.1.2" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "332ffa32bf586782a3efaeb58f127980944bbc8c4d6913a86107ac2a5ab24b28" +checksum = "ea6a9290e3c9cf0f18145ef7ffa62d68ee0bf5fcd651017e586dc7fd5da448c2" [[package]] name = "scopeguard" @@ -1321,51 +2089,36 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "security-framework" -version = "0.4.4" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64808902d7d99f78eaddd2b4e2509713babc3dc3c85ad6f4c447680f3c01e535" +checksum = "c1759c2e3c8580017a484a7ac56d3abc5a6c1feadf88db2f3633f12ae4268c69" dependencies = [ "bitflags 1.2.1", - "core-foundation", - "core-foundation-sys", + "core-foundation 0.9.1", + "core-foundation-sys 0.8.2", "libc", "security-framework-sys", ] [[package]] name = "security-framework-sys" -version = "0.4.3" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17bf11d99252f512695eb468de5516e5cf75455521e69dfe343f3b74e4748405" +checksum = "f99b9d5e26d2a71633cc4f2ebae7cc9f874044e0c351a27e17892d76dce5678b" dependencies = [ - "core-foundation-sys", + "core-foundation-sys 0.8.2", "libc", ] -[[package]] -name = "semver" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" -dependencies = [ - "semver-parser 0.7.0", -] - [[package]] name = "semver" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" dependencies = [ - "semver-parser 0.10.2", + "semver-parser", ] -[[package]] -name = "semver-parser" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" - [[package]] name = "semver-parser" version = "0.10.2" @@ -1377,29 +2130,29 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.114" +version = "1.0.123" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5317f7588f0a5078ee60ef675ef96735a1442132dc645eb1d12c018620ed8cd3" +checksum = "92d5161132722baa40d802cc70b15262b98258453e85e5d1d365c757c73869ae" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.114" +version = "1.0.123" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a0be94b04690fbaed37cddffc5c134bf537c8e3329d53e982fe04c374978f8e" +checksum = "9391c295d64fc0abb2c556bad848f33cb8296276b1ad2677d1ae1ace4f258f31" dependencies = [ "proc-macro2", - "quote 1.0.7", + "quote 1.0.8", "syn 1.0.60", ] [[package]] name = "serde_json" -version = "1.0.56" +version = "1.0.62" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3433e879a558dde8b5e8feb2a04899cf34fdde1fafb894687e52105fc1162ac3" +checksum = "ea1c6153794552ea7cf7cf63b1231a25de00ec90db326ba6264440fa08e31486" dependencies = [ "itoa", "ryu", @@ -1413,7 +2166,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2dc6b7951b17b051f3210b063f12cc17320e2fe30ae05b0fe2a3abb068551c76" dependencies = [ "proc-macro2", - "quote 1.0.7", + "quote 1.0.8", "syn 1.0.60", ] @@ -1429,6 +2182,12 @@ dependencies = [ "url", ] +[[package]] +name = "sha1" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d" + [[package]] name = "siphasher" version = "0.3.3" @@ -1441,6 +2200,58 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" +[[package]] +name = "smallvec" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" + +[[package]] +name = "smithay-client-toolkit" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "316e13a3eb853ce7bf72ad3530dc186cb2005c57c521ef5f4ada5ee4eed74de6" +dependencies = [ + "andrew", + "bitflags 1.2.1", + "calloop", + "dlib", + "lazy_static", + "log", + "memmap2", + "nix", + "wayland-client", + "wayland-cursor", + "wayland-protocols", +] + +[[package]] +name = "soup-sys" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3c7adf08565630bbb71f955f11f8a68464817ded2703a3549747c235b58a13e" +dependencies = [ + "bitflags 1.2.1", + "gio-sys", + "glib-sys", + "gobject-sys", + "libc", + "pkg-config", + "system-deps", +] + +[[package]] +name = "squote" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fccf17fd09e2455ea796d2ad267b64fa2c5cbd8701b2a93b555d2aa73449f7d" + +[[package]] +name = "strsim" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6446ced80d6c486436db5c078dde11a9f73d42b57fb273121e160b84f63d894c" + [[package]] name = "strsim" version = "0.10.0" @@ -1453,6 +2264,12 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ca6e4730f517e041e547ffe23d29daab8de6b73af4b6ae2a002108169f5e7da" +[[package]] +name = "strum" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57bd81eb48f4c437cadc685403cad539345bf703d78e63707418431cecd4522b" + [[package]] name = "strum_macros" version = "0.8.0" @@ -1463,6 +2280,18 @@ dependencies = [ "syn 0.11.11", ] +[[package]] +name = "strum_macros" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87c85aa3f8ea653bfd3ddf25f7ee357ee4d204731f6aa9ad04002306f6e2774c" +dependencies = [ + "heck", + "proc-macro2", + "quote 1.0.8", + "syn 1.0.60", +] + [[package]] name = "syn" version = "0.11.11" @@ -1481,7 +2310,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c700597eca8a5a762beb35753ef6b94df201c81cca676604f547495a0d7f0081" dependencies = [ "proc-macro2", - "quote 1.0.7", + "quote 1.0.8", "unicode-xid 0.2.1", ] @@ -1500,24 +2329,38 @@ version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8834e42be61ae4f6338b216fbb69837c7f33c3d4d3a139fb073735b25af4d9e" dependencies = [ - "cfg-if 0.1.9", + "cfg-if 0.1.10", "doc-comment", "libc", "ntapi", "once_cell", "rayon", - "winapi", + "winapi 0.3.9", +] + +[[package]] +name = "system-deps" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f3ecc17269a19353b3558b313bba738b25d82993e30d62a18406a24aba4649b" +dependencies = [ + "heck", + "pkg-config", + "strum 0.18.0", + "strum_macros 0.18.0", + "thiserror", + "toml", + "version-compare", ] [[package]] name = "tar" -version = "0.4.29" +version = "0.4.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8a4c1d0bee3230179544336c15eefb563cf0302955d962e456542323e8c2e8a" +checksum = "0313546c01d59e29be4f09687bcb4fb6690cec931cc3607b6aec7a0e417f4cc6" dependencies = [ "filetime", "libc", - "redox_syscall 0.1.56", "xattr", ] @@ -1527,9 +2370,8 @@ version = "0.11.1" dependencies = [ "anyhow", "async-trait", - "base64 0.13.0", + "base64", "cfg_aliases", - "envmnt", "futures", "lazy_static", "once_cell", @@ -1546,7 +2388,7 @@ dependencies = [ "urlencoding", "uuid", "webbrowser", - "webview_official", + "wry", ] [[package]] @@ -1564,7 +2406,7 @@ dependencies = [ "notify-rust", "once_cell", "rand 0.8.3", - "semver 0.11.0", + "semver", "serde", "serde_json", "serde_repr", @@ -1627,16 +2469,16 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" +checksum = "dac1c663cfc93810f88aed9b8941d48cabf856a1b111c29a40439018d870eb22" dependencies = [ - "cfg-if 0.1.9", + "cfg-if 1.0.0", "libc", - "rand 0.7.3", - "redox_syscall 0.1.56", + "rand 0.8.3", + "redox_syscall 0.2.4", "remove_dir_all", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -1673,7 +2515,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9be73a2caec27583d0046ef3796c3794f868a5bc813db689eed00c7631275cd1" dependencies = [ "proc-macro2", - "quote 1.0.7", + "quote 1.0.8", "syn 1.0.60", ] @@ -1684,7 +2526,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438" dependencies = [ "libc", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -1702,15 +2544,24 @@ dependencies = [ [[package]] name = "tinyvec" -version = "0.3.3" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53953d2d3a5ad81d9f844a32f14ebb121f50b650cd59d0ee2a07cf13c617efed" +checksum = "317cca572a0e89c3ce0ca1f1bdc9369547fe318a683418e42ac8f59d14701023" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "1.1.1" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6714d663090b6b0acb0fa85841c6d66233d150cdb2602c8f9b8abb03370beb3f" +checksum = "e8190d04c665ea9e6b6a0dc45523ade572c088d2e6566244c1122671dbf4ae3a" dependencies = [ "autocfg", "num_cpus", @@ -1719,13 +2570,19 @@ dependencies = [ [[package]] name = "toml" -version = "0.5.6" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffc92d160b1eef40665be3a05630d003936a3bc7da7421277846c2613e92c71a" +checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa" dependencies = [ "serde", ] +[[package]] +name = "ttf-parser" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e5d7cd7ab3e47dda6e56542f4bbf3824c15234958c6e1bd6aaa347e93499fdc" + [[package]] name = "ucd-trie" version = "0.1.3" @@ -1743,9 +2600,9 @@ dependencies = [ [[package]] name = "unicode-normalization" -version = "0.1.13" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb19cf769fa8c6a80a162df694621ebeb4dafb606470b2b2fce0be40a98a977" +checksum = "a13e63ab62dbe32aeee58d1c5408d35c36c392bba5d9d3142287219721afe606" dependencies = [ "tinyvec", ] @@ -1776,10 +2633,11 @@ checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564" [[package]] name = "url" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "829d4a8476c35c9bf0bbce5a3b23f4106f79728039b726d292bb93bc106787cb" +checksum = "5909f2b0817350449ed73e8bcd81c8c3c8d9a7a5d8acba4b27db277f1868976e" dependencies = [ + "form_urlencoded", "idna", "matches", "percent-encoding", @@ -1802,9 +2660,9 @@ dependencies = [ [[package]] name = "vcpkg" -version = "0.2.10" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6454029bf181f092ad1b853286f23e2c507d8e8194d01d92da4a55c274a5508c" +checksum = "b00bca6106a5e23f3eee943593759b7fcddb00554332e856d990c893966879fb" [[package]] name = "vec_map" @@ -1812,6 +2670,12 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" +[[package]] +name = "version-compare" +version = "0.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d63556a25bae6ea31b52e640d7c41d1ab27faba4ccb600013837a3d0b3994ca1" + [[package]] name = "version_check" version = "0.9.2" @@ -1825,7 +2689,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "777182bc735b6424e1a57516d35ed72cb8019d85c8c9bf536dccb3445c1a2f7d" dependencies = [ "same-file", - "winapi", + "winapi 0.3.9", "winapi-util", ] @@ -1861,7 +2725,7 @@ dependencies = [ "lazy_static", "log", "proc-macro2", - "quote 1.0.7", + "quote 1.0.8", "syn 1.0.60", "wasm-bindgen-shared", ] @@ -1872,7 +2736,7 @@ version = "0.2.70" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b8853882eef39593ad4174dd26fc9865a64e84026d223f63bb2c42affcbba2c" dependencies = [ - "quote 1.0.7", + "quote 1.0.8", "wasm-bindgen-macro-support", ] @@ -1883,7 +2747,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4133b5e7f2a531fa413b3a1695e925038a05a71cf67e87dafa295cb645a01385" dependencies = [ "proc-macro2", - "quote 1.0.7", + "quote 1.0.8", "syn 1.0.60", "wasm-bindgen-backend", "wasm-bindgen-shared", @@ -1895,6 +2759,79 @@ version = "0.2.70" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd4945e4943ae02d15c13962b38a5b1e81eadd4b71214eee75af64a4d6a4fd64" +[[package]] +name = "wayland-client" +version = "0.28.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdbdbe01d03b2267809f3ed99495b37395387fde789e0f2ebb78e8b43f75b6d7" +dependencies = [ + "bitflags 1.2.1", + "downcast-rs", + "libc", + "nix", + "scoped-tls", + "wayland-commons", + "wayland-scanner", + "wayland-sys", +] + +[[package]] +name = "wayland-commons" +version = "0.28.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "480450f76717edd64ad04a4426280d737fc3d10a236b982df7b1aee19f0e2d56" +dependencies = [ + "nix", + "once_cell", + "smallvec", + "wayland-sys", +] + +[[package]] +name = "wayland-cursor" +version = "0.28.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6eb122c160223a7660feeaf949d0100281d1279acaaed3720eb3c9894496e5f" +dependencies = [ + "nix", + "wayland-client", + "xcursor", +] + +[[package]] +name = "wayland-protocols" +version = "0.28.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "319a82b4d3054dd25acc32d9aee0f84fa95b63bc983fffe4703b6b8d47e01a30" +dependencies = [ + "bitflags 1.2.1", + "wayland-client", + "wayland-commons", + "wayland-scanner", +] + +[[package]] +name = "wayland-scanner" +version = "0.28.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7010ba5767b3fcd350decc59055390b4ebe6bd1b9279a9feb1f1888987f1133d" +dependencies = [ + "proc-macro2", + "quote 1.0.8", + "xml-rs 0.8.3", +] + +[[package]] +name = "wayland-sys" +version = "0.28.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6793834e0c35d11fd96a97297abe03d37be627e1847da52e17d7e0e3b51cc099" +dependencies = [ + "dlib", + "lazy_static", + "pkg-config", +] + [[package]] name = "web-sys" version = "0.3.47" @@ -1913,26 +2850,51 @@ checksum = "ecad156490d6b620308ed411cfee90d280b3cbd13e189ea0d3fada8acc89158a" dependencies = [ "web-sys", "widestring", - "winapi", + "winapi 0.3.9", ] [[package]] -name = "webview-official-sys" -version = "0.1.2" +name = "webkit2gtk" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4aec5fdf5bc938ba5fe47d23b8e02d6beaee395a91e16f0b2eec984a9a9e1d2" +checksum = "02b7e9eb04d30f8423e9c8435f686f42bc497cfcac2cfe4b43ce4139fb1a7cb6" dependencies = [ - "cc", - "pkg-config", + "bitflags 1.2.1", + "cairo-rs", + "gdk", + "gdk-sys", + "gio", + "gio-sys", + "glib", + "glib-sys", + "gobject-sys", + "gtk", + "gtk-sys", + "javascriptcore-rs", + "libc", + "webkit2gtk-sys", ] [[package]] -name = "webview_official" -version = "0.1.1" +name = "webkit2gtk-sys" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef1d99ead69b8f362550a88e161590acfe53e7698edfaecc98be15738a23d191" +checksum = "72d10cf73685359cd8611740db241a231f4d74d7e353348dc5332a1a132d6f24" dependencies = [ - "webview-official-sys", + "atk-sys", + "bitflags 1.2.1", + "cairo-sys-rs", + "gdk-pixbuf-sys", + "gdk-sys", + "gio-sys", + "glib-sys", + "gobject-sys", + "gtk-sys", + "javascriptcore-rs-sys", + "libc", + "pango-sys", + "pkg-config", + "soup-sys", ] [[package]] @@ -1947,9 +2909,9 @@ dependencies = [ [[package]] name = "widestring" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a763e303c0e0f23b0da40888724762e802a8ffefbc22de4127ef42493c2ea68c" +checksum = "c168940144dd21fd8046987c16a46a33d5fc84eec29ef9dcddc2ac9e31526b7c" [[package]] name = "wildmatch" @@ -1957,6 +2919,12 @@ version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2399814fda0d6999a6bfe9b5c7660d836334deb162a09db8b73d5b38fd8c40a" +[[package]] +name = "winapi" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" + [[package]] name = "winapi" version = "0.3.9" @@ -1967,6 +2935,12 @@ dependencies = [ "winapi-x86_64-pc-windows-gnu", ] +[[package]] +name = "winapi-build" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" + [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" @@ -1979,7 +2953,7 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" dependencies = [ - "winapi", + "winapi 0.3.9", ] [[package]] @@ -1988,6 +2962,113 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8577253c781c3aa634017840854139a65a51de658fb61577e5c91e995ebdd18e" +dependencies = [ + "const-sha1", + "windows_gen", + "windows_macros", + "windows_winmd", +] + +[[package]] +name = "windows_gen" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de23e2765bf82678467efef4ccdeb150a2456b2b01688fbd7c86292c1c931ee7" +dependencies = [ + "proc-macro2", + "quote 1.0.8", + "rayon", + "sha1", + "squote", + "syn 1.0.60", + "windows_gen_macros", + "windows_winmd", +] + +[[package]] +name = "windows_gen_macros" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "878ecff0c53decca3851547869b5473081198cfe97405b14412be9283a05ae34" +dependencies = [ + "proc-macro2", + "quote 1.0.8", + "syn 1.0.60", +] + +[[package]] +name = "windows_macros" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aaedcc12658411370a43f9c194c40ed4bae0047c39e48ebf67e92d241a97f0c7" +dependencies = [ + "proc-macro2", + "quote 1.0.8", + "rayon", + "squote", + "syn 1.0.60", + "windows_gen", + "windows_winmd", +] + +[[package]] +name = "windows_winmd" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40a0769bcad04692eb69e92ff93ce49c89ca5aeda188e98f5cc9b8502b41d6c0" +dependencies = [ + "serde", + "serde_json", + "windows_winmd_macros", +] + +[[package]] +name = "windows_winmd_macros" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f67ec9020d1bbfeaa8847ababe33b8dc190d683624cd72a48a4a117de50d6559" +dependencies = [ + "proc-macro2", + "quote 1.0.8", + "syn 1.0.60", +] + +[[package]] +name = "winit" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da4eda6fce0eb84bd0a33e3c8794eb902e1033d0a1d5a31bc4f19b1b4bbff597" +dependencies = [ + "bitflags 1.2.1", + "cocoa", + "core-foundation 0.9.1", + "core-graphics 0.22.2", + "core-video-sys", + "dispatch", + "instant", + "lazy_static", + "libc", + "log", + "mio", + "mio-extras", + "ndk", + "ndk-glue", + "ndk-sys", + "objc", + "parking_lot", + "percent-encoding", + "raw-window-handle", + "smithay-client-toolkit", + "wayland-client", + "winapi 0.3.9", + "x11-dl", +] + [[package]] name = "winres" version = "0.1.11" @@ -2003,7 +3084,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7e30cba82e22b083dc5a422c2ee77e20dc7927271a0dc981360c57c1453cb48d" dependencies = [ - "winapi", + "winapi 0.3.9", ] [[package]] @@ -2012,11 +3093,56 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c31a65da50d792c6f9bd2e3216249566c4fb1d2d34f9b7d2d66d2e93f62a242" dependencies = [ - "strum", - "strum_macros", - "winapi", + "strum 0.8.0", + "strum_macros 0.8.0", + "winapi 0.3.9", "winrt", - "xml-rs", + "xml-rs 0.6.1", +] + +[[package]] +name = "wry" +version = "0.4.1" +source = "git+https://github.com/tauri-apps/wry?rev=42f4f2133f7921ed5adc47908787094da8abeac5#42f4f2133f7921ed5adc47908787094da8abeac5" +dependencies = [ + "cc", + "cocoa", + "core-graphics 0.22.2", + "gio", + "glib", + "gtk", + "libc", + "objc", + "once_cell", + "serde", + "serde_json", + "thiserror", + "url", + "webkit2gtk", + "windows", + "winit", +] + +[[package]] +name = "ws2_32-sys" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" +dependencies = [ + "winapi 0.2.8", + "winapi-build", +] + +[[package]] +name = "x11-dl" +version = "2.18.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bf981e3a5b3301209754218f962052d4d9ee97e478f4d26d4a6eced34c1fef8" +dependencies = [ + "lazy_static", + "libc", + "maybe-uninit", + "pkg-config", ] [[package]] @@ -2028,6 +3154,21 @@ dependencies = [ "libc", ] +[[package]] +name = "xcursor" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a9a231574ae78801646617cefd13bfe94be907c0e4fa979cfd8b770aa3c5d08" +dependencies = [ + "nom", +] + +[[package]] +name = "xdg" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d089681aa106a86fade1b0128fb5daf07d5867a509ab036d99988dec80429a57" + [[package]] name = "xml-rs" version = "0.6.1" @@ -2037,6 +3178,12 @@ dependencies = [ "bitflags 0.9.1", ] +[[package]] +name = "xml-rs" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b07db065a5cf61a7e4ba64f29e67db906fb1787316516c4e6e5ff0fea1efcd8a" + [[package]] name = "zip" version = "0.5.9" diff --git a/tauri/examples/api/src-tauri/src/main.rs b/tauri/examples/api/src-tauri/src/main.rs index d62dda486ab..6323d76e763 100644 --- a/tauri/examples/api/src-tauri/src/main.rs +++ b/tauri/examples/api/src-tauri/src/main.rs @@ -13,7 +13,7 @@ struct Reply { } fn main() { - tauri::AppBuilder::new() + tauri::AppBuilder::::new() .setup(|webview, _source| async move { let mut webview = webview.clone(); tauri::event::listen(String::from("js-event"), move |msg| { diff --git a/tauri/examples/api/src-tauri/tauri.conf.json b/tauri/examples/api/src-tauri/tauri.conf.json index beb49f34c12..73b68e15196 100644 --- a/tauri/examples/api/src-tauri/tauri.conf.json +++ b/tauri/examples/api/src-tauri/tauri.conf.json @@ -44,7 +44,7 @@ } }, "embeddedServer": { - "active": false + "active": true }, "bundle": { "active": true, diff --git a/tauri/examples/communication/dist/__tauri.js b/tauri/examples/communication/dist/__tauri.js index 0040903e3e6..991170341b6 100644 --- a/tauri/examples/communication/dist/__tauri.js +++ b/tauri/examples/communication/dist/__tauri.js @@ -1,4 +1,4 @@ -function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _objectSpread(e){for(var t=1;t=0;--a){var i=this.tryEntries[a],u=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(c&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}("object"===("undefined"==typeof module?"undefined":_typeof(module))?module.exports:{});try{regeneratorRuntime=t}catch(e){Function("r","regeneratorRuntime = r")(t)}function r(e){for(var t=void 0,r=e[0],n=1;n1&&void 0!==arguments[1]&&arguments[1],n=o();return Object.defineProperty(window,n,{value:function(o){return t&&Reflect.deleteProperty(window,n),r([e,"optionalCall",function(e){return e(o)}])},writable:!1,configurable:!0}),n}function u(e){return c.apply(this,arguments)}function c(){return(c=_asyncToGenerator(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,new Promise((function(e,r){var n=i((function(t){e(t),Reflect.deleteProperty(window,o)}),!0),o=i((function(e){r(e),Reflect.deleteProperty(window,n)}),!0);a(_objectSpread({callback:n,error:o},t))}));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var s=Object.freeze({__proto__:null,invoke:a,transformCallback:i,promisified:u});function p(){return(p=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u({cmd:"cliMatches"});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var f=Object.freeze({__proto__:null,getMatches:function(){return p.apply(this,arguments)}});function l(){return(l=_asyncToGenerator(regeneratorRuntime.mark((function e(){var t,r=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"object"===_typeof(t=r.length>0&&void 0!==r[0]?r[0]:{})&&Object.freeze(t),e.next=4,u({cmd:"openDialog",options:t});case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function h(){return(h=_asyncToGenerator(regeneratorRuntime.mark((function e(){var t,r=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"object"===_typeof(t=r.length>0&&void 0!==r[0]?r[0]:{})&&Object.freeze(t),e.next=4,u({cmd:"saveDialog",options:t});case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var y=Object.freeze({__proto__:null,open:function(){return l.apply(this,arguments)},save:function(){return h.apply(this,arguments)}});var m,d=Object.freeze({__proto__:null,listen:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];a({cmd:"listen",event:e,handler:i(t,r),once:r})},emit:function(e,t){a({cmd:"emit",event:e,payload:t})}});function v(){return(v=_asyncToGenerator(regeneratorRuntime.mark((function e(t){var r,n=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.length>1&&void 0!==n[1]?n[1]:{},e.next=3,u({cmd:"readTextFile",path:t,options:r});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function g(){return(g=_asyncToGenerator(regeneratorRuntime.mark((function e(t){var r,n=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.length>1&&void 0!==n[1]?n[1]:{},e.next=3,u({cmd:"readBinaryFile",path:t,options:r});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function w(){return(w=_asyncToGenerator(regeneratorRuntime.mark((function e(t){var r,n=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"object"===_typeof(r=n.length>1&&void 0!==n[1]?n[1]:{})&&Object.freeze(r),"object"===_typeof(t)&&Object.freeze(t),e.next=5,u({cmd:"writeFile",path:t.path,contents:t.contents,options:r});case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}!function(e){e[e.Audio=1]="Audio";e[e.Cache=2]="Cache";e[e.Config=3]="Config";e[e.Data=4]="Data";e[e.LocalData=5]="LocalData";e[e.Desktop=6]="Desktop";e[e.Document=7]="Document";e[e.Download=8]="Download";e[e.Executable=9]="Executable";e[e.Font=10]="Font";e[e.Home=11]="Home";e[e.Picture=12]="Picture";e[e.Public=13]="Public";e[e.Runtime=14]="Runtime";e[e.Template=15]="Template";e[e.Video=16]="Video";e[e.Resource=17]="Resource";e[e.App=18]="App"}(m||(m={}));var b=65536;function x(e){var t=function(e){if(e.length1&&void 0!==n[1]?n[1]:{})&&Object.freeze(r),"object"===_typeof(t)&&Object.freeze(t),e.next=5,u({cmd:"writeBinaryFile",path:t.path,contents:x(t.contents),options:r});case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function R(){return(R=_asyncToGenerator(regeneratorRuntime.mark((function e(t){var r,n=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.length>1&&void 0!==n[1]?n[1]:{},e.next=3,u({cmd:"readDir",path:t,options:r});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function T(){return(T=_asyncToGenerator(regeneratorRuntime.mark((function e(t){var r,n=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.length>1&&void 0!==n[1]?n[1]:{},e.next=3,u({cmd:"createDir",path:t,options:r});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function P(){return(P=_asyncToGenerator(regeneratorRuntime.mark((function e(t){var r,n=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.length>1&&void 0!==n[1]?n[1]:{},e.next=3,u({cmd:"removeDir",path:t,options:r});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function k(){return(k=_asyncToGenerator(regeneratorRuntime.mark((function e(t,r){var n,o=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=o.length>2&&void 0!==o[2]?o[2]:{},e.next=3,u({cmd:"copyFile",source:t,destination:r,options:n});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function j(){return(j=_asyncToGenerator(regeneratorRuntime.mark((function e(t){var r,n=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.length>1&&void 0!==n[1]?n[1]:{},e.next=3,u({cmd:"removeFile",path:t,options:r});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function G(){return(G=_asyncToGenerator(regeneratorRuntime.mark((function e(t,r){var n,o=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=o.length>2&&void 0!==o[2]?o[2]:{},e.next=3,u({cmd:"renameFile",oldPath:t,newPath:r,options:n});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var O=Object.freeze({__proto__:null,get BaseDirectory(){return m},get Dir(){return m},readTextFile:function(e){return v.apply(this,arguments)},readBinaryFile:function(e){return g.apply(this,arguments)},writeFile:function(e){return w.apply(this,arguments)},writeBinaryFile:function(e){return _.apply(this,arguments)},readDir:function(e){return R.apply(this,arguments)},createDir:function(e){return T.apply(this,arguments)},removeDir:function(e){return P.apply(this,arguments)},copyFile:function(e,t){return k.apply(this,arguments)},removeFile:function(e){return j.apply(this,arguments)},renameFile:function(e,t){return G.apply(this,arguments)}});function D(){return(D=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u({cmd:"resolvePath",path:"",directory:m.App});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function E(){return(E=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u({cmd:"resolvePath",path:"",directory:m.Audio});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function L(){return(L=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u({cmd:"resolvePath",path:"",directory:m.Cache});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function S(){return(S=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u({cmd:"resolvePath",path:"",directory:m.Config});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function F(){return(F=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u({cmd:"resolvePath",path:"",directory:m.Data});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function A(){return(A=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u({cmd:"resolvePath",path:"",directory:m.Desktop});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function N(){return(N=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u({cmd:"resolvePath",path:"",directory:m.Document});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function z(){return(z=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u({cmd:"resolvePath",path:"",directory:m.Download});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function C(){return(C=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u({cmd:"resolvePath",path:"",directory:m.Executable});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function B(){return(B=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u({cmd:"resolvePath",path:"",directory:m.Font});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function I(){return(I=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u({cmd:"resolvePath",path:"",directory:m.Home});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function H(){return(H=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u({cmd:"resolvePath",path:"",directory:m.LocalData});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function M(){return(M=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u({cmd:"resolvePath",path:"",directory:m.Picture});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function q(){return(q=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u({cmd:"resolvePath",path:"",directory:m.Public});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function K(){return(K=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u({cmd:"resolvePath",path:"",directory:m.Resource});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function U(){return(U=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u({cmd:"resolvePath",path:"",directory:m.Runtime});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function V(){return(V=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u({cmd:"resolvePath",path:"",directory:m.Template});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function J(){return(J=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u({cmd:"resolvePath",path:"",directory:m.Video});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Y(){return(Y=_asyncToGenerator(regeneratorRuntime.mark((function e(t,r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u({cmd:"resolvePath",path:t,directory:r});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Q,W,X=Object.freeze({__proto__:null,appDir:function(){return D.apply(this,arguments)},audioDir:function(){return E.apply(this,arguments)},cacheDir:function(){return L.apply(this,arguments)},configDir:function(){return S.apply(this,arguments)},dataDir:function(){return F.apply(this,arguments)},desktopDir:function(){return A.apply(this,arguments)},documentDir:function(){return N.apply(this,arguments)},downloadDir:function(){return z.apply(this,arguments)},executableDir:function(){return C.apply(this,arguments)},fontDir:function(){return B.apply(this,arguments)},homeDir:function(){return I.apply(this,arguments)},localDataDir:function(){return H.apply(this,arguments)},pictureDir:function(){return M.apply(this,arguments)},publicDir:function(){return q.apply(this,arguments)},resourceDir:function(){return K.apply(this,arguments)},runtimeDir:function(){return U.apply(this,arguments)},templateDir:function(){return V.apply(this,arguments)},videoDir:function(){return J.apply(this,arguments)},resolvePath:function(e,t){return Y.apply(this,arguments)}});function Z(e){return $.apply(this,arguments)}function $(){return($=_asyncToGenerator(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u({cmd:"httpRequest",options:t});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ee(){return(ee=_asyncToGenerator(regeneratorRuntime.mark((function e(t,r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Z(_objectSpread({method:"GET",url:t},r));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function te(){return(te=_asyncToGenerator(regeneratorRuntime.mark((function e(t,r,n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Z(_objectSpread({method:"POST",url:t,body:r},n));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function re(){return(re=_asyncToGenerator(regeneratorRuntime.mark((function e(t,r,n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Z(_objectSpread({method:"PUT",url:t,body:r},n));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ne(){return(ne=_asyncToGenerator(regeneratorRuntime.mark((function e(t,r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Z(_objectSpread({method:"PATCH",url:t},r));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function oe(){return(oe=_asyncToGenerator(regeneratorRuntime.mark((function e(t,r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Z(_objectSpread({method:"DELETE",url:t},r));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}!function(e){e[e.JSON=1]="JSON";e[e.Text=2]="Text";e[e.Binary=3]="Binary"}(Q||(Q={})),function(e){e[e.Form=1]="Form";e[e.File=2]="File";e[e.Auto=3]="Auto"}(W||(W={}));var ae={request:Z,get:function(e,t){return ee.apply(this,arguments)},post:function(e,t,r){return te.apply(this,arguments)},put:function(e,t,r){return re.apply(this,arguments)},patch:function(e,t){return ne.apply(this,arguments)},delete:function(e,t){return oe.apply(this,arguments)},ResponseType:Q,BodyType:W};function ie(){return(ie=_asyncToGenerator(regeneratorRuntime.mark((function e(t,r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"object"===_typeof(r)&&Object.freeze(r),e.next=3,u({cmd:"execute",command:t,args:"string"==typeof r?[r]:r});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var ue=Object.freeze({__proto__:null,execute:function(e,t){return ie.apply(this,arguments)}});var ce=Object.freeze({__proto__:null,setTitle:function(e){a({cmd:"setTitle",title:e})},open:function(e){a({cmd:"open",uri:e})}});function se(){return(se=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("default"===window.Notification.permission){e.next=4;break}return e.next=3,Promise.resolve("granted"===window.Notification.permission);case 3:return e.abrupt("return",e.sent);case 4:return e.next=6,u({cmd:"isNotificationPermissionGranted"});case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function pe(){return(pe=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,window.Notification.requestPermission();case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var fe=Object.freeze({__proto__:null,sendNotification:function(e){"string"==typeof e?new window.Notification(e):new window.Notification(e.title,e)},requestPermission:function(){return pe.apply(this,arguments)},isPermissionGranted:function(){return se.apply(this,arguments)}});e.cli=f,e.dialog=y,e.event=d,e.fs=O,e.http=ae,e.notification=fe,e.path=X,e.process=ue,e.tauri=s,e.window=ce,Object.defineProperty(e,"__esModule",{value:!0})})); +function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _objectSpread(e){for(var t=1;t=0;--a){var i=this.tryEntries[a],u=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(c&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:O(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}("object"===("undefined"==typeof module?"undefined":_typeof(module))?module.exports:{});try{regeneratorRuntime=t}catch(e){Function("r","regeneratorRuntime = r")(t)}function r(e){for(var t=void 0,r=e[0],n=1;n1&&void 0!==arguments[1]&&arguments[1],n=o();return Object.defineProperty(window,n,{value:function(o){return t&&Reflect.deleteProperty(window,n),r([e,"optionalCall",function(e){return e(o)}])},writable:!1,configurable:!0}),n}function u(e){return c.apply(this,arguments)}function c(){return(c=_asyncToGenerator(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,new Promise((function(e,r){var n=i((function(t){e(t),Reflect.deleteProperty(window,o)}),!0),o=i((function(e){r(e),Reflect.deleteProperty(window,n)}),!0);a(_objectSpread({callback:n,error:o},t))}));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var s=Object.freeze({__proto__:null,invoke:a,transformCallback:i,promisified:u});function p(){return(p=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u({cmd:"cliMatches"});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var f=Object.freeze({__proto__:null,getMatches:function(){return p.apply(this,arguments)}});function l(){return(l=_asyncToGenerator(regeneratorRuntime.mark((function e(){var t,r=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"object"===_typeof(t=r.length>0&&void 0!==r[0]?r[0]:{})&&Object.freeze(t),e.next=4,u({cmd:"openDialog",options:t});case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function h(){return(h=_asyncToGenerator(regeneratorRuntime.mark((function e(){var t,r=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"object"===_typeof(t=r.length>0&&void 0!==r[0]?r[0]:{})&&Object.freeze(t),e.next=4,u({cmd:"saveDialog",options:t});case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var y=Object.freeze({__proto__:null,open:function(){return l.apply(this,arguments)},save:function(){return h.apply(this,arguments)}});var m,d=Object.freeze({__proto__:null,listen:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];a({cmd:"listen",event:e,handler:i(t,r),once:r})},emit:function(e,t){a({cmd:"emit",event:e,payload:t})}});function v(){return(v=_asyncToGenerator(regeneratorRuntime.mark((function e(t){var r,n=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.length>1&&void 0!==n[1]?n[1]:{},e.next=3,u({cmd:"readTextFile",path:t,options:r});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function g(){return(g=_asyncToGenerator(regeneratorRuntime.mark((function e(t){var r,n=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.length>1&&void 0!==n[1]?n[1]:{},e.next=3,u({cmd:"readBinaryFile",path:t,options:r});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function w(){return(w=_asyncToGenerator(regeneratorRuntime.mark((function e(t){var r,n=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"object"===_typeof(r=n.length>1&&void 0!==n[1]?n[1]:{})&&Object.freeze(r),"object"===_typeof(t)&&Object.freeze(t),e.next=5,u({cmd:"writeFile",path:t.path,contents:t.contents,options:r});case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}!function(e){e[e.Audio=1]="Audio";e[e.Cache=2]="Cache";e[e.Config=3]="Config";e[e.Data=4]="Data";e[e.LocalData=5]="LocalData";e[e.Desktop=6]="Desktop";e[e.Document=7]="Document";e[e.Download=8]="Download";e[e.Executable=9]="Executable";e[e.Font=10]="Font";e[e.Home=11]="Home";e[e.Picture=12]="Picture";e[e.Public=13]="Public";e[e.Runtime=14]="Runtime";e[e.Template=15]="Template";e[e.Video=16]="Video";e[e.Resource=17]="Resource";e[e.App=18]="App"}(m||(m={}));var b=65536;function x(e){var t=function(e){if(e.length1&&void 0!==n[1]?n[1]:{})&&Object.freeze(r),"object"===_typeof(t)&&Object.freeze(t),e.next=5,u({cmd:"writeBinaryFile",path:t.path,contents:x(t.contents),options:r});case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function R(){return(R=_asyncToGenerator(regeneratorRuntime.mark((function e(t){var r,n=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.length>1&&void 0!==n[1]?n[1]:{},e.next=3,u({cmd:"readDir",path:t,options:r});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function T(){return(T=_asyncToGenerator(regeneratorRuntime.mark((function e(t){var r,n=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.length>1&&void 0!==n[1]?n[1]:{},e.next=3,u({cmd:"createDir",path:t,options:r});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function P(){return(P=_asyncToGenerator(regeneratorRuntime.mark((function e(t){var r,n=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.length>1&&void 0!==n[1]?n[1]:{},e.next=3,u({cmd:"removeDir",path:t,options:r});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function k(){return(k=_asyncToGenerator(regeneratorRuntime.mark((function e(t,r){var n,o=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=o.length>2&&void 0!==o[2]?o[2]:{},e.next=3,u({cmd:"copyFile",source:t,destination:r,options:n});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function j(){return(j=_asyncToGenerator(regeneratorRuntime.mark((function e(t){var r,n=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.length>1&&void 0!==n[1]?n[1]:{},e.next=3,u({cmd:"removeFile",path:t,options:r});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function G(){return(G=_asyncToGenerator(regeneratorRuntime.mark((function e(t,r){var n,o=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=o.length>2&&void 0!==o[2]?o[2]:{},e.next=3,u({cmd:"renameFile",oldPath:t,newPath:r,options:n});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var O=Object.freeze({__proto__:null,get BaseDirectory(){return m},get Dir(){return m},readTextFile:function(e){return v.apply(this,arguments)},readBinaryFile:function(e){return g.apply(this,arguments)},writeFile:function(e){return w.apply(this,arguments)},writeBinaryFile:function(e){return _.apply(this,arguments)},readDir:function(e){return R.apply(this,arguments)},createDir:function(e){return T.apply(this,arguments)},removeDir:function(e){return P.apply(this,arguments)},copyFile:function(e,t){return k.apply(this,arguments)},removeFile:function(e){return j.apply(this,arguments)},renameFile:function(e,t){return G.apply(this,arguments)}});function D(){return(D=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u({cmd:"resolvePath",path:"",directory:m.App});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function E(){return(E=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u({cmd:"resolvePath",path:"",directory:m.Audio});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function L(){return(L=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u({cmd:"resolvePath",path:"",directory:m.Cache});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function S(){return(S=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u({cmd:"resolvePath",path:"",directory:m.Config});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function F(){return(F=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u({cmd:"resolvePath",path:"",directory:m.Data});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function A(){return(A=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u({cmd:"resolvePath",path:"",directory:m.Desktop});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function N(){return(N=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u({cmd:"resolvePath",path:"",directory:m.Document});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function z(){return(z=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u({cmd:"resolvePath",path:"",directory:m.Download});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function C(){return(C=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u({cmd:"resolvePath",path:"",directory:m.Executable});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function B(){return(B=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u({cmd:"resolvePath",path:"",directory:m.Font});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function I(){return(I=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u({cmd:"resolvePath",path:"",directory:m.Home});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function H(){return(H=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u({cmd:"resolvePath",path:"",directory:m.LocalData});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function M(){return(M=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u({cmd:"resolvePath",path:"",directory:m.Picture});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function q(){return(q=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u({cmd:"resolvePath",path:"",directory:m.Public});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function K(){return(K=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u({cmd:"resolvePath",path:"",directory:m.Resource});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function U(){return(U=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u({cmd:"resolvePath",path:"",directory:m.Runtime});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function V(){return(V=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u({cmd:"resolvePath",path:"",directory:m.Template});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function J(){return(J=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u({cmd:"resolvePath",path:"",directory:m.Video});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Y(){return(Y=_asyncToGenerator(regeneratorRuntime.mark((function e(t,r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u({cmd:"resolvePath",path:t,directory:r});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Q,W,X=Object.freeze({__proto__:null,appDir:function(){return D.apply(this,arguments)},audioDir:function(){return E.apply(this,arguments)},cacheDir:function(){return L.apply(this,arguments)},configDir:function(){return S.apply(this,arguments)},dataDir:function(){return F.apply(this,arguments)},desktopDir:function(){return A.apply(this,arguments)},documentDir:function(){return N.apply(this,arguments)},downloadDir:function(){return z.apply(this,arguments)},executableDir:function(){return C.apply(this,arguments)},fontDir:function(){return B.apply(this,arguments)},homeDir:function(){return I.apply(this,arguments)},localDataDir:function(){return H.apply(this,arguments)},pictureDir:function(){return M.apply(this,arguments)},publicDir:function(){return q.apply(this,arguments)},resourceDir:function(){return K.apply(this,arguments)},runtimeDir:function(){return U.apply(this,arguments)},templateDir:function(){return V.apply(this,arguments)},videoDir:function(){return J.apply(this,arguments)},resolvePath:function(e,t){return Y.apply(this,arguments)}});function Z(e){return $.apply(this,arguments)}function $(){return($=_asyncToGenerator(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u({cmd:"httpRequest",options:t});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ee(){return(ee=_asyncToGenerator(regeneratorRuntime.mark((function e(t,r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Z(_objectSpread({method:"GET",url:t},r));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function te(){return(te=_asyncToGenerator(regeneratorRuntime.mark((function e(t,r,n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Z(_objectSpread({method:"POST",url:t,body:r},n));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function re(){return(re=_asyncToGenerator(regeneratorRuntime.mark((function e(t,r,n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Z(_objectSpread({method:"PUT",url:t,body:r},n));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ne(){return(ne=_asyncToGenerator(regeneratorRuntime.mark((function e(t,r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Z(_objectSpread({method:"PATCH",url:t},r));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function oe(){return(oe=_asyncToGenerator(regeneratorRuntime.mark((function e(t,r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Z(_objectSpread({method:"DELETE",url:t},r));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}!function(e){e[e.JSON=1]="JSON";e[e.Text=2]="Text";e[e.Binary=3]="Binary"}(Q||(Q={})),function(e){e[e.Form=1]="Form";e[e.File=2]="File";e[e.Auto=3]="Auto"}(W||(W={}));var ae={request:Z,get:function(e,t){return ee.apply(this,arguments)},post:function(e,t,r){return te.apply(this,arguments)},put:function(e,t,r){return re.apply(this,arguments)},patch:function(e,t){return ne.apply(this,arguments)},delete:function(e,t){return oe.apply(this,arguments)},ResponseType:Q,BodyType:W};function ie(){return(ie=_asyncToGenerator(regeneratorRuntime.mark((function e(t,r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"object"===_typeof(r)&&Object.freeze(r),e.next=3,u({cmd:"execute",command:t,args:"string"==typeof r?[r]:r});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var ue=Object.freeze({__proto__:null,execute:function(e,t){return ie.apply(this,arguments)}});var ce=Object.freeze({__proto__:null,setTitle:function(e){a({cmd:"setTitle",title:e})},open:function(e){a({cmd:"open",uri:e})}});function se(){return(se=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("default"===window.Notification.permission){e.next=4;break}return e.next=3,Promise.resolve("granted"===window.Notification.permission);case 3:return e.abrupt("return",e.sent);case 4:return e.next=6,u({cmd:"isNotificationPermissionGranted"});case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function pe(){return(pe=_asyncToGenerator(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,window.Notification.requestPermission();case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var fe=Object.freeze({__proto__:null,sendNotification:function(e){"string"==typeof e?new window.Notification(e):new window.Notification(e.title,e)},requestPermission:function(){return pe.apply(this,arguments)},isPermissionGranted:function(){return se.apply(this,arguments)}});e.cli=f,e.dialog=y,e.event=d,e.fs=O,e.http=ae,e.notification=fe,e.path=X,e.process=ue,e.tauri=s,e.window=ce,Object.defineProperty(e,"__esModule",{value:!0})})); // polyfills @@ -121,24 +121,24 @@ if (!String.prototype.startsWith) { if (window.__TAURI_INVOKE_HANDLER__) { window.__TAURI_INVOKE_HANDLER__( - _objectSpread( + JSON.stringify(_objectSpread( { callback: callback, error: error }, args - ) + )) ) } else { window.addEventListener('DOMContentLoaded', function () { window.__TAURI_INVOKE_HANDLER__( - _objectSpread( + JSON.stringify(_objectSpread( { callback: callback, error: error }, args - ) + )) ) }) } @@ -185,10 +185,10 @@ if (!String.prototype.startsWith) { target.href.startsWith('http') && target.target === '_blank' ) { - window.__TAURI_INVOKE_HANDLER__({ + window.__TAURI_INVOKE_HANDLER__(JSON.stringify({ cmd: 'open', uri: target.href - }) + })) e.preventDefault() } break @@ -297,10 +297,10 @@ if (!String.prototype.startsWith) { }) window.alert = function (message) { - window.__TAURI_INVOKE_HANDLER__({ + window.__TAURI_INVOKE_HANDLER__(JSON.stringify({ cmd: 'messageDialog', message: message - }) + })) } window.confirm = function (message) { diff --git a/tauri/examples/communication/src-tauri/Cargo.lock b/tauri/examples/communication/src-tauri/Cargo.lock index 757e7431137..4aa9f38b66d 100644 --- a/tauri/examples/communication/src-tauri/Cargo.lock +++ b/tauri/examples/communication/src-tauri/Cargo.lock @@ -1,5 +1,11 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. +[[package]] +name = "ab_glyph_rasterizer" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9fe5e32de01730eb1f6b7f5b51c17e03e2325bf40a74f754f04f130043affff" + [[package]] name = "addr2line" version = "0.14.1" @@ -21,6 +27,19 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234" +[[package]] +name = "andrew" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c4afb09dd642feec8408e33f92f3ffc4052946f6b20f32fb99c1f58cd4fa7cf" +dependencies = [ + "bitflags 1.2.1", + "rusttype", + "walkdir", + "xdg", + "xml-rs 0.8.3", +] + [[package]] name = "anyhow" version = "1.0.38" @@ -63,7 +82,33 @@ checksum = "8d3a45e77e34375a7923b1e8febb049bb011f064714a8e17a1a616fef01da13d" dependencies = [ "proc-macro2", "quote 1.0.8", - "syn 1.0.59", + "syn 1.0.60", +] + +[[package]] +name = "atk" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "812b4911e210bd51b24596244523c856ca749e6223c50a7fbbba3f89ee37c426" +dependencies = [ + "atk-sys", + "bitflags 1.2.1", + "glib", + "glib-sys", + "gobject-sys", + "libc", +] + +[[package]] +name = "atk-sys" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f530e4af131d94cc4fa15c5c9d0348f0ef28bac64ba660b6b2a1cf2605dedfce" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps", ] [[package]] @@ -92,7 +137,7 @@ checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ "hermit-abi", "libc", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -152,9 +197,9 @@ checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" [[package]] name = "bumpalo" -version = "3.5.0" +version = "3.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f07aa6688c702439a1be0307b6a94dffe1168569e45b9500c1372bc580740d59" +checksum = "099e596ef14349721d9016f6b80dd3419ea1bf289ab9b44df8e4dfd3a005d5d9" [[package]] name = "byteorder" @@ -180,15 +225,51 @@ dependencies = [ [[package]] name = "bzip2-sys" -version = "0.1.9+1.0.8" +version = "0.1.10+1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad3b39a260062fca31f7b0b12f207e8f2590a67d32ec7d59c20484b07ea7285e" +checksum = "17fa3d1ac1ca21c5c4e36a97f3c3eb25084576f6fc47bf0139c1123434216c6c" dependencies = [ "cc", "libc", "pkg-config", ] +[[package]] +name = "cairo-rs" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5c0f2e047e8ca53d0ff249c54ae047931d7a6ebe05d00af73e0ffeb6e34bdb8" +dependencies = [ + "bitflags 1.2.1", + "cairo-sys-rs", + "glib", + "glib-sys", + "gobject-sys", + "libc", + "thiserror", +] + +[[package]] +name = "cairo-sys-rs" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ed2639b9ad5f1d6efa76de95558e11339e7318426d84ac4890b86c03e828ca7" +dependencies = [ + "glib-sys", + "libc", + "system-deps", +] + +[[package]] +name = "calloop" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b036167e76041694579972c28cf4877b4f92da222560ddb49008937b6a6727c" +dependencies = [ + "log", + "nix", +] + [[package]] name = "cc" version = "1.0.66" @@ -223,14 +304,14 @@ dependencies = [ "num-integer", "num-traits", "time", - "winapi", + "winapi 0.3.9", ] [[package]] name = "chunked_transfer" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7477065d45a8fe57167bf3cf8bcd3729b54cfcb81cca49bda2d038ea89ae82ca" +checksum = "fff857943da45f546682664a79488be82e69e43c1a7a2307679ab9afb3a66d2e" [[package]] name = "clap" @@ -243,7 +324,7 @@ dependencies = [ "indexmap", "lazy_static", "os_str_bytes", - "strsim", + "strsim 0.10.0", "termcolor", "textwrap", "unicode-width", @@ -259,9 +340,46 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote 1.0.8", - "syn 1.0.59", + "syn 1.0.60", ] +[[package]] +name = "cocoa" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f63902e9223530efb4e26ccd0cf55ec30d592d3b42e21a28defc42a9586e832" +dependencies = [ + "bitflags 1.2.1", + "block", + "cocoa-foundation", + "core-foundation 0.9.1", + "core-graphics 0.22.2", + "foreign-types", + "libc", + "objc", +] + +[[package]] +name = "cocoa-foundation" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ade49b65d560ca58c403a479bb396592b155c0185eada742ee323d1d68d6318" +dependencies = [ + "bitflags 1.2.1", + "block", + "core-foundation 0.9.1", + "core-graphics-types", + "foreign-types", + "libc", + "objc", +] + +[[package]] +name = "const-sha1" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb58b6451e8c2a812ad979ed1d83378caa5e927eef2622017a45f251457c2c9d" + [[package]] name = "const_fn" version = "0.4.5" @@ -274,22 +392,88 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" +[[package]] +name = "core-foundation" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57d24c7a13c43e870e37c1556b74555437870a04514f7685f5b354e090567171" +dependencies = [ + "core-foundation-sys 0.7.0", + "libc", +] + [[package]] name = "core-foundation" version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0a89e2ae426ea83155dccf10c0fa6b1463ef6d5fcb44cee0b224a408fa640a62" dependencies = [ - "core-foundation-sys", + "core-foundation-sys 0.8.2", "libc", ] +[[package]] +name = "core-foundation-sys" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3a71ab494c0b5b860bdc8407ae08978052417070c2ced38573a9157ad75b8ac" + [[package]] name = "core-foundation-sys" version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea221b5284a47e40033bf9b66f35f984ec0ea2931eb03505246cd27a963f981b" +[[package]] +name = "core-graphics" +version = "0.19.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3889374e6ea6ab25dba90bb5d96202f61108058361f6dc72e8b03e6f8bbe923" +dependencies = [ + "bitflags 1.2.1", + "core-foundation 0.7.0", + "foreign-types", + "libc", +] + +[[package]] +name = "core-graphics" +version = "0.22.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "269f35f69b542b80e736a20a89a05215c0ce80c2c03c514abb2e318b78379d86" +dependencies = [ + "bitflags 1.2.1", + "core-foundation 0.9.1", + "core-graphics-types", + "foreign-types", + "libc", +] + +[[package]] +name = "core-graphics-types" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a68b68b3446082644c91ac778bf50cd4104bfb002b5a6a7c44cca5a2c70788b" +dependencies = [ + "bitflags 1.2.1", + "core-foundation 0.9.1", + "foreign-types", + "libc", +] + +[[package]] +name = "core-video-sys" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34ecad23610ad9757664d644e369246edde1803fcb43ed72876565098a5d3828" +dependencies = [ + "cfg-if 0.1.10", + "core-foundation-sys 0.7.0", + "core-graphics 0.19.2", + "libc", + "objc", +] + [[package]] name = "crc32fast" version = "1.2.1" @@ -345,6 +529,41 @@ dependencies = [ "lazy_static", ] +[[package]] +name = "darling" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d706e75d87e35569db781a9b5e2416cff1236a47ed380831f959382ccd5f858" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0c960ae2da4de88a91b2d920c2a7233b400bc33cb28453a2987822d8392519b" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote 1.0.8", + "strsim 0.9.3", + "syn 1.0.60", +] + +[[package]] +name = "darling_macro" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b5a2f4ac4969822c62224815d069952656cadc7084fdca9751e6d959189b72" +dependencies = [ + "darling_core", + "quote 1.0.8", + "syn 1.0.60", +] + [[package]] name = "dbus" version = "0.9.1" @@ -355,6 +574,17 @@ dependencies = [ "libdbus-sys", ] +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote 1.0.8", + "syn 1.0.60", +] + [[package]] name = "dirs" version = "1.0.5" @@ -363,7 +593,7 @@ checksum = "3fd78930633bd1c6e35c4b42b1df7b0cbc6bc191146e512bb3bedf243fcc3901" dependencies = [ "libc", "redox_users 0.3.5", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -384,7 +614,22 @@ checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" dependencies = [ "libc", "redox_users 0.4.0", - "winapi", + "winapi 0.3.9", +] + +[[package]] +name = "dispatch" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" + +[[package]] +name = "dlib" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b11f15d1e3268f140f68d390637d5e76d849782d971ae7063e0da69fe9709a76" +dependencies = [ + "libloading", ] [[package]] @@ -393,6 +638,12 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" +[[package]] +name = "downcast-rs" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" + [[package]] name = "dtoa" version = "0.4.7" @@ -405,16 +656,6 @@ version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" -[[package]] -name = "envmnt" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2d328fc287c61314c4a61af7cfdcbd7e678e39778488c7cb13ec133ce0f4059" -dependencies = [ - "fsio", - "indexmap", -] - [[package]] name = "failure" version = "0.1.8" @@ -433,7 +674,7 @@ dependencies = [ "cfg-if 1.0.0", "libc", "redox_syscall 0.2.4", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -480,10 +721,20 @@ dependencies = [ ] [[package]] -name = "fsio" -version = "0.1.3" +name = "fuchsia-zircon" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1fd087255f739f4f1aeea69f11b72f8080e9c2e7645cd06955dad4a178a49e3" +checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" +dependencies = [ + "bitflags 1.2.1", + "fuchsia-zircon-sys", +] + +[[package]] +name = "fuchsia-zircon-sys" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" [[package]] name = "futures" @@ -542,7 +793,7 @@ dependencies = [ "proc-macro-hack", "proc-macro2", "quote 1.0.8", - "syn 1.0.59", + "syn 1.0.60", ] [[package]] @@ -586,6 +837,71 @@ version = "0.3.55" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2" +[[package]] +name = "gdk" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db00839b2a68a7a10af3fa28dfb3febaba3a20c3a9ac2425a33b7df1f84a6b7d" +dependencies = [ + "bitflags 1.2.1", + "cairo-rs", + "cairo-sys-rs", + "gdk-pixbuf", + "gdk-sys", + "gio", + "gio-sys", + "glib", + "glib-sys", + "gobject-sys", + "libc", + "pango", +] + +[[package]] +name = "gdk-pixbuf" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f6dae3cb99dd49b758b88f0132f8d401108e63ae8edd45f432d42cdff99998a" +dependencies = [ + "gdk-pixbuf-sys", + "gio", + "gio-sys", + "glib", + "glib-sys", + "gobject-sys", + "libc", +] + +[[package]] +name = "gdk-pixbuf-sys" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3bfe468a7f43e97b8d193a762b6c5cf67a7d36cacbc0b9291dbcae24bfea1e8f" +dependencies = [ + "gio-sys", + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + +[[package]] +name = "gdk-sys" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a9653cfc500fd268015b1ac055ddbc3df7a5c9ea3f4ccef147b3957bd140d69" +dependencies = [ + "cairo-sys-rs", + "gdk-pixbuf-sys", + "gio-sys", + "glib-sys", + "gobject-sys", + "libc", + "pango-sys", + "pkg-config", + "system-deps", +] + [[package]] name = "getrandom" version = "0.1.16" @@ -605,7 +921,7 @@ checksum = "c9495705279e7140bf035dde1f6e750c162df8b625267cd52cc44e0b156732c8" dependencies = [ "cfg-if 1.0.0", "libc", - "wasi 0.10.1+wasi-snapshot-preview1", + "wasi 0.10.2+wasi-snapshot-preview1", ] [[package]] @@ -614,6 +930,142 @@ version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6503fe142514ca4799d4c26297c4248239fe8838d827db6bd6065c6ed29a6ce" +[[package]] +name = "gio" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fb60242bfff700772dae5d9e3a1f7aa2e4ebccf18b89662a16acb2822568561" +dependencies = [ + "bitflags 1.2.1", + "futures", + "futures-channel", + "futures-core", + "futures-io", + "futures-util", + "gio-sys", + "glib", + "glib-sys", + "gobject-sys", + "libc", + "once_cell", + "thiserror", +] + +[[package]] +name = "gio-sys" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e24fb752f8f5d2cf6bbc2c606fd2bc989c81c5e2fe321ab974d54f8b6344eac" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps", + "winapi 0.3.9", +] + +[[package]] +name = "glib" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c685013b7515e668f1b57a165b009d4d28cb139a8a989bbd699c10dad29d0c5" +dependencies = [ + "bitflags 1.2.1", + "futures-channel", + "futures-core", + "futures-executor", + "futures-task", + "futures-util", + "glib-macros", + "glib-sys", + "gobject-sys", + "libc", + "once_cell", +] + +[[package]] +name = "glib-macros" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41486a26d1366a8032b160b59065a59fb528530a46a49f627e7048fb8c064039" +dependencies = [ + "anyhow", + "heck", + "itertools", + "proc-macro-crate", + "proc-macro-error", + "proc-macro2", + "quote 1.0.8", + "syn 1.0.60", +] + +[[package]] +name = "glib-sys" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7e9b997a66e9a23d073f2b1abb4dbfc3925e0b8952f67efd8d9b6e168e4cdc1" +dependencies = [ + "libc", + "system-deps", +] + +[[package]] +name = "gobject-sys" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "952133b60c318a62bf82ee75b93acc7e84028a093e06b9e27981c2b6fe68218c" +dependencies = [ + "glib-sys", + "libc", + "system-deps", +] + +[[package]] +name = "gtk" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f022f2054072b3af07666341984562c8e626a79daa8be27b955d12d06a5ad6a" +dependencies = [ + "atk", + "bitflags 1.2.1", + "cairo-rs", + "cairo-sys-rs", + "cc", + "gdk", + "gdk-pixbuf", + "gdk-pixbuf-sys", + "gdk-sys", + "gio", + "gio-sys", + "glib", + "glib-sys", + "gobject-sys", + "gtk-sys", + "libc", + "once_cell", + "pango", + "pango-sys", + "pkg-config", +] + +[[package]] +name = "gtk-sys" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89acda6f084863307d948ba64a4b1ef674e8527dddab147ee4cdcc194c880457" +dependencies = [ + "atk-sys", + "cairo-sys-rs", + "gdk-pixbuf-sys", + "gdk-sys", + "gio-sys", + "glib-sys", + "gobject-sys", + "libc", + "pango-sys", + "system-deps", +] + [[package]] name = "hashbrown" version = "0.9.1" @@ -649,11 +1101,17 @@ dependencies = [ "itoa", ] +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + [[package]] name = "idna" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" +checksum = "de910d521f7cc3135c4de8db1cb910e0b5ed1dc6f57c381cd07e8e661ce10094" dependencies = [ "matches", "unicode-bidi", @@ -670,32 +1128,100 @@ dependencies = [ "hashbrown", ] +[[package]] +name = "instant" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61124eeebbd69b8190558df225adf7e4caafce0d743919e5d6b19652314ec5ec" +dependencies = [ + "cfg-if 1.0.0", +] + +[[package]] +name = "iovec" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" +dependencies = [ + "libc", +] + +[[package]] +name = "itertools" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736" +[[package]] +name = "javascriptcore-rs" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ecc697657edc9cd3d85d5ec6941f74cc9bb2ae84bec320f55c9397c5a8d8722" +dependencies = [ + "glib", + "javascriptcore-rs-sys", +] + +[[package]] +name = "javascriptcore-rs-sys" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f46ada8a08dcd75a10afae872fbfb51275df4a8ae0d46b8cc7c708f08dd2998" +dependencies = [ + "libc", +] + +[[package]] +name = "jni-sys" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" + [[package]] name = "js-sys" -version = "0.3.46" +version = "0.3.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf3d7383929f7c9c7c2d0fa596f325832df98c3704f2c60553080f7127a58175" +checksum = "5cfb73131c35423a367daf8cbd24100af0d077668c8c2943f0e7dd775fef0f65" dependencies = [ "wasm-bindgen", ] +[[package]] +name = "kernel32-sys" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" +dependencies = [ + "winapi 0.2.8", + "winapi-build", +] + [[package]] name = "lazy_static" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +[[package]] +name = "lazycell" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" + [[package]] name = "libc" -version = "0.2.82" +version = "0.2.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89203f3fba0a3795506acaad8ebce3c80c0af93f994d5a1d7a0b1eeb23271929" +checksum = "7ccac4b00700875e6a07c6cde370d44d32fa01c5a65cdd2fca6858c479d28bb3" [[package]] name = "libdbus-sys" @@ -706,13 +1232,32 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "libloading" +version = "0.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "351a32417a12d5f7e82c368a66781e307834dae04c6ce0cd4456d52989229883" +dependencies = [ + "cfg-if 1.0.0", + "winapi 0.3.9", +] + +[[package]] +name = "lock_api" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd96ffd135b2fd7b973ac026d28085defbe8983df057ced3eb4f2130b0831312" +dependencies = [ + "scopeguard", +] + [[package]] name = "log" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcf3805d4480bb5b86070dcfeb9e2cb2ebc148adb753c5cca5f884d1d65a42b2" +checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" dependencies = [ - "cfg-if 0.1.10", + "cfg-if 1.0.0", ] [[package]] @@ -742,12 +1287,27 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" +[[package]] +name = "maybe-uninit" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" + [[package]] name = "memchr" version = "2.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525" +[[package]] +name = "memmap2" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b70ca2a6103ac8b665dc150b142ef0e4e89df640c9e6cf295d189c3caebe5a" +dependencies = [ + "libc", +] + [[package]] name = "memoffset" version = "0.6.1" @@ -776,6 +1336,49 @@ dependencies = [ "autocfg", ] +[[package]] +name = "mio" +version = "0.6.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4afd66f5b91bf2a3bc13fad0e21caedac168ca4c707504e75585648ae80e4cc4" +dependencies = [ + "cfg-if 0.1.10", + "fuchsia-zircon", + "fuchsia-zircon-sys", + "iovec", + "kernel32-sys", + "libc", + "log", + "miow", + "net2", + "slab", + "winapi 0.2.8", +] + +[[package]] +name = "mio-extras" +version = "2.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52403fe290012ce777c4626790c8951324a2b9e3316b3143779c72b029742f19" +dependencies = [ + "lazycell", + "log", + "mio", + "slab", +] + +[[package]] +name = "miow" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebd808424166322d4a38da87083bfddd3ac4c131334ed55856112eb06d46944d" +dependencies = [ + "kernel32-sys", + "net2", + "winapi 0.2.8", + "ws2_32-sys", +] + [[package]] name = "native-tls" version = "0.2.7" @@ -794,6 +1397,62 @@ dependencies = [ "tempfile", ] +[[package]] +name = "ndk" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5eb167c1febed0a496639034d0c76b3b74263636045db5489eee52143c246e73" +dependencies = [ + "jni-sys", + "ndk-sys", + "num_enum", + "thiserror", +] + +[[package]] +name = "ndk-glue" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdf399b8b7a39c6fb153c4ec32c72fd5fe789df24a647f229c239aa7adb15241" +dependencies = [ + "lazy_static", + "libc", + "log", + "ndk", + "ndk-macro", + "ndk-sys", +] + +[[package]] +name = "ndk-macro" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05d1c6307dc424d0f65b9b06e94f88248e6305726b14729fd67a5e47b2dc481d" +dependencies = [ + "darling", + "proc-macro-crate", + "proc-macro2", + "quote 1.0.8", + "syn 1.0.60", +] + +[[package]] +name = "ndk-sys" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c44922cb3dbb1c70b5e5f443d63b64363a898564d739ba5198e3a9138442868d" + +[[package]] +name = "net2" +version = "0.2.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "391630d12b68002ae1e25e8f974306474966550ad82dac6886fb8910c19568ae" +dependencies = [ + "cfg-if 0.1.10", + "libc", + "winapi 0.3.9", +] + [[package]] name = "nfd" version = "0.0.4" @@ -803,6 +1462,28 @@ dependencies = [ "gcc", ] +[[package]] +name = "nix" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83450fe6a6142ddd95fb064b746083fc4ef1705fe81f64a64e1d4b39f54a1055" +dependencies = [ + "bitflags 1.2.1", + "cc", + "cfg-if 0.1.10", + "libc", +] + +[[package]] +name = "nom" +version = "6.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab6f70b46d6325aa300f1c7bb3d470127dfc27806d8ea6bf294ee0ce643ce2b1" +dependencies = [ + "memchr", + "version_check", +] + [[package]] name = "notify-rust" version = "4.2.2" @@ -820,7 +1501,7 @@ version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44" dependencies = [ - "winapi", + "winapi 0.3.9", ] [[package]] @@ -852,6 +1533,28 @@ dependencies = [ "libc", ] +[[package]] +name = "num_enum" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca565a7df06f3d4b485494f25ba05da1435950f4dc263440eda7a6fa9b8e36e4" +dependencies = [ + "derivative", + "num_enum_derive", +] + +[[package]] +name = "num_enum_derive" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffa5a33ddddfee04c0283a7653987d634e880347e96b5b2ed64de07efb59db9d" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote 1.0.8", + "syn 1.0.60", +] + [[package]] name = "objc" version = "0.2.7" @@ -930,7 +1633,68 @@ dependencies = [ name = "os_str_bytes" version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afb2e1c3ee07430c2cf76151675e583e0f19985fa6efae47d6848a3e2c824f85" +checksum = "afb2e1c3ee07430c2cf76151675e583e0f19985fa6efae47d6848a3e2c824f85" + +[[package]] +name = "owned_ttf_parser" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f923fb806c46266c02ab4a5b239735c144bdeda724a50ed058e5226f594cde3" +dependencies = [ + "ttf-parser", +] + +[[package]] +name = "pango" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9937068580bebd8ced19975938573803273ccbcbd598c58d4906efd4ac87c438" +dependencies = [ + "bitflags 1.2.1", + "glib", + "glib-sys", + "gobject-sys", + "libc", + "once_cell", + "pango-sys", +] + +[[package]] +name = "pango-sys" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d2650c8b62d116c020abd0cea26a4ed96526afda89b1c4ea567131fdefc890" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + +[[package]] +name = "parking_lot" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d7744ac029df22dca6284efe4e898991d28e3085c706c972bcd7da4a27a15eb" +dependencies = [ + "instant", + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ccb628cad4f84851442432c60ad8e1f607e29752d0bf072cbd0baf28aa34272" +dependencies = [ + "cfg-if 1.0.0", + "instant", + "libc", + "redox_syscall 0.1.57", + "smallvec", + "winapi 0.3.9", +] [[package]] name = "percent-encoding" @@ -1009,6 +1773,15 @@ version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" +[[package]] +name = "proc-macro-crate" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" +dependencies = [ + "toml", +] + [[package]] name = "proc-macro-error" version = "1.0.4" @@ -1018,7 +1791,7 @@ dependencies = [ "proc-macro-error-attr", "proc-macro2", "quote 1.0.8", - "syn 1.0.59", + "syn 1.0.60", "version_check", ] @@ -1085,9 +1858,9 @@ dependencies = [ [[package]] name = "rand" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18519b42a40024d661e1714153e9ad0c3de27cd495760ceb09710920f1098b1e" +checksum = "0ef9e7e66b4468674bfcb0c81af8b7fa0bb154fa9f28eb840da5c447baeb8d7e" dependencies = [ "libc", "rand_chacha 0.3.0", @@ -1160,6 +1933,15 @@ dependencies = [ "rand_core 0.5.1", ] +[[package]] +name = "raw-window-handle" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a441a7a6c80ad6473bd4b74ec1c9a4c951794285bf941c2126f607c72e48211" +dependencies = [ + "libc", +] + [[package]] name = "rayon" version = "1.5.0" @@ -1227,7 +2009,7 @@ version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" dependencies = [ - "winapi", + "winapi 0.3.9", ] [[package]] @@ -1258,6 +2040,16 @@ version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e3bad0ee36814ca07d7968269dd4b7ec89ec2da10c4bb613928d3077083c232" +[[package]] +name = "rusttype" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc7c727aded0be18c5b80c1640eae0ac8e396abf6fa8477d96cb37d18ee5ec59" +dependencies = [ + "ab_glyph_rasterizer", + "owned_ttf_parser", +] + [[package]] name = "ryu" version = "1.0.5" @@ -1280,9 +2072,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75" dependencies = [ "lazy_static", - "winapi", + "winapi 0.3.9", ] +[[package]] +name = "scoped-tls" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea6a9290e3c9cf0f18145ef7ffa62d68ee0bf5fcd651017e586dc7fd5da448c2" + [[package]] name = "scopeguard" version = "1.1.0" @@ -1296,8 +2094,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1759c2e3c8580017a484a7ac56d3abc5a6c1feadf88db2f3633f12ae4268c69" dependencies = [ "bitflags 1.2.1", - "core-foundation", - "core-foundation-sys", + "core-foundation 0.9.1", + "core-foundation-sys 0.8.2", "libc", "security-framework-sys", ] @@ -1308,7 +2106,7 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f99b9d5e26d2a71633cc4f2ebae7cc9f874044e0c351a27e17892d76dce5678b" dependencies = [ - "core-foundation-sys", + "core-foundation-sys 0.8.2", "libc", ] @@ -1332,29 +2130,29 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.121" +version = "1.0.123" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6159e3c76cab06f6bc466244d43b35e77e9500cd685da87620addadc2a4c40b1" +checksum = "92d5161132722baa40d802cc70b15262b98258453e85e5d1d365c757c73869ae" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.121" +version = "1.0.123" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3fcab8778dc651bc65cfab2e4eb64996f3c912b74002fb379c94517e1f27c46" +checksum = "9391c295d64fc0abb2c556bad848f33cb8296276b1ad2677d1ae1ace4f258f31" dependencies = [ "proc-macro2", "quote 1.0.8", - "syn 1.0.59", + "syn 1.0.60", ] [[package]] name = "serde_json" -version = "1.0.61" +version = "1.0.62" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fceb2595057b6891a4ee808f70054bd2d12f0e97f1cbb78689b59f676df325a" +checksum = "ea1c6153794552ea7cf7cf63b1231a25de00ec90db326ba6264440fa08e31486" dependencies = [ "itoa", "ryu", @@ -1369,7 +2167,7 @@ checksum = "2dc6b7951b17b051f3210b063f12cc17320e2fe30ae05b0fe2a3abb068551c76" dependencies = [ "proc-macro2", "quote 1.0.8", - "syn 1.0.59", + "syn 1.0.60", ] [[package]] @@ -1384,6 +2182,12 @@ dependencies = [ "url", ] +[[package]] +name = "sha1" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d" + [[package]] name = "siphasher" version = "0.3.3" @@ -1396,6 +2200,58 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" +[[package]] +name = "smallvec" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" + +[[package]] +name = "smithay-client-toolkit" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "316e13a3eb853ce7bf72ad3530dc186cb2005c57c521ef5f4ada5ee4eed74de6" +dependencies = [ + "andrew", + "bitflags 1.2.1", + "calloop", + "dlib", + "lazy_static", + "log", + "memmap2", + "nix", + "wayland-client", + "wayland-cursor", + "wayland-protocols", +] + +[[package]] +name = "soup-sys" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3c7adf08565630bbb71f955f11f8a68464817ded2703a3549747c235b58a13e" +dependencies = [ + "bitflags 1.2.1", + "gio-sys", + "glib-sys", + "gobject-sys", + "libc", + "pkg-config", + "system-deps", +] + +[[package]] +name = "squote" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fccf17fd09e2455ea796d2ad267b64fa2c5cbd8701b2a93b555d2aa73449f7d" + +[[package]] +name = "strsim" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6446ced80d6c486436db5c078dde11a9f73d42b57fb273121e160b84f63d894c" + [[package]] name = "strsim" version = "0.10.0" @@ -1408,6 +2264,12 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ca6e4730f517e041e547ffe23d29daab8de6b73af4b6ae2a002108169f5e7da" +[[package]] +name = "strum" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57bd81eb48f4c437cadc685403cad539345bf703d78e63707418431cecd4522b" + [[package]] name = "strum_macros" version = "0.8.0" @@ -1418,6 +2280,18 @@ dependencies = [ "syn 0.11.11", ] +[[package]] +name = "strum_macros" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87c85aa3f8ea653bfd3ddf25f7ee357ee4d204731f6aa9ad04002306f6e2774c" +dependencies = [ + "heck", + "proc-macro2", + "quote 1.0.8", + "syn 1.0.60", +] + [[package]] name = "syn" version = "0.11.11" @@ -1431,9 +2305,9 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.59" +version = "1.0.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07cb8b1b4ebf86a89ee88cbd201b022b94138c623644d035185c84d3f41b7e66" +checksum = "c700597eca8a5a762beb35753ef6b94df201c81cca676604f547495a0d7f0081" dependencies = [ "proc-macro2", "quote 1.0.8", @@ -1461,18 +2335,32 @@ dependencies = [ "ntapi", "once_cell", "rayon", - "winapi", + "winapi 0.3.9", +] + +[[package]] +name = "system-deps" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f3ecc17269a19353b3558b313bba738b25d82993e30d62a18406a24aba4649b" +dependencies = [ + "heck", + "pkg-config", + "strum 0.18.0", + "strum_macros 0.18.0", + "thiserror", + "toml", + "version-compare", ] [[package]] name = "tar" -version = "0.4.30" +version = "0.4.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "489997b7557e9a43e192c527face4feacc78bfbe6eed67fd55c4c9e381cba290" +checksum = "0313546c01d59e29be4f09687bcb4fb6690cec931cc3607b6aec7a0e417f4cc6" dependencies = [ "filetime", "libc", - "redox_syscall 0.1.57", "xattr", ] @@ -1484,7 +2372,6 @@ dependencies = [ "async-trait", "base64", "cfg_aliases", - "envmnt", "futures", "lazy_static", "once_cell", @@ -1501,7 +2388,7 @@ dependencies = [ "urlencoding", "uuid", "webbrowser", - "webview_official", + "wry", ] [[package]] @@ -1518,7 +2405,7 @@ dependencies = [ "nfd", "notify-rust", "once_cell", - "rand 0.8.2", + "rand 0.8.3", "semver", "serde", "serde_json", @@ -1588,10 +2475,10 @@ checksum = "dac1c663cfc93810f88aed9b8941d48cabf856a1b111c29a40439018d870eb22" dependencies = [ "cfg-if 1.0.0", "libc", - "rand 0.8.2", + "rand 0.8.3", "redox_syscall 0.2.4", "remove_dir_all", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -1629,7 +2516,7 @@ checksum = "9be73a2caec27583d0046ef3796c3794f868a5bc813db689eed00c7631275cd1" dependencies = [ "proc-macro2", "quote 1.0.8", - "syn 1.0.59", + "syn 1.0.60", ] [[package]] @@ -1639,7 +2526,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438" dependencies = [ "libc", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -1657,9 +2544,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccf8dbc19eb42fba10e8feaaec282fb50e2c14b2726d6301dbfeed0f73306a6f" +checksum = "317cca572a0e89c3ce0ca1f1bdc9369547fe318a683418e42ac8f59d14701023" dependencies = [ "tinyvec_macros", ] @@ -1672,9 +2559,9 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "1.1.1" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6714d663090b6b0acb0fa85841c6d66233d150cdb2602c8f9b8abb03370beb3f" +checksum = "e8190d04c665ea9e6b6a0dc45523ade572c088d2e6566244c1122671dbf4ae3a" dependencies = [ "autocfg", "num_cpus", @@ -1690,6 +2577,12 @@ dependencies = [ "serde", ] +[[package]] +name = "ttf-parser" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e5d7cd7ab3e47dda6e56542f4bbf3824c15234958c6e1bd6aaa347e93499fdc" + [[package]] name = "ucd-trie" version = "0.1.3" @@ -1777,6 +2670,12 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" +[[package]] +name = "version-compare" +version = "0.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d63556a25bae6ea31b52e640d7c41d1ab27faba4ccb600013837a3d0b3994ca1" + [[package]] name = "version_check" version = "0.9.2" @@ -1790,7 +2689,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "777182bc735b6424e1a57516d35ed72cb8019d85c8c9bf536dccb3445c1a2f7d" dependencies = [ "same-file", - "winapi", + "winapi 0.3.9", "winapi-util", ] @@ -1802,15 +2701,15 @@ checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" [[package]] name = "wasi" -version = "0.10.1+wasi-snapshot-preview1" +version = "0.10.2+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93c6c3420963c5c64bca373b25e77acb562081b9bb4dd5bb864187742186cea9" +checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" [[package]] name = "wasm-bindgen" -version = "0.2.69" +version = "0.2.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cd364751395ca0f68cafb17666eee36b63077fb5ecd972bbcd74c90c4bf736e" +checksum = "55c0f7123de74f0dab9b7d00fd614e7b19349cd1e2f5252bbe9b1754b59433be" dependencies = [ "cfg-if 1.0.0", "wasm-bindgen-macro", @@ -1818,24 +2717,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.69" +version = "0.2.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1114f89ab1f4106e5b55e688b828c0ab0ea593a1ea7c094b141b14cbaaec2d62" +checksum = "7bc45447f0d4573f3d65720f636bbcc3dd6ce920ed704670118650bcd47764c7" dependencies = [ "bumpalo", "lazy_static", "log", "proc-macro2", "quote 1.0.8", - "syn 1.0.59", + "syn 1.0.60", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.69" +version = "0.2.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6ac8995ead1f084a8dea1e65f194d0973800c7f571f6edd70adf06ecf77084" +checksum = "3b8853882eef39593ad4174dd26fc9865a64e84026d223f63bb2c42affcbba2c" dependencies = [ "quote 1.0.8", "wasm-bindgen-macro-support", @@ -1843,28 +2742,101 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.69" +version = "0.2.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5a48c72f299d80557c7c62e37e7225369ecc0c963964059509fbafe917c7549" +checksum = "4133b5e7f2a531fa413b3a1695e925038a05a71cf67e87dafa295cb645a01385" dependencies = [ "proc-macro2", "quote 1.0.8", - "syn 1.0.59", + "syn 1.0.60", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.69" +version = "0.2.70" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd4945e4943ae02d15c13962b38a5b1e81eadd4b71214eee75af64a4d6a4fd64" + +[[package]] +name = "wayland-client" +version = "0.28.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdbdbe01d03b2267809f3ed99495b37395387fde789e0f2ebb78e8b43f75b6d7" +dependencies = [ + "bitflags 1.2.1", + "downcast-rs", + "libc", + "nix", + "scoped-tls", + "wayland-commons", + "wayland-scanner", + "wayland-sys", +] + +[[package]] +name = "wayland-commons" +version = "0.28.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "480450f76717edd64ad04a4426280d737fc3d10a236b982df7b1aee19f0e2d56" +dependencies = [ + "nix", + "once_cell", + "smallvec", + "wayland-sys", +] + +[[package]] +name = "wayland-cursor" +version = "0.28.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6eb122c160223a7660feeaf949d0100281d1279acaaed3720eb3c9894496e5f" +dependencies = [ + "nix", + "wayland-client", + "xcursor", +] + +[[package]] +name = "wayland-protocols" +version = "0.28.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "319a82b4d3054dd25acc32d9aee0f84fa95b63bc983fffe4703b6b8d47e01a30" +dependencies = [ + "bitflags 1.2.1", + "wayland-client", + "wayland-commons", + "wayland-scanner", +] + +[[package]] +name = "wayland-scanner" +version = "0.28.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7010ba5767b3fcd350decc59055390b4ebe6bd1b9279a9feb1f1888987f1133d" +dependencies = [ + "proc-macro2", + "quote 1.0.8", + "xml-rs 0.8.3", +] + +[[package]] +name = "wayland-sys" +version = "0.28.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e7811dd7f9398f14cc76efd356f98f03aa30419dea46aa810d71e819fc97158" +checksum = "6793834e0c35d11fd96a97297abe03d37be627e1847da52e17d7e0e3b51cc099" +dependencies = [ + "dlib", + "lazy_static", + "pkg-config", +] [[package]] name = "web-sys" -version = "0.3.46" +version = "0.3.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "222b1ef9334f92a21d3fb53dc3fd80f30836959a90f9274a626d7e06315ba3c3" +checksum = "c40dc691fc48003eba817c38da7113c15698142da971298003cac3ef175680b3" dependencies = [ "js-sys", "wasm-bindgen", @@ -1878,26 +2850,51 @@ checksum = "ecad156490d6b620308ed411cfee90d280b3cbd13e189ea0d3fada8acc89158a" dependencies = [ "web-sys", "widestring", - "winapi", + "winapi 0.3.9", ] [[package]] -name = "webview-official-sys" -version = "0.1.2" +name = "webkit2gtk" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4aec5fdf5bc938ba5fe47d23b8e02d6beaee395a91e16f0b2eec984a9a9e1d2" +checksum = "02b7e9eb04d30f8423e9c8435f686f42bc497cfcac2cfe4b43ce4139fb1a7cb6" dependencies = [ - "cc", - "pkg-config", + "bitflags 1.2.1", + "cairo-rs", + "gdk", + "gdk-sys", + "gio", + "gio-sys", + "glib", + "glib-sys", + "gobject-sys", + "gtk", + "gtk-sys", + "javascriptcore-rs", + "libc", + "webkit2gtk-sys", ] [[package]] -name = "webview_official" -version = "0.2.0" +name = "webkit2gtk-sys" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b38277d3fa288b13db39eeb153f9b8ee3d8e3181648ade05264c1ba99e774999" +checksum = "72d10cf73685359cd8611740db241a231f4d74d7e353348dc5332a1a132d6f24" dependencies = [ - "webview-official-sys", + "atk-sys", + "bitflags 1.2.1", + "cairo-sys-rs", + "gdk-pixbuf-sys", + "gdk-sys", + "gio-sys", + "glib-sys", + "gobject-sys", + "gtk-sys", + "javascriptcore-rs-sys", + "libc", + "pango-sys", + "pkg-config", + "soup-sys", ] [[package]] @@ -1922,6 +2919,12 @@ version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2399814fda0d6999a6bfe9b5c7660d836334deb162a09db8b73d5b38fd8c40a" +[[package]] +name = "winapi" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" + [[package]] name = "winapi" version = "0.3.9" @@ -1932,6 +2935,12 @@ dependencies = [ "winapi-x86_64-pc-windows-gnu", ] +[[package]] +name = "winapi-build" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" + [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" @@ -1944,7 +2953,7 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" dependencies = [ - "winapi", + "winapi 0.3.9", ] [[package]] @@ -1953,6 +2962,113 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8577253c781c3aa634017840854139a65a51de658fb61577e5c91e995ebdd18e" +dependencies = [ + "const-sha1", + "windows_gen", + "windows_macros", + "windows_winmd", +] + +[[package]] +name = "windows_gen" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de23e2765bf82678467efef4ccdeb150a2456b2b01688fbd7c86292c1c931ee7" +dependencies = [ + "proc-macro2", + "quote 1.0.8", + "rayon", + "sha1", + "squote", + "syn 1.0.60", + "windows_gen_macros", + "windows_winmd", +] + +[[package]] +name = "windows_gen_macros" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "878ecff0c53decca3851547869b5473081198cfe97405b14412be9283a05ae34" +dependencies = [ + "proc-macro2", + "quote 1.0.8", + "syn 1.0.60", +] + +[[package]] +name = "windows_macros" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aaedcc12658411370a43f9c194c40ed4bae0047c39e48ebf67e92d241a97f0c7" +dependencies = [ + "proc-macro2", + "quote 1.0.8", + "rayon", + "squote", + "syn 1.0.60", + "windows_gen", + "windows_winmd", +] + +[[package]] +name = "windows_winmd" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40a0769bcad04692eb69e92ff93ce49c89ca5aeda188e98f5cc9b8502b41d6c0" +dependencies = [ + "serde", + "serde_json", + "windows_winmd_macros", +] + +[[package]] +name = "windows_winmd_macros" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f67ec9020d1bbfeaa8847ababe33b8dc190d683624cd72a48a4a117de50d6559" +dependencies = [ + "proc-macro2", + "quote 1.0.8", + "syn 1.0.60", +] + +[[package]] +name = "winit" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da4eda6fce0eb84bd0a33e3c8794eb902e1033d0a1d5a31bc4f19b1b4bbff597" +dependencies = [ + "bitflags 1.2.1", + "cocoa", + "core-foundation 0.9.1", + "core-graphics 0.22.2", + "core-video-sys", + "dispatch", + "instant", + "lazy_static", + "libc", + "log", + "mio", + "mio-extras", + "ndk", + "ndk-glue", + "ndk-sys", + "objc", + "parking_lot", + "percent-encoding", + "raw-window-handle", + "smithay-client-toolkit", + "wayland-client", + "winapi 0.3.9", + "x11-dl", +] + [[package]] name = "winres" version = "0.1.11" @@ -1968,7 +3084,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7e30cba82e22b083dc5a422c2ee77e20dc7927271a0dc981360c57c1453cb48d" dependencies = [ - "winapi", + "winapi 0.3.9", ] [[package]] @@ -1977,11 +3093,56 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c31a65da50d792c6f9bd2e3216249566c4fb1d2d34f9b7d2d66d2e93f62a242" dependencies = [ - "strum", - "strum_macros", - "winapi", + "strum 0.8.0", + "strum_macros 0.8.0", + "winapi 0.3.9", "winrt", - "xml-rs", + "xml-rs 0.6.1", +] + +[[package]] +name = "wry" +version = "0.4.1" +source = "git+https://github.com/tauri-apps/wry?rev=42f4f2133f7921ed5adc47908787094da8abeac5#42f4f2133f7921ed5adc47908787094da8abeac5" +dependencies = [ + "cc", + "cocoa", + "core-graphics 0.22.2", + "gio", + "glib", + "gtk", + "libc", + "objc", + "once_cell", + "serde", + "serde_json", + "thiserror", + "url", + "webkit2gtk", + "windows", + "winit", +] + +[[package]] +name = "ws2_32-sys" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" +dependencies = [ + "winapi 0.2.8", + "winapi-build", +] + +[[package]] +name = "x11-dl" +version = "2.18.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bf981e3a5b3301209754218f962052d4d9ee97e478f4d26d4a6eced34c1fef8" +dependencies = [ + "lazy_static", + "libc", + "maybe-uninit", + "pkg-config", ] [[package]] @@ -1993,6 +3154,21 @@ dependencies = [ "libc", ] +[[package]] +name = "xcursor" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a9a231574ae78801646617cefd13bfe94be907c0e4fa979cfd8b770aa3c5d08" +dependencies = [ + "nom", +] + +[[package]] +name = "xdg" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d089681aa106a86fade1b0128fb5daf07d5867a509ab036d99988dec80429a57" + [[package]] name = "xml-rs" version = "0.6.1" @@ -2002,6 +3178,12 @@ dependencies = [ "bitflags 0.9.1", ] +[[package]] +name = "xml-rs" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b07db065a5cf61a7e4ba64f29e67db906fb1787316516c4e6e5ff0fea1efcd8a" + [[package]] name = "zip" version = "0.5.9" diff --git a/tauri/examples/communication/src-tauri/src/main.rs b/tauri/examples/communication/src-tauri/src/main.rs index 8279efcbe8c..6323d76e763 100644 --- a/tauri/examples/communication/src-tauri/src/main.rs +++ b/tauri/examples/communication/src-tauri/src/main.rs @@ -13,7 +13,7 @@ struct Reply { } fn main() { - tauri::AppBuilder::::new() + tauri::AppBuilder::::new() .setup(|webview, _source| async move { let mut webview = webview.clone(); tauri::event::listen(String::from("js-event"), move |msg| { diff --git a/tauri/examples/communication/src-tauri/tauri.conf.json b/tauri/examples/communication/src-tauri/tauri.conf.json index 4609e62e5fe..b8ad38fc300 100644 --- a/tauri/examples/communication/src-tauri/tauri.conf.json +++ b/tauri/examples/communication/src-tauri/tauri.conf.json @@ -43,7 +43,7 @@ } }, "embeddedServer": { - "active": false + "active": true }, "bundle": { "active": true, diff --git a/tauri/src/app.rs b/tauri/src/app.rs index ba3332dbccf..4e211bf8049 100644 --- a/tauri/src/app.rs +++ b/tauri/src/app.rs @@ -1,4 +1,4 @@ -use crate::Webview; +use crate::ApplicationExt; use futures::future::BoxFuture; mod runner; @@ -7,16 +7,16 @@ type InvokeHandler = dyn Fn(W, String) -> BoxFuture<'static, Result<(), Strin type Setup = dyn Fn(W, String) -> BoxFuture<'static, ()> + Send + Sync; /// The application runner. -pub struct App { +pub struct App { /// The JS message handler. - invoke_handler: Option>>, + invoke_handler: Option>>, /// The setup callback, invoked when the webview is ready. - setup: Option>>, + setup: Option>>, /// The HTML of the splashscreen to render. splashscreen_html: Option, } -impl App { +impl App { /// Runs the app until it finishes. pub fn run(self) { runner::run(self).expect("Failed to build webview"); @@ -27,11 +27,11 @@ impl App { /// The message is considered consumed if the handler exists and returns an Ok Result. pub(crate) async fn run_invoke_handler( &self, - webview: &mut W, + dispatcher: &mut A::Dispatcher, arg: &str, ) -> Result { if let Some(ref invoke_handler) = self.invoke_handler { - let fut = invoke_handler(webview.clone(), arg.to_string()); + let fut = invoke_handler(dispatcher.clone(), arg.to_string()); fut.await.map(|_| true) } else { Ok(false) @@ -39,9 +39,9 @@ impl App { } /// Runs the setup callback if defined. - pub(crate) async fn run_setup(&self, webview: &mut W, source: String) { + pub(crate) async fn run_setup(&self, dispatcher: &mut A::Dispatcher, source: String) { if let Some(ref setup) = self.setup { - let fut = setup(webview.clone(), source); + let fut = setup(dispatcher.clone(), source); fut.await; } } @@ -54,16 +54,16 @@ impl App { /// The App builder. #[derive(Default)] -pub struct AppBuilder { +pub struct AppBuilder { /// The JS message handler. - invoke_handler: Option>>, + invoke_handler: Option>>, /// The setup callback, invoked when the webview is ready. - setup: Option>>, + setup: Option>>, /// The HTML of the splashscreen to render. splashscreen_html: Option, } -impl AppBuilder { +impl AppBuilder { /// Creates a new App builder. pub fn new() -> Self { Self { @@ -76,13 +76,13 @@ impl AppBuilder { /// Defines the JS message handler callback. pub fn invoke_handler< T: futures::Future> + Send + Sync + 'static, - F: Fn(W, String) -> T + Send + Sync + 'static, + F: Fn(A::Dispatcher, String) -> T + Send + Sync + 'static, >( mut self, invoke_handler: F, ) -> Self { - self.invoke_handler = Some(Box::new(move |webview, arg| { - Box::pin(invoke_handler(webview, arg)) + self.invoke_handler = Some(Box::new(move |dispatcher, arg| { + Box::pin(invoke_handler(dispatcher, arg)) })); self } @@ -90,13 +90,13 @@ impl AppBuilder { /// Defines the setup callback. pub fn setup< T: futures::Future + Send + Sync + 'static, - F: Fn(W, String) -> T + Send + Sync + 'static, + F: Fn(A::Dispatcher, String) -> T + Send + Sync + 'static, >( mut self, setup: F, ) -> Self { - self.setup = Some(Box::new(move |webview, source| { - Box::pin(setup(webview, source)) + self.setup = Some(Box::new(move |dispatcher, source| { + Box::pin(setup(dispatcher, source)) })); self } @@ -110,14 +110,14 @@ impl AppBuilder { /// Adds a plugin to the runtime. pub fn plugin( self, - plugin: impl crate::plugin::Plugin + Send + Sync + Sync + 'static, + plugin: impl crate::plugin::Plugin + Send + Sync + Sync + 'static, ) -> Self { - crate::async_runtime::block_on(crate::plugin::register(W::plugin_store(), plugin)); + crate::async_runtime::block_on(crate::plugin::register(A::plugin_store(), plugin)); self } /// Builds the App. - pub fn build(self) -> App { + pub fn build(self) -> App { App { invoke_handler: self.invoke_handler, setup: self.setup, diff --git a/tauri/src/app/runner.rs b/tauri/src/app/runner.rs index 2a5829d91b0..02d7b0e7cd0 100644 --- a/tauri/src/app/runner.rs +++ b/tauri/src/app/runner.rs @@ -1,12 +1,9 @@ -use std::{ - path::Path, - sync::{ - atomic::{AtomicBool, Ordering}, - Arc, - }, +use std::sync::{ + atomic::{AtomicBool, Ordering}, + Arc, }; -use crate::{SizeHint, Webview, WebviewBuilder}; +use crate::{ApplicationDispatcherExt, ApplicationExt, WebviewBuilderExt, WindowBuilderExt}; use super::App; #[cfg(embedded_server)] @@ -20,7 +17,7 @@ enum Content { } /// Main entry point for running the Webview -pub(crate) fn run(application: App) -> crate::Result<()> { +pub(crate) fn run(application: App) -> crate::Result<()> { // setup the content using the config struct depending on the compile target let main_content = setup_content()?; @@ -46,11 +43,11 @@ pub(crate) fn run(application: App) -> crate::Result<() }; // build the webview - let mut webview = build_webview(application, main_content, splashscreen_content)?; + let (webview_application, mut dispatcher) = + build_webview(application, main_content, splashscreen_content)?; - let mut webview_ = webview.clone(); crate::async_runtime::spawn(async move { - crate::plugin::created(W::plugin_store(), &mut webview_).await + crate::plugin::created(A::plugin_store(), &mut dispatcher).await }); // spawn the embedded server on our server url @@ -62,7 +59,7 @@ pub(crate) fn run(application: App) -> crate::Result<() spawn_updater(); // run the webview - webview.run(); + webview_application.run(); Ok(()) } @@ -103,7 +100,7 @@ fn setup_content() -> crate::Result> { Ok(Content::Url(config.build.dev_path.clone())) } else { let dev_dir = &config.build.dev_path; - let dev_path = Path::new(dev_dir).join("index.tauri.html"); + let dev_path = std::path::Path::new(dev_dir).join("index.tauri.html"); if !dev_path.exists() { panic!( "Couldn't find 'index.tauri.html' inside {}; did you forget to run 'tauri dev'?", @@ -240,21 +237,17 @@ pub fn init() -> String { } // build the webview struct -fn build_webview( - application: App, +fn build_webview( + application: App, content: Content, splashscreen_content: Option>, -) -> crate::Result { +) -> crate::Result<(A, A::Dispatcher)> { let config = get()?; - let debug = cfg!(debug_assertions); + // TODO let debug = cfg!(debug_assertions); // get properties from config struct - let width = config.tauri.window.width; - let height = config.tauri.window.height; - let resizable = if config.tauri.window.resizable { - SizeHint::NONE - } else { - SizeHint::FIXED - }; + // TODO let width = config.tauri.window.width; + // TODO let height = config.tauri.window.height; + let resizable = config.tauri.window.resizable; // let fullscreen = config.tauri.window.fullscreen; let title = config.tauri.window.title.clone(); @@ -275,114 +268,112 @@ fn build_webview( {tauri_init} {event_init} if (window.__TAURI_INVOKE_HANDLER__) {{ - window.__TAURI_INVOKE_HANDLER__({{ cmd: "__initialized" }}) + window.__TAURI_INVOKE_HANDLER__(JSON.stringify({{ cmd: "__initialized" }})) }} else {{ window.addEventListener('DOMContentLoaded', function () {{ - window.__TAURI_INVOKE_HANDLER__({{ cmd: "__initialized" }}) + window.__TAURI_INVOKE_HANDLER__(JSON.stringify({{ cmd: "__initialized" }})) }}) }} {plugin_init} "#, tauri_init = include_str!(concat!(env!("OUT_DIR"), "/__tauri.js")), event_init = init(), - plugin_init = crate::async_runtime::block_on(crate::plugin::init_script(W::plugin_store())) + plugin_init = crate::async_runtime::block_on(crate::plugin::init_script(A::plugin_store())) ); - let mut webview = W::Builder::new() - .init(&init) - .title(&title) - .width(width as usize) - .height(height as usize) - .resizable(resizable) - .debug(debug) - .url(&url) - .finish(); - // TODO waiting for webview window API - // webview.set_fullscreen(fullscreen); - - if has_splashscreen { - let env_var = envmnt::get_or("TAURI_DIR", "../dist"); - let path = Path::new(&env_var); - let contents = std::fs::read_to_string(path.join("/tauri.js"))?; - // inject the tauri.js entry point - webview.dispatch(move |_webview| _webview.eval(&contents)); - } - - let w = webview.clone(); let application = Arc::new(application); - webview.bind("__TAURI_INVOKE_HANDLER__", move |_, arg| { - let arg = arg.to_string(); - let application = application.clone(); - let mut w = w.clone(); - let content_url = content_url.to_string(); - let initialized_splashscreen = initialized_splashscreen.clone(); - - crate::async_runtime::spawn(async move { - let arg = format_arg(&arg); - - if arg == r#"{"cmd":"__initialized"}"# { - let source = if has_splashscreen && !initialized_splashscreen.load(Ordering::Relaxed) { - initialized_splashscreen.swap(true, Ordering::Relaxed); - "splashscreen" + let mut webview_application = A::new()?; + + let main_window = + webview_application.create_window(A::WindowBuilder::new().resizable(resizable).title(title))?; + + let dispatcher = webview_application.dispatcher(&main_window); + + let tauri_invoke_handler = crate::Callback:: { + name: "__TAURI_INVOKE_HANDLER__".to_string(), + function: Box::new(move |dispatcher, _, arg| { + let arg = arg.into_iter().next().unwrap_or_else(String::new); + let application = application.clone(); + let mut dispatcher = dispatcher.clone(); + let content_url = content_url.to_string(); + let initialized_splashscreen = initialized_splashscreen.clone(); + + crate::async_runtime::spawn(async move { + if arg == r#"{"cmd":"__initialized"}"# { + let source = if has_splashscreen && !initialized_splashscreen.load(Ordering::Relaxed) { + initialized_splashscreen.swap(true, Ordering::Relaxed); + "splashscreen" + } else { + "window-1" + }; + application + .run_setup(&mut dispatcher, source.to_string()) + .await; + if source == "window-1" { + crate::plugin::ready(A::plugin_store(), &mut dispatcher).await; + } + } else if arg == r#"{"cmd":"closeSplashscreen"}"# { + dispatcher.eval(&format!(r#"window.location.href = "{}""#, content_url)); } else { - "window-1" - }; - application.run_setup(&mut w, source.to_string()).await; - if source == "window-1" { - crate::plugin::ready(W::plugin_store(), &mut w).await; - } - } else if arg == r#"{"cmd":"closeSplashscreen"}"# { - w.dispatch(move |w| { - w.eval(&format!(r#"window.location.href = "{}""#, content_url)); - }); - } else { - let mut endpoint_handle = crate::endpoints::handle(&mut w, &arg) - .await - .map_err(|e| e.to_string()); - if let Err(ref tauri_handle_error) = endpoint_handle { - if tauri_handle_error.contains("unknown variant") { - let error = match application.run_invoke_handler(&mut w, &arg).await { - Ok(handled) => { - if handled { - String::from("") - } else { - tauri_handle_error.to_string() + let mut endpoint_handle = crate::endpoints::handle(&mut dispatcher, &arg) + .await + .map_err(|e| e.to_string()); + if let Err(ref tauri_handle_error) = endpoint_handle { + if tauri_handle_error.contains("unknown variant") { + let error = match application.run_invoke_handler(&mut dispatcher, &arg).await { + Ok(handled) => { + if handled { + String::from("") + } else { + tauri_handle_error.to_string() + } } - } - Err(e) => e, - }; - endpoint_handle = Err(error); + Err(e) => e, + }; + endpoint_handle = Err(error); + } } - } - if let Err(ref app_handle_error) = endpoint_handle { - if app_handle_error.contains("unknown variant") { - let error = match crate::plugin::extend_api(W::plugin_store(), &mut w, &arg).await { - Ok(handled) => { - if handled { - String::from("") - } else { - app_handle_error.to_string() - } - } - Err(e) => e, - }; - endpoint_handle = Err(error); + if let Err(ref app_handle_error) = endpoint_handle { + if app_handle_error.contains("unknown variant") { + let error = + match crate::plugin::extend_api(A::plugin_store(), &mut dispatcher, &arg).await { + Ok(handled) => { + if handled { + String::from("") + } else { + app_handle_error.to_string() + } + } + Err(e) => e, + }; + endpoint_handle = Err(error); + } } - } - endpoint_handle = endpoint_handle.map_err(|e| e.replace("'", "\\'")); - if let Err(handler_error_message) = endpoint_handle { - if !handler_error_message.is_empty() { - let _ = w.dispatch(move |w| { - w.eval(&get_api_error_message(&arg, handler_error_message)); - }); + endpoint_handle = endpoint_handle.map_err(|e| e.replace("'", "\\'")); + if let Err(handler_error_message) = endpoint_handle { + if !handler_error_message.is_empty() { + dispatcher.eval(&get_api_error_message(&arg, handler_error_message)); + } } } - } - }); - }); + }); + 0 + }), + }; + + webview_application.create_webview( + A::WebviewBuilder::new() + .url(url) + .initialization_script(&init), + main_window, + vec![tauri_invoke_handler], + )?; + + // TODO waiting for webview window API + // webview.set_fullscreen(fullscreen); - Ok(webview) + Ok((webview_application, dispatcher)) } // Formats an invoke handler error message to print to console.error @@ -394,15 +385,6 @@ fn get_api_error_message(arg: &str, handler_error_message: String) -> String { ) } -// Transform `[payload]` to `payload` -fn format_arg(arg: &str) -> String { - arg - .chars() - .skip(1) - .take(arg.chars().count() - 2) - .collect::() -} - #[cfg(test)] mod test { use super::Content; @@ -501,13 +483,4 @@ mod test { } } } - - #[test] - fn test_format_arg() { - let input = &["[payload]", "[påyløad]"]; - let expected = &[String::from("payload"), String::from("påyløad")]; - for (i, e) in input.iter().zip(expected) { - assert_eq!(&super::format_arg(i), e); - } - } } diff --git a/tauri/src/endpoints.rs b/tauri/src/endpoints.rs index 4c21a401a6e..6b997c8c0bd 100644 --- a/tauri/src/endpoints.rs +++ b/tauri/src/endpoints.rs @@ -16,10 +16,13 @@ mod http; #[cfg(notification)] mod notification; -use crate::Webview; +use crate::{ApplicationDispatcherExt, Event}; #[allow(unused_variables)] -pub(crate) async fn handle(webview: &mut W, arg: &str) -> crate::Result<()> { +pub(crate) async fn handle( + dispatcher: &mut D, + arg: &str, +) -> crate::Result<()> { use cmd::Cmd::*; match serde_json::from_str(arg) { Err(e) => Err(e.into()), @@ -32,9 +35,9 @@ pub(crate) async fn handle(webview: &mut W, arg: &str) -> error, } => { #[cfg(read_text_file)] - file_system::read_text_file(webview, path, options, callback, error).await; + file_system::read_text_file(dispatcher, path, options, callback, error).await; #[cfg(not(read_text_file))] - allowlist_error(webview, error, "readTextFile"); + allowlist_error(dispatcher, error, "readTextFile"); } ReadBinaryFile { path, @@ -43,9 +46,9 @@ pub(crate) async fn handle(webview: &mut W, arg: &str) -> error, } => { #[cfg(read_binary_file)] - file_system::read_binary_file(webview, path, options, callback, error).await; + file_system::read_binary_file(dispatcher, path, options, callback, error).await; #[cfg(not(read_binary_file))] - allowlist_error(webview, error, "readBinaryFile"); + allowlist_error(dispatcher, error, "readBinaryFile"); } WriteFile { path, @@ -55,9 +58,9 @@ pub(crate) async fn handle(webview: &mut W, arg: &str) -> error, } => { #[cfg(write_file)] - file_system::write_file(webview, path, contents, options, callback, error).await; + file_system::write_file(dispatcher, path, contents, options, callback, error).await; #[cfg(not(write_file))] - allowlist_error(webview, error, "writeFile"); + allowlist_error(dispatcher, error, "writeFile"); } WriteBinaryFile { path, @@ -67,9 +70,10 @@ pub(crate) async fn handle(webview: &mut W, arg: &str) -> error, } => { #[cfg(write_binary_file)] - file_system::write_binary_file(webview, path, contents, options, callback, error).await; + file_system::write_binary_file(dispatcher, path, contents, options, callback, error) + .await; #[cfg(not(write_binary_file))] - allowlist_error(webview, error, "writeBinaryFile"); + allowlist_error(dispatcher, error, "writeBinaryFile"); } ReadDir { path, @@ -78,9 +82,9 @@ pub(crate) async fn handle(webview: &mut W, arg: &str) -> error, } => { #[cfg(read_dir)] - file_system::read_dir(webview, path, options, callback, error).await; + file_system::read_dir(dispatcher, path, options, callback, error).await; #[cfg(not(read_dir))] - allowlist_error(webview, error, "readDir"); + allowlist_error(dispatcher, error, "readDir"); } CopyFile { source, @@ -90,9 +94,9 @@ pub(crate) async fn handle(webview: &mut W, arg: &str) -> error, } => { #[cfg(copy_file)] - file_system::copy_file(webview, source, destination, options, callback, error).await; + file_system::copy_file(dispatcher, source, destination, options, callback, error).await; #[cfg(not(copy_file))] - allowlist_error(webview, error, "copyFile"); + allowlist_error(dispatcher, error, "copyFile"); } CreateDir { path, @@ -101,9 +105,9 @@ pub(crate) async fn handle(webview: &mut W, arg: &str) -> error, } => { #[cfg(create_dir)] - file_system::create_dir(webview, path, options, callback, error).await; + file_system::create_dir(dispatcher, path, options, callback, error).await; #[cfg(not(create_dir))] - allowlist_error(webview, error, "createDir"); + allowlist_error(dispatcher, error, "createDir"); } RemoveDir { path, @@ -112,9 +116,9 @@ pub(crate) async fn handle(webview: &mut W, arg: &str) -> error, } => { #[cfg(remove_dir)] - file_system::remove_dir(webview, path, options, callback, error).await; + file_system::remove_dir(dispatcher, path, options, callback, error).await; #[cfg(not(remove_dir))] - allowlist_error(webview, error, "removeDir"); + allowlist_error(dispatcher, error, "removeDir"); } RemoveFile { path, @@ -123,9 +127,9 @@ pub(crate) async fn handle(webview: &mut W, arg: &str) -> error, } => { #[cfg(remove_file)] - file_system::remove_file(webview, path, options, callback, error).await; + file_system::remove_file(dispatcher, path, options, callback, error).await; #[cfg(not(remove_file))] - allowlist_error(webview, error, "removeFile"); + allowlist_error(dispatcher, error, "removeFile"); } RenameFile { old_path, @@ -135,9 +139,9 @@ pub(crate) async fn handle(webview: &mut W, arg: &str) -> error, } => { #[cfg(rename_file)] - file_system::rename_file(webview, old_path, new_path, options, callback, error).await; + file_system::rename_file(dispatcher, old_path, new_path, options, callback, error).await; #[cfg(not(rename_file))] - allowlist_error(webview, error, "renameFile"); + allowlist_error(dispatcher, error, "renameFile"); } ResolvePath { path, @@ -146,17 +150,18 @@ pub(crate) async fn handle(webview: &mut W, arg: &str) -> error, } => { #[cfg(path_api)] - path::resolve_path(webview, path, directory, callback, error).await; + path::resolve_path(dispatcher, path, directory, callback, error).await; #[cfg(not(path_api))] - allowlist_error(webview, error, "pathApi"); + allowlist_error(dispatcher, error, "pathApi"); } SetTitle { title } => { - #[cfg(set_title)] + // TODO + /*#[cfg(set_title)] webview.dispatch(move |w| { w.set_title(&title); - }); + });*/ #[cfg(not(set_title))] - throw_allowlist_error(webview, "title"); + throw_allowlist_error(dispatcher, "title"); } Execute { command, @@ -165,22 +170,22 @@ pub(crate) async fn handle(webview: &mut W, arg: &str) -> error, } => { #[cfg(execute)] - crate::call(webview, command, args, callback, error).await; + crate::call(dispatcher, command, args, callback, error).await; #[cfg(not(execute))] - throw_allowlist_error(webview, "execute"); + throw_allowlist_error(dispatcher, "execute"); } Open { uri } => { #[cfg(open)] browser::open(uri); #[cfg(not(open))] - throw_allowlist_error(webview, "open"); + throw_allowlist_error(dispatcher, "open"); } ValidateSalt { salt, callback, error, } => { - salt::validate(webview, salt, callback, error)?; + salt::validate(dispatcher, salt, callback, error)?; } Listen { event, @@ -190,18 +195,16 @@ pub(crate) async fn handle(webview: &mut W, arg: &str) -> #[cfg(event)] { let js_string = event::listen_fn(event, handler, once)?; - webview.dispatch(move |w| { - w.eval(&js_string); - }); + dispatcher.eval(&js_string); } #[cfg(not(event))] - throw_allowlist_error(webview, "event"); + throw_allowlist_error(dispatcher, "event"); } Emit { event, payload } => { #[cfg(event)] crate::event::on_event(event, payload); #[cfg(not(event))] - throw_allowlist_error(webview, "event"); + throw_allowlist_error(dispatcher, "event"); } OpenDialog { options, @@ -209,9 +212,9 @@ pub(crate) async fn handle(webview: &mut W, arg: &str) -> error, } => { #[cfg(open_dialog)] - dialog::open(webview, options, callback, error)?; + dialog::open(dispatcher, options, callback, error)?; #[cfg(not(open_dialog))] - allowlist_error(webview, error, "title"); + allowlist_error(dispatcher, error, "title"); } SaveDialog { options, @@ -219,9 +222,9 @@ pub(crate) async fn handle(webview: &mut W, arg: &str) -> error, } => { #[cfg(save_dialog)] - dialog::save(webview, options, callback, error)?; + dialog::save(dispatcher, options, callback, error)?; #[cfg(not(save_dialog))] - throw_allowlist_error(webview, "saveDialog"); + throw_allowlist_error(dispatcher, "saveDialog"); } MessageDialog { message } => { let exe = std::env::current_exe()?; @@ -229,8 +232,11 @@ pub(crate) async fn handle(webview: &mut W, arg: &str) -> let app_name = exe .file_name() .expect("failed to get exe filename") - .to_string_lossy(); - dialog::message(app_name.to_string(), message); + .to_string_lossy() + .to_string(); + dispatcher.send_event(Event::Run(Box::new(move || { + dialog::message(app_name, message); + }))); } AskDialog { title, @@ -240,7 +246,7 @@ pub(crate) async fn handle(webview: &mut W, arg: &str) -> } => { let exe = std::env::current_exe()?; dialog::ask( - webview, + dispatcher, title.unwrap_or_else(|| { let exe_dir = exe.parent().expect("failed to get exe directory"); exe @@ -260,9 +266,9 @@ pub(crate) async fn handle(webview: &mut W, arg: &str) -> error, } => { #[cfg(http_request)] - http::make_request(webview, *options, callback, error).await; + http::make_request(dispatcher, *options, callback, error).await; #[cfg(not(http_request))] - allowlist_error(webview, error, "httpRequest"); + allowlist_error(dispatcher, error, "httpRequest"); } #[cfg(assets)] LoadAsset { @@ -271,12 +277,12 @@ pub(crate) async fn handle(webview: &mut W, arg: &str) -> callback, error, } => { - asset::load(webview, asset, asset_type, callback, error).await; + asset::load(dispatcher, asset, asset_type, callback, error).await; } CliMatches { callback, error } => { #[cfg(cli)] crate::execute_promise( - webview, + dispatcher, async move { match crate::cli::get_matches() { Some(matches) => Ok(matches), @@ -289,7 +295,7 @@ pub(crate) async fn handle(webview: &mut W, arg: &str) -> .await; #[cfg(not(cli))] api_error( - webview, + dispatcher, error, "CLI definition not set under tauri.conf.json > tauri > cli (https://tauri.studio/docs/api/config#tauri.cli)", ); @@ -300,21 +306,21 @@ pub(crate) async fn handle(webview: &mut W, arg: &str) -> error, } => { #[cfg(notification)] - notification::send(webview, options, callback, error).await; + notification::send(dispatcher, options, callback, error).await; #[cfg(not(notification))] - allowlist_error(webview, error, "notification"); + allowlist_error(dispatcher, error, "notification"); } IsNotificationPermissionGranted { callback, error } => { #[cfg(notification)] - notification::is_permission_granted(webview, callback, error).await; + notification::is_permission_granted(dispatcher, callback, error).await; #[cfg(not(notification))] - allowlist_error(webview, error, "notification"); + allowlist_error(dispatcher, error, "notification"); } RequestNotificationPermission { callback, error } => { #[cfg(notification)] - notification::request_permission(webview, callback, error)?; + notification::request_permission(dispatcher, callback, error)?; #[cfg(not(notification))] - allowlist_error(webview, error, "notification"); + allowlist_error(dispatcher, error, "notification"); } } Ok(()) @@ -323,17 +329,19 @@ pub(crate) async fn handle(webview: &mut W, arg: &str) -> } #[allow(dead_code)] -fn api_error(webview: &mut W, error_fn: String, message: &str) { +fn api_error(dispatcher: &mut D, error_fn: String, message: &str) { let reject_code = tauri_api::rpc::format_callback(error_fn, message); - let _ = webview.dispatch(move |w| { - w.eval(&reject_code); - }); + let _ = dispatcher.eval(&reject_code); } #[allow(dead_code)] -fn allowlist_error(webview: &mut W, error_fn: String, allowlist_key: &str) { +fn allowlist_error( + dispatcher: &mut D, + error_fn: String, + allowlist_key: &str, +) { api_error( - webview, + dispatcher, error_fn, &format!( "{}' not on the allowlist (https://tauri.studio/docs/api/config#tauri.allowlist)", @@ -343,14 +351,12 @@ fn allowlist_error(webview: &mut W, error_fn: String, allowlist_key: } #[allow(dead_code)] -fn throw_allowlist_error(webview: &mut W, allowlist_key: &str) { +fn throw_allowlist_error(dispatcher: &mut D, allowlist_key: &str) { let reject_code = format!( r#"throw new Error("'{}' not on the allowlist")"#, allowlist_key ); - let _ = webview.dispatch(move |w| { - w.eval(&reject_code); - }); + let _ = dispatcher.eval(&reject_code); } #[cfg(test)] diff --git a/tauri/src/endpoints/asset.rs b/tauri/src/endpoints/asset.rs index 3a536eaf73f..fc3e47e0985 100644 --- a/tauri/src/endpoints/asset.rs +++ b/tauri/src/endpoints/asset.rs @@ -1,17 +1,17 @@ -use crate::Webview; +use crate::ApplicationDispatcherExt; use std::path::PathBuf; #[allow(clippy::option_env_unwrap)] -pub async fn load( - webview: &mut W, +pub async fn load( + dispatcher: &mut D, asset: String, asset_type: String, callback: String, error: String, ) { - let mut webview_mut = webview.clone(); + let mut dispatcher_ = dispatcher.clone(); crate::execute_promise( - webview, + dispatcher, async move { let mut path = PathBuf::from(if asset.starts_with('/') { asset.replacen("/", "", 1) @@ -68,12 +68,11 @@ pub async fn load( )) } else { let asset_bytes = read_asset.expect("Failed to read asset type"); - webview_mut.dispatch(move |webview_ref| { - let asset_str = - std::str::from_utf8(&asset_bytes).expect("failed to convert asset bytes to u8 slice"); - if asset_type == "stylesheet" { - webview_ref.eval(&format!( - r#" + let asset_str = + std::str::from_utf8(&asset_bytes).expect("failed to convert asset bytes to u8 slice"); + if asset_type == "stylesheet" { + dispatcher_.eval(&format!( + r#" (function (content) {{ var css = document.createElement('style') css.type = 'text/css' @@ -84,13 +83,12 @@ pub async fn load( document.getElementsByTagName("head")[0].appendChild(css); }})(`{css}`) "#, - // Escape octal sequences, which aren't allowed in template literals - css = asset_str.replace("\\", "\\\\").as_str() - )); - } else { - webview_ref.eval(asset_str); - } - }); + // Escape octal sequences, which aren't allowed in template literals + css = asset_str.replace("\\", "\\\\").as_str() + )); + } else { + dispatcher_.eval(asset_str); + } Ok("Asset loaded successfully".to_string()) } }, diff --git a/tauri/src/endpoints/dialog.rs b/tauri/src/endpoints/dialog.rs index 8edf2da153a..070184e022c 100644 --- a/tauri/src/endpoints/dialog.rs +++ b/tauri/src/endpoints/dialog.rs @@ -3,7 +3,7 @@ use crate::api::dialog::{ ask as ask_dialog, message as message_dialog, pick_folder, save_file, select, select_multiple, DialogSelection, Response, }; -use crate::Webview; +use crate::ApplicationDispatcherExt; use serde_json::Value as JsonValue; /// maps a dialog response to a JS value to eval @@ -18,15 +18,15 @@ fn map_response(response: Response) -> JsonValue { /// Shows an open dialog. #[cfg(open_dialog)] -pub fn open( - webview: &mut W, +pub fn open( + dispatcher: &mut D, options: OpenDialogOptions, callback: String, error: String, ) -> crate::Result<()> { crate::execute_promise_sync( - webview, - async move { + dispatcher, + move || { let response = if options.multiple { select_multiple(options.filter, options.default_path) } else if options.directory { @@ -38,24 +38,24 @@ pub fn open( }, callback, error, - )?; + ); Ok(()) } /// Shows a save dialog. #[cfg(save_dialog)] -pub fn save( - webview: &mut W, +pub fn save( + dispatcher: &mut D, options: SaveDialogOptions, callback: String, error: String, ) -> crate::Result<()> { crate::execute_promise_sync( - webview, - async move { save_file(options.filter, options.default_path).map(map_response) }, + dispatcher, + move || save_file(options.filter, options.default_path).map(map_response), callback, error, - )?; + ); Ok(()) } @@ -65,23 +65,21 @@ pub fn message(title: String, message: String) { } /// Shows a dialog with a yes/no question. -pub fn ask( - webview: &mut W, +pub fn ask( + dispatcher: &mut D, title: String, message: String, callback: String, error: String, ) -> crate::Result<()> { crate::execute_promise_sync( - webview, - async move { - match ask_dialog(message, title) { - DialogSelection::Yes => Ok(true), - _ => Ok(false), - } + dispatcher, + move || match ask_dialog(message, title) { + DialogSelection::Yes => Ok(true), + _ => Ok(false), }, callback, error, - )?; + ); Ok(()) } diff --git a/tauri/src/endpoints/file_system.rs b/tauri/src/endpoints/file_system.rs index 49886be766e..479a1c3f00a 100644 --- a/tauri/src/endpoints/file_system.rs +++ b/tauri/src/endpoints/file_system.rs @@ -1,4 +1,4 @@ -use crate::Webview; +use crate::ApplicationDispatcherExt; use tauri_api::dir; use tauri_api::file; @@ -13,15 +13,15 @@ use super::cmd::{DirOperationOptions, FileOperationOptions}; /// Reads a directory. #[cfg(read_dir)] -pub async fn read_dir( - webview: &mut W, +pub async fn read_dir( + dispatcher: &mut D, path: PathBuf, options: Option, callback: String, error: String, ) { crate::execute_promise( - webview, + dispatcher, async move { let (recursive, dir) = if let Some(options_value) = options { (options_value.recursive, options_value.dir) @@ -38,8 +38,8 @@ pub async fn read_dir( /// Copies a file. #[cfg(copy_file)] -pub async fn copy_file( - webview: &mut W, +pub async fn copy_file( + dispatcher: &mut D, source: PathBuf, destination: PathBuf, options: Option, @@ -47,7 +47,7 @@ pub async fn copy_file( error: String, ) { crate::execute_promise( - webview, + dispatcher, async move { let (src, dest) = match options.and_then(|o| o.dir) { Some(dir) => ( @@ -66,15 +66,15 @@ pub async fn copy_file( /// Creates a directory. #[cfg(create_dir)] -pub async fn create_dir( - webview: &mut W, +pub async fn create_dir( + dispatcher: &mut D, path: PathBuf, options: Option, callback: String, error: String, ) { crate::execute_promise( - webview, + dispatcher, async move { let (recursive, dir) = if let Some(options_value) = options { (options_value.recursive, options_value.dir) @@ -98,15 +98,15 @@ pub async fn create_dir( /// Removes a directory. #[cfg(remove_dir)] -pub async fn remove_dir( - webview: &mut W, +pub async fn remove_dir( + dispatcher: &mut D, path: PathBuf, options: Option, callback: String, error: String, ) { crate::execute_promise( - webview, + dispatcher, async move { let (recursive, dir) = if let Some(options_value) = options { (options_value.recursive, options_value.dir) @@ -130,15 +130,15 @@ pub async fn remove_dir( /// Removes a file #[cfg(remove_file)] -pub async fn remove_file( - webview: &mut W, +pub async fn remove_file( + dispatcher: &mut D, path: PathBuf, options: Option, callback: String, error: String, ) { crate::execute_promise( - webview, + dispatcher, async move { let resolved_path = resolve_path(path, options.and_then(|o| o.dir))?; fs::remove_file(resolved_path).map_err(|e| e.into()) @@ -151,8 +151,8 @@ pub async fn remove_file( /// Renames a file. #[cfg(rename_file)] -pub async fn rename_file( - webview: &mut W, +pub async fn rename_file( + dispatcher: &mut D, old_path: PathBuf, new_path: PathBuf, options: Option, @@ -160,7 +160,7 @@ pub async fn rename_file( error: String, ) { crate::execute_promise( - webview, + dispatcher, async move { let (old, new) = match options.and_then(|o| o.dir) { Some(dir) => ( @@ -179,8 +179,8 @@ pub async fn rename_file( /// Writes a text file. #[cfg(write_file)] -pub async fn write_file( - webview: &mut W, +pub async fn write_file( + dispatcher: &mut D, path: PathBuf, contents: String, options: Option, @@ -188,7 +188,7 @@ pub async fn write_file( error: String, ) { crate::execute_promise( - webview, + dispatcher, async move { File::create(resolve_path(path, options.and_then(|o| o.dir))?) .map_err(|e| e.into()) @@ -202,8 +202,8 @@ pub async fn write_file( /// Writes a binary file. #[cfg(write_binary_file)] -pub async fn write_binary_file( - webview: &mut W, +pub async fn write_binary_file( + dispatcher: &mut D, path: PathBuf, contents: String, options: Option, @@ -211,7 +211,7 @@ pub async fn write_binary_file( error: String, ) { crate::execute_promise( - webview, + dispatcher, async move { base64::decode(contents) .map_err(|e| e.into()) @@ -229,15 +229,15 @@ pub async fn write_binary_file( /// Reads a text file. #[cfg(read_text_file)] -pub async fn read_text_file( - webview: &mut W, +pub async fn read_text_file( + dispatcher: &mut D, path: PathBuf, options: Option, callback: String, error: String, ) { crate::execute_promise( - webview, + dispatcher, async move { file::read_string(resolve_path(path, options.and_then(|o| o.dir))?) }, callback, error, @@ -247,15 +247,15 @@ pub async fn read_text_file( /// Reads a binary file. #[cfg(read_binary_file)] -pub async fn read_binary_file( - webview: &mut W, +pub async fn read_binary_file( + dispatcher: &mut D, path: PathBuf, options: Option, callback: String, error: String, ) { crate::execute_promise( - webview, + dispatcher, async move { file::read_binary(resolve_path(path, options.and_then(|o| o.dir))?) }, callback, error, @@ -307,7 +307,7 @@ mod test { //call write file with the path and contents. write_file( - &mut webview, + &mut dispatcher, path.clone(), contents.clone(), String::from(""), diff --git a/tauri/src/endpoints/http.rs b/tauri/src/endpoints/http.rs index 46aa986de1c..8e28c62e939 100644 --- a/tauri/src/endpoints/http.rs +++ b/tauri/src/endpoints/http.rs @@ -1,12 +1,12 @@ -use crate::Webview; +use crate::ApplicationDispatcherExt; use tauri_api::http::{make_request as request, HttpRequestOptions}; /// Makes an HTTP request and resolves the response to the webview -pub async fn make_request( - webview: &mut W, +pub async fn make_request( + dispatcher: &mut D, options: HttpRequestOptions, callback: String, error: String, ) { - crate::execute_promise(webview, async move { request(options) }, callback, error).await; + crate::execute_promise(dispatcher, async move { request(options) }, callback, error).await; } diff --git a/tauri/src/endpoints/notification.rs b/tauri/src/endpoints/notification.rs index 8417d224337..cbe3c2498d7 100644 --- a/tauri/src/endpoints/notification.rs +++ b/tauri/src/endpoints/notification.rs @@ -1,15 +1,15 @@ use super::cmd::NotificationOptions; -use crate::Webview; +use crate::ApplicationDispatcherExt; use serde_json::Value as JsonValue; -pub async fn send( - webview: &mut W, +pub async fn send( + dispatcher: &mut D, options: NotificationOptions, callback: String, error: String, ) { crate::execute_promise( - webview, + dispatcher, async move { let mut notification = tauri_api::notification::Notification::new().title(options.title); if let Some(body) = options.body { @@ -27,9 +27,13 @@ pub async fn send( .await; } -pub async fn is_permission_granted(webview: &mut W, callback: String, error: String) { +pub async fn is_permission_granted( + dispatcher: &mut D, + callback: String, + error: String, +) { crate::execute_promise( - webview, + dispatcher, async move { let settings = crate::settings::read_settings()?; if let Some(allow_notification) = settings.allow_notification { @@ -44,14 +48,14 @@ pub async fn is_permission_granted(webview: &mut W, callback: String .await; } -pub fn request_permission( - webview: &mut W, +pub fn request_permission( + dispatcher: &mut D, callback: String, error: String, ) -> crate::Result<()> { crate::execute_promise_sync( - webview, - async move { + dispatcher, + move || { let mut settings = crate::settings::read_settings()?; let granted = "granted".to_string(); let denied = "denied".to_string(); @@ -78,6 +82,6 @@ pub fn request_permission( }, callback, error, - )?; + ); Ok(()) } diff --git a/tauri/src/endpoints/path.rs b/tauri/src/endpoints/path.rs index 02755a3f882..eca59d01e04 100644 --- a/tauri/src/endpoints/path.rs +++ b/tauri/src/endpoints/path.rs @@ -1,17 +1,17 @@ #![cfg(path_api)] -use crate::Webview; +use crate::ApplicationDispatcherExt; use tauri_api::path; use tauri_api::path::BaseDirectory; -pub async fn resolve_path( - webview: &mut W, +pub async fn resolve_path( + dispatcher: &mut D, path: String, directory: Option, callback: String, error: String, ) { crate::execute_promise( - webview, + dispatcher, async move { path::resolve_path(path, directory) }, callback, error, diff --git a/tauri/src/endpoints/salt.rs b/tauri/src/endpoints/salt.rs index 32acb5f13cb..5c097b21b88 100644 --- a/tauri/src/endpoints/salt.rs +++ b/tauri/src/endpoints/salt.rs @@ -1,8 +1,8 @@ -use crate::Webview; +use crate::ApplicationDispatcherExt; /// Validates a salt. -pub fn validate( - webview: &mut W, +pub fn validate( + dispatcher: &mut D, salt: String, callback: String, error: String, @@ -13,8 +13,6 @@ pub fn validate( Err("Invalid salt") }; let callback_string = crate::api::rpc::format_callback_result(response, callback, error)?; - webview.dispatch(move |w| { - w.eval(callback_string.as_str()); - }); + dispatcher.eval(callback_string.as_str()); Ok(()) } diff --git a/tauri/src/event.rs b/tauri/src/event.rs index d93d039cbf8..dd86b86ab53 100644 --- a/tauri/src/event.rs +++ b/tauri/src/event.rs @@ -2,7 +2,7 @@ use std::boxed::Box; use std::collections::HashMap; use std::sync::{Arc, Mutex}; -use crate::Webview; +use crate::ApplicationDispatcherExt; use lazy_static::lazy_static; use once_cell::sync::Lazy; use serde::Serialize; @@ -57,8 +57,8 @@ pub fn listen) + Send + 'static>(id: impl Into, } /// Emits an event to JS. -pub fn emit( - webview: &mut W, +pub fn emit( + dispatcher: &mut D, event: impl AsRef + Send + 'static, payload: Option, ) -> crate::Result<()> { @@ -70,15 +70,13 @@ pub fn emit( JsonValue::Null }; - webview.dispatch(move |webview_ref| { - webview_ref.eval(&format!( - "window['{}']({{type: '{}', payload: {}}}, '{}')", - emit_function_name(), - event.as_ref(), - js_payload, - salt - )) - }); + dispatcher.eval(&format!( + "window['{}']({{type: '{}', payload: {}}}, '{}')", + emit_function_name(), + event.as_ref(), + js_payload, + salt + )); Ok(()) } diff --git a/tauri/src/lib.rs b/tauri/src/lib.rs index 8c4831ea7e2..e2447355de2 100644 --- a/tauri/src/lib.rs +++ b/tauri/src/lib.rs @@ -34,15 +34,20 @@ mod webview; pub(crate) mod async_runtime; +/// A task to run on the main thread. +pub type SyncTask = Box; + /// Alias for a Result with error type anyhow::Error. pub use anyhow::Result; pub use app::*; pub use tauri_api as api; -pub use webview::*; +pub use webview::{ + ApplicationDispatcherExt, ApplicationExt, Callback, Event, WebviewBuilderExt, WindowBuilderExt, +}; /// The Tauri webview implementations. pub mod flavors { - pub use webview_official::Webview as Official; + pub use super::webview::wry::WryApplication as Wry; } use std::process::Stdio; @@ -53,21 +58,27 @@ use serde::Serialize; /// Synchronously executes the given task /// and evaluates its Result to the JS promise described by the `callback` and `error` function names. pub fn execute_promise_sync< - W: Webview, + D: ApplicationDispatcherExt + 'static, R: Serialize, - F: futures::Future> + Send + 'static, + F: FnOnce() -> Result + Send + 'static, >( - webview: &mut W, + dispatcher: &mut D, task: F, callback: String, error: String, -) -> crate::Result<()> { - async_runtime::block_on(async move { +) { + let mut dispatcher_ = dispatcher.clone(); + dispatcher.send_event(Event::Run(Box::new(move || { let callback_string = - format_callback_result(task.await.map_err(|err| err.to_string()), callback, error)?; - webview.dispatch(move |w| w.eval(callback_string.as_str())); - Ok(()) - }) + match format_callback_result(task().map_err(|err| err.to_string()), &callback, &error) { + Ok(js) => js, + Err(e) => { + format_callback_result(Result::<(), String>::Err(e.to_string()), &callback, &error) + .unwrap() + } + }; + dispatcher_.eval(callback_string.as_str()); + }))); } /// Asynchronously executes the given task @@ -76,11 +87,11 @@ pub fn execute_promise_sync< /// If the Result `is_ok()`, the callback will be the `success_callback` function name and the argument will be the Ok value. /// If the Result `is_err()`, the callback will be the `error_callback` function name and the argument will be the Err value. pub async fn execute_promise< - W: Webview, + D: ApplicationDispatcherExt, R: Serialize, F: futures::Future> + Send + 'static, >( - webview: &mut W, + dispatcher: &mut D, task: F, success_callback: String, error_callback: String, @@ -93,19 +104,19 @@ pub async fn execute_promise< Ok(callback_string) => callback_string, Err(e) => format_callback(error_callback, e.to_string()), }; - webview.dispatch(move |webview_ref| webview_ref.eval(callback_string.as_str())); + dispatcher.eval(callback_string.as_str()); } /// Calls the given command and evaluates its output to the JS promise described by the `callback` and `error` function names. -pub async fn call( - webview: &mut W, +pub async fn call( + dispatcher: &mut D, command: String, args: Vec, callback: String, error: String, ) { execute_promise( - webview, + dispatcher, async move { api::command::get_output(command, args, Stdio::piped()) }, callback, error, @@ -114,9 +125,10 @@ pub async fn call( } /// Closes the splashscreen. -pub fn close_splashscreen(webview: &mut W) -> crate::Result<()> { +pub fn close_splashscreen(dispatcher: &mut D) -> crate::Result<()> { // send a signal to the runner so it knows that it should redirect to the main app content - webview.eval(r#"window.__TAURI_INVOKE_HANDLER__({ cmd: "closeSplashscreen" })"#); + dispatcher + .eval(r#"window.__TAURI_INVOKE_HANDLER__(JSON.stringify({ cmd: "closeSplashscreen" }))"#); Ok(()) } diff --git a/tauri/src/plugin.rs b/tauri/src/plugin.rs index a6c9ae6c3bf..f7c22fbf524 100644 --- a/tauri/src/plugin.rs +++ b/tauri/src/plugin.rs @@ -1,44 +1,46 @@ use crate::async_runtime::Mutex; -use crate::Webview; +use crate::ApplicationDispatcherExt; use std::sync::Arc; /// The plugin interface. #[async_trait::async_trait] -pub trait Plugin: Sync { +pub trait Plugin: Sync { /// The JS script to evaluate on init. async fn init_script(&self) -> Option { None } /// Callback invoked when the webview is created. #[allow(unused_variables)] - async fn created(&self, webview: W) {} + async fn created(&self, dispatcher: D) {} /// Callback invoked when the webview is ready. #[allow(unused_variables)] - async fn ready(&self, webview: W) {} + async fn ready(&self, dispatcher: D) {} /// Add invoke_handler API extension commands. #[allow(unused_variables)] - async fn extend_api(&self, webview: W, payload: &str) -> Result { + async fn extend_api(&self, dispatcher: D, payload: &str) -> Result { Err("unknown variant".to_string()) } } /// Plugin collection type. -pub type PluginStore = Arc + Sync + Send>>>>; +pub type PluginStore = Arc + Sync + Send>>>>; /// Registers a plugin. -pub async fn register( - store: &PluginStore, - plugin: impl Plugin + Sync + Send + 'static, +pub async fn register( + store: &PluginStore, + plugin: impl Plugin + Sync + Send + 'static, ) { let mut plugins = store.lock().await; plugins.push(Box::new(plugin)); } -pub(crate) async fn init_script(store: &PluginStore) -> String { +pub(crate) async fn init_script( + store: &PluginStore, +) -> String { let mut init = String::new(); let plugins = store.lock().await; @@ -51,28 +53,34 @@ pub(crate) async fn init_script(store: &PluginStore) -> init } -pub(crate) async fn created(store: &PluginStore, webview: &mut W) { +pub(crate) async fn created( + store: &PluginStore, + dispatcher: &mut D, +) { let plugins = store.lock().await; for plugin in plugins.iter() { - plugin.created(webview.clone()).await; + plugin.created(dispatcher.clone()).await; } } -pub(crate) async fn ready(store: &PluginStore, webview: &mut W) { +pub(crate) async fn ready( + store: &PluginStore, + dispatcher: &mut D, +) { let plugins = store.lock().await; for plugin in plugins.iter() { - plugin.ready(webview.clone()).await; + plugin.ready(dispatcher.clone()).await; } } -pub(crate) async fn extend_api( - store: &PluginStore, - webview: &mut W, +pub(crate) async fn extend_api( + store: &PluginStore, + dispatcher: &mut D, arg: &str, ) -> Result { let plugins = store.lock().await; for ext in plugins.iter() { - match ext.extend_api(webview.clone(), arg).await { + match ext.extend_api(dispatcher.clone(), arg).await { Ok(handled) => { if handled { return Ok(true); diff --git a/tauri/src/webview.rs b/tauri/src/webview.rs index 122487d5e6b..dab9f3722fc 100644 --- a/tauri/src/webview.rs +++ b/tauri/src/webview.rs @@ -1,83 +1,115 @@ -pub(crate) mod official; - -/// Size hints. -pub enum SizeHint { - /// None - NONE = 0, - /// Min - MIN = 1, - /// Max - MAX = 2, - /// Fixed - FIXED = 3, -} +pub(crate) mod wry; + +pub use crate::plugin::PluginStore; -impl Default for SizeHint { - fn default() -> Self { - Self::NONE - } +/// An event to be posted to the webview event loop. +pub enum Event { + /// Run the given closure. + Run(crate::SyncTask), } -pub use crate::plugin::PluginStore; +/// The window builder. +pub trait WindowBuilderExt: Sized { + /// The window type. + type Window; + + /// Initializes a new window builder. + fn new() -> Self; + + /// Whether the window is resizable or not. + fn resizable(self, resizable: bool) -> Self; + + /// The title of the window in the title bar. + fn title(self, title: String) -> Self; + + /// Whether the window should be maximized upon creation. + fn maximized(self, maximized: bool) -> Self; + + /// Whether the window should be immediately visible upon creation. + fn visible(self, visible: bool) -> Self; + + /// Whether the the window should be transparent. If this is true, writing colors + /// with alpha values different than `1.0` will produce a transparent window. + fn transparent(self, transparent: bool) -> Self; + + /// Whether the window should have borders and bars. + fn decorations(self, decorations: bool) -> Self; + + /// Whether the window should always be on top of other windows. + fn always_on_top(self, always_on_top: bool) -> Self; + + /// build the window. + fn finish(self) -> crate::Result; +} /// The webview builder. -pub trait WebviewBuilder: Sized { +pub trait WebviewBuilderExt: Sized { /// The webview object that this builder creates. - type WebviewObject: Webview; + type Webview; - /// Initializes a new instance of the builder. + /// Initializes a new webview builder. fn new() -> Self; - /// Sets the debug flag. - fn debug(self, debug: bool) -> Self; - /// Sets the window title. - fn title(self, title: &str) -> Self; - /// Sets the initial url. - fn url(self, url: &str) -> Self; + + /// Sets the webview url. + fn url(self, url: String) -> Self; + /// Sets the init script. - fn init(self, init: &str) -> Self; - /// Sets the window width. - fn width(self, width: usize) -> Self; - /// Sets the window height. - fn height(self, height: usize) -> Self; - /// Whether the window is resizable or not. - fn resizable(self, resizable: SizeHint) -> Self; + fn initialization_script(self, init: &str) -> Self; + /// Builds the webview instance. - fn finish(self) -> Self::WebviewObject; + fn finish(self) -> crate::Result; } -/// Webview core API. -pub trait Webview: Clone + Send + Sync + Sized { - /// The builder type. - type Builder: WebviewBuilder; - - /// Returns the static plugin collection. - fn plugin_store() -> &'static PluginStore; +/// Binds the given callback to a global variable on the window object. +pub struct Callback { + /// Function name to bind. + pub name: String, + /// Function callback handler. + pub function: Box) -> i32 + Send>, +} - /// Adds an init JS code. - fn init(&mut self, js: &str); +/// Webview dispatcher. A thread-safe handle to the webview API. +pub trait ApplicationDispatcherExt: Clone + Send + Sync + Sized { + /// Eval a JS string on the current webview. + fn eval(&mut self, js: &str); + /// Eval a JS string on the webview associated with the given window. + fn eval_on_window(&mut self, window_id: &str, js: &str); + /// Sends a event to the webview. + fn send_event(&self, event: Event); +} - /// Sets the window title. - fn set_title(&mut self, title: &str); +/// The application interface. +/// Manages windows and webviews. +pub trait ApplicationExt: Sized { + /// The webview builder. + type WebviewBuilder: WebviewBuilderExt; + /// The window builder. + type WindowBuilder: WindowBuilderExt; + /// The window type. + type Window; + /// The message dispatcher. + type Dispatcher: ApplicationDispatcherExt; - /// Sets the window size. - fn set_size(&mut self, width: i32, height: i32, hint: SizeHint); + /// Returns the static plugin collection. + fn plugin_store() -> &'static PluginStore; - /// terminate the webview. - fn terminate(&mut self); + /// Creates a new application. + fn new() -> crate::Result; - /// eval a string as JS code. - fn eval(&mut self, js: &str); + /// Gets the message dispatcher for the given window. + fn dispatcher(&self, window: &Self::Window) -> Self::Dispatcher; - /// Dispatches a closure to run on the main thread. - fn dispatch(&mut self, f: F) - where - F: FnOnce(&mut Self) + Send + 'static; + /// Creates a new window. + fn create_window(&self, window_builder: Self::WindowBuilder) -> crate::Result; - /// Binds a new API on the webview. - fn bind(&mut self, name: &str, f: F) - where - F: FnMut(&str, &str); + /// Creates a new webview. + fn create_webview( + &mut self, + webview_builder: Self::WebviewBuilder, + window: Self::Window, + callbacks: Vec>, + ) -> crate::Result<()>; - /// Run the webview event loop. - fn run(&mut self); + /// Run the application. + fn run(self); } diff --git a/tauri/src/webview/official.rs b/tauri/src/webview/official.rs deleted file mode 100644 index 758d37ed67b..00000000000 --- a/tauri/src/webview/official.rs +++ /dev/null @@ -1,143 +0,0 @@ -use super::{PluginStore, SizeHint, Webview, WebviewBuilder}; -use once_cell::sync::Lazy; - -#[derive(Default)] -pub struct WebviewOfficialBuilder { - title: Option, - url: Option, - init: Option, - eval: Option, - size: (usize, usize, SizeHint), - debug: bool, -} - -impl WebviewBuilder for WebviewOfficialBuilder { - type WebviewObject = webview_official::Webview; - - fn new() -> Self { - WebviewOfficialBuilder::default() - } - - fn debug(mut self, debug: bool) -> Self { - self.debug = debug; - self - } - - fn title(mut self, title: &str) -> Self { - self.title = Some(title.to_string()); - self - } - - fn url(mut self, url: &str) -> Self { - self.url = Some(url.to_string()); - self - } - - fn init(mut self, init: &str) -> Self { - self.init = Some(init.to_string()); - self - } - - fn width(mut self, width: usize) -> Self { - self.size.0 = width; - self - } - - fn height(mut self, height: usize) -> Self { - self.size.1 = height; - self - } - - fn resizable(mut self, hint: SizeHint) -> Self { - self.size.2 = hint; - self - } - - fn finish(self) -> Self::WebviewObject { - let mut w = webview_official::Webview::create(self.debug, None); - if let Some(title) = self.title { - w.set_title(&title); - } - - if let Some(init) = self.init { - w.init(&init); - } - - if let Some(url) = self.url { - w.navigate(&url); - } - - if let Some(eval) = self.eval { - w.eval(&eval); - } - - w.set_size( - self.size.0 as i32, - self.size.1 as i32, - match self.size.2 { - SizeHint::NONE => webview_official::SizeHint::NONE, - SizeHint::MIN => webview_official::SizeHint::MIN, - SizeHint::MAX => webview_official::SizeHint::MAX, - SizeHint::FIXED => webview_official::SizeHint::FIXED, - }, - ); - - w - } -} - -impl Webview for webview_official::Webview { - type Builder = WebviewOfficialBuilder; - - fn plugin_store() -> &'static PluginStore { - static PLUGINS: Lazy> = Lazy::new(Default::default); - &PLUGINS - } - - fn init(&mut self, js: &str) { - self.init(js); - } - - fn set_title(&mut self, title: &str) { - self.set_title(title); - } - - fn set_size(&mut self, width: i32, height: i32, hint: SizeHint) { - self.set_size( - width, - height, - match hint { - SizeHint::NONE => webview_official::SizeHint::NONE, - SizeHint::MIN => webview_official::SizeHint::MIN, - SizeHint::MAX => webview_official::SizeHint::MAX, - SizeHint::FIXED => webview_official::SizeHint::FIXED, - }, - ); - } - - fn terminate(&mut self) { - self.terminate(); - } - - fn eval(&mut self, js: &str) { - self.eval(js); - } - - fn dispatch(&mut self, f: F) - where - F: FnOnce(&mut Self) + Send + 'static, - { - self.dispatch(f); - } - - fn bind(&mut self, name: &str, f: F) - where - F: FnMut(&str, &str), - { - self.bind(name, f); - } - - fn run(&mut self) { - self.run(); - } -} diff --git a/tauri/src/webview/wry.rs b/tauri/src/webview/wry.rs new file mode 100644 index 00000000000..79990c0bf3f --- /dev/null +++ b/tauri/src/webview/wry.rs @@ -0,0 +1,225 @@ +use super::{ + ApplicationDispatcherExt, ApplicationExt, Callback, Event, WebviewBuilderExt, WindowBuilderExt, +}; + +use wry::{ApplicationDispatcher, ApplicationExt as _, WindowExt}; + +use once_cell::sync::Lazy; + +use crate::plugin::PluginStore; + +use std::{ + collections::HashMap, + sync::{Arc, Mutex}, +}; + +impl WindowBuilderExt for wry::AppWindowAttributes { + type Window = Self; + + fn new() -> Self { + Default::default() + } + + fn resizable(mut self, resizable: bool) -> Self { + self.resizable = resizable; + self + } + + fn title(mut self, title: String) -> Self { + self.title = title; + self + } + + fn maximized(mut self, maximized: bool) -> Self { + self.maximized = maximized; + self + } + + fn visible(mut self, visible: bool) -> Self { + self.visible = visible; + self + } + + fn transparent(mut self, transparent: bool) -> Self { + self.transparent = transparent; + self + } + + fn decorations(mut self, decorations: bool) -> Self { + self.decorations = decorations; + self + } + + /// Whether the window should always be on top of other windows. + fn always_on_top(mut self, always_on_top: bool) -> Self { + self.always_on_top = always_on_top; + self + } + + /// build the window. + fn finish(self) -> crate::Result { + Ok(self) + } +} + +/// The webview builder. +impl WebviewBuilderExt for wry::WebViewAttributes { + /// The webview object that this builder creates. + type Webview = Self; + + fn new() -> Self { + Default::default() + } + + fn url(mut self, url: String) -> Self { + self.url.replace(url); + self + } + + fn initialization_script(mut self, init: &str) -> Self { + self.initialization_script.push(init.to_string()); + self + } + + fn finish(self) -> crate::Result { + Ok(self) + } +} + +#[derive(Clone)] +pub struct WryDispatcher { + inner: Arc>>, + current_window: wry::WindowId, + windows: Arc>>, +} + +impl ApplicationDispatcherExt for WryDispatcher { + fn eval(&mut self, js: &str) { + #[cfg(target_os = "linux")] + let window_id = self.current_window; + #[cfg(not(target_os = "linux"))] + let window_id = self.current_window.clone(); + + self + .inner + .lock() + .unwrap() + .dispatch_message(wry::Message::Script(window_id, js.to_string())) + .unwrap(); + } + + fn eval_on_window(&mut self, window_id: &str, js: &str) { + if let Some(window_id) = self.windows.lock().unwrap().get(window_id) { + #[cfg(target_os = "linux")] + let window_id = *window_id; + #[cfg(not(target_os = "linux"))] + let window_id = window_id.clone(); + self + .inner + .lock() + .unwrap() + .dispatch_message(wry::Message::Script(window_id, js.to_string())) + .unwrap(); + } + } + + fn send_event(&self, event: Event) { + self + .inner + .lock() + .unwrap() + .dispatch_message(wry::Message::Custom(event)) + .unwrap(); + } +} + +/// A wrapper around the wry Application interface. +pub struct WryApplication { + inner: wry::Application, + windows: Arc>>, + dispatcher_handle: Arc>>, +} + +impl ApplicationExt for WryApplication { + type WebviewBuilder = wry::WebViewAttributes; + type WindowBuilder = wry::AppWindowAttributes; + type Window = wry::Window; + type Dispatcher = WryDispatcher; + + fn plugin_store() -> &'static PluginStore { + static PLUGINS: Lazy> = Lazy::new(Default::default); + &PLUGINS + } + + fn new() -> crate::Result { + let app = + wry::Application::new().map_err(|_| anyhow::anyhow!("failed to create application"))?; + let dispatcher = app.dispatcher(); + let windows = Arc::new(Mutex::new(HashMap::new())); + + Ok(Self { + inner: app, + windows, + dispatcher_handle: Arc::new(Mutex::new(dispatcher)), + }) + } + + fn dispatcher(&self, window: &Self::Window) -> Self::Dispatcher { + WryDispatcher { + inner: self.dispatcher_handle.clone(), + windows: self.windows.clone(), + current_window: window.id(), + } + } + + fn create_window(&self, window_builder: Self::WindowBuilder) -> crate::Result { + let window = self + .inner + .create_window(window_builder.finish()?) + .map_err(|_| anyhow::anyhow!("failed to create window"))?; + Ok(window) + } + + fn create_webview( + &mut self, + webview_builder: Self::WebviewBuilder, + window: Self::Window, + callbacks: Vec>, + ) -> crate::Result<()> { + let mut wry_callbacks = Vec::new(); + for mut callback in callbacks { + let dispatcher_handle = self.dispatcher_handle.clone(); + let windows = self.windows.clone(); + let window_id = window.id(); + + let callback = wry::Callback { + name: callback.name.to_string(), + function: Box::new(move |_, seq, req| { + (callback.function)( + &WryDispatcher { + inner: dispatcher_handle.clone(), + windows: windows.clone(), + current_window: window_id, + }, + seq, + req, + ) + }), + }; + wry_callbacks.push(callback); + } + + self + .inner + .create_webview(window, webview_builder.finish()?, Some(wry_callbacks)) + .map_err(|_| anyhow::anyhow!("failed to create webview"))?; + Ok(()) + } + + fn run(mut self) { + self.inner.set_message_handler(|message| match message { + Event::Run(task) => task(), + }); + wry::Application::run(self.inner) + } +}