diff --git a/Cargo.lock b/Cargo.lock index 9aeed593..ef47cd8a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -587,7 +587,7 @@ dependencies = [ "sqlx", "syntect", "tauri", - "tauri-build", + "tauri-build 2.5.3 (registry+https://github.com/rust-lang/crates.io-index)", "tauri-plugin-deep-link", "tauri-plugin-dialog", "tauri-plugin-fs", @@ -954,7 +954,7 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "340d2f0bdb2a43c1d3cd40513185b2bd7def0aa1052f956455114bc98f82dcf2" dependencies = [ - "objc2 0.6.1", + "objc2 0.6.3", ] [[package]] @@ -1125,6 +1125,15 @@ dependencies = [ "serde", ] +[[package]] +name = "bzip2" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3a53fac24f34a81bc9954b5d6cfce0c21e18ec6959f44f56e8e90e4bb7c346c" +dependencies = [ + "libbz2-rs-sys", +] + [[package]] name = "cairo-rs" version = "0.18.5" @@ -1152,11 +1161,11 @@ dependencies = [ [[package]] name = "camino" -version = "1.1.9" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b96ec4966b5813e2c0507c1f86115c8c5abaadc3980879c3424042a02fd1ad3" +checksum = "e629a66d692cb9ff1a1c664e41771b3dcaf961985a9774c0eb0bd1b51cf60a48" dependencies = [ - "serde", + "serde_core", ] [[package]] @@ -1168,6 +1177,16 @@ dependencies = [ "serde", ] +[[package]] +name = "cargo-platform" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87a0c0e6148f11f01f32650a2ea02d532b2ad4e81d8bd41e6e565b5adc5e6082" +dependencies = [ + "serde", + "serde_core", +] + [[package]] name = "cargo_metadata" version = "0.19.2" @@ -1175,7 +1194,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd5eb614ed4c27c5d706420e4320fbe3216ab31fa1c33cd8246ac36dae4479ba" dependencies = [ "camino", - "cargo-platform", + "cargo-platform 0.1.9", + "semver", + "serde", + "serde_json", + "thiserror 2.0.12", +] + +[[package]] +name = "cargo_metadata" +version = "0.23.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef987d17b0a113becdd19d3d0022d04d7ef41f9efe4f3fb63ac44ba61df3ade9" +dependencies = [ + "camino", + "cargo-platform 0.3.2", "semver", "serde", "serde_json", @@ -1222,6 +1255,38 @@ dependencies = [ "shlex", ] +[[package]] +name = "cef" +version = "143.6.0+143.0.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "340906790de24e79048b8ba1a81af4ef1208d8b85315d1e54ec80f05bfeae8ec" +dependencies = [ + "anyhow", + "cargo_metadata 0.23.1", + "cef-dll-sys", + "clap", + "libloading 0.9.0", + "objc2 0.6.3", + "plist", + "semver", + "serde", + "serde_json", + "thiserror 2.0.12", + "windows-sys 0.61.1", +] + +[[package]] +name = "cef-dll-sys" +version = "143.6.0+143.0.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdd94add6fe5f336163a6b3925985283c573a3fe33d99d76acae0a3acc10d6c3" +dependencies = [ + "anyhow", + "cmake", + "download-cef", + "serde_json", +] + [[package]] name = "cesu8" version = "1.1.0" @@ -1603,6 +1668,24 @@ dependencies = [ "url", ] +[[package]] +name = "cookie_store" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fc4bff745c9b4c7fb1e97b25d13153da2bc7796260141df62378998d070207f" +dependencies = [ + "cookie", + "document-features", + "idna", + "indexmap 2.12.1", + "log", + "serde", + "serde_derive", + "serde_json", + "time", + "url", +] + [[package]] name = "core-foundation" version = "0.9.4" @@ -2234,7 +2317,7 @@ dependencies = [ "bitflags 2.9.1", "block2 0.6.1", "libc", - "objc2 0.6.1", + "objc2 0.6.3", ] [[package]] @@ -2244,7 +2327,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89a09f22a6c6069a18470eb92d2298acf25463f14256d24778e1230d789a2aec" dependencies = [ "bitflags 2.9.1", - "objc2 0.6.1", + "objc2 0.6.3", ] [[package]] @@ -2326,6 +2409,25 @@ version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "117240f60069e65410b3ae1bb213295bd828f707b5bec6596a1afc8793ce0cbc" +[[package]] +name = "download-cef" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6002a6b95f9f3bbe5693ac02a03221a8e3af6c9f5f4539f5734a8d6cde1a3616" +dependencies = [ + "bzip2", + "clap", + "indicatif", + "regex 1.12.2", + "semver", + "serde", + "serde_json", + "sha1_smol", + "tar", + "thiserror 2.0.12", + "ureq", +] + [[package]] name = "dpi" version = "0.1.2" @@ -3740,13 +3842,16 @@ version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf9f1e950e0d9d1d3c47184416723cf29c0d1f93bd8cccf37e4beb6b44f31710" dependencies = [ + "base64 0.22.1", "bytes", "futures-channel", "futures-util", "http 1.3.1", "http-body 1.0.1", "hyper 1.6.0", + "ipnet", "libc", + "percent-encoding", "pin-project-lite", "socket2 0.5.9", "tokio", @@ -3766,7 +3871,7 @@ dependencies = [ "js-sys", "log", "wasm-bindgen", - "windows-core 0.61.2", + "windows-core 0.58.0", ] [[package]] @@ -3780,9 +3885,9 @@ dependencies = [ [[package]] name = "ico" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc50b891e4acf8fe0e71ef88ec43ad82ee07b3810ad09de10f1d01f072ed4b98" +checksum = "3e795dff5605e0f04bff85ca41b51a96b83e80b281e96231bcaaf1ac35103371" dependencies = [ "byteorder", "png", @@ -4071,6 +4176,16 @@ version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" +[[package]] +name = "iri-string" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c91338f0783edbd6195decb37bae672fd3b165faffb89bf7b9e6942f8b1a731a" +dependencies = [ + "memchr", + "serde", +] + [[package]] name = "is-docker" version = "0.2.0" @@ -4388,6 +4503,12 @@ dependencies = [ "once_cell", ] +[[package]] +name = "libbz2-rs-sys" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c4a545a15244c7d945065b5d392b2d2d7f21526fba56ce51467b06ed445e8f7" + [[package]] name = "libc" version = "0.2.172" @@ -4423,6 +4544,16 @@ dependencies = [ "windows-targets 0.53.3", ] +[[package]] +name = "libloading" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "754ca22de805bb5744484a5b151a9e1a8e837d5dc232c2d7d8c2e3492edc8b60" +dependencies = [ + "cfg-if", + "windows-link 0.2.0", +] + [[package]] name = "libm" version = "0.2.15" @@ -4572,7 +4703,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ee70bb2bba058d58e252d2944582d634fc884fc9c489a966d428dedcf653e97" dependencies = [ "cc", - "objc2 0.6.1", + "objc2 0.6.3", "objc2-foundation 0.3.1", "time", ] @@ -4744,7 +4875,7 @@ dependencies = [ "dpi", "gtk", "keyboard-types", - "objc2 0.6.1", + "objc2 0.6.3", "objc2-app-kit", "objc2-core-foundation", "objc2-foundation 0.3.1", @@ -5144,9 +5275,9 @@ dependencies = [ [[package]] name = "objc2" -version = "0.6.1" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88c6597e14493ab2e44ce58f2fdecf095a51f12ca57bec060a11c57332520551" +checksum = "b7c2599ce0ec54857b29ce62166b0ed9b4f6f1a70ccc9a71165b6154caca8c05" dependencies = [ "objc2-encode", "objc2-exception-helper", @@ -5161,7 +5292,7 @@ dependencies = [ "bitflags 2.9.1", "block2 0.6.1", "libc", - "objc2 0.6.1", + "objc2 0.6.3", "objc2-cloud-kit", "objc2-core-data", "objc2-core-foundation", @@ -5178,7 +5309,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17614fdcd9b411e6ff1117dfb1d0150f908ba83a7df81b1f118005fe0a8ea15d" dependencies = [ "bitflags 2.9.1", - "objc2 0.6.1", + "objc2 0.6.3", "objc2-foundation 0.3.1", ] @@ -5189,7 +5320,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "291fbbf7d29287518e8686417cf7239c74700fd4b607623140a7d4a3c834329d" dependencies = [ "bitflags 2.9.1", - "objc2 0.6.1", + "objc2 0.6.3", "objc2-foundation 0.3.1", ] @@ -5201,7 +5332,7 @@ checksum = "1c10c2894a6fed806ade6027bcd50662746363a9589d3ec9d9bef30a4e4bc166" dependencies = [ "bitflags 2.9.1", "dispatch2 0.3.0", - "objc2 0.6.1", + "objc2 0.6.3", ] [[package]] @@ -5212,7 +5343,7 @@ checksum = "989c6c68c13021b5c2d6b71456ebb0f9dc78d752e86a98da7c716f4f9470f5a4" dependencies = [ "bitflags 2.9.1", "dispatch2 0.3.0", - "objc2 0.6.1", + "objc2 0.6.3", "objc2-core-foundation", "objc2-io-surface", ] @@ -5223,7 +5354,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "79b3dc0cc4386b6ccf21c157591b34a7f44c8e75b064f85502901ab2188c007e" dependencies = [ - "objc2 0.6.1", + "objc2 0.6.3", "objc2-foundation 0.3.1", ] @@ -5263,7 +5394,7 @@ dependencies = [ "bitflags 2.9.1", "block2 0.6.1", "libc", - "objc2 0.6.1", + "objc2 0.6.3", "objc2-core-foundation", ] @@ -5274,7 +5405,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7282e9ac92529fa3457ce90ebb15f4ecbc383e8338060960760fa2cf75420c3c" dependencies = [ "bitflags 2.9.1", - "objc2 0.6.1", + "objc2 0.6.3", "objc2-core-foundation", ] @@ -5284,7 +5415,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9052cb1bb50a4c161d934befcf879526fb87ae9a68858f241e693ca46225cf5a" dependencies = [ - "objc2 0.6.1", + "objc2 0.6.3", "objc2-core-foundation", ] @@ -5307,7 +5438,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26bb88504b5a050dbba515d2414607bf5e57dd56b107bc5f0351197a3e7bdc5d" dependencies = [ "bitflags 2.9.1", - "objc2 0.6.1", + "objc2 0.6.3", "objc2-app-kit", "objc2-foundation 0.3.1", ] @@ -5332,7 +5463,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90ffb6a0cd5f182dc964334388560b12a57f7b74b3e2dec5e2722aa2dfb2ccd5" dependencies = [ "bitflags 2.9.1", - "objc2 0.6.1", + "objc2 0.6.3", "objc2-foundation 0.3.1", ] @@ -5343,7 +5474,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1f8e0ef3ab66b08c42644dcb34dba6ec0a574bbd8adbb8bdbdc7a2779731a44" dependencies = [ "bitflags 2.9.1", - "objc2 0.6.1", + "objc2 0.6.3", "objc2-core-foundation", ] @@ -5354,7 +5485,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25b1312ad7bc8a0e92adae17aa10f90aae1fb618832f9b993b022b591027daed" dependencies = [ "bitflags 2.9.1", - "objc2 0.6.1", + "objc2 0.6.3", "objc2-core-foundation", "objc2-foundation 0.3.1", ] @@ -5367,7 +5498,7 @@ checksum = "91672909de8b1ce1c2252e95bbee8c1649c9ad9d14b9248b3d7b4c47903c47ad" dependencies = [ "bitflags 2.9.1", "block2 0.6.1", - "objc2 0.6.1", + "objc2 0.6.3", "objc2-app-kit", "objc2-core-foundation", "objc2-foundation 0.3.1", @@ -5568,7 +5699,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "732c71caeaa72c065bb69d7ea08717bd3f4863a4f451402fc9513e29dbd5261b" dependencies = [ - "objc2 0.6.1", + "objc2 0.6.3", "objc2-foundation 0.3.1", "objc2-osa-kit", "serde", @@ -6725,7 +6856,7 @@ dependencies = [ "base64 0.22.1", "bytes", "cookie", - "cookie_store", + "cookie_store 0.21.1", "encoding_rs", "futures-core", "futures-util", @@ -6769,6 +6900,40 @@ dependencies = [ "windows-registry 0.4.0", ] +[[package]] +name = "reqwest" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04e9018c9d814e5f30cc16a0f03271aeab3571e609612d9fe78c1aa8d11c2f62" +dependencies = [ + "base64 0.22.1", + "bytes", + "futures-core", + "futures-util", + "http 1.3.1", + "http-body 1.0.1", + "http-body-util", + "hyper 1.6.0", + "hyper-util", + "js-sys", + "log", + "percent-encoding", + "pin-project-lite", + "serde", + "serde_json", + "sync_wrapper 1.0.2", + "tokio", + "tokio-util", + "tower", + "tower-http", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-streams", + "web-sys", +] + [[package]] name = "rfc6979" version = "0.4.0" @@ -6793,7 +6958,7 @@ dependencies = [ "gtk-sys", "js-sys", "log", - "objc2 0.6.1", + "objc2 0.6.3", "objc2-app-kit", "objc2-core-foundation", "objc2-foundation 0.3.1", @@ -7720,6 +7885,12 @@ dependencies = [ "digest", ] +[[package]] +name = "sha1_smol" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbfa15b3dddfee50a0fff136974b3e1bde555604ba463834a7eb7deb6417705d" + [[package]] name = "sha2" version = "0.10.9" @@ -7772,7 +7943,7 @@ version = "3.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b1fdf65dd6331831494dd616b30351c38e96e45921a27745cf98490458b90bb" dependencies = [ - "dirs 6.0.0", + "dirs 5.0.1", ] [[package]] @@ -7905,6 +8076,17 @@ dependencies = [ "windows-sys 0.59.0", ] +[[package]] +name = "socks" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0c3dbbd9ae980613c6dd8e28a9407b50509d3803b57624d5dfe8315218cd58b" +dependencies = [ + "byteorder", + "libc", + "winapi", +] + [[package]] name = "softbuffer" version = "0.4.6" @@ -8546,7 +8728,7 @@ dependencies = [ "ndk 0.9.0", "ndk-context", "ndk-sys 0.6.0+11769913", - "objc2 0.6.1", + "objc2 0.6.3", "objc2-app-kit", "objc2-foundation 0.3.1", "once_cell", @@ -8598,9 +8780,8 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] name = "tauri" -version = "2.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15524fc7959bfcaa051ba6d0b3fb1ef18e978de2176c7c6acb977f7fd14d35c7" +version = "2.9.5" +source = "git+https://github.com/tauri-apps/tauri?branch=feat%2Fcef#9e04e45d85e15adfdbca75691f5b4707a591a938" dependencies = [ "anyhow", "bytes", @@ -8618,7 +8799,7 @@ dependencies = [ "log", "mime", "muda", - "objc2 0.6.1", + "objc2 0.6.3", "objc2-app-kit", "objc2-foundation 0.3.1", "objc2-ui-kit", @@ -8626,15 +8807,16 @@ dependencies = [ "percent-encoding", "plist", "raw-window-handle", - "reqwest 0.12.15", + "reqwest 0.13.1", "serde", "serde_json", "serde_repr", "serialize-to-javascript", "swift-rs", - "tauri-build", + "tauri-build 2.5.3 (git+https://github.com/tauri-apps/tauri?branch=feat%2Fcef)", "tauri-macros", "tauri-runtime", + "tauri-runtime-cef", "tauri-runtime-wry", "tauri-utils", "thiserror 2.0.12", @@ -8669,11 +8851,31 @@ dependencies = [ "walkdir", ] +[[package]] +name = "tauri-build" +version = "2.5.3" +source = "git+https://github.com/tauri-apps/tauri?branch=feat%2Fcef#9e04e45d85e15adfdbca75691f5b4707a591a938" +dependencies = [ + "anyhow", + "cargo_toml", + "dirs 6.0.0", + "glob", + "heck 0.5.0", + "json-patch", + "schemars", + "semver", + "serde", + "serde_json", + "tauri-utils", + "tauri-winres", + "toml 0.9.8", + "walkdir", +] + [[package]] name = "tauri-codegen" version = "2.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fa9844cefcf99554a16e0a278156ae73b0d8680bbc0e2ad1e4287aadd8489cf" +source = "git+https://github.com/tauri-apps/tauri?branch=feat%2Fcef#9e04e45d85e15adfdbca75691f5b4707a591a938" dependencies = [ "base64 0.22.1", "brotli", @@ -8699,8 +8901,7 @@ dependencies = [ [[package]] name = "tauri-macros" version = "2.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3764a12f886d8245e66b7ee9b43ccc47883399be2019a61d80cf0f4117446fde" +source = "git+https://github.com/tauri-apps/tauri?branch=feat%2Fcef#9e04e45d85e15adfdbca75691f5b4707a591a938" dependencies = [ "heck 0.5.0", "proc-macro2", @@ -8795,7 +8996,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c00685aceab12643cf024f712ab0448ba8fcadf86f2391d49d2e5aa732aacc70" dependencies = [ "bytes", - "cookie_store", + "cookie_store 0.21.1", "data-url", "http 1.3.1", "regex 1.12.2", @@ -8822,7 +9023,7 @@ dependencies = [ "byte-unit", "fern", "log", - "objc2 0.6.1", + "objc2 0.6.3", "objc2-foundation 0.3.1", "serde", "serde_json", @@ -8994,15 +9195,14 @@ dependencies = [ [[package]] name = "tauri-runtime" version = "2.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f766fe9f3d1efc4b59b17e7a891ad5ed195fa8d23582abb02e6c9a01137892" +source = "git+https://github.com/tauri-apps/tauri?branch=feat%2Fcef#9e04e45d85e15adfdbca75691f5b4707a591a938" dependencies = [ "cookie", "dpi", "gtk", "http 1.3.1", "jni", - "objc2 0.6.1", + "objc2 0.6.3", "objc2-ui-kit", "objc2-web-kit", "raw-window-handle", @@ -9016,17 +9216,41 @@ dependencies = [ "windows 0.61.1", ] +[[package]] +name = "tauri-runtime-cef" +version = "0.1.0" +source = "git+https://github.com/tauri-apps/tauri?branch=feat%2Fcef#9e04e45d85e15adfdbca75691f5b4707a591a938" +dependencies = [ + "base64 0.22.1", + "cef", + "dirs 6.0.0", + "gtk", + "html5ever", + "http 1.3.1", + "kuchikiki", + "objc2 0.6.3", + "objc2-app-kit", + "objc2-foundation 0.3.1", + "raw-window-handle", + "serde", + "serde_json", + "sha2", + "tauri-runtime", + "tauri-utils", + "url", + "windows 0.61.1", +] + [[package]] name = "tauri-runtime-wry" -version = "2.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7950f3bde6bcca6655bc5e76d3d6ec587ceb81032851ab4ddbe1f508bdea2729" +version = "2.9.3" +source = "git+https://github.com/tauri-apps/tauri?branch=feat%2Fcef#9e04e45d85e15adfdbca75691f5b4707a591a938" dependencies = [ "gtk", "http 1.3.1", "jni", "log", - "objc2 0.6.1", + "objc2 0.6.3", "objc2-app-kit", "objc2-foundation 0.3.1", "once_cell", @@ -9046,12 +9270,11 @@ dependencies = [ [[package]] name = "tauri-utils" version = "2.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76a423c51176eb3616ee9b516a9fa67fed5f0e78baaba680e44eb5dd2cc37490" +source = "git+https://github.com/tauri-apps/tauri?branch=feat%2Fcef#9e04e45d85e15adfdbca75691f5b4707a591a938" dependencies = [ "anyhow", "brotli", - "cargo_metadata", + "cargo_metadata 0.19.2", "ctor", "dunce", "glob", @@ -9515,6 +9738,24 @@ dependencies = [ "tower-service", ] +[[package]] +name = "tower-http" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4e6559d53cc268e5031cd8429d05415bc4cb4aefc4aa5d6cc35fbf5b924a1f8" +dependencies = [ + "bitflags 2.9.1", + "bytes", + "futures-util", + "http 1.3.1", + "http-body 1.0.1", + "iri-string", + "pin-project-lite", + "tower", + "tower-layer", + "tower-service", +] + [[package]] name = "tower-layer" version = "0.3.3" @@ -9617,7 +9858,7 @@ dependencies = [ "dirs 6.0.0", "libappindicator", "muda", - "objc2 0.6.1", + "objc2 0.6.3", "objc2-app-kit", "objc2-core-foundation", "objc2-core-graphics", @@ -9902,6 +10143,39 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" +[[package]] +name = "ureq" +version = "3.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d39cb1dbab692d82a977c0392ffac19e188bd9186a9f32806f0aaa859d75585a" +dependencies = [ + "base64 0.22.1", + "cookie_store 0.22.0", + "flate2", + "log", + "percent-encoding", + "rustls 0.23.27", + "rustls-pki-types", + "serde", + "serde_json", + "socks", + "ureq-proto", + "utf-8", + "webpki-roots 1.0.0", +] + +[[package]] +name = "ureq-proto" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d81f9efa9df032be5934a46a068815a10a042b494b6a58cb0a1a97bb5467ed6f" +dependencies = [ + "base64 0.22.1", + "http 1.3.1", + "httparse", + "log", +] + [[package]] name = "url" version = "2.5.4" @@ -10384,7 +10658,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9bec5a31f3f9362f2258fd0e9c9dd61a9ca432e7306cc78c444258f0dce9a9c" dependencies = [ - "objc2 0.6.1", + "objc2 0.6.3", "objc2-app-kit", "objc2-core-foundation", "objc2-foundation 0.3.1", @@ -11096,7 +11370,7 @@ dependencies = [ "kuchikiki", "libc", "ndk 0.9.0", - "objc2 0.6.1", + "objc2 0.6.3", "objc2-app-kit", "objc2-core-foundation", "objc2-foundation 0.3.1", diff --git a/Cargo.toml b/Cargo.toml index 4c756773..5f1d32eb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -62,3 +62,8 @@ downcast-rs = "2.0.2" dyn-clone = "1.0.20" regex = "1.12.2" shellexpand = "3.1.0" + +[patch.crates-io] +tauri = { git = "https://github.com/tauri-apps/tauri", branch = "feat/cef" } +tauri-runtime = { git = "https://github.com/tauri-apps/tauri", branch = "feat/cef" } +tauri-utils = { git = "https://github.com/tauri-apps/tauri", branch = "feat/cef" } diff --git a/backend/Cargo.toml b/backend/Cargo.toml index cbb3e6c7..50e4259e 100644 --- a/backend/Cargo.toml +++ b/backend/Cargo.toml @@ -3,7 +3,7 @@ name = "atuin-desktop" description = "Atuin Desktop" publish = false workspace = ".." -version = "0.2.11" # duplicated here as CN CLI can't handle workspace version +version = "0.2.11" # duplicated here as CN CLI can't handle workspace version edition.workspace = true [lints.clippy] @@ -36,7 +36,12 @@ url = { workspace = true } sha2 = "0.10" bigdecimal = { workspace = true } -tauri = { version = "2.9.4", features = ["tray-icon", "devtools"] } +tauri = { version = "2.9.4", default-features = false, features = [ + "tray-icon", + "devtools", + "compression", + "common-controls-v6", +] } tauri-plugin-http = { version = "2.5.4", features = ["native-tls"] } tauri-plugin-deep-link = "2.4.5" tauri-plugin-single-instance = { version = "2.3.6", features = ["deep-link"] } @@ -83,6 +88,9 @@ dirs = { workspace = true } tempfile = { workspace = true } config = "0.15.19" +[dev-dependencies] +tauri = { version = "2.9.4", features = ["test"] } + [dependencies.tauri-plugin-sql] features = ["sqlite"] # or "postgres", or "mysql" version = "2.3.1" @@ -94,6 +102,9 @@ cocoa = "0.26" tauri-plugin-updater = "2.9.0" [features] +default = ["wry"] # this feature is used for production builds or when `devPath` points to the filesystem # DO NOT REMOVE!! custom-protocol = ["tauri/custom-protocol"] +wry = ["tauri/wry"] +cef = ["tauri/cef"] diff --git a/backend/src/commands/audio.rs b/backend/src/commands/audio.rs index 0adf0492..f188ad4a 100644 --- a/backend/src/commands/audio.rs +++ b/backend/src/commands/audio.rs @@ -2,7 +2,7 @@ use rodio::{Decoder, OutputStream, Sink}; use serde::Serialize; use std::fs::File; use std::io::BufReader; -use tauri::{path::BaseDirectory, AppHandle, Manager}; +use tauri::{path::BaseDirectory, AppHandle, Manager, Runtime}; #[derive(Debug, Serialize)] pub struct SoundInfo { @@ -27,7 +27,7 @@ fn to_display_name(stem: &str) -> String { } #[tauri::command] -pub async fn list_sounds(app: AppHandle) -> Result, String> { +pub async fn list_sounds(app: AppHandle) -> Result, String> { let sounds_path = app .path() .resolve("resources/sounds", BaseDirectory::Resource) @@ -62,7 +62,7 @@ pub async fn list_sounds(app: AppHandle) -> Result, String> { } #[tauri::command] -pub async fn play_sound(app: AppHandle, sound_id: String, volume: f32) -> Result<(), String> { +pub async fn play_sound(app: AppHandle, sound_id: String, volume: f32) -> Result<(), String> { log::info!( "play_sound called with sound_id={}, volume={}", sound_id, diff --git a/backend/src/commands/blocks.rs b/backend/src/commands/blocks.rs index 5014dbb8..3c35a891 100644 --- a/backend/src/commands/blocks.rs +++ b/backend/src/commands/blocks.rs @@ -10,7 +10,7 @@ use atuin_desktop_runtime::pty::PtyStoreHandle; use atuin_desktop_runtime::ssh::SshPoolHandle; use serde_json::Value; use tauri::Manager; -use tauri::{ipc::Channel, AppHandle, State}; +use tauri::{ipc::Channel, AppHandle, Runtime, State}; use tokio::sync::oneshot; use uuid::Uuid; @@ -51,18 +51,18 @@ impl MessageChannel for DocumentBridgeChannel { } #[derive(Clone)] -struct KvBlockLocalValueProvider { - app_handle: AppHandle, +struct KvBlockLocalValueProvider { + app_handle: AppHandle, } -impl KvBlockLocalValueProvider { - pub fn new(app_handle: AppHandle) -> Self { +impl KvBlockLocalValueProvider { + pub fn new(app_handle: AppHandle) -> Self { Self { app_handle } } } #[async_trait] -impl LocalValueProvider for KvBlockLocalValueProvider { +impl LocalValueProvider for KvBlockLocalValueProvider { async fn get_block_local_value( &self, block_id: Uuid, @@ -283,8 +283,8 @@ pub async fn cancel_block_execution( } #[tauri::command] -pub async fn open_document( - app: AppHandle, +pub async fn open_document( + app: AppHandle, state: State<'_, AtuinState>, document_id: String, document: Vec, @@ -493,8 +493,8 @@ pub async fn remove_stored_context_for_document( } #[tauri::command] -pub async fn start_serial_execution( - app: AppHandle, +pub async fn start_serial_execution( + app: AppHandle, state: State<'_, AtuinState>, document_id: String, from_block: Option, diff --git a/backend/src/commands/events.rs b/backend/src/commands/events.rs index 9091618d..9607c404 100644 --- a/backend/src/commands/events.rs +++ b/backend/src/commands/events.rs @@ -1,5 +1,5 @@ use async_trait::async_trait; -use tauri::{ipc::Channel, AppHandle, Manager}; +use tauri::{ipc::Channel, AppHandle, Manager, Runtime}; use tokio::sync::mpsc; use crate::state::AtuinState; @@ -28,8 +28,8 @@ impl EventBus for ChannelEventBus { /// Subscribe to the Grand Central event stream #[tauri::command] -pub async fn subscribe_to_events( - app_handle: AppHandle, +pub async fn subscribe_to_events( + app_handle: AppHandle, event_channel: Channel, ) -> Result<(), String> { let state = app_handle diff --git a/backend/src/commands/exec_log.rs b/backend/src/commands/exec_log.rs index 55bc6d40..ea6f8aef 100644 --- a/backend/src/commands/exec_log.rs +++ b/backend/src/commands/exec_log.rs @@ -13,8 +13,8 @@ struct ExecLogCompletedEvent { } #[tauri::command] -pub async fn log_execution( - app: tauri::AppHandle, +pub async fn log_execution( + app: tauri::AppHandle, state: tauri::State<'_, crate::state::AtuinState>, block: Block, start_time: u64, diff --git a/backend/src/commands/pty_store.rs b/backend/src/commands/pty_store.rs index 5c41f960..e2869ddf 100644 --- a/backend/src/commands/pty_store.rs +++ b/backend/src/commands/pty_store.rs @@ -3,8 +3,8 @@ use uuid::Uuid; use crate::{run::pty::remove_pty, state::AtuinState}; #[tauri::command] -pub async fn runbook_kill_all_ptys( - app: tauri::AppHandle, +pub async fn runbook_kill_all_ptys( + app: tauri::AppHandle, state: tauri::State<'_, AtuinState>, runbook: Uuid, ) -> Result<(), String> { diff --git a/backend/src/commands/workspaces.rs b/backend/src/commands/workspaces.rs index 1d85eae2..c0ad3a0a 100644 --- a/backend/src/commands/workspaces.rs +++ b/backend/src/commands/workspaces.rs @@ -1,7 +1,7 @@ use std::path::{Path, PathBuf}; use serde_yaml::Value; -use tauri::{ipc::Channel, path::BaseDirectory, AppHandle, Manager, State}; +use tauri::{ipc::Channel, path::BaseDirectory, AppHandle, Manager, Runtime, State}; use crate::{ state::AtuinState, @@ -14,7 +14,7 @@ use crate::{ }; #[tauri::command] -pub async fn copy_welcome_workspace(app: AppHandle, id: String) -> Result { +pub async fn copy_welcome_workspace(app: AppHandle, id: String) -> Result { let welcome_path = app .path() .resolve("resources/welcome", BaseDirectory::Resource) diff --git a/backend/src/kv.rs b/backend/src/kv.rs index 5601c3c1..369c41dc 100644 --- a/backend/src/kv.rs +++ b/backend/src/kv.rs @@ -1,6 +1,6 @@ use serde::{de::DeserializeOwned, Serialize}; use sqlx::{Row, SqlitePool}; -use tauri::{AppHandle, Manager}; +use tauri::{AppHandle, Manager, Runtime}; pub(crate) async fn get( db: &SqlitePool, @@ -34,7 +34,7 @@ pub(crate) async fn set(db: &SqlitePool, key: &str, value: &T) -> .map_err(|e| e.to_string()) } -pub(crate) async fn open_db(app: &AppHandle) -> eyre::Result { +pub(crate) async fn open_db(app: &AppHandle) -> eyre::Result { let state = app.state::(); state.db_instances.get_pool("kv").await } diff --git a/backend/src/main.rs b/backend/src/main.rs index b6a4f8e8..b954f654 100644 --- a/backend/src/main.rs +++ b/backend/src/main.rs @@ -7,7 +7,7 @@ use std::path::PathBuf; use std::{env, fs}; use tauri::path::BaseDirectory; -use tauri::{http, App, AppHandle, Manager, RunEvent}; +use tauri::{http, App, AppHandle, Manager, RunEvent, Runtime}; use tauri_plugin_log::fern::colors::{Color, ColoredLevelConfig}; use time::format_description::well_known::Rfc3339; @@ -46,6 +46,13 @@ use dotfiles::aliases::aliases; use crate::advanced_settings::AdvancedSettings; use crate::menu::TabItem; +#[cfg(all(not(test), feature = "cef"))] +use tauri::Cef as BrowserEngine; +#[cfg(all(not(test), not(feature = "cef"), feature = "wry"))] +use tauri::Wry as BrowserEngine; +#[cfg(test)] +use tauri::test::MockRuntime as BrowserEngine; + #[derive(Debug, serde::Serialize)] struct HomeInfo { pub record_count: u64, @@ -308,7 +315,7 @@ async fn cli_settings() -> Result { } #[tauri::command] -async fn get_app_version(app: AppHandle) -> Result { +async fn get_app_version(app: AppHandle) -> Result { let version = app.package_info().version.to_string(); Ok(version) } @@ -344,14 +351,14 @@ async fn get_platform_info() -> Result { } #[tauri::command] -async fn update_window_menu_tabs(app: AppHandle, tabs: Vec) -> Result<(), String> { +async fn update_window_menu_tabs(app: AppHandle, tabs: Vec) -> Result<(), String> { let new_menu = menu::menu(&app, &tabs).map_err(|e| e.to_string())?; let _ = app.set_menu(new_menu); Ok(()) } -fn backup_databases(app: &App) -> tauri::Result<()> { +fn backup_databases(app: &App) -> tauri::Result<()> { let version = app.package_info().version.to_string(); // This seems like the wrong directory to use, but it's what the SQL plugin uses so ¯\_(ツ)_/¯ let base_dir = app.path().app_config_dir()?; @@ -383,7 +390,7 @@ fn backup_databases(app: &App) -> tauri::Result<()> { Ok(()) } -fn show_window(app: &AppHandle) { +fn show_window(app: &AppHandle) { let windows = app.webview_windows(); windows @@ -394,7 +401,7 @@ fn show_window(app: &AppHandle) { .expect("Can't Bring Window to Focus"); } -async fn apply_runbooks_migrations(app: &AppHandle) -> eyre::Result<()> { +async fn apply_runbooks_migrations(app: &AppHandle) -> eyre::Result<()> { let state = app.state::(); let pool = state.db_instances.get_pool("runbooks").await?; sqlx::migrate!("./migrations/runbooks").run(&pool).await?; @@ -416,7 +423,7 @@ fn main() { .debug(Color::Blue) .trace(Color::BrightBlack); - let builder = tauri::Builder::default().plugin( + let builder = tauri::Builder::::new().plugin( tauri_plugin_log::Builder::new() .targets([ tauri_plugin_log::Target::new(tauri_plugin_log::TargetKind::Stderr), diff --git a/backend/src/main_window.rs b/backend/src/main_window.rs index c3ac96b9..b5a5c3b9 100644 --- a/backend/src/main_window.rs +++ b/backend/src/main_window.rs @@ -2,7 +2,7 @@ use crate::{kv, state}; use tauri::utils::config::BackgroundThrottlingPolicy; use tauri::webview::WebviewWindowBuilder; use tauri::{ - AppHandle, LogicalSize, Manager, PhysicalPosition, PhysicalSize, WebviewUrl, WebviewWindow, + AppHandle, LogicalSize, Manager, PhysicalPosition, PhysicalSize, Runtime, WebviewUrl, WebviewWindow, }; #[derive(Clone, serde::Serialize, serde::Deserialize, Debug)] @@ -45,7 +45,7 @@ fn get_os() -> String { } } -pub(crate) async fn create_main_window(app: &AppHandle) -> Result<(), String> { +pub(crate) async fn create_main_window(app: &AppHandle) -> Result<(), String> { let dev_prefix = app.state::().dev_prefix.clone(); let channel = env!("APP_CHANNEL"); @@ -114,7 +114,7 @@ pub(crate) async fn create_main_window(app: &AppHandle) -> Result<(), String> { .disable_drag_drop_handler() .min_inner_size(500.0, 500.0) .background_throttling(BackgroundThrottlingPolicy::Suspend) - .visible(false); + .visible(true); builder = { #[cfg(target_os = "macos")] @@ -171,7 +171,7 @@ pub(crate) async fn create_main_window(app: &AppHandle) -> Result<(), String> { Ok(()) } -fn is_correctly_sized_and_positioned(window: &WebviewWindow, window_state: &WindowState) -> bool { +fn is_correctly_sized_and_positioned(window: &WebviewWindow, window_state: &WindowState) -> bool { let position = window.outer_position().unwrap(); let size = window.outer_size().unwrap(); position.x == window_state.x @@ -181,7 +181,7 @@ fn is_correctly_sized_and_positioned(window: &WebviewWindow, window_state: &Wind } #[tauri::command] -pub(crate) async fn save_window_info(app: AppHandle) -> Result<(), String> { +pub(crate) async fn save_window_info(app: AppHandle) -> Result<(), String> { let window = app.get_webview_window("main").unwrap(); let position = window.outer_position().unwrap(); let size = window.outer_size().unwrap(); @@ -193,19 +193,19 @@ pub(crate) async fn save_window_info(app: AppHandle) -> Result<(), String> { } #[tauri::command] -pub(crate) async fn show_window(app: AppHandle) -> Result<(), String> { +pub(crate) async fn show_window(app: AppHandle) -> Result<(), String> { let window = app.get_webview_window("main").unwrap(); window.show().unwrap(); window.set_focus().unwrap(); Ok(()) } -async fn save_window_state(app: &AppHandle, state: WindowState) -> Result<(), String> { +async fn save_window_state(app: &AppHandle, state: WindowState) -> Result<(), String> { let db = kv::open_db(app).await.map_err(|e| e.to_string())?; kv::set(&db, "window_state_u32", &state).await } -async fn load_window_state(app: &AppHandle) -> Result, String> { +async fn load_window_state(app: &AppHandle) -> Result, String> { let db = kv::open_db(app).await.map_err(|e| e.to_string())?; kv::get(&db, "window_state_u32").await } diff --git a/backend/src/run/pty.rs b/backend/src/run/pty.rs index 7103d83f..b2defc2f 100644 --- a/backend/src/run/pty.rs +++ b/backend/src/run/pty.rs @@ -3,7 +3,7 @@ use atuin_desktop_runtime::pty::PtyStoreHandle; use eyre::Result; use tauri::Manager; -async fn update_badge_count(app: &tauri::AppHandle, store: PtyStoreHandle) -> Result<()> { +async fn update_badge_count(app: &tauri::AppHandle, store: PtyStoreHandle) -> Result<()> { let len = store.len().await?; let len = if len == 0 { None } else { Some(len as i64) }; @@ -48,8 +48,8 @@ pub(crate) async fn pty_resize( Ok(()) } -pub(crate) async fn remove_pty( - app: tauri::AppHandle, +pub(crate) async fn remove_pty( + app: tauri::AppHandle, pid: uuid::Uuid, store: PtyStoreHandle, ) -> Result<(), String> { diff --git a/backend/src/runbooks/runbook.rs b/backend/src/runbooks/runbook.rs index 2d38a6c5..79760d8a 100644 --- a/backend/src/runbooks/runbook.rs +++ b/backend/src/runbooks/runbook.rs @@ -32,8 +32,8 @@ pub fn export_atrb(json: String, file_path: String) -> Result<(), String> { } #[tauri::command] -pub async fn delete_runbook_cleanup( - app: tauri::AppHandle, +pub async fn delete_runbook_cleanup( + app: tauri::AppHandle, state: State<'_, AtuinState>, runbook: Uuid, ) -> Result<(), String> { diff --git a/backend/src/runbooks/ydoc.rs b/backend/src/runbooks/ydoc.rs index e52257a3..c6054012 100644 --- a/backend/src/runbooks/ydoc.rs +++ b/backend/src/runbooks/ydoc.rs @@ -1,9 +1,9 @@ use sqlx::Row; use tauri::ipc::{InvokeBody, Request, Response}; -use tauri::{AppHandle, Manager}; +use tauri::{AppHandle, Manager, Runtime}; #[tauri::command] -pub async fn save_ydoc_for_runbook(app: AppHandle, request: Request<'_>) -> Result<(), String> { +pub async fn save_ydoc_for_runbook(app: AppHandle, request: Request<'_>) -> Result<(), String> { if let InvokeBody::Raw(data) = request.body() { let runbook_id = request.headers().get("id").unwrap().to_str().unwrap(); @@ -28,7 +28,7 @@ pub async fn save_ydoc_for_runbook(app: AppHandle, request: Request<'_>) -> Resu } #[tauri::command] -pub async fn load_ydoc_for_runbook(app: AppHandle, runbook_id: &str) -> Result { +pub async fn load_ydoc_for_runbook(app: AppHandle, runbook_id: &str) -> Result { let state = app.state::(); let db = state .db_instances diff --git a/backend/src/state.rs b/backend/src/state.rs index 1362eeae..449e094f 100644 --- a/backend/src/state.rs +++ b/backend/src/state.rs @@ -5,7 +5,7 @@ use std::{ sync::{Arc, Mutex}, }; use tauri::ipc::Channel; -use tauri::{async_runtime::RwLock, AppHandle}; +use tauri::{async_runtime::RwLock, AppHandle, Runtime}; use tokio::sync::{broadcast, mpsc, oneshot}; use uuid::Uuid; @@ -107,7 +107,7 @@ impl AtuinState { use_hub_updater_service, } } - pub async fn init(&self, _app: &AppHandle) -> Result<()> { + pub async fn init(&self, _app: &AppHandle) -> Result<()> { let path = if let Some(ref prefix) = self.dev_prefix { self.app_path.join(format!("{prefix}_exec_log.db")) } else { diff --git a/package.json b/package.json index b02d91d0..042cafae 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,8 @@ "build": "tsc && vite build", "preview": "vite preview", "tauri": "tauri", + "tauri:cef": "node script/tauri cef", + "tauri:wry": "node script/tauri wry", "test": "vitest", "test-once": "vitest run", "test-rs": "cargo test", diff --git a/script/tauri b/script/tauri new file mode 100755 index 00000000..ed8b5b61 --- /dev/null +++ b/script/tauri @@ -0,0 +1,73 @@ +#!/usr/bin/env node + +/** + * Script to run tauri commands for a given runtime (wry or cef) with prepended CLI args. + * + * Usage: + * script/tauri [prepended-args...] + * + * Examples: + * script/tauri cef dev --verbose + * script/tauri cef dev -- --verbose + * Both will run: cargo tauri dev --features cef -- --verbose --no-default-features + * + * Note: The '--' separator is optional. All args after the command are prepended. + */ + +import { spawn } from "child_process"; +import { fileURLToPath } from "url"; +import { dirname, join } from "path"; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = dirname(__filename); + +const cmdlineArgs = process.argv.slice(2); + +if (cmdlineArgs.length < 2) { + console.error("Usage: node script/tauri [prepended-args...]"); + console.error(" command: dev or build"); + console.error(" runtime: wry or cef"); + console.error( + " prepended-args: Arguments to prepend to the cargo args (-- separator is optional)", + ); + process.exit(1); +} + +const [runtime, cmd, ...tauriArgs] = cmdlineArgs; + +if (!["wry", "cef"].includes(runtime)) { + console.error(`Invalid runtime: ${runtime}. Must be 'wry' or 'cef'`); + process.exit(1); +} +if (!["dev", "build"].includes(cmd)) { + console.error(`Invalid command: ${cmd}. Must be 'dev' or 'build'`); + process.exit(1); +} + +tauriArgs.unshift("--features", runtime); +if (!tauriArgs.includes("--")) { + tauriArgs.push("--"); +} +tauriArgs.push("--no-default-features"); + +const args = ["tauri", cmd, ...tauriArgs]; + +const command = "cargo"; + +console.log(`Running: ${command} ${args.join(" ")}`); + +// Spawn the tauri process +const proc = spawn(command, args, { + stdio: "inherit", + shell: false, + cwd: join(__dirname, ".."), +}); + +proc.on("error", (error) => { + console.error(`Failed to start process: ${error.message}`); + process.exit(1); +}); + +proc.on("exit", (code) => { + process.exit(code ?? 0); +});