diff --git a/Cargo.lock b/Cargo.lock
index 61cf722..6ca3d11 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1406,14 +1406,14 @@ dependencies = [
"arboard",
"base64",
"env_logger",
- "image",
"log",
"muda",
- "open",
+ "png 0.18.1",
"rfd",
"serde",
"serde_json",
"tao",
+ "url",
"wry",
]
@@ -5330,8 +5330,6 @@ checksum = "1ffae5123b2d3fc086436f8834ae3ab053a283cfac8fe0a0b8eaae044768a4c4"
[[package]]
name = "wry"
version = "0.47.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "61ce51277d65170f6379d8cda935c80e3c2d1f0ff712a123c8bddb11b31a4b73"
dependencies = [
"base64",
"block2 0.5.1",
diff --git a/Cargo.toml b/Cargo.toml
index 16a81e1..8a0d03b 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -17,3 +17,6 @@ lto = true
opt-level = 3
strip = "symbols"
codegen-units = 1
+
+[patch.crates-io]
+wry = { path = "vendor/wry" }
diff --git a/ELECTRON_API_STATUS.md b/ELECTRON_API_STATUS.md
index 5cd4903..0be437f 100644
--- a/ELECTRON_API_STATUS.md
+++ b/ELECTRON_API_STATUS.md
@@ -104,8 +104,8 @@
| **full** | 2 | app, ipcMain |
| **partial** | 15 | BrowserWindow, Menu, MenuItem, dialog, shell, Notification, nativeImage, contextBridge, webContents, ipcRenderer, net, process, clipboard, screen, nativeTheme |
| **stub** | 7 | Tray, safeStorage, autoUpdater, session, systemPreferences, powerMonitor, globalShortcut |
-| **missing** | 37 | BaseWindow, BrowserView, contentTracing, crashReporter, desktopCapturer, ImageView, inAppPurchase, MessageChannelMain, netLog, powerSaveBlocker, protocol, pushNotifications, ServiceWorkerMain, sharedTexture, ShareMenu, TouchBar (+10 sub-classes), utilityProcess, View, WebContentsView, webFrameMain, webFrame, webUtils, crashReporter (renderer), sharedTexture (renderer), remote, webviewTag, navigation-history, parent-port, web-request, web-socket, window-open, local-ai-handler |
-| **Total** | **60** | | |
+| **missing** | 36 | BaseWindow, BrowserView, contentTracing, crashReporter, desktopCapturer, ImageView, inAppPurchase, MessageChannelMain, netLog, powerSaveBlocker, protocol, pushNotifications, ServiceWorkerMain, sharedTexture, ShareMenu, TouchBar (+10 sub-classes), utilityProcess, View, WebContentsView, webFrameMain, webFrame, webUtils, crashReporter (renderer), sharedTexture (renderer), remote, webviewTag, navigation-history, parent-port, web-request, web-socket, window-open, local-ai-handler |
+| **Total** | **60** | BrowserView counted once (listed in both Main and Deprecated tables) |
## Rust Bridge (main.rs ToRust commands)
diff --git a/README.md b/README.md
index 50d7dad..a1adffd 100644
--- a/README.md
+++ b/README.md
@@ -4,6 +4,8 @@
A drop-in replacement for Electron powered by Mozilla's Servo engine
+See the [benchmark results and comparisons](https://gelectron.milesallen.site/benchmarks) for the latest performance data.
+
## Why Gelectron?
Electron bundles Chromium — ~150–300 MB per app with large memory overhead. Gelectron uses **Servo** (Mozilla's embeddable browser engine) to share Gecko's CSS engine (Stylo) and GPU compositor (WebRender), producing smaller binaries with lower memory usage.
diff --git a/benchmark/bench.sh b/benchmark/bench.sh
index 24cf888..b0a06e5 100755
--- a/benchmark/bench.sh
+++ b/benchmark/bench.sh
@@ -53,8 +53,33 @@ printf " │ Compat layer │ N/A │ %6sMB │\n" "${GEELECTRON_CO
echo " └─────────────────────┴───────────┴────────┘"
echo ""
+# ── Recursive helpers (macOS-compatible) ──
+# Sum RSS of a PID and all its descendants (process tree).
+total_rss() {
+ local root="$1"
+ ps -eo pid,ppid,rss | awk -v root="$root" '
+ function sum_tree(pid, total, i) {
+ total = 0;
+ for(i=1;i<=NR;i++) { if(pids[i]==pid) { total = rss[i]; break; } }
+ for(i=1;i<=NR;i++) { if(ppids[i]==pid && pids[i]!=pid) total += sum_tree(pids[i]); }
+ return total;
+ }
+ { pids[NR]=$1; ppids[NR]=$2; rss[NR]=$3+0; }
+ END { printf "%d\n", sum_tree(root+0); }
+ '
+}
+
+# Recursively kill a process tree.
+kill_tree() {
+ local root="$1"
+ for c in $(ps -eo pid,ppid | awk -v p=$root '$2==p && $1!=p {print $1}'); do
+ kill_tree "$c"
+ done
+ kill -9 "$root" 2>/dev/null || true
+}
+
# ── Benchmark function ──
-# Runs a binary, waits for it to stabilize, captures memory, kills it, measures time.
+# Runs a binary, waits for it to stabilize, captures memory (process tree RSS), kills it.
benchmark_run() {
local name="$1"
shift
@@ -64,8 +89,8 @@ benchmark_run() {
"${cmd[@]}" &>/dev/null &
local pid=$!
- # Wait for process to exist and settle
- sleep 2
+ # Wait for all processes to reach steady state
+ sleep 5
# Check if still running
if ! kill -0 "$pid" 2>/dev/null; then
@@ -73,35 +98,17 @@ benchmark_run() {
return
fi
- # Capture total RSS across parent + all child processes
+ # Total RSS across entire process tree
local rss_kb
- rss_kb=$(ps -o rss= -p "$pid" 2>/dev/null | tr -d ' ')
- # Add child process (Node.js) memory
- local child_rss
- child_rss=$(ps -o rss= --ppid "$pid" 2>/dev/null | awk '{s+=$1} END {print s+0}')
- rss_kb=$(( ${rss_kb:-0} + ${child_rss:-0} ))
+ rss_kb=$(total_rss "$pid")
- # Kill it
- kill -9 "$pid" 2>/dev/null || true
- sleep 0.2
+ # Kill entire process tree
+ kill_tree "$pid"
+ sleep 0.5
echo "${rss_kb:-0}"
}
-# ── Warmup run ──
-echo " Warming up..."
-"$ELECTRON_BIN" "$BENCH_DIR" &>/dev/null &
-sleep 3
-killall -9 Electron 2>/dev/null || true
-sleep 1
-
-"$GEELECTRON_BIN" "$DEMO_APP" &>/dev/null &
-sleep 3
-killall -9 gelectron 2>/dev/null || true
-sleep 1
-echo " Done."
-echo ""
-
# ── Run benchmarks ──
ELECTRON_TIMES=()
ELECTRON_MEMS=()
@@ -111,22 +118,11 @@ GEELECTRON_MEMS=()
echo " Running Electron x$RUNS..."
for i in $(seq 1 $RUNS); do
START=$(python3 -c 'import time; print(time.time())')
-
- "$ELECTRON_BIN" "$BENCH_DIR" &>/dev/null &
- PID=$!
- sleep 3
-
- # Total RSS: parent + all children
- PARENT_RSS=$(ps -o rss= -p "$PID" 2>/dev/null | tr -d ' ')
- CHILD_RSS=$(ps -o rss= --ppid "$PID" 2>/dev/null | awk '{s+=$1} END {print s+0}')
- RSS=$(( ${PARENT_RSS:-0} + ${CHILD_RSS:-0} ))
+ RSS_KB=$(benchmark_run "electron" "$ELECTRON_BIN" "$BENCH_DIR")
END=$(python3 -c 'import time; print(time.time())')
- kill -9 "$PID" 2>/dev/null || true
- sleep 0.2
-
ELAPSED=$(python3 -c "print(f'{$END - $START:.3f}')")
- MEM_MB=$(python3 -c "print(f'{$RSS / 1024:.1f}')")
+ MEM_MB=$(python3 -c "print(f'{$RSS_KB / 1024:.1f}')")
ELECTRON_TIMES+=("$ELAPSED")
ELECTRON_MEMS+=("$MEM_MB")
@@ -137,24 +133,11 @@ echo ""
echo " Running Gelectron x$RUNS..."
for i in $(seq 1 $RUNS); do
START=$(python3 -c 'import time; print(time.time())')
-
- "$GEELECTRON_BIN" "$DEMO_APP" &>/dev/null &
- PID=$!
- sleep 3
-
- # Total RSS: parent + all children (Rust + Node.js)
- PARENT_RSS=$(ps -o rss= -p "$PID" 2>/dev/null | tr -d ' ')
- CHILD_RSS=$(ps -o rss= --ppid "$PID" 2>/dev/null | awk '{s+=$1} END {print s+0}')
- RSS=$(( ${PARENT_RSS:-0} + ${CHILD_RSS:-0} ))
+ RSS_KB=$(benchmark_run "gelectron" "$GEELECTRON_BIN" "$DEMO_APP")
END=$(python3 -c 'import time; print(time.time())')
- kill -9 "$PID" 2>/dev/null || true
- # Also kill Node.js child
- ps -o pid= --ppid "$PID" 2>/dev/null | xargs kill -9 2>/dev/null || true
- sleep 0.2
-
ELAPSED=$(python3 -c "print(f'{$END - $START:.3f}')")
- MEM_MB=$(python3 -c "print(f'{$RSS / 1024:.1f}')")
+ MEM_MB=$(python3 -c "print(f'{$RSS_KB / 1024:.1f}')")
GEELECTRON_TIMES+=("$ELAPSED")
GEELECTRON_MEMS+=("$MEM_MB")
diff --git a/benchmark/results/benchmark_20260727_145953.json b/benchmark/results/benchmark_20260727_145953.json
deleted file mode 100644
index bae4604..0000000
--- a/benchmark/results/benchmark_20260727_145953.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
- "timestamp": "2026-07-27T20:01:08Z",
- "runs": 10,
- "platform": "Darwin arm64",
- "electron": {
- "version": "v43.2.0",
- "avg_startup_s": 3.035,
- "min_startup_s": 3.024,
- "max_startup_s": 3.043,
- "avg_memory_mb": 48.0,
- "min_memory_mb": 47.9,
- "max_memory_mb": 48.1,
- "runtime_size_mb": 296,
- "raw_times": [3.039,3.038,3.038,3.024,3.032,3.026,3.043,3.040,3.035,3.038],
- "raw_memory": [48.0,48.1,48.0,48.0,48.1,48.1,47.9,47.9,47.9,48.0]
- },
- "gelectron": {
- "avg_startup_s": 3.028,
- "min_startup_s": 3.027,
- "max_startup_s": 3.031,
- "avg_memory_mb": 83.4,
- "min_memory_mb": 82.9,
- "max_memory_mb": 83.8,
- "runtime_size_mb": 2,
- "raw_times": [3.027,3.027,3.027,3.028,3.027,3.031,3.027,3.027,3.027,3.028],
- "raw_memory": [83.2,83.7,82.9,83.2,83.4,83.8,83.3,83.3,83.6,83.6]
- }
-}
diff --git a/benchmark/results/benchmark_20260728_141802.json b/benchmark/results/benchmark_20260728_141802.json
deleted file mode 100644
index 8404aef..0000000
--- a/benchmark/results/benchmark_20260728_141802.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
- "timestamp": "2026-07-28T19:19:17Z",
- "runs": 10,
- "platform": "Darwin arm64",
- "electron": {
- "version": "v43.2.0",
- "avg_startup_s": 3.038,
- "min_startup_s": 3.035,
- "max_startup_s": 3.041,
- "avg_memory_mb": 47.9,
- "min_memory_mb": 47.7,
- "max_memory_mb": 48.1,
- "runtime_size_mb": 296,
- "raw_times": [3.039,3.038,3.041,3.035,3.038,3.037,3.035,3.040,3.036,3.036],
- "raw_memory": [47.7,47.9,48.0,48.0,47.8,48.1,47.8,48.0,48.0,48.1]
- },
- "gelectron": {
- "avg_startup_s": 3.027,
- "min_startup_s": 3.026,
- "max_startup_s": 3.031,
- "avg_memory_mb": 82.7,
- "min_memory_mb": 81.7,
- "max_memory_mb": 83.1,
- "runtime_size_mb": 4,
- "raw_times": [3.031,3.027,3.027,3.028,3.027,3.026,3.026,3.026,3.028,3.028],
- "raw_memory": [83.0,82.8,82.8,83.0,82.7,81.7,82.7,82.8,82.8,83.1]
- }
-}
diff --git a/benchmark/results/benchmark_20260728_222020.json b/benchmark/results/benchmark_20260728_222020.json
new file mode 100644
index 0000000..d8f3f4c
--- /dev/null
+++ b/benchmark/results/benchmark_20260728_222020.json
@@ -0,0 +1,28 @@
+{
+ "timestamp": "2026-07-29T03:22:15Z",
+ "runs": 10,
+ "platform": "Darwin arm64",
+ "electron": {
+ "version": "v43.2.0",
+ "avg_startup_s": 5.671,
+ "min_startup_s": 5.668,
+ "max_startup_s": 5.674,
+ "avg_memory_mb": 585.9,
+ "min_memory_mb": 583.3,
+ "max_memory_mb": 587.4,
+ "runtime_size_mb": 296,
+ "raw_times": [5.670,5.672,5.674,5.672,5.671,5.668,5.670,5.668,5.673,5.672],
+ "raw_memory": [583.7,586.5,583.3,587.1,586.5,587.4,586.5,587.1,584.1,586.3]
+ },
+ "gelectron": {
+ "avg_startup_s": 5.601,
+ "min_startup_s": 5.598,
+ "max_startup_s": 5.604,
+ "avg_memory_mb": 131.4,
+ "min_memory_mb": 131.0,
+ "max_memory_mb": 131.7,
+ "runtime_size_mb": 3,
+ "raw_times": [5.600,5.601,5.602,5.602,5.598,5.600,5.601,5.602,5.602,5.604],
+ "raw_memory": [131.6,131.7,131.3,131.5,131.3,131.7,131.0,131.5,131.3,131.5]
+ }
+}
diff --git a/crates/gelectron-app/Cargo.toml b/crates/gelectron-app/Cargo.toml
index 228c7c2..4c1e63c 100644
--- a/crates/gelectron-app/Cargo.toml
+++ b/crates/gelectron-app/Cargo.toml
@@ -20,6 +20,6 @@ tao = "0.30"
muda = "0.15"
arboard = "3"
rfd = "0.15"
-image = { version = "0.25", default-features = false, features = ["png", "jpeg"] }
+png = "0.18"
base64 = "0.22"
-open = "5"
+url = { workspace = true }
diff --git a/crates/gelectron-app/src/main.rs b/crates/gelectron-app/src/main.rs
index 9cb83e8..d6421d6 100644
--- a/crates/gelectron-app/src/main.rs
+++ b/crates/gelectron-app/src/main.rs
@@ -11,8 +11,6 @@ use std::sync::mpsc;
use std::sync::atomic::{AtomicBool, Ordering};
use std::thread;
use std::sync::Arc;
-
-use image::ImageEncoder;
use tao::event::{Event, StartCause, WindowEvent};
use tao::event_loop::{ControlFlow, EventLoopBuilder};
use tao::window::{Fullscreen, WindowBuilder, WindowId};
@@ -367,8 +365,9 @@ require('{}');
);
let mut child: Child = Command::new(&node_path)
- .arg("--max-old-space-size=64")
- .arg("--expose-gc")
+ .arg("--max-old-space-size=32")
+ .arg("--optimize-for-size")
+ .arg("--v8-pool-size=1")
.arg("-e")
.arg(&setup_script)
.stdin(Stdio::piped())
@@ -615,7 +614,7 @@ fn create_initial_webview_window(
match WebViewBuilder::new()
.with_url("about:blank")
.with_initialization_script(&init_script)
- .with_devtools(true)
+ .with_devtools(false)
.with_ipc_handler(move |req| {
let body = req.body().to_string();
if let Ok(val) = serde_json::from_str::(&body) {
@@ -766,7 +765,7 @@ fn handle_to_rust(
match WebViewBuilder::new()
.with_url(&url)
.with_initialization_script(&init)
- .with_devtools(true)
+ .with_devtools(false)
.with_ipc_handler(move |req| {
let body = req.body().to_string();
if let Ok(val) = serde_json::from_str::(&body) {
@@ -814,7 +813,9 @@ fn handle_to_rust(
}
}
ToRust::LoadFile { id, path } => {
- let url = format!("file://{}", std::fs::canonicalize(&path).unwrap_or_default().display());
+ let url = url::Url::from_file_path(std::fs::canonicalize(&path).unwrap_or_default())
+ .map(|u| u.to_string())
+ .unwrap_or_else(|_| "about:blank".into());
log::info!("Loading file in window {}: {}", id, url);
let init = st.bundle_js.clone().unwrap_or_else(|| preload_script());
if let Some(pair) = st.windows.get_mut(&id) {
@@ -825,7 +826,7 @@ fn handle_to_rust(
match WebViewBuilder::new()
.with_url(&url)
.with_initialization_script(&init)
- .with_devtools(true)
+ .with_devtools(false)
.with_ipc_handler(move |req| {
let body = req.body().to_string();
if let Ok(val) = serde_json::from_str::(&body) {
@@ -933,7 +934,6 @@ fn handle_to_rust(
.and_then(|mut c| c.get_image())
.ok()
.and_then(|img| {
- // Convert ARGB to RGBA for PNG encoding
let w = img.width;
let h = img.height;
let bytes = &img.bytes;
@@ -943,20 +943,16 @@ fn handle_to_rust(
rgba.extend_from_slice(&[chunk[1], chunk[2], chunk[3], chunk[0]]);
}
}
- // Encode as PNG
- image::RgbaImage::from_raw(w as u32, h as u32, rgba)
- .and_then(|img_buf| {
- let mut buf = std::io::Cursor::new(Vec::new());
- image::codecs::png::PngEncoder::new(&mut buf)
- .write_image(
- &img_buf,
- img_buf.width(),
- img_buf.height(),
- image::ExtendedColorType::Rgba8,
- ).ok()?;
- use base64::Engine;
- Some(base64::engine::general_purpose::STANDARD.encode(buf.into_inner()))
- })
+ let mut buf = std::io::Cursor::new(Vec::new());
+ {
+ let mut encoder = png::Encoder::new(&mut buf, w as u32, h as u32);
+ encoder.set_color(png::ColorType::Rgba);
+ encoder.set_depth(png::BitDepth::Eight);
+ let mut writer = encoder.write_header().ok()?;
+ writer.write_image_data(&rgba).ok()?;
+ }
+ use base64::Engine;
+ Some(base64::engine::general_purpose::STANDARD.encode(buf.into_inner()))
})
.unwrap_or_default();
if let Some(ref tx) = st.response_tx {
@@ -967,20 +963,24 @@ fn handle_to_rust(
if let Ok(mut c) = arboard::Clipboard::new() {
use base64::Engine;
if let Ok(bytes) = base64::engine::general_purpose::STANDARD.decode(&data) {
- if let Ok(img) = image::load_from_memory(&bytes) {
- let rgba = img.to_rgba8();
- let (w, h) = rgba.dimensions();
- let raw = rgba.into_raw();
- // Convert RGBA to ARGB for arboard
- let mut argb = Vec::with_capacity(raw.len());
- for chunk in raw.chunks_exact(4) {
- argb.extend_from_slice(&[chunk[3], chunk[0], chunk[1], chunk[2]]);
+ use std::io::Read;
+ let cursor = std::io::Cursor::new(&bytes[..]);
+ let decoder = png::Decoder::new(cursor);
+ if let Ok(mut reader) = decoder.read_info() {
+ let mut buf = vec![0; reader.output_buffer_size().unwrap()];
+ if let Ok(info) = reader.next_frame(&mut buf) {
+ let (w, h) = (info.width, info.height);
+ let raw = &buf[..(w as usize * h as usize * 4)];
+ let mut argb = Vec::with_capacity(raw.len());
+ for chunk in raw.chunks_exact(4) {
+ argb.extend_from_slice(&[chunk[3], chunk[0], chunk[1], chunk[2]]);
+ }
+ let _ = c.set_image(arboard::ImageData {
+ width: w as usize,
+ height: h as usize,
+ bytes: argb.into(),
+ });
}
- let _ = c.set_image(arboard::ImageData {
- width: w as usize,
- height: h as usize,
- bytes: argb.into(),
- });
}
}
}
@@ -1126,10 +1126,20 @@ fn handle_to_rust(
});
}
ToRust::ShellOpenExternal { url } => {
- let _ = open::that(&url);
+ #[cfg(target_os = "macos")]
+ { let _ = std::process::Command::new("open").arg(&url).spawn(); }
+ #[cfg(target_os = "windows")]
+ { let _ = std::process::Command::new("cmd").args(["/c", "start", "", &url]).spawn(); }
+ #[cfg(target_os = "linux")]
+ { let _ = std::process::Command::new("xdg-open").arg(&url).spawn(); }
}
ToRust::ShellOpenPath { path } => {
- let _ = open::that(&path);
+ #[cfg(target_os = "macos")]
+ { let _ = std::process::Command::new("open").arg(&path).spawn(); }
+ #[cfg(target_os = "windows")]
+ { let _ = std::process::Command::new("explorer").arg(&path).spawn(); }
+ #[cfg(target_os = "linux")]
+ { let _ = std::process::Command::new("xdg-open").arg(&path).spawn(); }
}
ToRust::ShellShowInFolder { path } => {
#[cfg(target_os = "macos")]
diff --git a/src/electron/index.js b/src/electron/index.js
index 40f47b9..b0c8017 100644
--- a/src/electron/index.js
+++ b/src/electron/index.js
@@ -1,27 +1,35 @@
'use strict';
-/**
- * Gelectron - Electron compatibility layer.
- * Drop-in replacement for require('electron').
- */
-
-const { app } = require('./app');
-const { BrowserWindow } = require('./browser-window');
-const ipcMain = require('./ipc-main');
-const { Menu, MenuItem } = require('./menu');
-const { Tray } = require('./tray');
-const dialog = require('./dialog');
-const shell = require('./shell');
-const { Notification } = require('./notification');
-const nativeImage = require('./native-image');
-const safeStorage = require('./safe-storage');
-const contextBridge = require('./context-bridge');
-const webContents = require('./web-contents');
-const { autoUpdater, AutoUpdater } = require('./auto-updater');
const { bridge, isNative } = require('./native-bridge');
-const clipboard = require('./clipboard');
-const { Screen } = require('./screen');
-const nativeTheme = require('./nativeTheme');
+const ipcMain = require('./ipc-main');
+const nativeImage = require('./native-image');
+
+let _app, _BrowserWindow, _Menu, _MenuItem, _Tray, _dialog, _shell;
+let _Notification, _safeStorage, _contextBridge, _webContents;
+let _autoUpdater, _AutoUpdater, _clipboard, _Screen, _nativeTheme;
+
+function lazy(loader) {
+ let mod;
+ return function () {
+ if (!mod) mod = loader();
+ return mod;
+ };
+}
+
+const lazyApp = lazy(() => { _app = require('./app').app; return _app; });
+const lazyBrowserWindow = lazy(() => { _BrowserWindow = require('./browser-window').BrowserWindow; return _BrowserWindow; });
+const lazyMenu = lazy(() => { const m = require('./menu'); _Menu = m.Menu; _MenuItem = m.MenuItem; return { Menu: _Menu, MenuItem: _MenuItem }; });
+const lazyTray = lazy(() => { _Tray = require('./tray').Tray; return _Tray; });
+const lazyDialog = lazy(() => { _dialog = require('./dialog'); return _dialog; });
+const lazyShell = lazy(() => { _shell = require('./shell'); return _shell; });
+const lazyNotification = lazy(() => { _Notification = require('./notification').Notification; return _Notification; });
+const lazySafeStorage = lazy(() => { _safeStorage = require('./safe-storage'); return _safeStorage; });
+const lazyContextBridge = lazy(() => { _contextBridge = require('./context-bridge'); return _contextBridge; });
+const lazyWebContents = lazy(() => { _webContents = require('./web-contents'); return _webContents; });
+const lazyAutoUpdater = lazy(() => { const a = require('./auto-updater'); _autoUpdater = a.autoUpdater; _AutoUpdater = a.AutoUpdater; return { autoUpdater: _autoUpdater, AutoUpdater: _AutoUpdater }; });
+const lazyClipboard = lazy(() => { _clipboard = require('./clipboard'); return _clipboard; });
+const lazyScreen = lazy(() => { if (!_Screen) _Screen = require('./screen').Screen; return new _Screen(); });
+const lazyNativeTheme = lazy(() => { _nativeTheme = require('./nativeTheme'); return _nativeTheme; });
if (isNative) {
bridge.on('ipc-message', (windowId, channel, data) => {
@@ -81,62 +89,73 @@ const sessionStub = {
};
module.exports = {
- app,
- BrowserWindow,
- ipcMain,
- Menu,
- MenuItem,
- Tray,
- dialog,
- shell,
- Notification,
- nativeImage,
- safeStorage,
- contextBridge,
- webContents,
- autoUpdater,
- AutoUpdater,
- session: sessionStub,
- clipboard,
- screen: new Screen(),
- nativeTheme,
+ get app() { return lazyApp(); },
+ get BrowserWindow() { return lazyBrowserWindow(); },
+ get ipcMain() { return ipcMain; },
+ get Menu() { return lazyMenu().Menu; },
+ get MenuItem() { return lazyMenu().MenuItem; },
+ get Tray() { return lazyTray(); },
+ get dialog() { return lazyDialog(); },
+ get shell() { return lazyShell(); },
+ get Notification() { return lazyNotification(); },
+ get nativeImage() { return nativeImage; },
+ get safeStorage() { return lazySafeStorage(); },
+ get contextBridge() { return lazyContextBridge(); },
+ get webContents() { return lazyWebContents(); },
+ get autoUpdater() { return lazyAutoUpdater().autoUpdater; },
+ get AutoUpdater() { return lazyAutoUpdater().AutoUpdater; },
+ get session() { return sessionStub; },
+ get clipboard() { return lazyClipboard(); },
+ get screen() { return lazyScreen(); },
+ get nativeTheme() { return lazyNativeTheme(); },
- systemPreferences: {
- isDarkMode: () => nativeTheme.shouldUseDarkColors,
- getAccentColor: () => '#007AFF',
- getColor: () => '#ffffff',
- isSwipeTrackingFromScrollEventsEnabled: () => false,
- subscribeNotification: () => () => {},
- unsubscribeNotification: () => {},
- subscribeLocalNotification: () => () => {},
- unsubscribeLocalNotification: () => {},
- getUserDefault: () => null,
- setUserDefault: () => {},
- removeUserDefault: () => {},
+ get systemPreferences() {
+ const nt = lazyNativeTheme();
+ return {
+ isDarkMode: () => nt.shouldUseDarkColors,
+ getAccentColor: () => '#007AFF',
+ getColor: () => '#ffffff',
+ isSwipeTrackingFromScrollEventsEnabled: () => false,
+ subscribeNotification: () => () => {},
+ unsubscribeNotification: () => {},
+ subscribeLocalNotification: () => () => {},
+ unsubscribeLocalNotification: () => {},
+ getUserDefault: () => null,
+ setUserDefault: () => {},
+ removeUserDefault: () => {},
+ };
},
- powerMonitor: {
- on: () => {},
- off: () => {},
- once: () => {},
- getSystemIdleState: () => 'active',
- getSystemIdleTime: () => 0,
- isInLowPowerMode: () => false,
+ get powerMonitor() {
+ return {
+ on: () => {},
+ off: () => {},
+ once: () => {},
+ getSystemIdleState: () => 'active',
+ getSystemIdleTime: () => 0,
+ isInLowPowerMode: () => false,
+ };
},
- globalShortcut: {
- register: () => true,
- unregister: () => {},
- unregisterAll: () => {},
- isRegistered: () => false,
+ get globalShortcut() {
+ return {
+ register: () => true,
+ unregister: () => {},
+ unregisterAll: () => {},
+ isRegistered: () => false,
+ };
},
- net: {
- fetch: globalThis.fetch || (() => Promise.reject(new Error('fetch not available'))),
+ get net() {
+ return {
+ fetch: globalThis.fetch || (() => Promise.reject(new Error('fetch not available'))),
+ };
},
// Constants
- IPCRenderer: {
- invoke: () => Promise.resolve(),
- send: () => {},
- on: () => () => {},
- removeListener: () => {},
+ get IPCRenderer() {
+ return {
+ invoke: () => Promise.resolve(),
+ send: () => {},
+ on: () => () => {},
+ removeListener: () => {},
+ };
},
};
diff --git a/vendor/wry/CHANGELOG.md b/vendor/wry/CHANGELOG.md
new file mode 100644
index 0000000..bd343df
--- /dev/null
+++ b/vendor/wry/CHANGELOG.md
@@ -0,0 +1,1069 @@
+# Changelog
+
+## \[0.47.2]
+
+- [`7bb4f49`](https://github.com/tauri-apps/wry/commit/7bb4f4929eddbde8f36472a55ec3713d6d51c0e3) ([#1421](https://github.com/tauri-apps/wry/pull/1421) by [@SpikeHD](https://github.com/tauri-apps/wry/../../SpikeHD)) Fix extension loading on Windows.
+
+## \[0.47.1]
+
+- [`59c1eef`](https://github.com/tauri-apps/wry/commit/59c1eef0805ecbb1f70a7c78578ff4e03b09a204) ([#1418](https://github.com/tauri-apps/wry/pull/1418) by [@amrbashir](https://github.com/tauri-apps/wry/../../amrbashir)) Fix initialization scripts running twice on Windows.
+
+## \[0.47.0]
+
+- [`7221256`](https://github.com/tauri-apps/wry/commit/72212568cb4d815463fc035969f9cac60fe28ba6) ([#1365](https://github.com/tauri-apps/wry/pull/1365) by [@Norbiros](https://github.com/tauri-apps/wry/../../Norbiros)) Add `WebViewBuilder::with_initialization_script_for_main_only` to enable injecting JavaScript code into main frame only or all subframes.
+- [`c1b26b9`](https://github.com/tauri-apps/wry/commit/c1b26b9612bf5c5a9e4e0185f73739a2444343cd) ([#1394](https://github.com/tauri-apps/wry/pull/1394) by [@amrbashir](https://github.com/tauri-apps/wry/../../amrbashir)) Add `WebView::cookies` and `WebView::cookies_for_url` APIs.
+- [`c193e2a`](https://github.com/tauri-apps/wry/commit/c193e2a04c369b7699cd0d73049e84b6851b5c06) ([#1408](https://github.com/tauri-apps/wry/pull/1408) by [@amrbashir](https://github.com/tauri-apps/wry/../../amrbashir)) Fix `DragDropEvent::Drop` event never fired on Wayland (and sometimes on X11).
+- [`1d63fa3`](https://github.com/tauri-apps/wry/commit/1d63fa325327a02a0a8be9ee50ce1eb7a0e8e04f) ([#1403](https://github.com/tauri-apps/wry/pull/1403) by [@SpikeHD](https://github.com/tauri-apps/wry/../../SpikeHD)) Add `WebViewBuilder::with_extension_path` API to Windows and Linux.
+- [`0c192f4`](https://github.com/tauri-apps/wry/commit/0c192f4fda1d9c0020bd3ad09a9090bca25ef04f) ([#1414](https://github.com/tauri-apps/wry/pull/1414) by [@lucasfernog](https://github.com/tauri-apps/wry/../../lucasfernog)) Fix Android static handlers not being replaced when the application UI is relaunched while still running in the foreground.
+- [`9a2a2d4`](https://github.com/tauri-apps/wry/commit/9a2a2d42b635a1e27bd6a8f67f7f7b1c59acc7db) ([#1412](https://github.com/tauri-apps/wry/pull/1412) by [@amrbashir](https://github.com/tauri-apps/wry/../../amrbashir)) Fix icons of dragged items getting stuck when using `WebViewBuilder::with_drag_drop_handler` on some distros like Gnome.
+- [`fa9875b`](https://github.com/tauri-apps/wry/commit/fa9875bb16dd967520c41e50c562a5aabccc2cbc) ([#1409](https://github.com/tauri-apps/wry/pull/1409) by [@amrbashir](https://github.com/tauri-apps/wry/../../amrbashir)) On Windows, disable Webview2's file drop when using `WebViewBuilder::with_drag_drop_handler` which fix drag events for files from "Recent files" view.
+- [`6007608`](https://github.com/tauri-apps/wry/commit/600760827735696e4099eff1ad500baa69d84d2f) ([#1400](https://github.com/tauri-apps/wry/pull/1400) by [@amrbashir](https://github.com/tauri-apps/wry/../../amrbashir)) On Windows, fix webview slightly larger than the window inner size, which resulted in a hidden 1px in the right and bottom borders of the webview
+
+## \[0.46.3]
+
+- [`be122f6`](https://github.com/tauri-apps/wry/commit/be122f667f9f5516b4bc25f9e8c61cb99dbe1440) ([#1397](https://github.com/tauri-apps/wry/pull/1397) by [@lucasfernog](https://github.com/tauri-apps/wry/../../lucasfernog)) Fix `with_user_agent` regression.
+
+## \[0.46.2]
+
+- [`1189e2a`](https://github.com/tauri-apps/wry/commit/1189e2a2d5ee18ad83281eea92b05a93f9184ebf) ([#1392](https://github.com/tauri-apps/wry/pull/1392) by [@chrox](https://github.com/tauri-apps/wry/../../chrox)) Fix malformed headers in custom protocol response on macOS.
+
+## \[0.46.1]
+
+### bug
+
+- [`33c0193`](https://github.com/tauri-apps/wry/commit/33c01931a08b2178bb37b03b762d82f20f10aa3b) ([#1389](https://github.com/tauri-apps/wry/pull/1389) by [@amrbashir](https://github.com/tauri-apps/wry/../../amrbashir)) Fix crash on macOS versions below 14.
+- [`a57719e`](https://github.com/tauri-apps/wry/commit/a57719e6d63c8dbb002905e54c19d9d2f82c12de) ([#1385](https://github.com/tauri-apps/wry/pull/1385) by [@huacnlee](https://github.com/tauri-apps/wry/../../huacnlee)) Add `WebView::focus_parent` method.
+
+## \[0.46.0]
+
+- [`8cc2a7f`](https://github.com/tauri-apps/wry/commit/8cc2a7f6570085da5d6a5ea57ad7f127520b778f) ([#1384](https://github.com/tauri-apps/wry/pull/1384) by [@amrbashir](https://github.com/tauri-apps/wry/../../amrbashir)) This release contains quite the breaking changes, because even though wry@0.44, ignored duplicate custom protocols, On Linux when using a shared web context, the custom protocol handler can only be registered once so we are bringing the duplicate custom protocols on Linux again, Windows and macOS are not affected. If using a shared web context, make sure to register a protocol only once on Linux (other platforms should be registed multiple times), use `WebContext::is_custom_protocol_registered` with `#[cfg(target_os = "linux")]`.
+
+ We also noticed that it is hard to know which webview made a request to the custom protocol so we added a method to attach an ID to a webview, and changed relevant custom protocol APIs to take a new argument that passes the specified id back to protocol handler.
+
+ We also made a few changes to the builder, specifically `WebViewBuilder::new` and `WebViewBuilder::build` methods to make them more ergonomic to work with.
+
+ - Added `Error::DuplicateCustomProtocol` enum variant.
+ - Added `Error::ContextDuplicateCustomProtocol` enum variant.
+ - On Linux, return an error in `WebViewBuilder::build` if registering a custom protocol multiple times.
+ - Added `WebContext::is_custom_protocol_registered` to check if a protocol has been regsterd for this web context.
+ - Added `WebViewId` alias type.
+ - **Breaking** Changed `WebViewAttributes` to have a lifetime parameter.
+ - Added `WebViewAttributes.id` field to specify an id for the webview.
+ - Added `WebViewBuilder::with_id` method to specify an id for the webview.
+ - Added `WebViewAttributes.context` field to specify a shared context for the webview.
+ - **Breaking** Changed `WebViewAttributes.custom_protocols` field,`WebViewBuilder::with_custom_protocol` method and `WebViewBuilder::with_asynchronous_custom_protocol` method handler function to take `WebViewId` as the first argument to check which webview made the request to the protocol.
+ - **Breaking** Changed `WebViewBuilder::with_web_context` to be a static method to create a builder with a webcontext, instead of it being a setter method. It is now an alternative to `WebviewBuilder::new`
+ - Added `WebViewBuilder::with_attributes` to create a webview builder with provided attributes.
+ - **Breaking** Changed `WebViewBuilder::new` to take no arguments.
+ - **Breaking** Changed `WebViewBuilder::build` method to take a reference to a window to create the webview in it.
+ - **Breaking** Removed `WebViewBuilder::new_as_child`.
+ - Added `WebViewBuilder::build_as_child` method, which takes a reference to a window to create the webview in it.
+ - **Breaking** Removed `WebViewBuilderExtUnix::new_gtk`.
+ - Added `WebViewBuilderExtUnix::build_gtk`.
+- [`0abc221`](https://github.com/tauri-apps/wry/commit/0abc221ca0edf3482518a68af024f9988b10f50b) ([#1316](https://github.com/tauri-apps/wry/pull/1316) by [@pewsheen](https://github.com/tauri-apps/wry/../../pewsheen)) Migrate to obj2.
+- [`b01eac3`](https://github.com/tauri-apps/wry/commit/b01eac35f521e4e763fc15753e2fbee68aa31a02) ([#1386](https://github.com/tauri-apps/wry/pull/1386) by [@lucasfernog](https://github.com/tauri-apps/wry/../../lucasfernog)) Use unescaped Android package identifier for the proguard rules.
+
+## \[0.45.0]
+
+- [`0fd1229`](https://github.com/tauri-apps/wry/commit/0fd12297997f598e4893e8f5b6e235b09cedec09) ([#1369](https://github.com/tauri-apps/wry/pull/1369) by [@lloydzhou](https://github.com/tauri-apps/wry/../../lloydzhou)) On Linux, fixed incorrect path for indexeddb database directory which made apps using `wry@0.24` and `tauri@1` migrating to `wry@>=0.38` and `tauri@2` lose their indexeddb data.
+- [`e332eff`](https://github.com/tauri-apps/wry/commit/e332eff6ac41ff0f4ed6cf5196c3a78c776912d3) ([#1368](https://github.com/tauri-apps/wry/pull/1368) by [@zephraph](https://github.com/tauri-apps/wry/../../zephraph)) Add `Webview::load_html`.
+
+## \[0.44.1]
+
+- [`5111eb0`](https://github.com/tauri-apps/wry/commit/5111eb013e1b049d12aad38b96b2017a4fc54c72) ([#1362](https://github.com/tauri-apps/wry/pull/1362) by [@lucasfernog](https://github.com/tauri-apps/wry/../../lucasfernog)) Fixes `WebView::clear_all_browsing_data` crashing with a segfault on macOS.
+
+## \[0.44.0]
+
+- [`b863d38`](https://github.com/tauri-apps/wry/commit/b863d38ff705e037b297c1651e17775d3dbe473c) ([#1356](https://github.com/tauri-apps/wry/pull/1356) by [@SpikeHD](https://github.com/tauri-apps/wry/../../SpikeHD)) Expose ability to enable browser extensions in WebView2
+- [`9220793`](https://github.com/tauri-apps/wry/commit/92207933c9de4a0c1ef65ecbacb0c303619ced4c) ([#1361](https://github.com/tauri-apps/wry/pull/1361) by [@amrbashir](https://github.com/tauri-apps/wry/../../amrbashir)) Ignore duplicate custom protocols in `WebviewBuilder::with_custom_protocol` and `WebviewBuilder::with_async_custom_protocol` and use the last registered one.
+- [`9220793`](https://github.com/tauri-apps/wry/commit/92207933c9de4a0c1ef65ecbacb0c303619ced4c) ([#1361](https://github.com/tauri-apps/wry/pull/1361) by [@amrbashir](https://github.com/tauri-apps/wry/../../amrbashir)) Removed `Error::DuplicateCustomProtocol` variant.
+- [`5915341`](https://github.com/tauri-apps/wry/commit/59153413d87549964b885ad3ed84473acf4b70df) ([#1354](https://github.com/tauri-apps/wry/pull/1354) by [@millermk](https://github.com/tauri-apps/wry/../../millermk)) Fixes Android webview error page flashing when a redirect to the app is performed.
+- [`170095b`](https://github.com/tauri-apps/wry/commit/170095b9a5829ac9279cfeea3fac0da2c922d448) ([#1360](https://github.com/tauri-apps/wry/pull/1360) by [@Steve-xmh](https://github.com/tauri-apps/wry/../../Steve-xmh)) Fix web resource loading in android binding by skip duplicate Content-Type/Content-Length headers.
+- [`5915341`](https://github.com/tauri-apps/wry/commit/59153413d87549964b885ad3ed84473acf4b70df) ([#1354](https://github.com/tauri-apps/wry/pull/1354) by [@millermk](https://github.com/tauri-apps/wry/../../millermk)) Fix navigation error handling to trigger custom protocol on Android.
+
+## \[0.43.1]
+
+- [`5cea504`](https://github.com/tauri-apps/wry/commit/5cea5045c9e646ace1f94767d91b746c2afd3c14) ([#1352](https://github.com/tauri-apps/wry/pull/1352) by [@lucasfernog](https://github.com/tauri-apps/wry/../../lucasfernog)) Fixes Android file picker result processing.
+
+## \[0.43.0]
+
+- [`7b1c26a`](https://github.com/tauri-apps/wry/commit/7b1c26adff5fdf13a3364b6fc26c8444c120d5c1) ([#1344](https://github.com/tauri-apps/wry/pull/1344) by [@Themayu](https://github.com/tauri-apps/wry/../../Themayu)) Windows: Implement `WebViewBuilderExtWindows::with_scroll_bar_style` to allow opting into Fluent Overlay style scrollbars.
+- [`98d1a83`](https://github.com/tauri-apps/wry/commit/98d1a835e2c818e9f733a55b074e7de3c0cd725f) ([#1326](https://github.com/tauri-apps/wry/pull/1326) by [@ollpu](https://github.com/tauri-apps/wry/../../ollpu)) Fix Linux IPC handler and initialization scripts when sharing a WebContext between multiple WebViews.
+
+## \[0.42.0]
+
+- [`556a359`](https://github.com/tauri-apps/wry/commit/556a359d3739ac3a3e671ab2d1c3dda2784c511e) ([#1301](https://github.com/tauri-apps/wry/pull/1301) by [@pewsheen](https://github.com/tauri-apps/wry/../../pewsheen)) On macOS, emit an error when the URL scheme registration fails.
+- [`19d83d7`](https://github.com/tauri-apps/wry/commit/19d83d7d01ef9704197c09e6197a6da31a4eec6c) ([#1332](https://github.com/tauri-apps/wry/pull/1332) by [@lucasfernog](https://github.com/tauri-apps/wry/../../lucasfernog)) Fixes a crash on the Android custom protocol handler when the request URL is invalid.
+- [`38abcb9`](https://github.com/tauri-apps/wry/commit/38abcb95090a3917ad5092f4933acb95c721f893) ([#1340](https://github.com/tauri-apps/wry/pull/1340) by [@lucasfernog](https://github.com/tauri-apps/wry/../../lucasfernog)) Fixes custom protocols not triggered on Android on external redirects.
+- [`d1f1e7e`](https://github.com/tauri-apps/wry/commit/d1f1e7e6fa82722d9848fbb540e6f9a3d5925cdd) ([#1299](https://github.com/tauri-apps/wry/pull/1299) by [@kanatapple](https://github.com/tauri-apps/wry/../../kanatapple)) Fix `Webview::bounds` returning logical values where it should have been physical.
+- [`03cdf93`](https://github.com/tauri-apps/wry/commit/03cdf93f1e39469a1cd73565ba61138c58567fb6) ([#1311](https://github.com/tauri-apps/wry/pull/1311) by [@bukowa](https://github.com/tauri-apps/wry/../../bukowa)) Handle `webkit2gtk` close signal (when `window.close` is called from js)
+- [`68413e8`](https://github.com/tauri-apps/wry/commit/68413e837f81a88e8de0df39d12ba2b405b89e5e) ([#1296](https://github.com/tauri-apps/wry/pull/1296) by [@MarijnS95](https://github.com/tauri-apps/wry/../../MarijnS95)) **Breaking change**: Upgrade `ndk` crate to `0.9` and delete unused `ndk-sys` and `ndk-context` dependencies. Types from the `ndk` crate are used in public API surface.
+ **Breaking change**: The public `android_setup()` function now takes `&ThreadLooper` instead of `&ForeignLooper`, signifying that the setup function must be called on the thread where the looper is attached (and the `JNIEnv` argument is already thread-local as well).
+- [`39fc82c`](https://github.com/tauri-apps/wry/commit/39fc82c9276bd039a9130919645db149f067719a) ([#1306](https://github.com/tauri-apps/wry/pull/1306) by [@Legend-Master](https://github.com/tauri-apps/wry/../../Legend-Master)) Support WebView2 version older than 101.0.1210.39 and document `incognito` and `theme` will not work for versions before it
+- [`5231a37`](https://github.com/tauri-apps/wry/commit/5231a379d09c9eea27f490b3062129dd474cb44c) ([#1322](https://github.com/tauri-apps/wry/pull/1322) by [@Legend-Master](https://github.com/tauri-apps/wry/../../Legend-Master)) Support WebView2 version older than 86.0.616.0 and document version requirements for `back_forward_navigation_gestures`, `with_user_agent`, `with_hotkeys_zoom`, `with_browser_accelerator_keys`
+- [`a23a28d`](https://github.com/tauri-apps/wry/commit/a23a28d32a01a0a4c8e62e83d34813ec7db4a004) ([#1341](https://github.com/tauri-apps/wry/pull/1341) by [@amrbashir](https://github.com/tauri-apps/wry/../../amrbashir)) Updated `windows` to 0.58.
+
+## \[0.41.0]
+
+- [`8b691df`](https://github.com/tauri-apps/wry/commit/8b691df1ac57eb5eb15082c5f6d72e871965c61e) ([#1285](https://github.com/tauri-apps/wry/pull/1285) by [@pewsheen](https://github.com/tauri-apps/wry/../../pewsheen)) On macOS, fix an issue that could cause a panic when running an async command.
+- [`6c7f45e`](https://github.com/tauri-apps/wry/commit/6c7f45e1e3f89805a9fd6b58a9382a6bbc2b0c28) ([#1287](https://github.com/tauri-apps/wry/pull/1287) by [@FabianLars](https://github.com/tauri-apps/wry/../../FabianLars)) Fixed a regression causing autoplay on windows to require user gestures.
+- [`24a7d27`](https://github.com/tauri-apps/wry/commit/24a7d275c9059dd9e54544b75a5996c9d0762f26) ([#1289](https://github.com/tauri-apps/wry/pull/1289) by [@renovate](https://github.com/tauri-apps/wry/../../renovate)) Update `windows` crate to `0.57` and `webview2-com` crate to `0.31`
+
+## \[0.40.1]
+
+- [`b6863ed`](https://github.com/tauri-apps/wry/commit/b6863ed1884fb190ae46f37ed72dcdd92de700cd)([#1275](https://github.com/tauri-apps/wry/pull/1275)) On Android, set `RustWebViewClient.currentUrl` field early in `onPageStarted` method instead of `onPageFinished`
+- [`f089964`](https://github.com/tauri-apps/wry/commit/f089964a3cf3014987aca24a7e7d6cae83e67d8a)([#1276](https://github.com/tauri-apps/wry/pull/1276)) Fixes `with_asynchronous_custom_protocol` crashing when sending the response on Linux.
+- [`637289d`](https://github.com/tauri-apps/wry/commit/637289dfb36150635177eb629a12b40fdaac1afe)([#1272](https://github.com/tauri-apps/wry/pull/1272)) On Android, make `WryActivity.setWebview` method public to prevent JNI crashes.
+
+## \[0.40.0]
+
+- [`a424a0b`](https://github.com/tauri-apps/wry/commit/a424a0b234cb20b3ca7305d87e82aba3c8b2bd41)([#1270](https://github.com/tauri-apps/wry/pull/1270)) On Windows, fix child webview invisible after creation because it was created with `0,0` size
+- [`d6f8dd7`](https://github.com/tauri-apps/wry/commit/d6f8dd7b6c0485fbb96fed34717969540eef2b96)([#1271](https://github.com/tauri-apps/wry/pull/1271)) On Windows, create child webview at the top of z-order to align with other platforms.
+- [`03d2535`](https://github.com/tauri-apps/wry/commit/03d25357d2c20a21640871cfca9d5f6a39c7afc8)([#1269](https://github.com/tauri-apps/wry/pull/1269)) On macOS, disable initialization script injection into subframes.
+- [`1e65049`](https://github.com/tauri-apps/wry/commit/1e65049d4842947ced6a807b93211542c46ca771)([#1267](https://github.com/tauri-apps/wry/pull/1267)) On macOS, fixed a crash when sending empty body by IPC.
+- [`0f3c886`](https://github.com/tauri-apps/wry/commit/0f3c886a224a1b52980ef90667860e58a6ad669a)([#1260](https://github.com/tauri-apps/wry/pull/1260)) On macOS, fixed an issue of not being able to listen to the cmd+key event in javascript in single WebView.
+- [`0f14e2a`](https://github.com/tauri-apps/wry/commit/0f14e2a540a1d54f82bdee2a3c2f93c43c593959)([#1259](https://github.com/tauri-apps/wry/pull/1259)) Default the margin when printing on MacOS to 0 so it is closer to the behavior of when printing on the web.
+- [`0f14e2a`](https://github.com/tauri-apps/wry/commit/0f14e2a540a1d54f82bdee2a3c2f93c43c593959)([#1259](https://github.com/tauri-apps/wry/pull/1259)) Add `WebViewExtMacOS::print_with_options` which allows to modify the margins that will be used on the print dialog.
+- [`f516122`](https://github.com/tauri-apps/wry/commit/f5161225940c545dd457af1178c73f36dfe63710)([#1262](https://github.com/tauri-apps/wry/pull/1262)) On Windows, enable webview2 [non client region support](https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2settings9?view=webview2-1.0.2478.35#get_isnonclientregionsupportenabled) which allows using `app-region` CSS style.
+
+## \[0.39.5]
+
+- [`4c88c66`](https://github.com/tauri-apps/wry/commit/4c88c66fb79fc3742f4592252c260e7e012d5fcf)([#1247](https://github.com/tauri-apps/wry/pull/1247)) Force the IPC and custom protocol tracing spans to have no parent.
+- [`2d43d62`](https://github.com/tauri-apps/wry/commit/2d43d62a8e61514ade27ae63fa33c1dee2de6744)([#1254](https://github.com/tauri-apps/wry/pull/1254)) On Windows, fix webview having a bigger size than the actual window size after creation and until the window is resized.
+
+## \[0.39.4]
+
+- [`8bbc2bf`](https://github.com/tauri-apps/wry/commit/8bbc2bf388113af2e7d91250abe1569070b351a9)([#1237](https://github.com/tauri-apps/wry/pull/1237)) Fix `WebviewBuilder::with_transparent`, `WebviewBuilder::with_background_color`, and `Webview::set_background_color` always failing and causing the webview to fail to load.
+- [`130c469`](https://github.com/tauri-apps/wry/commit/130c46965d0cd0ae2389d2fa9b683488a16e0cc8)([#1238](https://github.com/tauri-apps/wry/pull/1238)) Add `WebViewBuilderExtDarwin::with_data_store_identifier`.
+- [`203604c`](https://github.com/tauri-apps/wry/commit/203604c519e4acb169676b20ddf5956ba21b4d57)([#1233](https://github.com/tauri-apps/wry/pull/1233)) On Windows, fix the webview not filling up the whole window if the parent window was resized during the webview initialization.
+
+## \[0.39.3]
+
+- [`c7ca3db`](https://github.com/tauri-apps/wry/commit/c7ca3db581bbeb4f16a28f47c3a1fd59889c0978)([#1221](https://github.com/tauri-apps/wry/pull/1221)) On Windows, fix data directory created next to the executable with a gibberish name even if it was explicitly provided in `WebConext::new`
+
+## \[0.39.2]
+
+- [`3e3d59c`](https://github.com/tauri-apps/wry/commit/3e3d59cd4f79c21571e503a5bf80d4d54a654a38)([#1215](https://github.com/tauri-apps/wry/pull/1215)) On macOS, prevent NSExceptions and invalid memory access panics when dropping the WebView while custom protocols handlers may still be running.
+- [`ca6b5fb`](https://github.com/tauri-apps/wry/commit/ca6b5fbef6e5a5efe43b5cbebe6bfc4bc13930d3)([#1224](https://github.com/tauri-apps/wry/pull/1224)) Update `windows` crate to `0.56`
+
+## \[0.39.1]
+
+- [`f0e82d3`](https://github.com/tauri-apps/wry/commit/f0e82d3aa2da9da2b935d97c9a9b5e2dbd65b6ea)([#1217](https://github.com/tauri-apps/wry/pull/1217)) Fix target detection on build script to enhance cross compiling capabilities.
+- [`ed9fa9b`](https://github.com/tauri-apps/wry/commit/ed9fa9b3950206548cdaf0bcdb6c2d5fb72619b3)([#1210](https://github.com/tauri-apps/wry/pull/1210)) On iOS, allows media plays inline.
+
+## \[0.39.0]
+
+- [`ddda455`](https://github.com/tauri-apps/wry/commit/ddda4556b36a41b1c6f3f4d200eb16612d5f3f12)([#1207](https://github.com/tauri-apps/wry/pull/1207)) Disable deprecated applicationCache web api. This api was completely removed upstream in webkitgtk 2.44.
+- [`d7031ae`](https://github.com/tauri-apps/wry/commit/d7031aed8eebc6324e4b3db46ee53120ce24930b)([#1206](https://github.com/tauri-apps/wry/pull/1206)) On Windows, fix a crash due to a double-free when the host window is destroyed before the webview is dropped.
+- [`34ae1ca`](https://github.com/tauri-apps/wry/commit/34ae1ca3af75c471f77b90fd342bbcc79ac7189a)([#1202](https://github.com/tauri-apps/wry/pull/1202)) Add `dpi` module which is a re-export of `dpi` crate.
+- [`fdbd3d3`](https://github.com/tauri-apps/wry/commit/fdbd3d3c614acd42dddb49583d16de6b3f02e62d)([#1081](https://github.com/tauri-apps/wry/pull/1081)) Update `http` dependency to `1`
+- [`34ae1ca`](https://github.com/tauri-apps/wry/commit/34ae1ca3af75c471f77b90fd342bbcc79ac7189a)([#1202](https://github.com/tauri-apps/wry/pull/1202)) **Breaking Change**: Removed `x`, `y`, `with` and `height` fields from `Rect` struct and replaced it with `size` and `position` fields.
+- [`c033bd2`](https://github.com/tauri-apps/wry/commit/c033bd27f23953537520d17493c7b77ea146e7d5)([#1156](https://github.com/tauri-apps/wry/pull/1156)) On `macOS`, fix menu keyboard shortcuts when added `webview` as `child`.
+
+## \[0.38.2]
+
+- [`3e84a0e`](https://github.com/tauri-apps/wry/commit/3e84a0e276dfac0b28fb01f42460f9367fff9f22)([#1200](https://github.com/tauri-apps/wry/pull/1200)) Fixes compilation for 32bit Linux targets.
+
+## \[0.38.1]
+
+- [`7c9e71f`](https://github.com/tauri-apps/wry/commit/7c9e71f4692e94fd401ad3508ff3912d43880e2c)([#1192](https://github.com/tauri-apps/wry/pull/1192)) Fixes compilation failing on Windows with the `tracing` feature enabled.
+
+## \[0.38.0]
+
+- [`e6f0fbd`](https://github.com/tauri-apps/wry/commit/e6f0fbd33365070af46361605a922ba24e542fb5)([#1180](https://github.com/tauri-apps/wry/pull/1180)) Fixes a null pointer exception when running `window.ipc.postMessage(null)` on Android.
+- [`5789bf7`](https://github.com/tauri-apps/wry/commit/5789bf759ce94e4dad5ff26a08fe81521658a4e4)([#1187](https://github.com/tauri-apps/wry/pull/1187)) **Breaking change**: Refactored the file-drop handling on the webview for better representation of the actual drag and drop operation:
+
+ - Renamed `file-drop` cargo feature flag to `drag-drop`.
+ - Removed `FileDropEvent` enum and replaced with a new `DragDropEvent` enum.
+ - Renamed `WebViewAttributes::file_drop_handler` field to `WebViewAttributes::drag_drop_handler`.
+ - Renamed `WebViewAttributes::with_file_drop_handler` method to `WebViewAttributes::with_drag_drop_handler`.
+- [`b8fea39`](https://github.com/tauri-apps/wry/commit/b8fea396c2eca289e2f930ad635a15397b7c0dda)([#1183](https://github.com/tauri-apps/wry/pull/1183)) Changed `WebViewBuilder::with_ipc_handler` closure to take `http::Request` instead of `String` so the request URL is available.
+- [`3a2026b`](https://github.com/tauri-apps/wry/commit/3a2026b37be67dea53535f0a7d78b32452ac8b40)([#1182](https://github.com/tauri-apps/wry/pull/1182)) **Breaking changes**: Changed a few methods on `WebView` type to return a `Result`:
+
+ - `Webview::url`
+ - `Webview::zoom`
+ - `Webview::load_url`
+ - `Webview::load_url_with_headers`
+ - `Webview::bounds`
+ - `Webview::set_bounds`
+ - `Webview::set_visible`
+ - `WebviewExtWindows::set_theme`
+ - `WebviewExtWindows::set_memory_usage_level`
+ - `WebviewExtWindows::reparent`
+ - `WebviewExtUnix::reparent`
+ - `WebviewExtMacOS::reparent`
+- [`e1e2e07`](https://github.com/tauri-apps/wry/commit/e1e2e071e5329bc1a94864e368fdaa3041e79427)([#1190](https://github.com/tauri-apps/wry/pull/1190)) Update `webview2-com` crate to `0.29`
+- [`e1e2e07`](https://github.com/tauri-apps/wry/commit/e1e2e071e5329bc1a94864e368fdaa3041e79427)([#1190](https://github.com/tauri-apps/wry/pull/1190)) Update `windows` crate to `0.54`
+- [`00bc96d`](https://github.com/tauri-apps/wry/commit/00bc96d115879c841fc47242271db3761d19f746)([#1179](https://github.com/tauri-apps/wry/pull/1179)) Added `WryActivity::onWebViewCreate(android.webkit.WebView)` on Android.
+
+## \[0.37.0]
+
+- [`8c86fba`](https://github.com/tauri-apps/wry/commit/8c86fbaf51cd970737cc070583318d4b532349d2) **Breaking change**: Removed `data:` url support, as its native support in Windows and macOS are buggy and unreliable, use `Webview::with_html` instead.
+- [`8c86fba`](https://github.com/tauri-apps/wry/commit/8c86fbaf51cd970737cc070583318d4b532349d2) On Linux, decode `FilDropEvent` paths before emitting them to make it consistent across all platforms.
+- [`8c86fba`](https://github.com/tauri-apps/wry/commit/8c86fbaf51cd970737cc070583318d4b532349d2) Added `WebViewExtMacOS::reparent`,`WebViewExtWindows::reparent` and `WebViewExtUnix::reparent`.
+- [`8c86fba`](https://github.com/tauri-apps/wry/commit/8c86fbaf51cd970737cc070583318d4b532349d2) Revert global keys shortcuts (wry#1156)
+- [`8c86fba`](https://github.com/tauri-apps/wry/commit/8c86fbaf51cd970737cc070583318d4b532349d2) **Breaking change**: Removed internal url parsing which had a few side-effects such as encoded url content, now it is up to the user to pass a valid URL as a string. This also came with a few breaking changes:
+
+ - Removed `Url` struct re-export
+ - Removed `Error::UrlError` variant.
+ - Changed `WebviewAttributes::url` field type to `String`.
+ - Changed `WebviewBuilder::with_url` and `WebviewBuilder::with_url_and_headers` return type to `WebviewBuilder` instead of `Result`.
+ - Changed `Webview::url` getter to return a `String` instead of `Url`.
+
+## \[0.36.0]
+
+- [`8646120`](https://github.com/tauri-apps/wry/commit/8646120339b8ed983582caa9e668fc286dc59cb3)([#1159](https://github.com/tauri-apps/wry/pull/1159)) On android, fix `no non-static method ".evalScript(ILjava/lang/String;)"` when calling `Window::eval`.
+- [`8646120`](https://github.com/tauri-apps/wry/commit/8646120339b8ed983582caa9e668fc286dc59cb3)([#1159](https://github.com/tauri-apps/wry/pull/1159)) On macOS, fix a release build crashes with SEGV when calling `WebView::evaluate_script`. This crash bug was introduced at v0.35.2.
+- [`8646120`](https://github.com/tauri-apps/wry/commit/8646120339b8ed983582caa9e668fc286dc59cb3)([#1159](https://github.com/tauri-apps/wry/pull/1159)) **Breaking change** Update [raw-window-handle](https://crates.io/crates/raw-window-handle) crate to v0.6.
+
+ - `HasWindowHandle` trait is required for window types instead of `HasRawWindowHandle`.
+ - `wry::raw_window_handle` now re-exports v0.6.
+- [`8646120`](https://github.com/tauri-apps/wry/commit/8646120339b8ed983582caa9e668fc286dc59cb3)([#1159](https://github.com/tauri-apps/wry/pull/1159)) On `macOS`, fix menu keyboard shortcuts. This issue bug was introduced in `v2` when added `webview` as `child`.
+
+## \[0.35.2]
+
+- [`0ef041f`](https://github.com/tauri-apps/wry/commit/0ef041ffece143dcb5059ad43596c63b18a62928)([#1133](https://github.com/tauri-apps/wry/pull/1133)) On Linux, apply passed webview bounds when using `WebView::new_gtk` or `WebViewBuilder::new_gtk` with `gtk::Fixed` widget. This allows to create multiple webviews inside `gtk::Fixed` in the same window.
+- [`0ef041f`](https://github.com/tauri-apps/wry/commit/0ef041ffece143dcb5059ad43596c63b18a62928)([#1133](https://github.com/tauri-apps/wry/pull/1133)) Added tracing spans for `evaluate_script`, `ipc_handler` and `custom_protocols` behind the `tracing` feature flag.
+
+## \[0.35.1]
+
+- [`a4a39b9`](https://github.com/tauri-apps/wry/commit/a4a39b9b23da3c562f27730dd0eab09b9459755b)([#1098](https://github.com/tauri-apps/wry/pull/1098)) Fix the API documentation cannot be built on docs.rs.
+- [`e116d42`](https://github.com/tauri-apps/wry/commit/e116d427319d1adbc14d418e78c43ddb49b70d76)([#1111](https://github.com/tauri-apps/wry/pull/1111)) Fix screen share permissions dialog not showing up on macOS 14.0+
+- [`a8c0d38`](https://github.com/tauri-apps/wry/commit/a8c0d384fc51b12d2436c11d10fd8c2dfdcd9d4a)([#1097](https://github.com/tauri-apps/wry/pull/1097)) Fix IPC crash on wkwebview if receiving invalid types.
+- [`8fddbb6`](https://github.com/tauri-apps/wry/commit/8fddbb6d514de8fa0561bd6631ff8a3699911ddd)([#1091](https://github.com/tauri-apps/wry/pull/1091)) Add `WebView::bounds` getter.
+- [`30a85f3`](https://github.com/tauri-apps/wry/commit/30a85f31141839a5284b1bfdd52b1cb690fcd10d)([#1122](https://github.com/tauri-apps/wry/pull/1122)) On Windows, fix file drop handler.
+
+## \[0.35.0]
+
+- [`e61e7f8`](https://github.com/tauri-apps/wry/commit/e61e7f8474c18752f5c60d3f1f5ba33b27e41d52)([#1090](https://github.com/tauri-apps/wry/pull/1090)) **Breaking change** Consistently use `WebView` in API names. The following APIs were renamed:
+
+ - `WebviewExtWindows` → `WebViewExtWindows`
+ - `WebviewExtUnix` → `WebViewExtUnix`
+ - `WebviewExtMacOS` → `WebViewExtMacOS`
+ - `WebviewExtIOS` → `WebViewExtIOS`
+ - `WebviewExtAndroid` → `WebViewExtAndroid`
+ - `WebviewUriLoader` → `WebViewUriLoader`
+- [`e61e7f8`](https://github.com/tauri-apps/wry/commit/e61e7f8474c18752f5c60d3f1f5ba33b27e41d52)([#1090](https://github.com/tauri-apps/wry/pull/1090)) Add `WebViewExtWindows::set_memory_usage_level` API to set the [memory usage target level](https://learn.microsoft.com/en-us/dotnet/api/microsoft.web.webview2.core.corewebview2memoryusagetargetlevel) on Windows. Setting 'Low' memory usage target level when an application is going to inactive can significantly reduce the memory consumption. Please read the [guide for WebView2](https://github.com/MicrosoftEdge/WebView2Feedback/blob/main/specs/MemoryUsageTargetLevel.md) for more details.
+- [`e61e7f8`](https://github.com/tauri-apps/wry/commit/e61e7f8474c18752f5c60d3f1f5ba33b27e41d52)([#1090](https://github.com/tauri-apps/wry/pull/1090)) - Add cfg_aliases for easier feature configuration. And add `os-webview` as default feature.
+- [`e61e7f8`](https://github.com/tauri-apps/wry/commit/e61e7f8474c18752f5c60d3f1f5ba33b27e41d52)([#1090](https://github.com/tauri-apps/wry/pull/1090)) Enhance initalization script implementation on Android supporting any kind of URL.
+- [`e61e7f8`](https://github.com/tauri-apps/wry/commit/e61e7f8474c18752f5c60d3f1f5ba33b27e41d52)([#1090](https://github.com/tauri-apps/wry/pull/1090)) Fix wkwebview crashed when received invalid UTF8 string from IPC.
+- [`e61e7f8`](https://github.com/tauri-apps/wry/commit/e61e7f8474c18752f5c60d3f1f5ba33b27e41d52)([#1090](https://github.com/tauri-apps/wry/pull/1090)) Refactor new method to take raw window handle instead. Following are APIs got affected:
+
+ - `application` module is removed, and `webivew` module is moved to root module.
+ - `WebViewBuilder::new`, `WebView::new` now take `RawWindowHandle` instead.
+ - Add `WebViewBuilder::new_as_child`, `WebView::new_as_child` to crate a webview as a child inside a parent window.
+ - `Webview::inner_size` is removed.
+ - Add `WebViewBuilderExtUnix` trait to extend `WebViewBuilder` on Unix platforms.
+ - Add `new_gtk` functions to `WebViewBuilderExtUnix` and `WebviewExtUnix`.
+ - [raw-window-handle](https://docs.rs/raw-window-handle/latest/raw_window_handle/) crate is re-exported as `wry::raw_window_handle`.
+
+ This also means that we removed `tao` as a dependency completely which required some changes to the public APIs and to the Android backend:
+
+ - Webview attributes `ipc_handler`, `file_drop_handler`, `document_change_handler` don't take the `Window` as first parameter anymore.
+ Users should use closure to capture the types they want to use.
+ - Position field in `FileDrop` event is now a tuple of `(x, y)` physical position instead of `PhysicalPosition`. Users need to handle scale factor
+ - We exposed the `android_setup` function that needs to be called once to setup necessary logic.
+ - Previously the `android_binding!` had internal call to `tao::android_binding` but now that `tao` has been removed,
+ the macro signature has changed and you now need to call `tao::android_binding` yourself, checkout the crate documentation for more information.
+
+## \[0.34.2]
+
+- [`c2e6980`](https://github.com/tauri-apps/wry/commit/c2e6980b6cacf02b3f8c0b0285d391d010f4536b)([#1047](https://github.com/tauri-apps/wry/pull/1047)) Fix doc building by removing dox feature requirement from `webkit2gtk`.
+- [`82908d4`](https://github.com/tauri-apps/wry/commit/82908d4e001d1be6fd5d692fcb2e08908c4b5e16)([#1045](https://github.com/tauri-apps/wry/pull/1045)) Fix docs.rs build.
+
+## \[0.34.1]
+
+- [`3de68e7`](https://github.com/tauri-apps/wry/commit/3de68e781d52f3c817473c1ee8cc73b392d60c98)([#1043](https://github.com/tauri-apps/wry/pull/1043)) Fix compilation with the `linux-body` feature.
+
+## \[0.34.0]
+
+- [`ce95730`](https://github.com/tauri-apps/wry/commit/ce957301566dfe33f576810982a3eb38813d22ea)([#1036](https://github.com/tauri-apps/wry/pull/1036)) Upgrade gtk to 0.18 and bump MSRV to 1.70.0.
+- [`591fda8`](https://github.com/tauri-apps/wry/commit/591fda8045b88ea0edbc5676e2814fb9acb2d6f6)([#1042](https://github.com/tauri-apps/wry/pull/1042)) Use `gtk`'s re-exported modules instead.
+- [`b22a19e`](https://github.com/tauri-apps/wry/commit/b22a19e1c19ce90aec6521a66587dac9b0351579)([#1037](https://github.com/tauri-apps/wry/pull/1037)) Update `windows` and `windows-implement` crate to `0.51`
+
+## \[0.33.1]
+
+- [`0582cdf`](https://github.com/tauri-apps/wry/commit/0582cdf4a195db5df9c4e21d24039c64b7474683)([#1033](https://github.com/tauri-apps/wry/pull/1033)) Fix documentation for macOS target not being generated on docs.rs.
+
+## \[0.33.0]
+
+- [`5adf9da`](https://github.com/tauri-apps/wry/commit/5adf9da2151800ec2431a1547cc0d970fc95b764)([#994](https://github.com/tauri-apps/wry/pull/994)) **Breaking change** Wry now defaults to `http://.localhost/` for custom protocols on Android.
+- [`844d95a`](https://github.com/tauri-apps/wry/commit/844d95a4035f68371d64f6b04151982481cdee70)([#1023](https://github.com/tauri-apps/wry/pull/1023)) Fixes async custom protocol resolver on Windows.
+- [`5adf9da`](https://github.com/tauri-apps/wry/commit/5adf9da2151800ec2431a1547cc0d970fc95b764)([#994](https://github.com/tauri-apps/wry/pull/994)) Add `WebViewBuilderExtAndroid::with_https_scheme` to be able to choose between `http` and `https` for custom protocols on Android.
+- [`c5c3731`](https://github.com/tauri-apps/wry/commit/c5c3731f2027802735f7b80c7ae5f4b64d0fb746)([#1024](https://github.com/tauri-apps/wry/pull/1024)) Add winit-gtk to support winit feature flag on Linux.
+
+## \[0.32.0]
+
+- [`4bdf1c3`](https://github.com/tauri-apps/wry/commit/4bdf1c366de5708b7626ca63eb39e134869c5bd4)([#1017](https://github.com/tauri-apps/wry/pull/1017)) Added `WebViewBuilder::with_asynchronous_custom_protocol` to allow implementing a protocol handler that resolves asynchronously.
+- [`70d8ae0`](https://github.com/tauri-apps/wry/commit/70d8ae057c5e8b81db4aac28e5fa2dd3424b3307)([#1009](https://github.com/tauri-apps/wry/pull/1009)) Fixes Android freezing when handling request due to endless iteration when reading request headers.
+- [`b5e1875`](https://github.com/tauri-apps/wry/commit/b5e1875230794502a8e74c74abe79ca63488e421)([#994](https://github.com/tauri-apps/wry/pull/994)) **Breaking change** Wry now defaults to `http://.localhost/` for custom protocols on Windows.
+- [`b5e1875`](https://github.com/tauri-apps/wry/commit/b5e1875230794502a8e74c74abe79ca63488e421)([#994](https://github.com/tauri-apps/wry/pull/994)) Add `WebViewBuilderExtWindows::with_https_scheme` to be able to choose between `http` and `https` for custom protocols on Windows.
+- [`fa15076`](https://github.com/tauri-apps/wry/commit/fa15076207d9e678db4149210aba929044d0ff45)([#163](https://github.com/tauri-apps/wry/pull/163)) Add `winit` and `tao` feature flag with `tao` as default.
+- [`4bdf1c3`](https://github.com/tauri-apps/wry/commit/4bdf1c366de5708b7626ca63eb39e134869c5bd4)([#1017](https://github.com/tauri-apps/wry/pull/1017)) **Breaking change:** `WebViewBuidler::with_custom_protocol` closure now returns `http::Response` instead of `Result`.
+- [`ebc4a20`](https://github.com/tauri-apps/wry/commit/ebc4a20d218036b29b186aca1853d28d870fa2ef)([#1015](https://github.com/tauri-apps/wry/pull/1015)) Add `WebViewAtrributes.focused` and `WebViewBuilder::with_focused` to control whether to focus the webview upon creation or not. Supported on Windows and Linux only.
+
+## \[0.31.0]
+
+- [`e47562f`](https://github.com/tauri-apps/wry/commit/e47562f71284457ff77e4c8b6bf02fdbe19ab880)([#993](https://github.com/tauri-apps/wry/pull/993)) Update the unmaintained `kuchiki` crate to the maintained `kuchikiki` crate.
+- [`7a353c7`](https://github.com/tauri-apps/wry/commit/7a353c7d8a474bfb14b92a272efc75ceb194ea90)([#980](https://github.com/tauri-apps/wry/pull/980)) Add `WebViewBuilder::with_on_page_load_handler` for providing a callback for handling various page loading events.
+- [`b0a08b1`](https://github.com/tauri-apps/wry/commit/b0a08b165215823ed7a48a0a377e0f09832898df)([#997](https://github.com/tauri-apps/wry/pull/997)) Update `tao` to version `0.22` which has removed the global-shortcut, menus and tray features, see [tao@v0.22 release](https://github.com/tauri-apps/tao/releases/tag/tao-v0.22.0).
+
+## \[0.30.0]
+
+- [`17e04e2`](https://github.com/tauri-apps/wry/commit/17e04e2b4c0bd75f93bbc511234f0d3c93726b63)([#985](https://github.com/tauri-apps/wry/pull/985)) Make `WebViewBuilder::with_navigation_handler` apply to Android `loadUrl` calls.
+- [`17e04e2`](https://github.com/tauri-apps/wry/commit/17e04e2b4c0bd75f93bbc511234f0d3c93726b63)([#985](https://github.com/tauri-apps/wry/pull/985)) Add support for `WebViewBuilder::with_navigation_handler` on Android.
+- [`87b331a`](https://github.com/tauri-apps/wry/commit/87b331a7d4c169814d2b6a1f8a06d976ad7565bc)([#978](https://github.com/tauri-apps/wry/pull/978)) On Windows, avoid resizing the webview when the window gets minimized to avoid unnecessary `resize` event on JS side.
+- [`17e04e2`](https://github.com/tauri-apps/wry/commit/17e04e2b4c0bd75f93bbc511234f0d3c93726b63)([#985](https://github.com/tauri-apps/wry/pull/985)) Update tao to 0.21.
+
+## \[0.29.0]
+
+- [`c09dd7b`](https://github.com/tauri-apps/wry/commit/c09dd7bebe3d00f989dff57f0414f1023653efe4)([#968](https://github.com/tauri-apps/wry/pull/968)) Remove ActionBar handling from wry. If you want to hide the action bar, hide it using the `themes.xml` file in your android project or inherit `WryActivity` class and use `getSupportActionBar()?.hide()` in the `onCreate` method.
+- [`2b56bfa`](https://github.com/tauri-apps/wry/commit/2b56bfaaee5125f0dc48f4a9bedb53db0e679e5f)([#966](https://github.com/tauri-apps/wry/pull/966)) Add support for `WebViewBuilder::with_html` and `WebViewAttributes.html` on Android.
+- [`d2c1819`](https://github.com/tauri-apps/wry/commit/d2c1819f81a7b03288348f1c3b195407400dfbde)([#969](https://github.com/tauri-apps/wry/pull/969)) On Linux, replace `linux-header` flag with `linux-body` flag. Request headers are enabled by default. Add request body on custom protocol but it's behind the flag.
+- [`f7dded4`](https://github.com/tauri-apps/wry/commit/f7dded417c239c39ca4cad6f9d3f6b319c3f91f2)([#955](https://github.com/tauri-apps/wry/pull/955)) The bug was reported in tauri repo: https://github.com/tauri-apps/tauri/issues/5986
+
+ With input method preedit disabled,fcitx can anchor at edit cursor position.
+ the pre-edit text will not disappear,instead it shows in the fcitx selection window below the input area.
+- [`2b56bfa`](https://github.com/tauri-apps/wry/commit/2b56bfaaee5125f0dc48f4a9bedb53db0e679e5f)([#966](https://github.com/tauri-apps/wry/pull/966)) Set base url and origin to null for `WebViewBuilder::with_html` and `WebViewAttributes.html` for consistency on all platforms.
+
+## \[0.28.3]
+
+- On iOS, fix panic at runtime due to setting webview ivar.
+ - [c9002c1](https://github.com/tauri-apps/wry/commit/c9002c1e043e8a948fff2e671ccb04153a10dcd5) fix(macos): remove `webview` ivar in `WryWebView` ([#943](https://github.com/tauri-apps/wry/pull/943)) on 2023-04-26
+
+## \[0.28.2]
+
+- Adjust `cargo:rerun-if-changed` instruction for Android files.
+ - [cc934fe](https://github.com/tauri-apps/wry/commit/cc934fe799836e4cc72d796f5eddba868a9b585e) refactor(build): adjust rerun-if-changed instruction for Android files ([#940](https://github.com/tauri-apps/wry/pull/940)) on 2023-04-24
+
+## \[0.28.1]
+
+- Fix unresolved reference in kotlin files when building for android.
+ - [ed36c0b](https://github.com/tauri-apps/wry/commit/ed36c0b032cdf27c926577ee72658ad9f0785a5f) fix(android): fix unresolved reference in kotlin files ([#932](https://github.com/tauri-apps/wry/pull/932)) on 2023-04-19
+- Support modifying user agent string on Android.
+ - [4a320b0](https://github.com/tauri-apps/wry/commit/4a320b0bdef81d36a1f85a083c2abbabaf958521) feat(android): add support modifying user agent string ([#933](https://github.com/tauri-apps/wry/pull/933)) on 2023-04-20
+- On Linux and macOS, add synthesized event for mouse backward and forward buttons.
+ - [6ef820b](https://github.com/tauri-apps/wry/commit/6ef820b97dd505bacdc7d3f906112ffe0a6a1e60) feat: synthesize forward/backward mouse button on Linux and macOS ([#900](https://github.com/tauri-apps/wry/pull/900)) on 2023-04-18
+
+## \[0.28.0]
+
+- Add `Webview::clear_browsing_data` method.
+ - [5f0c9e4](https://github.com/tauri-apps/wry/commit/5f0c9e4595baf5d60ec407b391f873ab52abf923) feat: add `Webview::clear_browsing_data` ([#915](https://github.com/tauri-apps/wry/pull/915)) on 2023-04-18
+- On Android, generate a `proguard-wry.pro` file that could be used to keep the necessary symbols for wry when using minification.
+ - [ced4c0b](https://github.com/tauri-apps/wry/commit/ced4c0b4459ceb0ff89d07b84d6396c60cfd75e5) feat: generate proguard rule file for android ([#927](https://github.com/tauri-apps/wry/pull/927)) on 2023-04-17
+- Update `tao` to `0.19`
+ - [d560981](https://github.com/tauri-apps/wry/commit/d56098113f9764e31f73aa84144ee84be8e2aead) refactor: rename `TauriActivity` to `WryActivity` ([#926](https://github.com/tauri-apps/wry/pull/926)) on 2023-04-17
+
+## \[0.27.3]
+
+- Adds a way to launch a WebView as incognito through a new API at WebViewBuilder named as `with_incognito`.
+ - [8698836](https://github.com/tauri-apps/wry/commit/86988368a4e833b21089d119c934529ecfe306b7) feat: Add a way to launch WebViews as incognito `WebView::as_incognito`, closes [#908](https://github.com/tauri-apps/wry/pull/908) ([#916](https://github.com/tauri-apps/wry/pull/916)) on 2023-04-06
+- On macOS and iOS, remove webcontext implementation since we don't actually use it. This also fix segfault if users drop webcontext early.
+ - [3cc45cb](https://github.com/tauri-apps/wry/commit/3cc45cb86b93c56cf2444bfc37dc6ba229d4222e) Remove webcontext implementation on wkwebview ([#922](https://github.com/tauri-apps/wry/pull/922)) on 2023-04-07
+- Use the new WKWebView `inspectable` property if available (iOS 16.4, macOS 13.3).
+ - [c3f7304](https://github.com/tauri-apps/wry/commit/c3f7304dbfd45d1e1c27b53be2369c737e946b69) feat(macos): use WKWebView's inspectable property ([#923](https://github.com/tauri-apps/wry/pull/923)) on 2023-04-08
+
+## \[0.27.2]
+
+- On Android, Add support for native back button navigation.
+ - [fc232a3](https://github.com/tauri-apps/wry/commit/fc232a32268a13ec89965450dd6cf0abca064b24) feat(android): add support for native back navigation ([#918](https://github.com/tauri-apps/wry/pull/918)) on 2023-04-03
+- Fix `WebView::url` getter on Android.
+ - [427cf92](https://github.com/tauri-apps/wry/commit/427cf9222d7152f911aa70eb778eb7aa90c83fac) Unify custom porotocol across Android/iOS ([#546](https://github.com/tauri-apps/wry/pull/546)) on 2022-04-11
+ - [b89398a](https://github.com/tauri-apps/wry/commit/b89398a9bb17303544a1f04303783f311c6dc77f) Publish New Versions ([#547](https://github.com/tauri-apps/wry/pull/547)) on 2022-04-26
+ - [c22744a](https://github.com/tauri-apps/wry/commit/c22744a0c11e9c78f548dc3786e6be30c1d6f46f) fix(android): use correct method signature ([#917](https://github.com/tauri-apps/wry/pull/917)) on 2023-03-31
+- Add Webview attribute to enable/disable autoplay. Enabled by default.
+ - [6a523cc](https://github.com/tauri-apps/wry/commit/6a523cc7a633236e1fb562e0626e0aedc67ec2fc) feat: Add setting to enable autoplay ([#913](https://github.com/tauri-apps/wry/pull/913)) on 2023-04-04
+- Fix the `WebViewBuilder::with_url` when the projet use `mimalloc`
+ - [c22744a](https://github.com/tauri-apps/wry/commit/c22744a0c11e9c78f548dc3786e6be30c1d6f46f) fix(android): use correct method signature ([#917](https://github.com/tauri-apps/wry/pull/917)) on 2023-03-31
+- Revert [`51b49c54`](https://github.com/tauri-apps/wry/commit/51b49c54e41c71d1c5f03b568094d43fb9dc32ac) which hid the webview when minimized on Windows.
+ - [f76568a](https://github.com/tauri-apps/wry/commit/f76568a1cc8f7e56f36633d2f6e700af684bb213) fix(windows): Ignore resize event when minimizing frameless windows ([#909](https://github.com/tauri-apps/wry/pull/909)) on 2023-03-24
+
+## \[0.27.1]
+
+- On Windows, Linux and macOS, add method `evaluate_script_with_callback` to execute javascipt with a callback.
+ Evaluated result will be serialized into JSON string and pass to the callback.
+ - [2647731](https://github.com/tauri-apps/wry/commit/2647731c1f084565895a5306fa6465ee6cd271c2) feat: support callback function in eval ([#778](https://github.com/tauri-apps/wry/pull/778)) on 2023-03-23
+- On iOS, set webview scroll bounce default to NO.
+ - [4d61cf1](https://github.com/tauri-apps/wry/commit/4d61cf122dc0e5b2cef818e0fd491dbd0fd47621) fix(ios): set scroll bounce default to NO ([#907](https://github.com/tauri-apps/wry/pull/907)) on 2023-03-20
+- Update the value returned on a `None` value of `ClassDecl::new("WryDownloadDelegate", class!(NSObject))`
+ from `UIViewController` to `WryDownloadDelegate`.
+ - [7795356](https://github.com/tauri-apps/wry/commit/7795356a45b1bd015fad0e9973fc5af58c8c339b) fix: WryDownloadDelegate call after first time on 2023-02-20
+- On Linux, disable system appearance for scrollbars.
+ - [530a8b7](https://github.com/tauri-apps/wry/commit/530a8b73766dc54736ae6de9528683b27430eaa6) fix(linux): disable system appearance for scrollbars ([#897](https://github.com/tauri-apps/wry/pull/897)) on 2023-03-08
+- On Windows and Linux, implement `WebviewBuilder::with_back_forward_navigation_gestures` and `WebviewAttributes::back_forward_navigation_gestures` to control swipe navigation. Disabled by default.
+ - [15b4ddf](https://github.com/tauri-apps/wry/commit/15b4ddf7698cf04b90ffcc3164ccb7b62daf6ed0) feat(win\&linux): implement the option to control gesture navigation ([#896](https://github.com/tauri-apps/wry/pull/896)) on 2023-03-07
+
+## \[0.27.0]
+
+- Add function to dispatch closure with the Android context.
+ - [a9e186c](https://github.com/tauri-apps/wry/commit/a9e186cab4456d7ac2c265e61e71b345f7d269c4) feat(android): add function to dispatch closure to the Android context ([#864](https://github.com/tauri-apps/wry/pull/864)) on 2023-02-06
+- On macOS, fix crash when getting dragging position.
+ - [a8f7cef](https://github.com/tauri-apps/wry/commit/a8f7cefaac72d3e9fd2f8901f790a777d9888357) Fix crash when getting drag position ([#867](https://github.com/tauri-apps/wry/pull/867)) on 2023-02-04
+- On Android, `wry` can again load assets from the apk's `asset` folder via a custom protocol. This is set by `WebViewBuilder`'s method `with_asset_loader`, which is exclusive to Android (by virtue of existing within `WebViewBuilderExtAndroid`).
+ - [077eb3a](https://github.com/tauri-apps/wry/commit/077eb3a7ca520d07e73f899da60ce23eef941e6f) fix(android): restore asset loading functionality to android (fix: [#846](https://github.com/tauri-apps/wry/pull/846)) ([#854](https://github.com/tauri-apps/wry/pull/854)) on 2023-02-07
+- Update `webview2-com` to `0.22` and `windows-rs` to `0.44` which bumps the MSRV of this crate on Windows to `1.64`.
+ - [496bfb5](https://github.com/tauri-apps/wry/commit/496bfb5c7be55e9c2bb674e241f9d7d2620e2acd) chore(deps): update to windows-rs 0.44 and webview2-com 0.22 ([#871](https://github.com/tauri-apps/wry/pull/871)) on 2023-02-06
+
+## \[0.26.0]
+
+- Added `WebViewBuilderExtAndroid` trait and with `on_webview_created` hook.
+ - [08c0156](https://github.com/tauri-apps/wry/commit/08c0156c60e016bd77f6e0f1bd16ae31dc48d4a0) feat(android): add on_webview_created hook, expose find_class ([#855](https://github.com/tauri-apps/wry/pull/855)) on 2023-01-30
+- Enable dox feature when building docs.
+ - [c6e53c6](https://github.com/tauri-apps/wry/commit/c6e53c6fa007dcc2dc4771a94b7f312f95edd892) Enable dox feature when building docs ([#861](https://github.com/tauri-apps/wry/pull/861)) on 2023-01-31
+- Expose `wry::webview::prelude::find_class` function to find an Android class in the app project scope.
+ - [08c0156](https://github.com/tauri-apps/wry/commit/08c0156c60e016bd77f6e0f1bd16ae31dc48d4a0) feat(android): add on_webview_created hook, expose find_class ([#855](https://github.com/tauri-apps/wry/pull/855)) on 2023-01-30
+- Added `WebviewExtIOS` trait to access the WKWebView and userContentController references.
+ - [f546c44](https://github.com/tauri-apps/wry/commit/f546c44fce76faf04855a97b285bbdef8ae80f3d) feat(ios): add WebviewExtIOS ([#859](https://github.com/tauri-apps/wry/pull/859)) on 2023-01-30
+
+## \[0.25.0]
+
+- **Breaking Change:** Bump webkit2gtk to 0.19. This will use webkit2gtk-4.1 as dependency from now on. Also Bump gtk version: 0.15 -> 0.16.
+ - [c5f3b36](https://github.com/tauri-apps/wry/commit/c5f3b36b7ac4613971ddf56397932c44a9c74878) Bump gtk version 0.15 -> 0.16 ([#851](https://github.com/tauri-apps/wry/pull/851)) on 2023-01-26
+- **Breaking** Add position of the drop to `FileDropEvent` struct.
+ - [bce39e2](https://github.com/tauri-apps/wry/commit/bce39e2be195194e547b0021e770e45a3df15fa1) feat: add file drop position ([#847](https://github.com/tauri-apps/wry/pull/847)) on 2023-01-17
+- On Android, fix the injection of `intialization_scripts` for devServers where the `Content-Type` header includes more information than just `"text/plain"`.
+ - [87216c7](https://github.com/tauri-apps/wry/commit/87216c7f01d5f65641422343dd0aa7f08ea61d0d) fix: make the Content-Type check spec compliant ([#844](https://github.com/tauri-apps/wry/pull/844)) on 2023-01-14
+
+## \[0.24.1]
+
+- Update `tao` to `0.16.0`
+ - [a27a66b](https://github.com/tauri-apps/wry/commit/a27a66baccc86873110b0aa67ddad1f3a8dbd205) chore: update tao to 0.16.0 on 2023-01-11
+
+## \[0.24.0]
+
+- Changed env vars used when building for Android; changed `WRY_ANDROID_REVERSED_DOMAIN` to `WRY_ANDROID_PACKAGE` and `WRY_ANDROID_APP_NAME_SNAKE_CASE` to `WRY_ANDROID_LIBRARY`.
+ - [dfe6a5e](https://github.com/tauri-apps/wry/commit/dfe6a5e78acca05d9e0808c8f4ed974a8657b847) refactor: improve android env vars naming ([#829](https://github.com/tauri-apps/wry/pull/829)) on 2022-12-30
+- Fixes Android initialization scripts order.
+ - [7f819c0](https://github.com/tauri-apps/wry/commit/7f819c0ec3d3aaaf582d9eecde09f5e539c45743) fix(android): initialization scripts order ([#808](https://github.com/tauri-apps/wry/pull/808)) on 2022-12-12
+- Remove redundant `.clone()` calls and avoid unnecessary heap allocations.
+ - [45f2b21](https://github.com/tauri-apps/wry/commit/45f2b2127e73718b71f349eae1847d1764c748f5) perf: remove redundant `.clone()` calls and avoid unnecessary heap allocations ([#812](https://github.com/tauri-apps/wry/pull/812)) on 2022-12-14
+- Change return type of [custom protocol handlers](https://docs.rs/wry/latest/wry/webview/struct.WebViewBuilder.html#method.with_custom_protocol) from `Result>>` to `Result>>`. This allows the handlers to return static resources without heap allocations. This is effective when you embed some large files like bundled JavaScript source as `&'static [u8]` using [`include_bytes!`](https://doc.rust-lang.org/std/macro.include_bytes.html).
+ - [ddd3461](https://github.com/tauri-apps/wry/commit/ddd34614be8a0ba826eff8acbf4b06710ce2ba65) perf: Change return type of custom protocol handler from `Vec` to `Cow<'static, [u8]>`, closes [#796](https://github.com/tauri-apps/wry/pull/796) ([#797](https://github.com/tauri-apps/wry/pull/797)) on 2022-12-12
+- Ensures that the script passed to `.with_initialization_script("here")` is not empty.
+ - [ceb209e](https://github.com/tauri-apps/wry/commit/ceb209eddc20d284be748ee382ba8aef7686863b) fix empty string bug (fix: [#833](https://github.com/tauri-apps/wry/pull/833)) ([#836](https://github.com/tauri-apps/wry/pull/836)) on 2023-01-08
+- Add APIs to process webview document title change.
+ - [14a0ee3](https://github.com/tauri-apps/wry/commit/14a0ee323e8e596f45d4a57d2d86abcf0a848bc8) feat: add document title changed handler, closes [#804](https://github.com/tauri-apps/wry/pull/804) ([#825](https://github.com/tauri-apps/wry/pull/825)) on 2022-12-30
+- Evaluate scripts after the page load starts on Linux and macOS.
+ - [ca7c8e4](https://github.com/tauri-apps/wry/commit/ca7c8e44832b3236f08022f7ea3469be9a65aa3f) fix(unix): race condition on script eval ([#815](https://github.com/tauri-apps/wry/pull/815)) on 2022-12-14
+- Improve panic error messages on the build script.
+ - [5b9f21d](https://github.com/tauri-apps/wry/commit/5b9f21d38974881c2d6f4456990f5863484e7382) feat: improve build script panic messages ([#807](https://github.com/tauri-apps/wry/pull/807)) on 2022-12-12
+- Add `WebViewBuilder::with_url_and_headers` and `WebView::load_url_with_headers` to navigate to urls with headers.
+ - [8ae93b9](https://github.com/tauri-apps/wry/commit/8ae93b9c76b2efe14e93febd009e31fc459275a8) feat: add headers when loading URLs, closes [#816](https://github.com/tauri-apps/wry/pull/816) ([#826](https://github.com/tauri-apps/wry/pull/826)) on 2023-01-01
+ - [e246bd1](https://github.com/tauri-apps/wry/commit/e246bd164eb9df1b0e48123a542bbd240958c9db) chore: update headers change file on 2023-01-01
+- Change class declare name from `UIViewController` to `WryNavigationDelegate` to avoid class name conflict on iOS.
+ - [fca42a0](https://github.com/tauri-apps/wry/commit/fca42a0730e75a142f7f354c6ac3f6d6a0f4711f) fix(ios): navigation delegate class name conflict ([#824](https://github.com/tauri-apps/wry/pull/824)) on 2022-12-27
+- Rerun build script if the `WRY_ANDROID_KOTLIN_FILES_OUT_DIR` directory changes.
+ - [1cf92e2](https://github.com/tauri-apps/wry/commit/1cf92e2b68b1d9109de3924a3cd1fd10cb8c7c17) feat(build): rerun if kotlin out directory changes ([#839](https://github.com/tauri-apps/wry/pull/839)) on 2023-01-10
+- On Windows, Add `WebviewBuilderExtWindows::with_theme` and `WebviewExtWindows::set_theme` to change webview2 theme.
+ - [563a497](https://github.com/tauri-apps/wry/commit/563a497d7f842c760ad05a0017059e7781c2b810) feat(webview2): add theme API, closes [#806](https://github.com/tauri-apps/wry/pull/806) ([#809](https://github.com/tauri-apps/wry/pull/809)) on 2022-12-13
+
+## \[0.23.4]
+
+- Fixes Android initialization scripts order.
+ - [800cc48](https://github.com/tauri-apps/wry/commit/800cc48b46ba9e5ce968efd5708aeb71b63832f9) fix(android): initialization scripts order ([#808](https://github.com/tauri-apps/wry/pull/808)) on 2022-12-12
+- Improve panic error messages on the build script.
+ - [4ec7386](https://github.com/tauri-apps/wry/commit/4ec7386740ab2edb3b56d72668841af3f329cefd) feat: improve build script panic messages ([#807](https://github.com/tauri-apps/wry/pull/807)) on 2022-12-12
+
+## \[0.23.3]
+
+- Fix the beep sound on macOS
+ - [94256c3](https://github.com/tauri-apps/wry/commit/94256c3adb1d6c005e0386f8b20f01d597b52f28) Fix beep sound, closes [#799](https://github.com/tauri-apps/wry/pull/799) ([#801](https://github.com/tauri-apps/wry/pull/801)) on 2022-12-10
+
+## \[0.23.2]
+
+- On macOS, remove all custom keydown implementations. This will bring back keydown regression but should allow all accelerator working.
+ - [fee4bf2](https://github.com/tauri-apps/wry/commit/fee4bf2eb384d9c315530bd8f5af146909706cf6) Remove all keydown implementations ([#798](https://github.com/tauri-apps/wry/pull/798)) on 2022-12-10
+- Suppress `unused_variables` warning reported only in release build.
+ - [4e23c0f](https://github.com/tauri-apps/wry/commit/4e23c0f84b5a954be78418d56e37366395de030f) fix(macos): suppress `unused_variables` warning reported only in release build ([#790](https://github.com/tauri-apps/wry/pull/790)) on 2022-12-07
+- Add `WebViewBuilderExtWindows::with_browser_accelerator_keys` method to allow disabling browser-specific accelerator keys enabled in WebView2 by default. When `false` is passed, it disables all accelerator keys that access features specific to a web browser. See [the official WebView2 document](https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2\_core/corewebview2settings#arebrowseracceleratorkeysenabled) for more details.
+ - [6e622ff](https://github.com/tauri-apps/wry/commit/6e622ffbdad2312bf3906d278a75956a3a6eeadd) feat(windows): Allow disabling browser-specific accelerator keys ([#792](https://github.com/tauri-apps/wry/pull/792)) on 2022-12-07
+
+## \[0.23.1]
+
+- Fixes usage of the `linux-headers` feature.
+ - [64a72ff](https://github.com/tauri-apps/wry/commit/64a72ffd2369f51d36bdb00973f71326e8395016) fix(wry): correctly use the linux-headers feature on 2022-12-05
+
+## \[0.23.0]
+
+- Properly parse the content type header for the `android.webkit.WebResourceResponse` mime type.
+ - [1db5ea6](https://github.com/tauri-apps/wry/commit/1db5ea68c2028db77788ec8c78ee0ab75a7a5f7f) fix(android): properly parse content-type for response mime type ([#772](https://github.com/tauri-apps/wry/pull/772)) on 2022-11-27
+- Change typo in `WebViewBuilderExtWindows::with_additionl_browser_args`. to `WebViewBuilderExtWindows::with_additional_browser_args`.
+ - [db1c290](https://github.com/tauri-apps/wry/commit/db1c290c0d8b58f6612ef9bef244a06261fb2a6e) fix(windows): Fix typo in method name of `WebViewBuilderExtWindows` ([#781](https://github.com/tauri-apps/wry/pull/781)) on 2022-12-02
+- Add `Webiew::load_url`.
+ - [a2b9531](https://github.com/tauri-apps/wry/commit/a2b9531b0e8397dcf74c049ccf6c7fa125288ca8) feat: add `Webiew::navigate_to_url`, closes [#776](https://github.com/tauri-apps/wry/pull/776) ([#777](https://github.com/tauri-apps/wry/pull/777)) on 2022-11-30
+- Change the type of `WebViewBuilderExtWindows::with_additional_browser_args` argument from `AsRef` to `Into` to reduce extra allocation.
+ - [b0ff06a](https://github.com/tauri-apps/wry/commit/b0ff06aba5aea77f067aee1e9bf8ac8c245ac5e8) perf: reduce extra allocation at `WebViewBuilderExtWindows::with_additional_browser_args` argument ([#783](https://github.com/tauri-apps/wry/pull/783)) on 2022-12-03
+- Validate custom protocol response status code on Android.
+ - [7f585c7](https://github.com/tauri-apps/wry/commit/7f585c7dc947936387faf565f3f5cbe62148daaf) feat(android): validate custom protocol response status code ([#779](https://github.com/tauri-apps/wry/pull/779)) on 2022-11-30
+- \[https://github.com/tauri-apps/wry/commit/04422bc1b579d9388ce03c2388b8f415dbc0747b] On macOS, revert content view to native NSView (\[#782])(https://github.com/tauri-apps/wry/pull/782)
+
+## \[0.22.6]
+
+- Fixes usage of the `linux-headers` feature.
+ - [14c5ae7](https://github.com/tauri-apps/wry/commit/14c5ae7d41b506c8a398d4735062b46cd0770447) fix(wry): correctly use the linux-headers feature on 2022-12-05
+
+## \[0.22.5]
+
+- On macOS, fix arrow keys misprint text on textarea.
+ - [3005e54](https://github.com/tauri-apps/wry/commit/3005e5450339c6c3fbc1c7c67ab8008ed39ec864) On macOS, fix arrow keys misprint texts ([#769](https://github.com/tauri-apps/wry/pull/769)) on 2022-11-25
+
+## \[0.22.4]
+
+- On Linux, add `linux-headers` feature flag to fix version regression. The minimum webkit2gtk version remains v2.22.
+ - [cf447f6](https://github.com/tauri-apps/wry/commit/cf447f64451fd8345f21440df31601265e0fde86) On Linux, add header feature flag to fix version regression ([#766](https://github.com/tauri-apps/wry/pull/766)) on 2022-11-24
+
+## \[0.22.3]
+
+- On macOS, fix keyinput missing by calling superclass methods.
+ - [e40e55a](https://github.com/tauri-apps/wry/commit/e40e55a41d8d65ceda5e182c8915d37b5698c7b0) On macOS, fix keyinput missing by calling super class methods ([#764](https://github.com/tauri-apps/wry/pull/764)) on 2022-11-21
+
+## \[0.22.2]
+
+- On macOS, add an API to enable or disable backward and forward navigation gestures.
+ - [487dff0](https://github.com/tauri-apps/wry/commit/487dff03a103df999e5e0c6286f75b4d1f419d25) Add the ability to navigate with swipe gesture ([#757](https://github.com/tauri-apps/wry/pull/757)) on 2022-11-16
+ - [1a0ec19](https://github.com/tauri-apps/wry/commit/1a0ec19fd533c853b744c5e2346542d2e1e5805d) Update gesture change file to patch ([#763](https://github.com/tauri-apps/wry/pull/763)) on 2022-11-21
+- On macOS, pass key event to menu if we have one on key press.
+ - [2e5e138](https://github.com/tauri-apps/wry/commit/2e5e1381789c332654a5ffee47d578042a9be87b) On macOS, pass key event to menu on key press ([#760](https://github.com/tauri-apps/wry/pull/760)) on 2022-11-21
+
+## \[0.22.1]
+
+- Fix `WebViewBuilder::with_accept_first_mouse` taking behavior of first initalized webview.
+ - [0647c0e](https://github.com/tauri-apps/wry/commit/0647c0efe131566ffbab0729e9d74355155c3c32) fix(macos): fix `acceptFirstMouse` for subsequent webviews, closes [#751](https://github.com/tauri-apps/wry/pull/751) ([#752](https://github.com/tauri-apps/wry/pull/752)) on 2022-11-13
+- Fix download implementation on macOS older than 11.3.
+ - [e69ddc6](https://github.com/tauri-apps/wry/commit/e69ddc6943770aa8baa02431bb037bbdcb3cbd80) fix(macos): download breaking app on macOS older than 11.3, closes [#755](https://github.com/tauri-apps/wry/pull/755) ([#756](https://github.com/tauri-apps/wry/pull/756)) on 2022-11-15
+- On macOS, remove webview from window's NSView before dropping.
+ - [3d3ea80](https://github.com/tauri-apps/wry/commit/3d3ea80808a327c546d8bbd97e06ef4b8feb32d0) On macOS, remove webview from window's NSView before dropping ([#754](https://github.com/tauri-apps/wry/pull/754)) on 2022-11-14
+
+## \[0.22.0]
+
+- Added `WebViewAttributes::with_accept_first_mouse` method for macOS.
+ - [2c23440](https://github.com/tauri-apps/wry/commit/2c23440f9c194064caa907650df39bf9c96ed99c) feat(macos): add `accept_first_mouse` option, closes [#714](https://github.com/tauri-apps/wry/pull/714) ([#715](https://github.com/tauri-apps/wry/pull/715)) on 2022-10-04
+- **Breaking change** Custom protocol now takes `Request` and returns `Response` types from `http` crate.
+ - [1510e45](https://github.com/tauri-apps/wry/commit/1510e452547a95af2e42ff5199640877beecdbd7) refactor: use `http` crate primitives instead of a custom impl ([#706](https://github.com/tauri-apps/wry/pull/706)) on 2022-09-29
+- Enabled devtools in debug mode by default.
+ - [fea0638](https://github.com/tauri-apps/wry/commit/fea0638d9ad100c00b95468aa16fc44d6517ac0d) feat: enable devtools in debug mode by default ([#741](https://github.com/tauri-apps/wry/pull/741)) on 2022-10-27
+- On Desktop, add `download_started_handler` and `download_completed_handler`. See `blob_download` and `download_event` example for their usages.
+ - [3691c4f](https://github.com/tauri-apps/wry/commit/3691c4f6c88fe43e92597caf3003c8d57b447a7b) feat: Add download started and download completed callbacks ([#530](https://github.com/tauri-apps/wry/pull/530)) on 2022-10-19
+- Fix double permission dialog on macOS 12+ and iOS 15+.
+ - [8aa7d61](https://github.com/tauri-apps/wry/commit/8aa7d61cdc9fc584805b46c3ffd700aabb633649) Fix: Remove extra soft prompt asking for media permission on every app launch in macOS ([#694](https://github.com/tauri-apps/wry/pull/694)) on 2022-09-29
+- Focus webview when window starts moving or resizing on Windows to automatically close `` dropdowns. Also notify webview2 whenever the window position/size changes which fixes the `` dropdown position
+ - [a1001dd](https://github.com/tauri-apps/wry/commit/a1001dd6361a0629cd1ce2f8063b7c983bf29616) fix(windows): focus webview on `WM_ENTERSIZEMOVE` and call `NotifyParentChanged` on `WM_WINDOWPOSCHANGED`. ([#695](https://github.com/tauri-apps/wry/pull/695)) on 2022-09-16
+- On Windows, hide the webview when the window is minimized to reduce memory and cpu usage.
+ - [51b49c5](https://github.com/tauri-apps/wry/commit/51b49c54e41c71d1c5f03b568094d43fb9dc32ac) feat(webview2): hide the webview when the window is minimized ([#702](https://github.com/tauri-apps/wry/pull/702)) on 2022-09-27
+- Internally return with error from custom protocol if an invalid uri was requseted such as `wry://` which doesn't contain a host.
+ - [818ce99](https://github.com/tauri-apps/wry/commit/818ce9989d816bf970ebcf93009b2d693384e436) fix: don't panic on invalid uri ([#712](https://github.com/tauri-apps/wry/pull/712)) on 2022-09-30
+- Support cross compiling ios on a non macos host.
+ - [cd08410](https://github.com/tauri-apps/wry/commit/cd08410bce326c42e8fc25a74290d254468724fe) Fix cross compilation. ([#731](https://github.com/tauri-apps/wry/pull/731)) on 2022-10-29
+- On Linux, Improve custom protocol with http headers / method added to request, and status code / http headers added to response. This feature is 2.36 only, version below it will fallback to previous implementation.
+ - [2944d91](https://github.com/tauri-apps/wry/commit/2944d91c763ff105288aa6c1370ba42a54fa8caf) feat(linux): add headers to URL scheme request ([#721](https://github.com/tauri-apps/wry/pull/721)) on 2022-10-17
+- On macOS, add WKWebview as subview of existing NSView directly.
+ - [008eca8](https://github.com/tauri-apps/wry/commit/008eca871155f393e5de1053bb1a9f63e1eafe82) On macOS, add WKWebview as subview of existing NSView directly ([#745](https://github.com/tauri-apps/wry/pull/745)) on 2022-11-07
+- Keypress on non-input element no longer triggers unsupported key feedback sound.
+ - [51c7f12](https://github.com/tauri-apps/wry/commit/51c7f12d80e2b51a188fb644a323abaf5df1b3d1) fix(macos): do not trigger unsupported key feedback sound on keypress ([#742](https://github.com/tauri-apps/wry/pull/742)) on 2022-10-30
+- Remove the IPC script message handler when the WebView is dropped on macOS.
+ - [818ce99](https://github.com/tauri-apps/wry/commit/818ce9989d816bf970ebcf93009b2d693384e436) fix: don't panic on invalid uri ([#712](https://github.com/tauri-apps/wry/pull/712)) on 2022-09-30
+- **Breaking change** Removed http error variants from `wry::Error` and replaced with generic `HttpError` variant that can be used to convert `http` crate errors.
+ - [1510e45](https://github.com/tauri-apps/wry/commit/1510e452547a95af2e42ff5199640877beecdbd7) refactor: use `http` crate primitives instead of a custom impl ([#706](https://github.com/tauri-apps/wry/pull/706)) on 2022-09-29
+- Disabled Microsoft SmartScreen by default on Windows.
+ - [a617c5b](https://github.com/tauri-apps/wry/commit/a617c5b29da3d173d43aa814106e1c7ace08d27f) feat(webview2): disable smartscreen & allow disabling internal webview2 args, closes [#704](https://github.com/tauri-apps/wry/pull/704) ([#705](https://github.com/tauri-apps/wry/pull/705)) on 2022-09-28
+- Add `WebView::url` to get the current url.
+ - [38e49bd](https://github.com/tauri-apps/wry/commit/38e49bd5f1e26e9f9507d1f2af8b0b290aa515ad) feat: add `WebView::url()` to access the current url ([#732](https://github.com/tauri-apps/wry/pull/732)) on 2022-10-25
+- **Breaking change** Removed `http` module and replaced with re-export of `http` crate.
+ - [1510e45](https://github.com/tauri-apps/wry/commit/1510e452547a95af2e42ff5199640877beecdbd7) refactor: use `http` crate primitives instead of a custom impl ([#706](https://github.com/tauri-apps/wry/pull/706)) on 2022-09-29
+- Add `WebviewBuilderExtWindows::with_additionl_browser_args` method to pass additional browser args to Webview2 On Windows. By default wry passes `--disable-features=msWebOOUI,msPdfOOUI,msSmartScreenProtection` so if you use this method, you also need to disable these components by yourself if you want.
+ - [683f866](https://github.com/tauri-apps/wry/commit/683f86665366bb333cb03e05a503a69d0f8eb734) feat(webview2): add method to pass additional args, closes [#415](https://github.com/tauri-apps/wry/pull/415) ([#711](https://github.com/tauri-apps/wry/pull/711)) on 2022-09-29
+- On Windows, fix canonical reason for custom protocol response.
+ - [9d5595c](https://github.com/tauri-apps/wry/commit/9d5595c9c723b3f8046d9582ac086ccebf460a83) fix(webview2): set response reason correctly, closes [#733](https://github.com/tauri-apps/wry/pull/733) ([#734](https://github.com/tauri-apps/wry/pull/734)) on 2022-10-24
+- On macOS, make the webview first responder.
+ - [e64ad21](https://github.com/tauri-apps/wry/commit/e64ad21ad5ab9bf0b7fb15aec0065c20b61a5a80) fix(wkwebview): make webview first responder ([#740](https://github.com/tauri-apps/wry/pull/740)) on 2022-10-28
+
+## \[0.21.1]
+
+- Fix transparency on Windows
+ - [e31cd0a](https://github.com/tauri-apps/wry/commit/e31cd0adf4ba881a35dcccd9b5ee78bb5af8828a) fix: fix transparency on Windows, closes [#692](https://github.com/tauri-apps/wry/pull/692) on 2022-09-16
+
+## \[0.21.0]
+
+- Implement ` ` on Android.
+ - [bf39d9d](https://github.com/tauri-apps/wry/commit/bf39d9de1e997170e9efb3bb7392710b57c2ae1f) feat(android): implement dialogs and permissions ([#685](https://github.com/tauri-apps/wry/pull/685)) on 2022-09-05
+- Add `WebviewExtAndroid::handle` which can be used to execute some code using JNI context.
+ - [2bfc6c3](https://github.com/tauri-apps/wry/commit/2bfc6c3d2e0cc6c3922d125f678ab30c00b89483) feat(android): JNI execution handle ([#689](https://github.com/tauri-apps/wry/pull/689)) on 2022-09-07
+- Enable JS alert, confirm, prompt on Android.
+ - [bf39d9d](https://github.com/tauri-apps/wry/commit/bf39d9de1e997170e9efb3bb7392710b57c2ae1f) feat(android): implement dialogs and permissions ([#685](https://github.com/tauri-apps/wry/pull/685)) on 2022-09-05
+- Prompt for permissions on Android when needed.
+ - [bf39d9d](https://github.com/tauri-apps/wry/commit/bf39d9de1e997170e9efb3bb7392710b57c2ae1f) feat(android): implement dialogs and permissions ([#685](https://github.com/tauri-apps/wry/pull/685)) on 2022-09-05
+- Implement `webview_version` on Android.
+ - [9183de4](https://github.com/tauri-apps/wry/commit/9183de4f9d3129e7cba332eebca2afc846f727d0) feat(android): implement webview_version ([#687](https://github.com/tauri-apps/wry/pull/687)) on 2022-09-05
+- Enable storage, geolocation, media playback, `window.open`.
+ - [9dfffcf](https://github.com/tauri-apps/wry/commit/9dfffcfe12199d7f28bf4b8a837e28253958ac17) feat(android): enable storage, geolocation, media playback, window.open ([#684](https://github.com/tauri-apps/wry/pull/684)) on 2022-09-04
+- Improve Android initialization script implementation.
+ - [1b26d60](https://github.com/tauri-apps/wry/commit/1b26d605d6e33f5417eb6566a7381d8feb239c8b) feat(android): improve initialization scripts implementation ([#670](https://github.com/tauri-apps/wry/pull/670)) on 2022-08-24
+- WRY will now generate the needed kotlin files at build time but you need to set `WRY_ANDROID_REVERSED_DOMAIN`, `WRY_ANDROID_APP_NAME_SNAKE_CASE` and `WRY_ANDROID_KOTLIN_FILES_OUT_DIR` env vars.
+ - [b478903](https://github.com/tauri-apps/wry/commit/b4789034dc4d10ab83f6acce6b4152d79f702940) feat(android): generate kotlin files at build time ([#671](https://github.com/tauri-apps/wry/pull/671)) on 2022-08-24
+ - [103f255](https://github.com/tauri-apps/wry/commit/103f255903bdf728bf5124fb323293d172c8dd12) chore: change bump to patch on 2022-08-25
+- **Breaking change** Removed `WebView::focus`.
+ - [f338df7](https://github.com/tauri-apps/wry/commit/f338df7a2716cbbde357b81d9baa108ce679eaa5) feat(windows): auto-focus the webview ([#676](https://github.com/tauri-apps/wry/pull/676)) on 2022-08-27
+- Updated tao to `0.14`
+ - [483bad0](https://github.com/tauri-apps/wry/commit/483bad0fc7e7564500f7183547c15604fa387258) feat: tao as window dependency ([#230](https://github.com/tauri-apps/wry/pull/230)) on 2021-05-03
+ - [51430e9](https://github.com/tauri-apps/wry/commit/51430e97dfb6589c5ff71e5078438be67293d044) publish new versions ([#221](https://github.com/tauri-apps/wry/pull/221)) on 2021-05-09
+ - [0cf0089](https://github.com/tauri-apps/wry/commit/0cf0089b6d49aa9e1a8c791ec8883fce48a0dfd1) Update tao to v0.2.6 ([#271](https://github.com/tauri-apps/wry/pull/271)) on 2021-05-18
+ - [a76206c](https://github.com/tauri-apps/wry/commit/a76206c11fa0a4ba1d041aa0f25452dd80941ee9) publish new versions ([#272](https://github.com/tauri-apps/wry/pull/272)) on 2021-05-18
+ - [3c4f8b8](https://github.com/tauri-apps/wry/commit/3c4f8b8b2bd42e7634b889aa5317d909bfce593c) Update tao to v0.5 ([#365](https://github.com/tauri-apps/wry/pull/365)) on 2021-08-09
+ - [44aa1dc](https://github.com/tauri-apps/wry/commit/44aa1dc8fcc20cc5826697d69f763118d45f724a) publish new versions ([#351](https://github.com/tauri-apps/wry/pull/351)) on 2021-08-09
+ - [935cc5f](https://github.com/tauri-apps/wry/commit/935cc5fe8b73055279dc107e71a10f2701ea8b3d) Update tao to 0.13 ([#642](https://github.com/tauri-apps/wry/pull/642)) on 2022-07-27
+ - [657888a](https://github.com/tauri-apps/wry/commit/657888aac13830d97d2970bdf1c87319dadb2ffa) Publish New Versions ([#632](https://github.com/tauri-apps/wry/pull/632)) on 2022-07-27
+ - [3a91376](https://github.com/tauri-apps/wry/commit/3a91376fa2c04783a32804e6f123722749ad595e) chore(deps): update tao to 0.14 ([#691](https://github.com/tauri-apps/wry/pull/691)) on 2022-09-13
+- Allow setting the webview background color.
+ - [eb1b723](https://github.com/tauri-apps/wry/commit/eb1b7234f731759b5e091f7c88ac18ce4b507017) feat: allow setting webview bg color, closes [#197](https://github.com/tauri-apps/wry/pull/197) ([#682](https://github.com/tauri-apps/wry/pull/682)) on 2022-09-05
+- Added the `RustWebView` class on Android.
+ - [b1e8560](https://github.com/tauri-apps/wry/commit/b1e8560c3f13f2674528f6ca440ba476ddbef7c2) feat(android): define WebView class in kotlin ([#672](https://github.com/tauri-apps/wry/pull/672)) on 2022-08-24
+- Update the `windows` crate to the latest 0.39.0 release and `webview2-com` to 0.19.1 to match.
+ - [c7d7e1f](https://github.com/tauri-apps/wry/commit/c7d7e1f9c85a5db9c98aa5ded1e0eaf7fe697817) Update windows to 0.39.0 and webview2-com to 0.19.1 to match ([#679](https://github.com/tauri-apps/wry/pull/679)) on 2022-08-31
+- On Windows, automatically focus the webview when the window gains focus to match other platforms.
+ - [f338df7](https://github.com/tauri-apps/wry/commit/f338df7a2716cbbde357b81d9baa108ce679eaa5) feat(windows): auto-focus the webview ([#676](https://github.com/tauri-apps/wry/pull/676)) on 2022-08-27
+
+## \[0.20.2]
+
+- Implement custom protocol on Android.
+ - [dc68289](https://github.com/tauri-apps/wry/commit/dc68289169196419b8c9cda73c73b139ea1301f9) feat(android): implement custom protocol ([#656](https://github.com/tauri-apps/wry/pull/656)) on 2022-08-13
+- Implement `WebView::eval` on Android.
+ - [690fd26](https://github.com/tauri-apps/wry/commit/690fd26a3b9bd47f9d7b1b5d2aa3dcb1c018a771) feat(android): implement eval ([#658](https://github.com/tauri-apps/wry/pull/658)) on 2022-08-13
+- On iOS, add webview as subview instead of replacing original view.
+ - [74391e0](https://github.com/tauri-apps/wry/commit/74391e0769d0e0f4be015147ddfa39bf25c90928) fix(ios): addSubview instead of setContentView ([#655](https://github.com/tauri-apps/wry/pull/655)) on 2022-08-13
+- Move WebView logic from tao to wry.
+ - [aba1ae5](https://github.com/tauri-apps/wry/commit/aba1ae5afcf96c88b1215ef66f38a5a635ecf7c3) refactor(android): move WebView logic from tao to wry ([#659](https://github.com/tauri-apps/wry/pull/659)) on 2022-08-14
+
+## \[0.20.1]
+
+- Add android support
+ - [3218091](https://github.com/tauri-apps/wry/commit/3218091aa393dca9451840d3baa44bc9371f2e1d) Add real android support [#577](https://github.com/tauri-apps/wry/pull/577)
+- Enable private picture-in-picture on macos.
+ - [3cfd8c9](https://github.com/tauri-apps/wry/commit/3cfd8c9e7a43f6c35a1ea61358521bd62fc70633) fix: add feature flag to enable private picture-in-picture flag on macos ([#645](https://github.com/tauri-apps/wry/pull/645)) on 2022-08-05
+- On macOS, fix devtool warning
+ - [2eba8c9](https://github.com/tauri-apps/wry/commit/2eba8c9c26ff5f9512b0039ac04bc7fd27a5256f) fix: devtool warning by adding parent view
+
+## \[0.20.0]
+
+- Add `WebViewBuilder::with_clipboard`.
+ - [c798700](https://github.com/tauri-apps/wry/commit/c7987004eaaf5cb7da830d574d81bd96dace0112) fix: Add `WebViewBuilder::with_clipboard`([#631](https://github.com/tauri-apps/wry/pull/631)) on 2022-07-05
+- Fix typos in several files.
+ - [4466250](https://github.com/tauri-apps/wry/commit/44662506ab01846c7e8767eb2f13bf0bbca7fe9a) Fix typos ([#635](https://github.com/tauri-apps/wry/pull/635)) on 2022-07-11
+- Set webview2 language to match the OS language. This makes i18n functions like `new Date().toLocaleStrin()` behave correctly.
+ - [e9f04d7](https://github.com/tauri-apps/wry/commit/e9f04d7e7bea576d0283d97e25faf7b356c5e959) fix: set system language to webview on windows, closes [#442](https://github.com/tauri-apps/wry/pull/442) ([#640](https://github.com/tauri-apps/wry/pull/640)) on 2022-07-26
+- Update tao to 0.13.0.
+ - [935cc5f](https://github.com/tauri-apps/wry/commit/935cc5fe8b73055279dc107e71a10f2701ea8b3d) Update tao to 0.13 ([#642](https://github.com/tauri-apps/wry/pull/642)) on 2022-07-27
+
+## \[0.19.0]
+
+- - Automatically resize the webview on Windows to align with other platforms.
+- **Breaking change**: Removed `WebView::resize`
+- [d7c9097](https://github.com/tauri-apps/wry/commit/d7c9097256d76de7400032cf27acd7a1874da5cd) feat: auto resize webview on Windows ([#628](https://github.com/tauri-apps/wry/pull/628)) on 2022-06-27
+- Implement new window requested handler
+ - [fa5456c](https://github.com/tauri-apps/wry/commit/fa5456c6abe16be17073e75f4a0205966be266b2) feat: Implement new window requested event, closes [#527](https://github.com/tauri-apps/wry/pull/527) ([#526](https://github.com/tauri-apps/wry/pull/526)) on 2022-06-19
+- Re-export `url::Url`.
+ - [0cb6961](https://github.com/tauri-apps/wry/commit/0cb696119b5e25292af9595fd89856116520c049) fix: re-export `url::Url` ([#612](https://github.com/tauri-apps/wry/pull/612)) on 2022-06-17
+- Update tao to 0.12
+ - [448837e](https://github.com/tauri-apps/wry/commit/448837e795a8f7f8dc4ac5f34b27063b108fc1f2) Update tao to 0.12 ([#629](https://github.com/tauri-apps/wry/pull/629)) on 2022-06-28
+
+## \[0.18.3]
+
+- Update tao to 0.11
+ - [f4b42fb](https://github.com/tauri-apps/wry/commit/f4b42fb412fa557188f20b72ef6c4314d1d6bb91) Update tao to v0.12 ([#609](https://github.com/tauri-apps/wry/pull/609)) on 2022-06-15
+
+## \[0.18.2]
+
+- Fix NSString can not be released.
+ - [95ca52f](https://github.com/tauri-apps/wry/commit/95ca52f5d8ca86b64f8587a0f96cf0fb7dc22125) fix: NSString isn't released ([#604](https://github.com/tauri-apps/wry/pull/604)) on 2022-06-07
+
+## \[0.18.1]
+
+- Remove unused tray from doc features.
+ - [5eecb00](https://github.com/tauri-apps/wry/commit/5eecb0074397efa40351b3caa8fd4a6d972c4c85) Remove unused tray from doc features ([#602](https://github.com/tauri-apps/wry/pull/602)) on 2022-05-31
+
+## \[0.18.0]
+
+- Remove trivial tray features.
+ - [a3fea48](https://github.com/tauri-apps/wry/commit/a3fea48d2d78ebe4fa3f08b40d2c3c8c8135bb12) Remove trivial tray features ([#599](https://github.com/tauri-apps/wry/pull/599)) on 2022-05-31
+
+## \[0.17.0]
+
+- Add option to enable/disable zoom shortcuts for WebView2, disabled by default.
+ - [494a110](https://github.com/tauri-apps/wry/commit/494a11057f9ddd2bf4bcecdc96b43ed95c5bd08e) WebView2: Enable/disable platform default zooming shortcuts, closes [#569](https://github.com/tauri-apps/wry/pull/569) ([#574](https://github.com/tauri-apps/wry/pull/574)) on 2022-05-15
+- Prevent memory leak on macOS.
+ - [16d1924](https://github.com/tauri-apps/wry/commit/16d192450ed639f94cf8b7137fa5fea1a319f8b5) fix: prevent memory leak on macOS, closes [#536](https://github.com/tauri-apps/wry/pull/536) ([#587](https://github.com/tauri-apps/wry/pull/587)) on 2022-05-20
+- Update the `windows` crate to the latest 0.37.0 release and `webview2-com` to 0.16.0 to match.
+
+The `#[implement]` macro in `windows-implement` and the `implement` feature in `windows` depend on some `const` generic features which stabilized in `rustc` 1.61. The MSRV on Windows targets is effectively 1.61, but other targets do not require these features.
+
+The `webview2-com` crate specifies `rust-version = "1.61"`, so `wry` will inherit that MSRV and developers on Windows should get a clear error message telling them to update their toolchain when building `wry` or anything that depends on `wry`. Developers targeting other platforms should be able to continue using whatever toolchain they were using before.
+
+- [9d9d9d8](https://github.com/tauri-apps/wry/commit/9d9d9d8f3d37a283bbb707d39c3aac090325a63e) Update windows-rs to 0.37.0 and webview2-com to 0.16.0 to match ([#592](https://github.com/tauri-apps/wry/pull/592)) on 2022-05-23
+
+## \[0.16.2]
+
+- Fixed build on macos.
+ - [17ab12d](https://github.com/tauri-apps/wry/commit/17ab12ded27949474f687640faebb5cc376327c5) fix: fix build on macos, closes [#580](https://github.com/tauri-apps/wry/pull/580) ([#581](https://github.com/tauri-apps/wry/pull/581)) on 2022-05-10
+
+## \[0.16.1]
+
+- Fixes a crash on macOS below Big Sur due to `titlebarSeparatorStyle` (11+ API) usage.
+ - [eb2dddb](https://github.com/tauri-apps/wry/commit/eb2dddb611f7fadf35bf7d7c32cb6d054da9fe9e) fix(macos): only use APIs when supported on 2022-05-08
+- Only run `WebView::print` on macOS on v11+. This prevents a crash on older versions.
+ - [eb2dddb](https://github.com/tauri-apps/wry/commit/eb2dddb611f7fadf35bf7d7c32cb6d054da9fe9e) fix(macos): only use APIs when supported on 2022-05-08
+
+## \[0.16.0]
+
+- Fixes a typo in the `WebviewExtMacOS` conditional compilation.
+ - [10d7f03](https://github.com/tauri-apps/wry/commit/10d7f03f403e9c373fe80897308393e0bb67a06d) fix(macos): typo in the WebviewExtMacOS conditional compilation ([#568](https://github.com/tauri-apps/wry/pull/568)) on 2022-05-02
+- Fixes a crash when the custom protocol response is empty on macOS.
+ - [67809f4](https://github.com/tauri-apps/wry/commit/67809f4d8abe1a042b2cdb616b03f6a2c50652b8) fix(macos): crash when custom protocol response is empty ([#567](https://github.com/tauri-apps/wry/pull/567)) on 2022-05-01
+- Add `WebView::zoom` method.
+ - [34b6cbc](https://github.com/tauri-apps/wry/commit/34b6cbca76811966cedf8050ae0d0fa18c84aa34) feat: add feature to zoom webview contents, closes [#388](https://github.com/tauri-apps/wry/pull/388) ([#564](https://github.com/tauri-apps/wry/pull/564)) on 2022-05-02
+- Set the titlebar separator style in macOS to `none`.
+ - [9776fc4](https://github.com/tauri-apps/wry/commit/9776fc466b5f3a6ef47956ec5c9cdd9c5164046a) fix(macos): set titlebar style to `none` ([#566](https://github.com/tauri-apps/wry/pull/566)) on 2022-05-01
+- Disable webview2 mini menu
+ - [ed0b223](https://github.com/tauri-apps/wry/commit/ed0b2230c285991b7a4588c8045111f04a67a16f) fix: disable WebView2 mini menu ("OOUI"), closes [#535](https://github.com/tauri-apps/wry/pull/535) ([#559](https://github.com/tauri-apps/wry/pull/559)) on 2022-04-29
+
+## \[0.15.1]
+
+- Update how android handles url
+ - [427cf92](https://github.com/tauri-apps/wry/commit/427cf9222d7152f911aa70eb778eb7aa90c83fac) Unify custom protocol across Android/iOS ([#546](https://github.com/tauri-apps/wry/pull/546)) on 2022-04-11
+- Add devtools support on Android/iOS.
+ - [1c5d77a](https://github.com/tauri-apps/wry/commit/1c5d77a8ce79e75705a71c659af86541d50c5007) Add devtools support on Android/iOS ([#548](https://github.com/tauri-apps/wry/pull/548)) on 2022-04-11
+- Fix to reset process on MacOS when webview is closed, closes #536.
+ - [fd1dcc3](https://github.com/tauri-apps/wry/commit/fd1dcc3cc5a290bfe4ae8de04064074109902432) fix: reset background process when webview is closed, closes [#536](https://github.com/tauri-apps/wry/pull/536) ([#556](https://github.com/tauri-apps/wry/pull/556)) on 2022-04-24
+
+## \[0.15.0]
+
+- On Windows and Linux, disable resizing maximized borderless windows.
+ - [313eaea](https://github.com/tauri-apps/wry/commit/313eaea0ff123bddbc8b5c337ded05d464d3dfaa) fix(win,linux): disable resizing maximized borderless windows ([#533](https://github.com/tauri-apps/wry/pull/533)) on 2022-03-30
+- Fixes a memory leak on the custom protocol response body on macOS.
+ - [36b985e](https://github.com/tauri-apps/wry/commit/36b985e939f4769f9835b4865ee1013229ec7539) fix(macos): custom protocol memory leak ([#539](https://github.com/tauri-apps/wry/pull/539)) on 2022-04-03
+- Update tao to v0.8.0.
+ - [1c540b0](https://github.com/tauri-apps/wry/commit/1c540b01fa08e84c199b8ded726b6ec77b40f015) feat: update tao to 0.8, refactor tray features ([#541](https://github.com/tauri-apps/wry/pull/541)) on 2022-04-07
+- The `tray` and `ayatana-tray` Cargo features are not enabled by default.
+ - [1c540b0](https://github.com/tauri-apps/wry/commit/1c540b01fa08e84c199b8ded726b6ec77b40f015) feat: update tao to 0.8, refactor tray features ([#541](https://github.com/tauri-apps/wry/pull/541)) on 2022-04-07
+- **Breaking change:** Renamed the `ayatana` Cargo feature to `ayatana-tray` and added the `gtk-tray` feature. The default tray on Linux is now `libayatana-appindicator`.
+ - [1c540b0](https://github.com/tauri-apps/wry/commit/1c540b01fa08e84c199b8ded726b6ec77b40f015) feat: update tao to 0.8, refactor tray features ([#541](https://github.com/tauri-apps/wry/pull/541)) on 2022-04-07
+
+## \[0.14.0]
+
+- Added `close_devtools` function to `Webview`.
+ - [bf3b710](https://github.com/tauri-apps/wry/commit/bf3b7107631f14567b0b5ff1947c2bff1ffa2603) feat: add function to close the devtool and check if it is opened ([#529](https://github.com/tauri-apps/wry/pull/529)) on 2022-03-28
+- Hide the devtool functions behind the `any(debug_assertions, feature = "devtools")` flag.
+ - [bf3b710](https://github.com/tauri-apps/wry/commit/bf3b7107631f14567b0b5ff1947c2bff1ffa2603) feat: add function to close the devtool and check if it is opened ([#529](https://github.com/tauri-apps/wry/pull/529)) on 2022-03-28
+- **Breaking change:** Renamed the `devtool` function to `open_devtools`.
+ - [bf3b710](https://github.com/tauri-apps/wry/commit/bf3b7107631f14567b0b5ff1947c2bff1ffa2603) feat: add function to close the devtool and check if it is opened ([#529](https://github.com/tauri-apps/wry/pull/529)) on 2022-03-28
+- Enable tab navigation on macOS.
+ - [28ebedc](https://github.com/tauri-apps/wry/commit/28ebedc41f9017fed3fe1dc3a6d021c69f88ef5d) fix(macOS): enable tab navigation on all elements, fixes [#406](https://github.com/tauri-apps/wry/pull/406) ([#512](https://github.com/tauri-apps/wry/pull/512)) on 2022-03-03
+- Added `is_devtools_open` function to `Webview`.
+ - [bf3b710](https://github.com/tauri-apps/wry/commit/bf3b7107631f14567b0b5ff1947c2bff1ffa2603) feat: add function to close the devtool and check if it is opened ([#529](https://github.com/tauri-apps/wry/pull/529)) on 2022-03-28
+- - Expose methods to access the underlying native handles of the webview.
+- **Breaking change**: `WebviewExtWindows::controller` now returns the controller directly and not wrapped in an `Option`
+- [e54afec](https://github.com/tauri-apps/wry/commit/e54afec43b767ffdb43debbd526d249c3c5b5490) feat: expose webview native handles, closes [#495](https://github.com/tauri-apps/wry/pull/495) ([#513](https://github.com/tauri-apps/wry/pull/513)) on 2022-03-03
+- Add navigation handler to decide if an url is allowed to navigate.
+ - [aa8af02](https://github.com/tauri-apps/wry/commit/aa8af020ab9d88ad762f2facbfa368effb04f570) feat: Implement navigation event and cancellation, closes [#456](https://github.com/tauri-apps/wry/pull/456) ([#519](https://github.com/tauri-apps/wry/pull/519)) on 2022-03-18
+- **Breaking change**: Renamed the `devtool` feature to `devtools`.
+ - [bf3b710](https://github.com/tauri-apps/wry/commit/bf3b7107631f14567b0b5ff1947c2bff1ffa2603) feat: add function to close the devtool and check if it is opened ([#529](https://github.com/tauri-apps/wry/pull/529)) on 2022-03-28
+- **Breaking change:** Renamed the `with_dev_tool` function to `with_devtools`.
+ - [bf3b710](https://github.com/tauri-apps/wry/commit/bf3b7107631f14567b0b5ff1947c2bff1ffa2603) feat: add function to close the devtool and check if it is opened ([#529](https://github.com/tauri-apps/wry/pull/529)) on 2022-03-28
+
+## \[0.13.3]
+
+- Fix rustdoc generation of Windows and Mac on docs.rs.
+ - [327a019](https://github.com/tauri-apps/wry/commit/327a019a07fd10ca3a42ebfb8d9d626e3b91fd05) Fix rustdoc generation of Windows and Mac on docs.rs, fix [#503](https://github.com/tauri-apps/wry/pull/503) ([#507](https://github.com/tauri-apps/wry/pull/507)) on 2022-02-27
+
+## \[0.13.2]
+
+- Fix cross compilation from `macOS`.
+ - [c97499f](https://github.com/tauri-apps/wry/commit/c97499fb078c7c65508bf2fa3502ef95c8114ef4) fix: cross compilation from macOS ([#498](https://github.com/tauri-apps/wry/pull/498)) on 2022-02-15
+- Update `webview2-com` to 0.13.0, which bumps the WebView2 SDK to 1.0.1108.44 and improves cross-compilation support.
+
+Targeting \*-pc-windows-gnu works now, but it has some [limitations](https://github.com/wravery/webview2-rs#cross-compilation).
+
+- [24a443c](https://github.com/tauri-apps/wry/commit/24a443ca1d90ef091eaceb0ec61bcc648499b743) Add /.changes/webview2-com-0.13.0.md on 2022-02-14
+
+## \[0.13.1]
+
+- Add `devtool` feature flag and configuration option.
+ - [d0f307b](https://github.com/tauri-apps/wry/commit/d0f307b218c3913520efbb378e9c01a526137fdd) feat: implement `devtools` API, closes [#287](https://github.com/tauri-apps/wry/pull/287) ([#486](https://github.com/tauri-apps/wry/pull/486)) on 2022-02-07
+
+- Update the `webview2-com` crate 0.11.0:
+
+- Fix silent build script errors related to unconfigured nuget in https://github.com/wravery/webview2-rs/pull/4
+
+- Update the WebView2 SDK (not the runtime, just the API bindings) to the latest 1.0.1072.54 version
+
+- [7d4eeb7](https://github.com/tauri-apps/wry/commit/7d4eeb744bf008e43c034e865b383ee4a330e77a) Update webview2-com to 0.11.0 ([#488](https://github.com/tauri-apps/wry/pull/488)) on 2022-02-06
+
+## \[0.13.0]
+
+- Update gtk to 0.15
+ - [219d20c](https://github.com/tauri-apps/wry/commit/219d20ce66a6bdf6c3e1af6156c9f2a74f2eed29) Merge next back to dev branch ([#477](https://github.com/tauri-apps/wry/pull/477)) on 2022-02-05
+- Add clipboard field in WebViewAttributes.
+ - [219d20c](https://github.com/tauri-apps/wry/commit/219d20ce66a6bdf6c3e1af6156c9f2a74f2eed29) Merge next back to dev branch ([#477](https://github.com/tauri-apps/wry/pull/477)) on 2022-02-05
+- Ignore transparency on Windows 7 to prevent application crash.
+ - [219d20c](https://github.com/tauri-apps/wry/commit/219d20ce66a6bdf6c3e1af6156c9f2a74f2eed29) Merge next back to dev branch ([#477](https://github.com/tauri-apps/wry/pull/477)) on 2022-02-05
+- Remove clipboard property for consistency across platforms.
+ - [219d20c](https://github.com/tauri-apps/wry/commit/219d20ce66a6bdf6c3e1af6156c9f2a74f2eed29) Merge next back to dev branch ([#477](https://github.com/tauri-apps/wry/pull/477)) on 2022-02-05
+- Enable cookie persistence on Linux if the `data_directory` is provided.
+ - [219d20c](https://github.com/tauri-apps/wry/commit/219d20ce66a6bdf6c3e1af6156c9f2a74f2eed29) Merge next back to dev branch ([#477](https://github.com/tauri-apps/wry/pull/477)) on 2022-02-05
+- Enable objc's exception features so they can be treated as panic message.
+ - [219d20c](https://github.com/tauri-apps/wry/commit/219d20ce66a6bdf6c3e1af6156c9f2a74f2eed29) Merge next back to dev branch ([#477](https://github.com/tauri-apps/wry/pull/477)) on 2022-02-05
+- Add inner size method for webview. This can reflect correct size of webview on macOS.
+ - [219d20c](https://github.com/tauri-apps/wry/commit/219d20ce66a6bdf6c3e1af6156c9f2a74f2eed29) Merge next back to dev branch ([#477](https://github.com/tauri-apps/wry/pull/477)) on 2022-02-05
+- Add "transparent" and "fullscreen" feature flags on macOS to toggle private API.
+ - [219d20c](https://github.com/tauri-apps/wry/commit/219d20ce66a6bdf6c3e1af6156c9f2a74f2eed29) Merge next back to dev branch ([#477](https://github.com/tauri-apps/wry/pull/477)) on 2022-02-05
+- Implement WebContextImpl on mac to extend several callback lifetimes.
+ - [219d20c](https://github.com/tauri-apps/wry/commit/219d20ce66a6bdf6c3e1af6156c9f2a74f2eed29) Merge next back to dev branch ([#477](https://github.com/tauri-apps/wry/pull/477)) on 2022-02-05
+- The only thing that private mod shared does is re-export http mod to public,
+ we can just pub mod http.
+ - [219d20c](https://github.com/tauri-apps/wry/commit/219d20ce66a6bdf6c3e1af6156c9f2a74f2eed29) Merge next back to dev branch ([#477](https://github.com/tauri-apps/wry/pull/477)) on 2022-02-05
+- - Fix hovering over an edge of undecorated window on Linux won't change cursor.
+- Undecorated window can be resized using touch on Linux.
+- [219d20c](https://github.com/tauri-apps/wry/commit/219d20ce66a6bdf6c3e1af6156c9f2a74f2eed29) Merge next back to dev branch ([#477](https://github.com/tauri-apps/wry/pull/477)) on 2022-02-05
+- Update webkit2gtk to 0.15
+ - [219d20c](https://github.com/tauri-apps/wry/commit/219d20ce66a6bdf6c3e1af6156c9f2a74f2eed29) Merge next back to dev branch ([#477](https://github.com/tauri-apps/wry/pull/477)) on 2022-02-05
+- Add `with_user_agent(&str)` to `WebViewBuilder`.
+ - [219d20c](https://github.com/tauri-apps/wry/commit/219d20ce66a6bdf6c3e1af6156c9f2a74f2eed29) Merge next back to dev branch ([#477](https://github.com/tauri-apps/wry/pull/477)) on 2022-02-05
+- Replace all of the `winapi` crate references with the `windows` crate, and replace `webview2` and `webview2-sys` with `webview2-com` and `webview2-com-sys` built with the `windows` crate. The replacement bindings are in the `webview2-com-sys` crate, with `pub use` in the `webview2-com` crate. They can be shared with TAO.
+ - [219d20c](https://github.com/tauri-apps/wry/commit/219d20ce66a6bdf6c3e1af6156c9f2a74f2eed29) Merge next back to dev branch ([#477](https://github.com/tauri-apps/wry/pull/477)) on 2022-02-05
+- Fix null pointer crash on `get_content` of web resource request. This is a temporary fix.
+ We will switch it back once upstream is updated.
+ - [219d20c](https://github.com/tauri-apps/wry/commit/219d20ce66a6bdf6c3e1af6156c9f2a74f2eed29) Merge next back to dev branch ([#477](https://github.com/tauri-apps/wry/pull/477)) on 2022-02-05
+- Update the `windows` crate to 0.25.0, which comes with pre-built libraries. WRY and Tao can both reference the same types directly from the `windows` crate instead of sharing bindings in `webview2-com-sys`.
+ - [219d20c](https://github.com/tauri-apps/wry/commit/219d20ce66a6bdf6c3e1af6156c9f2a74f2eed29) Merge next back to dev branch ([#477](https://github.com/tauri-apps/wry/pull/477)) on 2022-02-05
+- Update the `windows` crate to 0.29.0 and `webview2-com` to 0.9.0.
+ - [219d20c](https://github.com/tauri-apps/wry/commit/219d20ce66a6bdf6c3e1af6156c9f2a74f2eed29) Merge next back to dev branch ([#477](https://github.com/tauri-apps/wry/pull/477)) on 2022-02-05
+- Update the `windows` crate to 0.30.0 and `webview2-com` to 0.10.0.
+ - [219d20c](https://github.com/tauri-apps/wry/commit/219d20ce66a6bdf6c3e1af6156c9f2a74f2eed29) Merge next back to dev branch ([#477](https://github.com/tauri-apps/wry/pull/477)) on 2022-02-05
+
+## \[0.12.2]
+
+- Fixed a Linux multi-window issue where the internal url loader didn't unlock when flushed while empty
+ - [5377821](https://github.com/tauri-apps/wry/commit/5377821f43c0e7556ec46f0aaf4d6b0637512493) Fix async multiwindow deadlock ([#382](https://github.com/tauri-apps/wry/pull/382)) on 2021-08-16
+
+- The custom protocol now returns a `Request` and expects a `Response`.
+
+- This allows us to get the complete request from the Webview. (Method, GET, POST, PUT etc..)
+ Read the complete header.
+
+- And allow us to be more flexible in the future without bringing breaking changes.
+
+- [d202573](https://github.com/tauri-apps/wry/commit/d202573c2c68a2ff0411c1aa797ecc10f727e93b) refactor: Custom protocol request/response ([#387](https://github.com/tauri-apps/wry/pull/387)) on 2021-08-22
+
+- On Linux, automation callbacks now use the first created webview as the return value
+ - [f9d7049](https://github.com/tauri-apps/wry/commit/f9d7049978bbad389c99d7a7cce9903a528d871d) Use the first created webview for webkit2gtk automation callbacks ([#383](https://github.com/tauri-apps/wry/pull/383)) on 2021-08-16
+
+## \[0.12.1]
+
+- Add html attributes as another method to load the page. This can provide some other origin header and make CORS request
+ possible.
+ - [02ad372](https://github.com/tauri-apps/wry/commit/02ad37219a1f6e5e6ed8e4da61e6a5ac021d410e) feat: html string attributes ([#368](https://github.com/tauri-apps/wry/pull/368)) on 2021-08-12
+- Shorter protocol name on Windows. This can make origin be shorter too.
+ - [2d9f5c9](https://github.com/tauri-apps/wry/commit/2d9f5c95e3805911d12803122fd1e83be758a769) Shorter protocol name on Windows ([#367](https://github.com/tauri-apps/wry/pull/367)) on 2021-08-12
+
+## \[0.12.0]
+
+- Custom Protocol handlers no longer take a `&Window` parameter.
+ - [0e2574c](https://github.com/tauri-apps/wry/commit/0e2574c420f778c59bafc164ddee2bc0b7705ee9) Remove `&Window` parameter from Custom Protocol handlers ([#361](https://github.com/tauri-apps/wry/pull/361)) on 2021-07-28
+- Update gtk to version 0.14. This also remove requirement of `clang`.
+ - [251a80b](https://github.com/tauri-apps/wry/commit/251a80bab49d42f742a3ae6b3ca2cbfc97de98bb) Update gtk to version 0.14 ([#364](https://github.com/tauri-apps/wry/pull/364)) on 2021-08-06
+- Update tao to v0.5. Please see release notes on tao for more information.
+ - [483bad0](https://github.com/tauri-apps/wry/commit/483bad0fc7e7564500f7183547c15604fa387258) feat: tao as window dependency ([#230](https://github.com/tauri-apps/wry/pull/230)) on 2021-05-03
+ - [51430e9](https://github.com/tauri-apps/wry/commit/51430e97dfb6589c5ff71e5078438be67293d044) publish new versions ([#221](https://github.com/tauri-apps/wry/pull/221)) on 2021-05-09
+ - [0cf0089](https://github.com/tauri-apps/wry/commit/0cf0089b6d49aa9e1a8c791ec8883fce48a0dfd1) Update tao to v0.2.6 ([#271](https://github.com/tauri-apps/wry/pull/271)) on 2021-05-18
+ - [a76206c](https://github.com/tauri-apps/wry/commit/a76206c11fa0a4ba1d041aa0f25452dd80941ee9) publish new versions ([#272](https://github.com/tauri-apps/wry/pull/272)) on 2021-05-18
+ - [3c4f8b8](https://github.com/tauri-apps/wry/commit/3c4f8b8b2bd42e7634b889aa5317d909bfce593c) Update tao to v0.5 ([#365](https://github.com/tauri-apps/wry/pull/365)) on 2021-08-09
+- Add flags to support all other possible unix systems.
+ - [c0d0a78](https://github.com/tauri-apps/wry/commit/c0d0a78b893eecdc45c6cda71264020d6ae17bda) Add flags to support all other unix systems. ([#352](https://github.com/tauri-apps/wry/pull/352)) on 2021-07-21
+- Support having multiple webkit2gtk `WebView`s on a single `WebContext`.
+ - [3f03d6b](https://github.com/tauri-apps/wry/commit/3f03d6b5ea4e9ba81950245de156f09e72ab40a1) Support multiple webviews on a single WebContext (webkit2gtk) ([#359](https://github.com/tauri-apps/wry/pull/359)) on 2021-07-28
+- On Windows, Fix cursor flickering when Tao window is without decorations
+ - [e28bcce](https://github.com/tauri-apps/wry/commit/e28bcce0884937365013fda3098f64f9956d569f) fix(windows): fix mouse style flicker when `decorations: false` ([#350](https://github.com/tauri-apps/wry/pull/350)) on 2021-07-20
+- Remove winrt support since it's outdated for a long time. We will reimplement it again once `windws-rs` is stable!
+ - [c37973e](https://github.com/tauri-apps/wry/commit/c37973e47318e9cff2712eb4a394c07734f58d54) chore(windows): remove winrt support ([#356](https://github.com/tauri-apps/wry/pull/356)) on 2021-07-24
+
+## \[0.11.0]
+
+- Allow resizing of borderless window on Windows
+ - [bd10b8e](https://github.com/tauri-apps/wry/commit/bd10b8e5fe517edd6234ed03170741f1a51768bf) feat(Windows): resize borderless window ([#333](https://github.com/tauri-apps/wry/pull/333)) on 2021-07-15
+- Mark enums as `#[non_exhaustive]` to prevent breaking changes on enum update.
+ - [f07ae14](https://github.com/tauri-apps/wry/commit/f07ae144197933c28f8302105b313c2a2afc62af) refactor: add `#[non_exhaustive]` attributes to enums ([#304](https://github.com/tauri-apps/wry/pull/304)) on 2021-07-08
+- Bump tao to `0.4`. Please refer to `tao` changelog for more details.
+ - [6eb10d4](https://github.com/tauri-apps/wry/commit/6eb10d4e10ce86c8403c80fb41ba5e37072dc61e) bump `tao` to 0.4 and fix examples ([#329](https://github.com/tauri-apps/wry/pull/329)) on 2021-07-14
+- - Add `focus` method to `Webview`
+- Add `WebviewExtWindows` trait with `controller` method
+- [621ed1f](https://github.com/tauri-apps/wry/commit/621ed1fff35d9389d88664d8084e1a678dfbfc36) feat: add `.focus()` to `Webview` ([#325](https://github.com/tauri-apps/wry/pull/325)) on 2021-07-05
+- [96b7b94](https://github.com/tauri-apps/wry/commit/96b7b943da34ab81872553e65d2f2cd138531a62) Add controller method instead ([#326](https://github.com/tauri-apps/wry/pull/326)) on 2021-07-07
+- macOS: Remove handler in the webview as it should be handled with the menu.
+ - [5a9df15](https://github.com/tauri-apps/wry/commit/5a9df156f04789d4c89fdb8edf72b301667df127) fix(macos): Remove keypress handler in the webview for copy/paste/cut ([#328](https://github.com/tauri-apps/wry/pull/328)) on 2021-07-07
+- Fixes multiple custom protocols registration on Windows.
+ - [923d346](https://github.com/tauri-apps/wry/commit/923d3461ce93846af8dd548d4e43ebd0fd6111a3) fix(windows): multiple custom protocols, closes [#323](https://github.com/tauri-apps/wry/pull/323) ([#324](https://github.com/tauri-apps/wry/pull/324)) on 2021-07-02
+
+## \[0.10.3]
+
+- [#315](https://github.com/tauri-apps/wry/pull/315) fixed Webview2 runtime performance issues.
+ - [d3c9b16](https://github.com/tauri-apps/wry/commit/d3c9b169d81fd8b79e6695d91b3a1d0e8042a81f) Fix Webview2 runtime performance issues ([#316](https://github.com/tauri-apps/wry/pull/316)) on 2021-06-29
+
+## \[0.10.2]
+
+- Fix file explorer getting blocked by automation.
+ - [0c5cdd8](https://github.com/tauri-apps/wry/commit/0c5cdd8f2a6f4d07d87c6c4d1c51540ff9abfd97) Fix file explorer getting blocked by automation ([#310](https://github.com/tauri-apps/wry/pull/310)) on 2021-06-23
+
+## \[0.10.1]
+
+- `WebContext::set_allows_automation` is now available to specify if the context should allow automation (e.g. WebDriver).
+ It is only enforced on Linux, but may expand platforms in the future.
+ - [4ad0bf1](https://github.com/tauri-apps/wry/commit/4ad0bf12d186b3c313131060316aef371f45d455) move set_allows_automation to WebContext method ([#302](https://github.com/tauri-apps/wry/pull/302)) on 2021-06-21
+
+## \[0.10.0]
+
+- Add WebViewAttributes
+ - [81f3218](https://github.com/tauri-apps/wry/commit/81f3218d9ac55a987b050f574774afcaa0b5c2f7) Add WebViewAttributes ([#286](https://github.com/tauri-apps/wry/pull/286)) on 2021-06-04
+- Add `with_web_context` method that can work well with builder pattern.
+ - [48f53a3](https://github.com/tauri-apps/wry/commit/48f53a3393b0c016a972a72dec45691959ac9e3b) Add `with_web_context` method ([#292](https://github.com/tauri-apps/wry/pull/292)) on 2021-06-13
+- Change the custom protocol handler on macOS so it returns a response on error and a status code on success.
+ - [6b869b1](https://github.com/tauri-apps/wry/commit/6b869b1ad5de9c8e9f36c1fc1b7040e10b033b52) fix(macos): custom protocol response with status code + error response ([#279](https://github.com/tauri-apps/wry/pull/279)) on 2021-05-20
+- Update signature of custom protocol closure. It should return a mime type string now.
+ - [cc9fc4b](https://github.com/tauri-apps/wry/commit/cc9fc4b43df79834c1b8f2c1347accba50356604) Add mimetype to return type of custom protocol ([#296](https://github.com/tauri-apps/wry/pull/296)) on 2021-06-13
+- Fix webview creation when using new_any_thread of event loop.
+ - [4d62cf5](https://github.com/tauri-apps/wry/commit/4d62cf5a3ddcbed06afb93d9503424a9b8110d57) Fix webview creation when using new_any_thread on Windows ([#298](https://github.com/tauri-apps/wry/pull/298)) on 2021-06-18
+- Remove `Dispatcher`, `dispatch_script` and `dispatcher` in the `webview` module and add a `js` parameter to `evaluate_script`.
+ - [de4a5fa](https://github.com/tauri-apps/wry/commit/de4a5fa820b1938532223677913e73720885cb54) refactor: remove `Dispatcher` and related methods, closes [#290](https://github.com/tauri-apps/wry/pull/290) ([#291](https://github.com/tauri-apps/wry/pull/291)) on 2021-06-09
+- Removes the `image` dependency.
+ - [1d5cc59](https://github.com/tauri-apps/wry/commit/1d5cc590856e1be1428f8516595ace6d8099f41f) chore(deps): remove `image` dependency ([#274](https://github.com/tauri-apps/wry/pull/274)) on 2021-05-19
+- Bump tao to `0.3` and add more examples.
+
+*For more details, please refer to `tao` changelog.*
+
+- [cd4697e](https://github.com/tauri-apps/wry/commit/cd4697ebdb8eb955f0ed2be4aefea82d2c263a52) bump `tao` to 0.3 with examples ([#294](https://github.com/tauri-apps/wry/pull/294)) on 2021-06-21
+- Add `wry::webview::WebContext`. It's now a required argument on `WebViewBuilder::build`.
+ - [761b2b5](https://github.com/tauri-apps/wry/commit/761b2b59fe0434b3458d99ed599394af0e1e3962) webdriver support ([#281](https://github.com/tauri-apps/wry/pull/281)) on 2021-06-08
+
+## \[0.9.4]
+
+- Update tao to v0.2.6
+ - [483bad0](https://github.com/tauri-apps/wry/commit/483bad0fc7e7564500f7183547c15604fa387258) feat: tao as window dependency ([#230](https://github.com/tauri-apps/wry/pull/230)) on 2021-05-03
+ - [51430e9](https://github.com/tauri-apps/wry/commit/51430e97dfb6589c5ff71e5078438be67293d044) publish new versions ([#221](https://github.com/tauri-apps/wry/pull/221)) on 2021-05-09
+ - [0cf0089](https://github.com/tauri-apps/wry/commit/0cf0089b6d49aa9e1a8c791ec8883fce48a0dfd1) Update tao to v0.2.6 ([#271](https://github.com/tauri-apps/wry/pull/271)) on 2021-05-18
+
+## \[0.9.3]
+
+- Expose `webview_version` function in the `webview` module.
+ - [4df310e](https://github.com/tauri-apps/wry/commit/4df310e6bb508854ffc17ec915b3d0ab7c11f03d) feat: get webview version ([#259](https://github.com/tauri-apps/wry/pull/259)) on 2021-05-12
+- Add print method on Linux and Windows.
+ - [54c5ec7](https://github.com/tauri-apps/wry/commit/54c5ec7ae6166da5ce670ccd2ceaa108233bb845) Implement print method on Linux and Windows ([#264](https://github.com/tauri-apps/wry/pull/264)) on 2021-05-17
+- Disable smooth scrolling on Linux to match behaviour on browsers.
+ - [3e786bb](https://github.com/tauri-apps/wry/commit/3e786bb28793e939c00ebf0c6758d4f6cf4d3b28) Disable smooth scrolling on Linux ([#268](https://github.com/tauri-apps/wry/pull/268)) on 2021-05-17
+
+## \[0.9.2]
+
+- Add `tray` feature flag from tao.
+ - [093c25e](https://github.com/tauri-apps/wry/commit/093c25ee68d51849b95a1a3b9341e5ad6021cecf) feat: expose tray feature flag ([#256](https://github.com/tauri-apps/wry/pull/256)) on 2021-05-10
+
+## \[0.9.1]
+
+- Correctly set visibility when building `Window` on gtk-backend
+ - [4395ad1](https://github.com/tauri-apps/wry/commit/4395ad147b799e67f9802c499346d0ad53554317) fix: only call `show_all` when needed ([#227](https://github.com/tauri-apps/wry/pull/227)) on 2021-05-02
+- Fix `macOS` cursors and other minors UI glitch.
+ - [d550b2f](https://github.com/tauri-apps/wry/commit/d550b2f0a1c708747537e3a5e6d880fea00e651d) fix(macOS): Window layers ([#220](https://github.com/tauri-apps/wry/pull/220)) on 2021-04-28
+- Expose `print()` function to the webview. Work only on macOS for now.
+ - [5206db6](https://github.com/tauri-apps/wry/commit/5206db6ca599fe0e146d72b04c908330e3045838) fix(macOS): Printing ([#235](https://github.com/tauri-apps/wry/pull/235)) ([#236](https://github.com/tauri-apps/wry/pull/236)) on 2021-05-06
+- Fix macOS windows order for tray (statusbar) applications.
+ - [229275f](https://github.com/tauri-apps/wry/commit/229275f106371d79800e0ca1cbc7b6c1827bc2ac) fix: macOS windows order ([#242](https://github.com/tauri-apps/wry/pull/242)) on 2021-05-07
+- Add `request_redraw` method of `Window` on Linux
+ - [03abfa0](https://github.com/tauri-apps/wry/commit/03abfa06019a78a182c7cd29dc63bf3d9df10e44) Add request_redraw method on Linux ([#222](https://github.com/tauri-apps/wry/pull/222)) on 2021-04-30
+- Add tao as window dependency.
+ - [483bad0](https://github.com/tauri-apps/wry/commit/483bad0fc7e7564500f7183547c15604fa387258) feat: tao as window dependency ([#230](https://github.com/tauri-apps/wry/pull/230)) on 2021-05-03
+- Close the window when the instance is dropped on Linux and Windows.
+ - [3f2cc28](https://github.com/tauri-apps/wry/commit/3f2cc28b4fbfcf54c97000a6541e9356440838e8) fix: close window when the instance is dropped ([#228](https://github.com/tauri-apps/wry/pull/228)) on 2021-05-02
+- Remove winit dependency on Linux
+ - [fa15076](https://github.com/tauri-apps/wry/commit/fa15076207d9e678db4149210aba929044d0ff45) feat: winit interface for gtk ([#163](https://github.com/tauri-apps/wry/pull/163)) on 2021-04-19
+ - [39d6f59](https://github.com/tauri-apps/wry/commit/39d6f595d81c857e92aef31cc2559b402e64edd3) publish new versions ([#166](https://github.com/tauri-apps/wry/pull/166)) on 2021-04-29
+ - [4ef8330](https://github.com/tauri-apps/wry/commit/4ef8330d856e07d34bf86d1f2903c82c37042556) Remove winit dependency on Linux ([#226](https://github.com/tauri-apps/wry/pull/226)) on 2021-04-30
+
+## \[0.9.0]
+
+- Refactor signatures of most closure types
+ - [b8823fe](https://github.com/tauri-apps/wry/commit/b8823fe14ee5f95d07cd2cb1f9f673b964c9dc83) refactor: signature of closure types ([#167](https://github.com/tauri-apps/wry/pull/167)) on 2021-04-19
+- Drop handler closures properly on macOS.
+ - [f905503](https://github.com/tauri-apps/wry/commit/f905503c4a010ed4219c6ad36d14c0dbf0b6e122) fix: [#160](https://github.com/tauri-apps/wry/pull/160) drop handler closures properly ([#211](https://github.com/tauri-apps/wry/pull/211)) on 2021-04-27
+- Fix `history.pushState` in webview2.
+ - [dd0fa46](https://github.com/tauri-apps/wry/commit/dd0fa46494c1ab8536bcc7ea1dd16341b12856b4) Use http instead of file for windows custom protocol workaround ([#173](https://github.com/tauri-apps/wry/pull/173)) on 2021-04-20
+- The `data_directory` field now affects the IndexedDB and LocalStorage directories on Linux.
+ - [1a6c821](https://github.com/tauri-apps/wry/commit/1a6c8216ee6865ca14025c229b37342496b38f26) feat(linux): implement custom user data path ([#188](https://github.com/tauri-apps/wry/pull/188)) on 2021-04-22
+- Fix runtime panic on macOS, when no file handler are defined.
+ - [22a4991](https://github.com/tauri-apps/wry/commit/22a4991aa8ca7c75aa52150a90379c40bcc34d07) bug(macOS): Runtime panic when no file_drop_handler ([#177](https://github.com/tauri-apps/wry/pull/177)) on 2021-04-20
+- Add position field on WindowAttribute
+ - [2b3be7a](https://github.com/tauri-apps/wry/commit/2b3be7a4db2cbc1612c7105cb698c1f21a05da77) Add position field on WindowAttribute ([#219](https://github.com/tauri-apps/wry/pull/219)) on 2021-04-28
+- Fix panic on multiple custom protocols registration.
+ - [01647a2](https://github.com/tauri-apps/wry/commit/01647a2a5b769bc192754c2d3806a55112d58d33) Fix custom protocol registry on mac ([#205](https://github.com/tauri-apps/wry/pull/205)) on 2021-04-26
+- Fix SVG render with the custom protocol.
+ - [890cfe5](https://github.com/tauri-apps/wry/commit/890cfe527996c181d643c9f8e5fc3e79ff0841a0) fix(custom-protocol): SVG mime type - close [#168](https://github.com/tauri-apps/wry/pull/168) ([#169](https://github.com/tauri-apps/wry/pull/169)) on 2021-04-19
+- Initial custom WindowExtWindows trait.
+ - [1ef1f58](https://github.com/tauri-apps/wry/commit/1ef1f58efb6afa6c6b9eda3a43ee83fc79c3b78e) feat: custom WindowExtWindow trait ([#191](https://github.com/tauri-apps/wry/pull/191)) on 2021-04-23
+- Fix transparency on Windows
+ - [e278556](https://github.com/tauri-apps/wry/commit/e2785566c69d43f003896b7b5da79b29d2966c13) fix: transparency on Windows ([#217](https://github.com/tauri-apps/wry/pull/217)) on 2021-04-28
+- Add platform module and WindowExtUnix trait on Linux
+ - [004e298](https://github.com/tauri-apps/wry/commit/004e298e0198e6576a11e6e84fdf6b7c2f66b6ae) feat: WindowExtUnix trait ([#192](https://github.com/tauri-apps/wry/pull/192)) on 2021-04-23
+- Make sure custom protocol on Windows is over HTTPS.
+ - [c36db35](https://github.com/tauri-apps/wry/commit/c36db35b2b8704eb36bc341cd99abac01abfab87) fix(custom-protocol): Make sure custom protocol on Windows is over HTTPS. ([#179](https://github.com/tauri-apps/wry/pull/179)) on 2021-04-20
+- Initial winit interface for gtk backend
+ - [fa15076](https://github.com/tauri-apps/wry/commit/fa15076207d9e678db4149210aba929044d0ff45) feat: winit interface for gtk ([#163](https://github.com/tauri-apps/wry/pull/163)) on 2021-04-19
+
+## \[0.8.0]
+
+- Wry now accepts multiple custom protocol registrations.
+ - [db64fc6](https://github.com/tauri-apps/wry/commit/db64fc69c48a728184fcef001688b94f0294edab) feat/licenses ([#155](https://github.com/tauri-apps/wry/pull/155)) on 2021-04-14
+- Apply license header for SPDX compliance.
+ - [05e0218](https://github.com/tauri-apps/wry/commit/05e02180c9fe929d3e691185df44257654546935) feat: multiple custom protocols ([#151](https://github.com/tauri-apps/wry/pull/151)) on 2021-04-11
+ - [db64fc6](https://github.com/tauri-apps/wry/commit/db64fc69c48a728184fcef001688b94f0294edab) feat/licenses ([#155](https://github.com/tauri-apps/wry/pull/155)) on 2021-04-14
+- Remove bindings crate and use windows-webview2 as dependency instead.
+ - [c2156a4](https://github.com/tauri-apps/wry/commit/c2156a45d7fbfead956b6d03b2594962e3455e6d) Move to windows-webview2 as dependency for winrt impl ([#144](https://github.com/tauri-apps/wry/pull/144)) on 2021-04-03
+
+## \[0.7.0]
+
+- Add old win32 implementation on windows as default feature flag.
+ - [1a88cd2](https://github.com/tauri-apps/wry/commit/1a88cd267f2a29c1dd35d7197250972718081847) refactor: Add win32 implementation and feature flag for both backends ([#139](https://github.com/tauri-apps/wry/pull/139)) on 2021-04-02
+- Adds a `WindowProxy` to the file drop handler closure - `WindowFileDropHandler`.
+ - [20cb051](https://github.com/tauri-apps/wry/commit/20cb051aba28009c70dad838b2a9b1575cb5363a) feat: add WindowProxy to file drop handler closure ([#140](https://github.com/tauri-apps/wry/pull/140)) on 2021-04-01
+
+## \[0.6.2]
+
+- Add pipe back to version check for covector config. This prevents the CI failure on publish if it exists already. The issue was patched in covector (and tests in place so it doesn't break in the future).
+ - [a32829c](https://github.com/tauri-apps/wry/commit/a32829c527f02b228fa1da45e9710941c5415bfc) chore: add pipe for publish check back in ([#131](https://github.com/tauri-apps/wry/pull/131)) on 2021-03-28
+- Fix messages to the webview from the backend being delayed on Linux/GTK when the user is not actively engaged with the UI.
+ - [d2a2a9f](https://github.com/tauri-apps/wry/commit/d2a2a9f473d2588b27a95bf627d125caea1b979d) fix: spawn async event loop on gtk to prevent delayed messages ([#135](https://github.com/tauri-apps/wry/pull/135)) on 2021-03-31
+- Add draggable regions, just add `drag-region` class to the html element.
+ - [b2a0bfc](https://github.com/tauri-apps/wry/commit/b2a0bfc289786d0a23dac0c8d9543771e70e3427) feat/ draggable-region ([#92](https://github.com/tauri-apps/wry/pull/92)) on 2021-03-25
+- Add event listener in application proxy
+ - [c49846c](https://github.com/tauri-apps/wry/commit/c49846cfc41bb548a685edeac5f8036501f7dcec) feat: event listener ([#129](https://github.com/tauri-apps/wry/pull/129)) on 2021-03-26
+- Better result error handling
+ - [485035f](https://github.com/tauri-apps/wry/commit/485035f17d28560966b07b512935821814f0e951) chore: better result error handling ([#124](https://github.com/tauri-apps/wry/pull/124)) on 2021-03-21
+- Fix visibility on webview2 when window was invisible previously and then shown.
+ - [6d31706](https://github.com/tauri-apps/wry/commit/6d31706a6bff43e9b28100675cf8fc12f29db248) Fix visibility on webview2 when window was invisible previously ([#128](https://github.com/tauri-apps/wry/pull/128)) on 2021-03-24
+
+## \[0.6.1]
+
+- Add attribute option to allow WebView on Windows use user_data folder
+ - [8dd58ee](https://github.com/tauri-apps/wry/commit/8dd58eec77d4c89491b1af427d06c4ee6cfa8e58) feat/ allow webview2 (windows) to use optional user_data folder provided by the attributes ([#120](https://github.com/tauri-apps/wry/pull/120)) on 2021-03-21
+
+## \[0.6.0]
+
+- Initialize covector!
+ - [33b64ed](https://github.com/tauri-apps/wry/commit/33b64ed5c208b778d03dbb5f3f2808bb417c9f52) chore: covector init ([#55](https://github.com/tauri-apps/wry/pull/55)) on 2021-02-21
+- Support Windows 7, 8, and 10
+ - [fbf0d17](https://github.com/tauri-apps/wry/commit/fbf0d17164da455400aaa44104c3925eded09393) Adopt Webview2 on Windows ([#48](https://github.com/tauri-apps/wry/pull/48)) on 2021-02-20
+- Dev tools are enabled on debug build
+- Add skip task bar option
+ - [395b6fb](https://github.com/tauri-apps/wry/commit/395b6fbcd66f6cbd0457cb609bea4afe734fadd4) feat: `skip_taskbar` for windows ([#49](https://github.com/tauri-apps/wry/pull/49)) on 2021-02-20
+- Add custom protocol option
+ - [a492806](https://github.com/tauri-apps/wry/commit/7a492806d716a30abe15a2104b64152c1ca370bb) Add custom protocol ([#65](https://github.com/tauri-apps/wry/pull/65)) on 2021-02-23
+- Add transparent option to mac and linux
+- Error type has Send/Sync traits
+ - [3536b83](https://github.com/tauri-apps/wry/commit/3536b831ec30ee7436616ba4b262bbdd1e6279c8) Add .changes file in prepare of v0.6 on 2021-02-24
+- Replace Callback with RPC handler
+ - [e215157](https://github.com/tauri-apps/wry/commit/e215157146f0eab8ee6beab0628b036c68eea108) Implement draft RPC API ([#95](https://github.com/tauri-apps/wry/pull/95)) on 2021-03-04
+- Add File drop handlers
+ - [fed0ee7](https://github.com/tauri-apps/wry/commit/fed0ee772100ad19a344a85266618c7bcf7cb649) File drop handlers ([#96](https://github.com/tauri-apps/wry/pull/96)) on 2021-03-09
diff --git a/vendor/wry/Cargo.lock b/vendor/wry/Cargo.lock
new file mode 100644
index 0000000..12d1016
--- /dev/null
+++ b/vendor/wry/Cargo.lock
@@ -0,0 +1,4236 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+version = 3
+
+[[package]]
+name = "ab_glyph"
+version = "0.2.29"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ec3672c180e71eeaaac3a541fbbc5f5ad4def8b747c595ad30d674e43049f7b0"
+dependencies = [
+ "ab_glyph_rasterizer",
+ "owned_ttf_parser",
+]
+
+[[package]]
+name = "ab_glyph_rasterizer"
+version = "0.1.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c71b1793ee61086797f5c80b6efa2b8ffa6d5dd703f118545808a7f2e27f7046"
+
+[[package]]
+name = "ahash"
+version = "0.8.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011"
+dependencies = [
+ "cfg-if",
+ "getrandom 0.2.15",
+ "once_cell",
+ "version_check",
+ "zerocopy",
+]
+
+[[package]]
+name = "allocator-api2"
+version = "0.2.20"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "45862d1c77f2228b9e10bc609d5bc203d86ebc9b87ad8d5d5167a6c9abf739d9"
+
+[[package]]
+name = "android-activity"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ee91c0c2905bae44f84bfa4e044536541df26b7703fd0888deeb9060fcc44289"
+dependencies = [
+ "android-properties",
+ "bitflags 2.6.0",
+ "cc",
+ "cesu8",
+ "jni",
+ "jni-sys",
+ "libc",
+ "log",
+ "ndk 0.8.0",
+ "ndk-context",
+ "ndk-sys 0.5.0+25.2.9519653",
+ "num_enum",
+ "thiserror",
+]
+
+[[package]]
+name = "android-properties"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fc7eb209b1518d6bb87b283c20095f5228ecda460da70b44f0802523dea6da04"
+
+[[package]]
+name = "android_system_properties"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "arrayref"
+version = "0.3.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb"
+
+[[package]]
+name = "arrayvec"
+version = "0.7.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50"
+
+[[package]]
+name = "as-raw-xcb-connection"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "175571dd1d178ced59193a6fc02dde1b972eb0bc56c892cde9beeceac5bf0f6b"
+
+[[package]]
+name = "ash"
+version = "0.37.3+1.3.251"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "39e9c3835d686b0a6084ab4234fcd1b07dbf6e4767dce60874b12356a25ecd4a"
+dependencies = [
+ "libloading 0.7.4",
+]
+
+[[package]]
+name = "atk"
+version = "0.18.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b4af014b17dd80e8af9fa689b2d4a211ddba6eb583c1622f35d0cb543f6b17e4"
+dependencies = [
+ "atk-sys",
+ "glib",
+ "libc",
+]
+
+[[package]]
+name = "atk-sys"
+version = "0.18.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "251e0b7d90e33e0ba930891a505a9a35ece37b2dd37a14f3ffc306c13b980009"
+dependencies = [
+ "glib-sys",
+ "gobject-sys",
+ "libc",
+ "system-deps",
+]
+
+[[package]]
+name = "atomic-waker"
+version = "1.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0"
+
+[[package]]
+name = "autocfg"
+version = "1.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
+
+[[package]]
+name = "base64"
+version = "0.22.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
+
+[[package]]
+name = "bit-set"
+version = "0.5.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1"
+dependencies = [
+ "bit-vec",
+]
+
+[[package]]
+name = "bit-vec"
+version = "0.6.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb"
+
+[[package]]
+name = "bitflags"
+version = "1.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
+
+[[package]]
+name = "bitflags"
+version = "2.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de"
+
+[[package]]
+name = "block"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a"
+
+[[package]]
+name = "block-buffer"
+version = "0.10.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71"
+dependencies = [
+ "generic-array",
+]
+
+[[package]]
+name = "block-sys"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ae85a0696e7ea3b835a453750bf002770776609115e6d25c6d2ff28a8200f7e7"
+dependencies = [
+ "objc-sys",
+]
+
+[[package]]
+name = "block2"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "15b55663a85f33501257357e6421bb33e769d5c9ffb5ba0921c975a123e35e68"
+dependencies = [
+ "block-sys",
+ "objc2 0.4.1",
+]
+
+[[package]]
+name = "block2"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2c132eebf10f5cad5289222520a4a058514204aed6d791f1cf4fe8088b82d15f"
+dependencies = [
+ "objc2 0.5.2",
+]
+
+[[package]]
+name = "bumpalo"
+version = "3.16.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c"
+
+[[package]]
+name = "bytemuck"
+version = "1.20.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8b37c88a63ffd85d15b406896cc343916d7cf57838a847b3a6f2ca5d39a5695a"
+
+[[package]]
+name = "byteorder"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
+
+[[package]]
+name = "bytes"
+version = "1.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da"
+
+[[package]]
+name = "cairo-rs"
+version = "0.18.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8ca26ef0159422fb77631dc9d17b102f253b876fe1586b03b803e63a309b4ee2"
+dependencies = [
+ "bitflags 2.6.0",
+ "cairo-sys-rs",
+ "glib",
+ "libc",
+ "once_cell",
+ "thiserror",
+]
+
+[[package]]
+name = "cairo-sys-rs"
+version = "0.18.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "685c9fa8e590b8b3d678873528d83411db17242a73fccaed827770ea0fedda51"
+dependencies = [
+ "glib-sys",
+ "libc",
+ "system-deps",
+]
+
+[[package]]
+name = "calloop"
+version = "0.12.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fba7adb4dd5aa98e5553510223000e7148f621165ec5f9acd7113f6ca4995298"
+dependencies = [
+ "bitflags 2.6.0",
+ "log",
+ "polling",
+ "rustix",
+ "slab",
+ "thiserror",
+]
+
+[[package]]
+name = "calloop-wayland-source"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0f0ea9b9476c7fad82841a8dbb380e2eae480c21910feba80725b46931ed8f02"
+dependencies = [
+ "calloop",
+ "rustix",
+ "wayland-backend",
+ "wayland-client",
+]
+
+[[package]]
+name = "cc"
+version = "1.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fd9de9f2205d5ef3fd67e685b0df337994ddd4495e2a28d185500d0e1edfea47"
+dependencies = [
+ "jobserver",
+ "libc",
+ "shlex",
+]
+
+[[package]]
+name = "cesu8"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c"
+
+[[package]]
+name = "cfg-expr"
+version = "0.15.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d067ad48b8650848b989a59a86c6c36a995d02d2bf778d45c3c5d57bc2718f02"
+dependencies = [
+ "smallvec",
+ "target-lexicon",
+]
+
+[[package]]
+name = "cfg-if"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
+
+[[package]]
+name = "cfg_aliases"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e"
+
+[[package]]
+name = "cocoa"
+version = "0.26.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f79398230a6e2c08f5c9760610eb6924b52aa9e7950a619602baba59dcbbdbb2"
+dependencies = [
+ "bitflags 2.6.0",
+ "block",
+ "cocoa-foundation",
+ "core-foundation 0.10.0",
+ "core-graphics 0.24.0",
+ "foreign-types",
+ "libc",
+ "objc",
+]
+
+[[package]]
+name = "cocoa-foundation"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e14045fb83be07b5acf1c0884b2180461635b433455fa35d1cd6f17f1450679d"
+dependencies = [
+ "bitflags 2.6.0",
+ "block",
+ "core-foundation 0.10.0",
+ "core-graphics-types 0.2.0",
+ "libc",
+ "objc",
+]
+
+[[package]]
+name = "codespan-reporting"
+version = "0.11.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e"
+dependencies = [
+ "termcolor",
+ "unicode-width",
+]
+
+[[package]]
+name = "com"
+version = "0.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7e17887fd17353b65b1b2ef1c526c83e26cd72e74f598a8dc1bee13a48f3d9f6"
+dependencies = [
+ "com_macros",
+]
+
+[[package]]
+name = "com_macros"
+version = "0.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d375883580a668c7481ea6631fc1a8863e33cc335bf56bfad8d7e6d4b04b13a5"
+dependencies = [
+ "com_macros_support",
+ "proc-macro2",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "com_macros_support"
+version = "0.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ad899a1087a9296d5644792d7cb72b8e34c1bec8e7d4fbc002230169a6e8710c"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "combine"
+version = "4.6.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd"
+dependencies = [
+ "bytes",
+ "memchr",
+]
+
+[[package]]
+name = "concurrent-queue"
+version = "2.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973"
+dependencies = [
+ "crossbeam-utils",
+]
+
+[[package]]
+name = "convert_case"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e"
+
+[[package]]
+name = "cookie"
+version = "0.18.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4ddef33a339a91ea89fb53151bd0a4689cfce27055c291dfa69945475d22c747"
+dependencies = [
+ "time",
+ "version_check",
+]
+
+[[package]]
+name = "core-foundation"
+version = "0.9.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f"
+dependencies = [
+ "core-foundation-sys",
+ "libc",
+]
+
+[[package]]
+name = "core-foundation"
+version = "0.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b55271e5c8c478ad3f38ad24ef34923091e0548492a266d19b3c0b4d82574c63"
+dependencies = [
+ "core-foundation-sys",
+ "libc",
+]
+
+[[package]]
+name = "core-foundation-sys"
+version = "0.8.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
+
+[[package]]
+name = "core-graphics"
+version = "0.23.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c07782be35f9e1140080c6b96f0d44b739e2278479f64e02fdab4e32dfd8b081"
+dependencies = [
+ "bitflags 1.3.2",
+ "core-foundation 0.9.4",
+ "core-graphics-types 0.1.3",
+ "foreign-types",
+ "libc",
+]
+
+[[package]]
+name = "core-graphics"
+version = "0.24.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fa95a34622365fa5bbf40b20b75dba8dfa8c94c734aea8ac9a5ca38af14316f1"
+dependencies = [
+ "bitflags 2.6.0",
+ "core-foundation 0.10.0",
+ "core-graphics-types 0.2.0",
+ "foreign-types",
+ "libc",
+]
+
+[[package]]
+name = "core-graphics-types"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "45390e6114f68f718cc7a830514a96f903cccd70d02a8f6d9f643ac4ba45afaf"
+dependencies = [
+ "bitflags 1.3.2",
+ "core-foundation 0.9.4",
+ "libc",
+]
+
+[[package]]
+name = "core-graphics-types"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3d44a101f213f6c4cdc1853d4b78aef6db6bdfa3468798cc1d9912f4735013eb"
+dependencies = [
+ "bitflags 2.6.0",
+ "core-foundation 0.10.0",
+ "libc",
+]
+
+[[package]]
+name = "cpufeatures"
+version = "0.2.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0ca741a962e1b0bff6d724a1a0958b686406e853bb14061f218562e1896f95e6"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "crossbeam-channel"
+version = "0.5.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2"
+dependencies = [
+ "crossbeam-utils",
+]
+
+[[package]]
+name = "crossbeam-utils"
+version = "0.8.20"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80"
+
+[[package]]
+name = "crypto-common"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3"
+dependencies = [
+ "generic-array",
+ "typenum",
+]
+
+[[package]]
+name = "cssparser"
+version = "0.27.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "754b69d351cdc2d8ee09ae203db831e005560fc6030da058f86ad60c92a9cb0a"
+dependencies = [
+ "cssparser-macros",
+ "dtoa-short",
+ "itoa 0.4.8",
+ "matches",
+ "phf 0.8.0",
+ "proc-macro2",
+ "quote",
+ "smallvec",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "cssparser-macros"
+version = "0.6.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331"
+dependencies = [
+ "quote",
+ "syn 2.0.87",
+]
+
+[[package]]
+name = "cursor-icon"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "96a6ac251f4a2aca6b3f91340350eab87ae57c3f127ffeb585e92bd336717991"
+
+[[package]]
+name = "d3d12"
+version = "0.19.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3e3d747f100290a1ca24b752186f61f6637e1deffe3bf6320de6fcb29510a307"
+dependencies = [
+ "bitflags 2.6.0",
+ "libloading 0.8.5",
+ "winapi",
+]
+
+[[package]]
+name = "deranged"
+version = "0.3.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4"
+dependencies = [
+ "powerfmt",
+]
+
+[[package]]
+name = "derive_more"
+version = "0.99.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce"
+dependencies = [
+ "convert_case",
+ "proc-macro2",
+ "quote",
+ "rustc_version",
+ "syn 2.0.87",
+]
+
+[[package]]
+name = "digest"
+version = "0.10.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
+dependencies = [
+ "block-buffer",
+ "crypto-common",
+]
+
+[[package]]
+name = "dispatch"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b"
+
+[[package]]
+name = "displaydoc"
+version = "0.2.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.87",
+]
+
+[[package]]
+name = "dlib"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412"
+dependencies = [
+ "libloading 0.8.5",
+]
+
+[[package]]
+name = "dlopen2"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9e1297103d2bbaea85724fcee6294c2d50b1081f9ad47d0f6f6f61eda65315a6"
+dependencies = [
+ "dlopen2_derive",
+ "libc",
+ "once_cell",
+ "winapi",
+]
+
+[[package]]
+name = "dlopen2_derive"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f2b99bf03862d7f545ebc28ddd33a665b50865f4dfd84031a393823879bd4c54"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.87",
+]
+
+[[package]]
+name = "downcast-rs"
+version = "1.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2"
+
+[[package]]
+name = "dpi"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f25c0e292a7ca6d6498557ff1df68f32c99850012b6ea401cf8daf771f22ff53"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "dtoa"
+version = "1.0.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dcbb2bf8e87535c23f7a8a321e364ce21462d0ff10cb6407820e8e96dfff6653"
+
+[[package]]
+name = "dtoa-short"
+version = "0.3.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cd1511a7b6a56299bd043a9c167a6d2bfb37bf84a6dfceaba651168adfb43c87"
+dependencies = [
+ "dtoa",
+]
+
+[[package]]
+name = "dunce"
+version = "1.0.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813"
+
+[[package]]
+name = "equivalent"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"
+
+[[package]]
+name = "errno"
+version = "0.3.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba"
+dependencies = [
+ "libc",
+ "windows-sys 0.52.0",
+]
+
+[[package]]
+name = "field-offset"
+version = "0.3.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "38e2275cc4e4fc009b0669731a1e5ab7ebf11f469eaede2bab9309a5b4d6057f"
+dependencies = [
+ "memoffset",
+ "rustc_version",
+]
+
+[[package]]
+name = "fnv"
+version = "1.0.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
+
+[[package]]
+name = "foreign-types"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965"
+dependencies = [
+ "foreign-types-macros",
+ "foreign-types-shared",
+]
+
+[[package]]
+name = "foreign-types-macros"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.87",
+]
+
+[[package]]
+name = "foreign-types-shared"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b"
+
+[[package]]
+name = "form_urlencoded"
+version = "1.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456"
+dependencies = [
+ "percent-encoding",
+]
+
+[[package]]
+name = "futf"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "df420e2e84819663797d1ec6544b13c5be84629e7bb00dc960d6917db2987843"
+dependencies = [
+ "mac",
+ "new_debug_unreachable",
+]
+
+[[package]]
+name = "futures-channel"
+version = "0.3.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10"
+dependencies = [
+ "futures-core",
+]
+
+[[package]]
+name = "futures-core"
+version = "0.3.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e"
+
+[[package]]
+name = "futures-executor"
+version = "0.3.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f"
+dependencies = [
+ "futures-core",
+ "futures-task",
+ "futures-util",
+]
+
+[[package]]
+name = "futures-io"
+version = "0.3.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6"
+
+[[package]]
+name = "futures-macro"
+version = "0.3.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.87",
+]
+
+[[package]]
+name = "futures-task"
+version = "0.3.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988"
+
+[[package]]
+name = "futures-util"
+version = "0.3.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81"
+dependencies = [
+ "futures-core",
+ "futures-macro",
+ "futures-task",
+ "pin-project-lite",
+ "pin-utils",
+ "slab",
+]
+
+[[package]]
+name = "fxhash"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c"
+dependencies = [
+ "byteorder",
+]
+
+[[package]]
+name = "gdk"
+version = "0.18.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f5ba081bdef3b75ebcdbfc953699ed2d7417d6bd853347a42a37d76406a33646"
+dependencies = [
+ "cairo-rs",
+ "gdk-pixbuf",
+ "gdk-sys",
+ "gio",
+ "glib",
+ "libc",
+ "pango",
+]
+
+[[package]]
+name = "gdk-pixbuf"
+version = "0.18.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "50e1f5f1b0bfb830d6ccc8066d18db35c487b1b2b1e8589b5dfe9f07e8defaec"
+dependencies = [
+ "gdk-pixbuf-sys",
+ "gio",
+ "glib",
+ "libc",
+ "once_cell",
+]
+
+[[package]]
+name = "gdk-pixbuf-sys"
+version = "0.18.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3f9839ea644ed9c97a34d129ad56d38a25e6756f99f3a88e15cd39c20629caf7"
+dependencies = [
+ "gio-sys",
+ "glib-sys",
+ "gobject-sys",
+ "libc",
+ "system-deps",
+]
+
+[[package]]
+name = "gdk-sys"
+version = "0.18.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "31ff856cb3386dae1703a920f803abafcc580e9b5f711ca62ed1620c25b51ff2"
+dependencies = [
+ "cairo-sys-rs",
+ "gdk-pixbuf-sys",
+ "gio-sys",
+ "glib-sys",
+ "gobject-sys",
+ "libc",
+ "pango-sys",
+ "pkg-config",
+ "system-deps",
+]
+
+[[package]]
+name = "gdkwayland-sys"
+version = "0.18.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a90fbf5c033c65d93792192a49a8efb5bb1e640c419682a58bb96f5ae77f3d4a"
+dependencies = [
+ "gdk-sys",
+ "glib-sys",
+ "gobject-sys",
+ "libc",
+ "pkg-config",
+ "system-deps",
+]
+
+[[package]]
+name = "gdkx11"
+version = "0.18.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "db2ea8a4909d530f79921290389cbd7c34cb9d623bfe970eaae65ca5f9cd9cce"
+dependencies = [
+ "gdk",
+ "gdkx11-sys",
+ "gio",
+ "glib",
+ "libc",
+ "x11",
+]
+
+[[package]]
+name = "gdkx11-sys"
+version = "0.18.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fee8f00f4ee46cad2939b8990f5c70c94ff882c3028f3cc5abf950fa4ab53043"
+dependencies = [
+ "gdk-sys",
+ "glib-sys",
+ "libc",
+ "system-deps",
+ "x11",
+]
+
+[[package]]
+name = "generic-array"
+version = "0.14.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"
+dependencies = [
+ "typenum",
+ "version_check",
+]
+
+[[package]]
+name = "gethostname"
+version = "0.4.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0176e0459c2e4a1fe232f984bca6890e681076abb9934f6cea7c326f3fc47818"
+dependencies = [
+ "libc",
+ "windows-targets 0.48.5",
+]
+
+[[package]]
+name = "getrandom"
+version = "0.1.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce"
+dependencies = [
+ "cfg-if",
+ "libc",
+ "wasi 0.9.0+wasi-snapshot-preview1",
+]
+
+[[package]]
+name = "getrandom"
+version = "0.2.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7"
+dependencies = [
+ "cfg-if",
+ "libc",
+ "wasi 0.11.0+wasi-snapshot-preview1",
+]
+
+[[package]]
+name = "gio"
+version = "0.18.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d4fc8f532f87b79cbc51a79748f16a6828fb784be93145a322fa14d06d354c73"
+dependencies = [
+ "futures-channel",
+ "futures-core",
+ "futures-io",
+ "futures-util",
+ "gio-sys",
+ "glib",
+ "libc",
+ "once_cell",
+ "pin-project-lite",
+ "smallvec",
+ "thiserror",
+]
+
+[[package]]
+name = "gio-sys"
+version = "0.18.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "37566df850baf5e4cb0dfb78af2e4b9898d817ed9263d1090a2df958c64737d2"
+dependencies = [
+ "glib-sys",
+ "gobject-sys",
+ "libc",
+ "system-deps",
+ "winapi",
+]
+
+[[package]]
+name = "gl_generator"
+version = "0.14.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1a95dfc23a2b4a9a2f5ab41d194f8bfda3cabec42af4e39f08c339eb2a0c124d"
+dependencies = [
+ "khronos_api",
+ "log",
+ "xml-rs",
+]
+
+[[package]]
+name = "glib"
+version = "0.18.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "233daaf6e83ae6a12a52055f568f9d7cf4671dabb78ff9560ab6da230ce00ee5"
+dependencies = [
+ "bitflags 2.6.0",
+ "futures-channel",
+ "futures-core",
+ "futures-executor",
+ "futures-task",
+ "futures-util",
+ "gio-sys",
+ "glib-macros",
+ "glib-sys",
+ "gobject-sys",
+ "libc",
+ "memchr",
+ "once_cell",
+ "smallvec",
+ "thiserror",
+]
+
+[[package]]
+name = "glib-macros"
+version = "0.18.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0bb0228f477c0900c880fd78c8759b95c7636dbd7842707f49e132378aa2acdc"
+dependencies = [
+ "heck 0.4.1",
+ "proc-macro-crate 2.0.2",
+ "proc-macro-error",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.87",
+]
+
+[[package]]
+name = "glib-sys"
+version = "0.18.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "063ce2eb6a8d0ea93d2bf8ba1957e78dbab6be1c2220dd3daca57d5a9d869898"
+dependencies = [
+ "libc",
+ "system-deps",
+]
+
+[[package]]
+name = "glow"
+version = "0.13.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bd348e04c43b32574f2de31c8bb397d96c9fcfa1371bd4ca6d8bdc464ab121b1"
+dependencies = [
+ "js-sys",
+ "slotmap",
+ "wasm-bindgen",
+ "web-sys",
+]
+
+[[package]]
+name = "glutin_wgl_sys"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6c8098adac955faa2d31079b65dc48841251f69efd3ac25477903fc424362ead"
+dependencies = [
+ "gl_generator",
+]
+
+[[package]]
+name = "gobject-sys"
+version = "0.18.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0850127b514d1c4a4654ead6dedadb18198999985908e6ffe4436f53c785ce44"
+dependencies = [
+ "glib-sys",
+ "libc",
+ "system-deps",
+]
+
+[[package]]
+name = "gpu-alloc"
+version = "0.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fbcd2dba93594b227a1f57ee09b8b9da8892c34d55aa332e034a228d0fe6a171"
+dependencies = [
+ "bitflags 2.6.0",
+ "gpu-alloc-types",
+]
+
+[[package]]
+name = "gpu-alloc-types"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "98ff03b468aa837d70984d55f5d3f846f6ec31fe34bbb97c4f85219caeee1ca4"
+dependencies = [
+ "bitflags 2.6.0",
+]
+
+[[package]]
+name = "gpu-allocator"
+version = "0.25.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6f56f6318968d03c18e1bcf4857ff88c61157e9da8e47c5f29055d60e1228884"
+dependencies = [
+ "log",
+ "presser",
+ "thiserror",
+ "winapi",
+ "windows 0.52.0",
+]
+
+[[package]]
+name = "gpu-descriptor"
+version = "0.2.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cc11df1ace8e7e564511f53af41f3e42ddc95b56fd07b3f4445d2a6048bc682c"
+dependencies = [
+ "bitflags 2.6.0",
+ "gpu-descriptor-types",
+ "hashbrown 0.14.5",
+]
+
+[[package]]
+name = "gpu-descriptor-types"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6bf0b36e6f090b7e1d8a4b49c0cb81c1f8376f72198c65dd3ad9ff3556b8b78c"
+dependencies = [
+ "bitflags 2.6.0",
+]
+
+[[package]]
+name = "gtk"
+version = "0.18.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "93c4f5e0e20b60e10631a5f06da7fe3dda744b05ad0ea71fee2f47adf865890c"
+dependencies = [
+ "atk",
+ "cairo-rs",
+ "field-offset",
+ "futures-channel",
+ "gdk",
+ "gdk-pixbuf",
+ "gio",
+ "glib",
+ "gtk-sys",
+ "gtk3-macros",
+ "libc",
+ "pango",
+ "pkg-config",
+]
+
+[[package]]
+name = "gtk-sys"
+version = "0.18.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "771437bf1de2c1c0b496c11505bdf748e26066bbe942dfc8f614c9460f6d7722"
+dependencies = [
+ "atk-sys",
+ "cairo-sys-rs",
+ "gdk-pixbuf-sys",
+ "gdk-sys",
+ "gio-sys",
+ "glib-sys",
+ "gobject-sys",
+ "libc",
+ "pango-sys",
+ "system-deps",
+]
+
+[[package]]
+name = "gtk3-macros"
+version = "0.18.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c6063efb63db582968fb7df72e1ae68aa6360dcfb0a75143f34fc7d616bad75e"
+dependencies = [
+ "proc-macro-crate 1.3.1",
+ "proc-macro-error",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.87",
+]
+
+[[package]]
+name = "hashbrown"
+version = "0.12.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
+
+[[package]]
+name = "hashbrown"
+version = "0.14.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1"
+dependencies = [
+ "ahash",
+ "allocator-api2",
+]
+
+[[package]]
+name = "hashbrown"
+version = "0.15.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3a9bfc1af68b1726ea47d3d5109de126281def866b33970e10fbab11b5dafab3"
+
+[[package]]
+name = "hassle-rs"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "af2a7e73e1f34c48da31fb668a907f250794837e08faa144fd24f0b8b741e890"
+dependencies = [
+ "bitflags 2.6.0",
+ "com",
+ "libc",
+ "libloading 0.8.5",
+ "thiserror",
+ "widestring",
+ "winapi",
+]
+
+[[package]]
+name = "heck"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
+
+[[package]]
+name = "heck"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
+
+[[package]]
+name = "hermit-abi"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc"
+
+[[package]]
+name = "hexf-parse"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dfa686283ad6dd069f105e5ab091b04c62850d3e4cf5d67debad1933f55023df"
+
+[[package]]
+name = "html5ever"
+version = "0.26.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bea68cab48b8459f17cf1c944c67ddc572d272d9f2b274140f223ecb1da4a3b7"
+dependencies = [
+ "log",
+ "mac",
+ "markup5ever",
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "http"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258"
+dependencies = [
+ "bytes",
+ "fnv",
+ "itoa 1.0.11",
+]
+
+[[package]]
+name = "http-range"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "21dec9db110f5f872ed9699c3ecf50cf16f423502706ba5c72462e28d3157573"
+
+[[package]]
+name = "icrate"
+version = "0.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "99d3aaff8a54577104bafdf686ff18565c3b6903ca5782a2026ef06e2c7aa319"
+dependencies = [
+ "block2 0.3.0",
+ "dispatch",
+ "objc2 0.4.1",
+]
+
+[[package]]
+name = "icu_collections"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526"
+dependencies = [
+ "displaydoc",
+ "yoke",
+ "zerofrom",
+ "zerovec",
+]
+
+[[package]]
+name = "icu_locid"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637"
+dependencies = [
+ "displaydoc",
+ "litemap",
+ "tinystr",
+ "writeable",
+ "zerovec",
+]
+
+[[package]]
+name = "icu_locid_transform"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e"
+dependencies = [
+ "displaydoc",
+ "icu_locid",
+ "icu_locid_transform_data",
+ "icu_provider",
+ "tinystr",
+ "zerovec",
+]
+
+[[package]]
+name = "icu_locid_transform_data"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e"
+
+[[package]]
+name = "icu_normalizer"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f"
+dependencies = [
+ "displaydoc",
+ "icu_collections",
+ "icu_normalizer_data",
+ "icu_properties",
+ "icu_provider",
+ "smallvec",
+ "utf16_iter",
+ "utf8_iter",
+ "write16",
+ "zerovec",
+]
+
+[[package]]
+name = "icu_normalizer_data"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516"
+
+[[package]]
+name = "icu_properties"
+version = "1.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5"
+dependencies = [
+ "displaydoc",
+ "icu_collections",
+ "icu_locid_transform",
+ "icu_properties_data",
+ "icu_provider",
+ "tinystr",
+ "zerovec",
+]
+
+[[package]]
+name = "icu_properties_data"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569"
+
+[[package]]
+name = "icu_provider"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9"
+dependencies = [
+ "displaydoc",
+ "icu_locid",
+ "icu_provider_macros",
+ "stable_deref_trait",
+ "tinystr",
+ "writeable",
+ "yoke",
+ "zerofrom",
+ "zerovec",
+]
+
+[[package]]
+name = "icu_provider_macros"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.87",
+]
+
+[[package]]
+name = "idna"
+version = "1.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e"
+dependencies = [
+ "idna_adapter",
+ "smallvec",
+ "utf8_iter",
+]
+
+[[package]]
+name = "idna_adapter"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71"
+dependencies = [
+ "icu_normalizer",
+ "icu_properties",
+]
+
+[[package]]
+name = "indexmap"
+version = "1.9.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99"
+dependencies = [
+ "autocfg",
+ "hashbrown 0.12.3",
+]
+
+[[package]]
+name = "indexmap"
+version = "2.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da"
+dependencies = [
+ "equivalent",
+ "hashbrown 0.15.1",
+]
+
+[[package]]
+name = "instant"
+version = "0.1.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222"
+dependencies = [
+ "cfg-if",
+]
+
+[[package]]
+name = "itoa"
+version = "0.4.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4"
+
+[[package]]
+name = "itoa"
+version = "1.0.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b"
+
+[[package]]
+name = "javascriptcore-rs"
+version = "1.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ca5671e9ffce8ffba57afc24070e906da7fc4b1ba66f2cabebf61bf2ea257fcc"
+dependencies = [
+ "bitflags 1.3.2",
+ "glib",
+ "javascriptcore-rs-sys",
+]
+
+[[package]]
+name = "javascriptcore-rs-sys"
+version = "1.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "af1be78d14ffa4b75b66df31840478fef72b51f8c2465d4ca7c194da9f7a5124"
+dependencies = [
+ "glib-sys",
+ "gobject-sys",
+ "libc",
+ "system-deps",
+]
+
+[[package]]
+name = "jni"
+version = "0.21.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97"
+dependencies = [
+ "cesu8",
+ "cfg-if",
+ "combine",
+ "jni-sys",
+ "log",
+ "thiserror",
+ "walkdir",
+ "windows-sys 0.45.0",
+]
+
+[[package]]
+name = "jni-sys"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130"
+
+[[package]]
+name = "jobserver"
+version = "0.1.32"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "js-sys"
+version = "0.3.72"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9"
+dependencies = [
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "khronos-egl"
+version = "6.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6aae1df220ece3c0ada96b8153459b67eebe9ae9212258bb0134ae60416fdf76"
+dependencies = [
+ "libc",
+ "libloading 0.8.5",
+ "pkg-config",
+]
+
+[[package]]
+name = "khronos_api"
+version = "3.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc"
+
+[[package]]
+name = "kuchikiki"
+version = "0.8.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f29e4755b7b995046f510a7520c42b2fed58b77bd94d5a87a8eb43d2fd126da8"
+dependencies = [
+ "cssparser",
+ "html5ever",
+ "indexmap 1.9.3",
+ "matches",
+ "selectors",
+]
+
+[[package]]
+name = "lazy_static"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
+
+[[package]]
+name = "libc"
+version = "0.2.164"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "433bfe06b8c75da9b2e3fbea6e5329ff87748f0b144ef75306e674c3f6f7c13f"
+
+[[package]]
+name = "libloading"
+version = "0.7.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f"
+dependencies = [
+ "cfg-if",
+ "winapi",
+]
+
+[[package]]
+name = "libloading"
+version = "0.8.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4"
+dependencies = [
+ "cfg-if",
+ "windows-targets 0.52.6",
+]
+
+[[package]]
+name = "libredox"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d"
+dependencies = [
+ "bitflags 2.6.0",
+ "libc",
+ "redox_syscall 0.5.7",
+]
+
+[[package]]
+name = "linux-raw-sys"
+version = "0.4.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89"
+
+[[package]]
+name = "litemap"
+version = "0.7.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "643cb0b8d4fcc284004d5fd0d67ccf61dfffadb7f75e1e71bc420f4688a3a704"
+
+[[package]]
+name = "lock_api"
+version = "0.4.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17"
+dependencies = [
+ "autocfg",
+ "scopeguard",
+]
+
+[[package]]
+name = "log"
+version = "0.4.22"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24"
+
+[[package]]
+name = "mac"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4"
+
+[[package]]
+name = "malloc_buf"
+version = "0.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "markup5ever"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7a2629bb1404f3d34c2e921f21fd34ba00b206124c81f65c50b43b6aaefeb016"
+dependencies = [
+ "log",
+ "phf 0.10.1",
+ "phf_codegen 0.10.0",
+ "string_cache",
+ "string_cache_codegen",
+ "tendril",
+]
+
+[[package]]
+name = "matches"
+version = "0.1.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5"
+
+[[package]]
+name = "memchr"
+version = "2.7.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
+
+[[package]]
+name = "memmap2"
+version = "0.9.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fd3f7eed9d3848f8b98834af67102b720745c4ec028fcd0aa0239277e7de374f"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "memoffset"
+version = "0.9.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a"
+dependencies = [
+ "autocfg",
+]
+
+[[package]]
+name = "metal"
+version = "0.27.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c43f73953f8cbe511f021b58f18c3ce1c3d1ae13fe953293e13345bf83217f25"
+dependencies = [
+ "bitflags 2.6.0",
+ "block",
+ "core-graphics-types 0.1.3",
+ "foreign-types",
+ "log",
+ "objc",
+ "paste",
+]
+
+[[package]]
+name = "naga"
+version = "0.19.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "50e3524642f53d9af419ab5e8dd29d3ba155708267667c2f3f06c88c9e130843"
+dependencies = [
+ "bit-set",
+ "bitflags 2.6.0",
+ "codespan-reporting",
+ "hexf-parse",
+ "indexmap 2.6.0",
+ "log",
+ "num-traits",
+ "rustc-hash",
+ "spirv",
+ "termcolor",
+ "thiserror",
+ "unicode-xid",
+]
+
+[[package]]
+name = "ndk"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2076a31b7010b17a38c01907c45b945e8f11495ee4dd588309718901b1f7a5b7"
+dependencies = [
+ "bitflags 2.6.0",
+ "jni-sys",
+ "log",
+ "ndk-sys 0.5.0+25.2.9519653",
+ "num_enum",
+ "raw-window-handle",
+ "thiserror",
+]
+
+[[package]]
+name = "ndk"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4"
+dependencies = [
+ "bitflags 2.6.0",
+ "jni-sys",
+ "log",
+ "ndk-sys 0.6.0+11769913",
+ "num_enum",
+ "raw-window-handle",
+ "thiserror",
+]
+
+[[package]]
+name = "ndk-context"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b"
+
+[[package]]
+name = "ndk-sys"
+version = "0.5.0+25.2.9519653"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8c196769dd60fd4f363e11d948139556a344e79d451aeb2fa2fd040738ef7691"
+dependencies = [
+ "jni-sys",
+]
+
+[[package]]
+name = "ndk-sys"
+version = "0.6.0+11769913"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ee6cda3051665f1fb8d9e08fc35c96d5a244fb1be711a03b71118828afc9a873"
+dependencies = [
+ "jni-sys",
+]
+
+[[package]]
+name = "new_debug_unreachable"
+version = "1.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086"
+
+[[package]]
+name = "nodrop"
+version = "0.1.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb"
+
+[[package]]
+name = "num-conv"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9"
+
+[[package]]
+name = "num-traits"
+version = "0.2.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
+dependencies = [
+ "autocfg",
+]
+
+[[package]]
+name = "num_enum"
+version = "0.7.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4e613fc340b2220f734a8595782c551f1250e969d87d3be1ae0579e8d4065179"
+dependencies = [
+ "num_enum_derive",
+]
+
+[[package]]
+name = "num_enum_derive"
+version = "0.7.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56"
+dependencies = [
+ "proc-macro-crate 2.0.2",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.87",
+]
+
+[[package]]
+name = "objc"
+version = "0.2.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1"
+dependencies = [
+ "malloc_buf",
+ "objc_exception",
+]
+
+[[package]]
+name = "objc-sys"
+version = "0.3.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cdb91bdd390c7ce1a8607f35f3ca7151b65afc0ff5ff3b34fa350f7d7c7e4310"
+dependencies = [
+ "cc",
+]
+
+[[package]]
+name = "objc2"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "559c5a40fdd30eb5e344fbceacf7595a81e242529fb4e21cf5f43fb4f11ff98d"
+dependencies = [
+ "objc-sys",
+ "objc2-encode 3.0.0",
+]
+
+[[package]]
+name = "objc2"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "46a785d4eeff09c14c487497c162e92766fbb3e4059a71840cecc03d9a50b804"
+dependencies = [
+ "objc-sys",
+ "objc2-encode 4.0.3",
+]
+
+[[package]]
+name = "objc2-app-kit"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff"
+dependencies = [
+ "bitflags 2.6.0",
+ "block2 0.5.1",
+ "libc",
+ "objc2 0.5.2",
+ "objc2-core-data",
+ "objc2-core-image",
+ "objc2-foundation",
+ "objc2-quartz-core",
+]
+
+[[package]]
+name = "objc2-cloud-kit"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "74dd3b56391c7a0596a295029734d3c1c5e7e510a4cb30245f8221ccea96b009"
+dependencies = [
+ "bitflags 2.6.0",
+ "block2 0.5.1",
+ "objc2 0.5.2",
+ "objc2-core-location",
+ "objc2-foundation",
+]
+
+[[package]]
+name = "objc2-contacts"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a5ff520e9c33812fd374d8deecef01d4a840e7b41862d849513de77e44aa4889"
+dependencies = [
+ "block2 0.5.1",
+ "objc2 0.5.2",
+ "objc2-foundation",
+]
+
+[[package]]
+name = "objc2-core-data"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef"
+dependencies = [
+ "bitflags 2.6.0",
+ "block2 0.5.1",
+ "objc2 0.5.2",
+ "objc2-foundation",
+]
+
+[[package]]
+name = "objc2-core-image"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "55260963a527c99f1819c4f8e3b47fe04f9650694ef348ffd2227e8196d34c80"
+dependencies = [
+ "block2 0.5.1",
+ "objc2 0.5.2",
+ "objc2-foundation",
+ "objc2-metal",
+]
+
+[[package]]
+name = "objc2-core-location"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "000cfee34e683244f284252ee206a27953279d370e309649dc3ee317b37e5781"
+dependencies = [
+ "block2 0.5.1",
+ "objc2 0.5.2",
+ "objc2-contacts",
+ "objc2-foundation",
+]
+
+[[package]]
+name = "objc2-encode"
+version = "3.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d079845b37af429bfe5dfa76e6d087d788031045b25cfc6fd898486fd9847666"
+
+[[package]]
+name = "objc2-encode"
+version = "4.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7891e71393cd1f227313c9379a26a584ff3d7e6e7159e988851f0934c993f0f8"
+
+[[package]]
+name = "objc2-foundation"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8"
+dependencies = [
+ "bitflags 2.6.0",
+ "block2 0.5.1",
+ "libc",
+ "objc2 0.5.2",
+]
+
+[[package]]
+name = "objc2-link-presentation"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a1a1ae721c5e35be65f01a03b6d2ac13a54cb4fa70d8a5da293d7b0020261398"
+dependencies = [
+ "block2 0.5.1",
+ "objc2 0.5.2",
+ "objc2-app-kit",
+ "objc2-foundation",
+]
+
+[[package]]
+name = "objc2-metal"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6"
+dependencies = [
+ "bitflags 2.6.0",
+ "block2 0.5.1",
+ "objc2 0.5.2",
+ "objc2-foundation",
+]
+
+[[package]]
+name = "objc2-quartz-core"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a"
+dependencies = [
+ "bitflags 2.6.0",
+ "block2 0.5.1",
+ "objc2 0.5.2",
+ "objc2-foundation",
+ "objc2-metal",
+]
+
+[[package]]
+name = "objc2-symbols"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0a684efe3dec1b305badae1a28f6555f6ddd3bb2c2267896782858d5a78404dc"
+dependencies = [
+ "objc2 0.5.2",
+ "objc2-foundation",
+]
+
+[[package]]
+name = "objc2-ui-kit"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b8bb46798b20cd6b91cbd113524c490f1686f4c4e8f49502431415f3512e2b6f"
+dependencies = [
+ "bitflags 2.6.0",
+ "block2 0.5.1",
+ "objc2 0.5.2",
+ "objc2-cloud-kit",
+ "objc2-core-data",
+ "objc2-core-image",
+ "objc2-core-location",
+ "objc2-foundation",
+ "objc2-link-presentation",
+ "objc2-quartz-core",
+ "objc2-symbols",
+ "objc2-uniform-type-identifiers",
+ "objc2-user-notifications",
+]
+
+[[package]]
+name = "objc2-uniform-type-identifiers"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "44fa5f9748dbfe1ca6c0b79ad20725a11eca7c2218bceb4b005cb1be26273bfe"
+dependencies = [
+ "block2 0.5.1",
+ "objc2 0.5.2",
+ "objc2-foundation",
+]
+
+[[package]]
+name = "objc2-user-notifications"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "76cfcbf642358e8689af64cee815d139339f3ed8ad05103ed5eaf73db8d84cb3"
+dependencies = [
+ "bitflags 2.6.0",
+ "block2 0.5.1",
+ "objc2 0.5.2",
+ "objc2-core-location",
+ "objc2-foundation",
+]
+
+[[package]]
+name = "objc2-web-kit"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "68bc69301064cebefc6c4c90ce9cba69225239e4b8ff99d445a2b5563797da65"
+dependencies = [
+ "bitflags 2.6.0",
+ "block2 0.5.1",
+ "objc2 0.5.2",
+ "objc2-app-kit",
+ "objc2-foundation",
+]
+
+[[package]]
+name = "objc_exception"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ad970fb455818ad6cba4c122ad012fae53ae8b4795f86378bce65e4f6bab2ca4"
+dependencies = [
+ "cc",
+]
+
+[[package]]
+name = "once_cell"
+version = "1.20.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775"
+
+[[package]]
+name = "orbclient"
+version = "0.3.48"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ba0b26cec2e24f08ed8bb31519a9333140a6599b867dac464bb150bdb796fd43"
+dependencies = [
+ "libredox",
+]
+
+[[package]]
+name = "owned_ttf_parser"
+version = "0.25.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "22ec719bbf3b2a81c109a4e20b1f129b5566b7dce654bc3872f6a05abf82b2c4"
+dependencies = [
+ "ttf-parser",
+]
+
+[[package]]
+name = "pango"
+version = "0.18.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7ca27ec1eb0457ab26f3036ea52229edbdb74dee1edd29063f5b9b010e7ebee4"
+dependencies = [
+ "gio",
+ "glib",
+ "libc",
+ "once_cell",
+ "pango-sys",
+]
+
+[[package]]
+name = "pango-sys"
+version = "0.18.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "436737e391a843e5933d6d9aa102cb126d501e815b83601365a948a518555dc5"
+dependencies = [
+ "glib-sys",
+ "gobject-sys",
+ "libc",
+ "system-deps",
+]
+
+[[package]]
+name = "parking_lot"
+version = "0.12.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27"
+dependencies = [
+ "lock_api",
+ "parking_lot_core",
+]
+
+[[package]]
+name = "parking_lot_core"
+version = "0.9.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8"
+dependencies = [
+ "cfg-if",
+ "libc",
+ "redox_syscall 0.5.7",
+ "smallvec",
+ "windows-targets 0.52.6",
+]
+
+[[package]]
+name = "paste"
+version = "1.0.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a"
+
+[[package]]
+name = "percent-encoding"
+version = "2.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e"
+
+[[package]]
+name = "phf"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3dfb61232e34fcb633f43d12c58f83c1df82962dcdfa565a4e866ffc17dafe12"
+dependencies = [
+ "phf_macros",
+ "phf_shared 0.8.0",
+ "proc-macro-hack",
+]
+
+[[package]]
+name = "phf"
+version = "0.10.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fabbf1ead8a5bcbc20f5f8b939ee3f5b0f6f281b6ad3468b84656b658b455259"
+dependencies = [
+ "phf_shared 0.10.0",
+]
+
+[[package]]
+name = "phf_codegen"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cbffee61585b0411840d3ece935cce9cb6321f01c45477d30066498cd5e1a815"
+dependencies = [
+ "phf_generator 0.8.0",
+ "phf_shared 0.8.0",
+]
+
+[[package]]
+name = "phf_codegen"
+version = "0.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4fb1c3a8bc4dd4e5cfce29b44ffc14bedd2ee294559a294e2a4d4c9e9a6a13cd"
+dependencies = [
+ "phf_generator 0.10.0",
+ "phf_shared 0.10.0",
+]
+
+[[package]]
+name = "phf_generator"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "17367f0cc86f2d25802b2c26ee58a7b23faeccf78a396094c13dced0d0182526"
+dependencies = [
+ "phf_shared 0.8.0",
+ "rand 0.7.3",
+]
+
+[[package]]
+name = "phf_generator"
+version = "0.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5d5285893bb5eb82e6aaf5d59ee909a06a16737a8970984dd7746ba9283498d6"
+dependencies = [
+ "phf_shared 0.10.0",
+ "rand 0.8.5",
+]
+
+[[package]]
+name = "phf_macros"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7f6fde18ff429ffc8fe78e2bf7f8b7a5a5a6e2a8b58bc5a9ac69198bbda9189c"
+dependencies = [
+ "phf_generator 0.8.0",
+ "phf_shared 0.8.0",
+ "proc-macro-hack",
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "phf_shared"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c00cf8b9eafe68dde5e9eaa2cef8ee84a9336a47d566ec55ca16589633b65af7"
+dependencies = [
+ "siphasher",
+]
+
+[[package]]
+name = "phf_shared"
+version = "0.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096"
+dependencies = [
+ "siphasher",
+]
+
+[[package]]
+name = "pin-project-lite"
+version = "0.2.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff"
+
+[[package]]
+name = "pin-utils"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
+
+[[package]]
+name = "pkg-config"
+version = "0.3.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2"
+
+[[package]]
+name = "polling"
+version = "3.7.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a604568c3202727d1507653cb121dbd627a58684eb09a820fd746bee38b4442f"
+dependencies = [
+ "cfg-if",
+ "concurrent-queue",
+ "hermit-abi",
+ "pin-project-lite",
+ "rustix",
+ "tracing",
+ "windows-sys 0.59.0",
+]
+
+[[package]]
+name = "pollster"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "22686f4785f02a4fcc856d3b3bb19bf6c8160d103f7a99cc258bddd0251dc7f2"
+
+[[package]]
+name = "powerfmt"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391"
+
+[[package]]
+name = "ppv-lite86"
+version = "0.2.20"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04"
+dependencies = [
+ "zerocopy",
+]
+
+[[package]]
+name = "precomputed-hash"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c"
+
+[[package]]
+name = "presser"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e8cf8e6a8aa66ce33f63993ffc4ea4271eb5b0530a9002db8455ea6050c77bfa"
+
+[[package]]
+name = "proc-macro-crate"
+version = "1.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919"
+dependencies = [
+ "once_cell",
+ "toml_edit 0.19.15",
+]
+
+[[package]]
+name = "proc-macro-crate"
+version = "2.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b00f26d3400549137f92511a46ac1cd8ce37cb5598a96d382381458b992a5d24"
+dependencies = [
+ "toml_datetime",
+ "toml_edit 0.20.2",
+]
+
+[[package]]
+name = "proc-macro-error"
+version = "1.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
+dependencies = [
+ "proc-macro-error-attr",
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+ "version_check",
+]
+
+[[package]]
+name = "proc-macro-error-attr"
+version = "1.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "version_check",
+]
+
+[[package]]
+name = "proc-macro-hack"
+version = "0.5.20+deprecated"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068"
+
+[[package]]
+name = "proc-macro2"
+version = "1.0.89"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e"
+dependencies = [
+ "unicode-ident",
+]
+
+[[package]]
+name = "profiling"
+version = "1.0.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "afbdc74edc00b6f6a218ca6a5364d6226a259d4b8ea1af4a0ea063f27e179f4d"
+
+[[package]]
+name = "quick-xml"
+version = "0.36.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f7649a7b4df05aed9ea7ec6f628c67c9953a43869b8bc50929569b2999d443fe"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "quote"
+version = "1.0.37"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af"
+dependencies = [
+ "proc-macro2",
+]
+
+[[package]]
+name = "rand"
+version = "0.7.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03"
+dependencies = [
+ "getrandom 0.1.16",
+ "libc",
+ "rand_chacha 0.2.2",
+ "rand_core 0.5.1",
+ "rand_hc",
+ "rand_pcg",
+]
+
+[[package]]
+name = "rand"
+version = "0.8.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
+dependencies = [
+ "libc",
+ "rand_chacha 0.3.1",
+ "rand_core 0.6.4",
+]
+
+[[package]]
+name = "rand_chacha"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402"
+dependencies = [
+ "ppv-lite86",
+ "rand_core 0.5.1",
+]
+
+[[package]]
+name = "rand_chacha"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
+dependencies = [
+ "ppv-lite86",
+ "rand_core 0.6.4",
+]
+
+[[package]]
+name = "rand_core"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19"
+dependencies = [
+ "getrandom 0.1.16",
+]
+
+[[package]]
+name = "rand_core"
+version = "0.6.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
+dependencies = [
+ "getrandom 0.2.15",
+]
+
+[[package]]
+name = "rand_hc"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c"
+dependencies = [
+ "rand_core 0.5.1",
+]
+
+[[package]]
+name = "rand_pcg"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "16abd0c1b639e9eb4d7c50c0b8100b0d0f849be2349829c740fe8e6eb4816429"
+dependencies = [
+ "rand_core 0.5.1",
+]
+
+[[package]]
+name = "range-alloc"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9c8a99fddc9f0ba0a85884b8d14e3592853e787d581ca1816c91349b10e4eeab"
+
+[[package]]
+name = "raw-window-handle"
+version = "0.6.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539"
+
+[[package]]
+name = "redox_syscall"
+version = "0.3.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29"
+dependencies = [
+ "bitflags 1.3.2",
+]
+
+[[package]]
+name = "redox_syscall"
+version = "0.5.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f"
+dependencies = [
+ "bitflags 2.6.0",
+]
+
+[[package]]
+name = "renderdoc-sys"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "19b30a45b0cd0bcca8037f3d0dc3421eaf95327a17cad11964fb8179b4fc4832"
+
+[[package]]
+name = "rustc-hash"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
+
+[[package]]
+name = "rustc_version"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92"
+dependencies = [
+ "semver",
+]
+
+[[package]]
+name = "rustix"
+version = "0.38.41"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d7f649912bc1495e167a6edee79151c84b1bad49748cb4f1f1167f459f6224f6"
+dependencies = [
+ "bitflags 2.6.0",
+ "errno",
+ "libc",
+ "linux-raw-sys",
+ "windows-sys 0.52.0",
+]
+
+[[package]]
+name = "same-file"
+version = "1.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"
+dependencies = [
+ "winapi-util",
+]
+
+[[package]]
+name = "scoped-tls"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294"
+
+[[package]]
+name = "scopeguard"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
+
+[[package]]
+name = "sctk-adwaita"
+version = "0.8.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "70b31447ca297092c5a9916fc3b955203157b37c19ca8edde4f52e9843e602c7"
+dependencies = [
+ "ab_glyph",
+ "log",
+ "memmap2",
+ "smithay-client-toolkit",
+ "tiny-skia",
+]
+
+[[package]]
+name = "selectors"
+version = "0.22.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "df320f1889ac4ba6bc0cdc9c9af7af4bd64bb927bccdf32d81140dc1f9be12fe"
+dependencies = [
+ "bitflags 1.3.2",
+ "cssparser",
+ "derive_more",
+ "fxhash",
+ "log",
+ "matches",
+ "phf 0.8.0",
+ "phf_codegen 0.8.0",
+ "precomputed-hash",
+ "servo_arc",
+ "smallvec",
+ "thin-slice",
+]
+
+[[package]]
+name = "semver"
+version = "1.0.23"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b"
+
+[[package]]
+name = "serde"
+version = "1.0.215"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f"
+dependencies = [
+ "serde_derive",
+]
+
+[[package]]
+name = "serde_derive"
+version = "1.0.215"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.87",
+]
+
+[[package]]
+name = "serde_spanned"
+version = "0.6.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "servo_arc"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d98238b800e0d1576d8b6e3de32827c2d74bee68bb97748dcf5071fb53965432"
+dependencies = [
+ "nodrop",
+ "stable_deref_trait",
+]
+
+[[package]]
+name = "sha2"
+version = "0.10.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8"
+dependencies = [
+ "cfg-if",
+ "cpufeatures",
+ "digest",
+]
+
+[[package]]
+name = "shlex"
+version = "1.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
+
+[[package]]
+name = "siphasher"
+version = "0.3.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d"
+
+[[package]]
+name = "slab"
+version = "0.4.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67"
+dependencies = [
+ "autocfg",
+]
+
+[[package]]
+name = "slotmap"
+version = "1.0.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dbff4acf519f630b3a3ddcfaea6c06b42174d9a44bc70c620e9ed1649d58b82a"
+dependencies = [
+ "version_check",
+]
+
+[[package]]
+name = "smallvec"
+version = "1.13.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67"
+
+[[package]]
+name = "smithay-client-toolkit"
+version = "0.18.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "922fd3eeab3bd820d76537ce8f582b1cf951eceb5475c28500c7457d9d17f53a"
+dependencies = [
+ "bitflags 2.6.0",
+ "calloop",
+ "calloop-wayland-source",
+ "cursor-icon",
+ "libc",
+ "log",
+ "memmap2",
+ "rustix",
+ "thiserror",
+ "wayland-backend",
+ "wayland-client",
+ "wayland-csd-frame",
+ "wayland-cursor",
+ "wayland-protocols",
+ "wayland-protocols-wlr",
+ "wayland-scanner",
+ "xkeysym",
+]
+
+[[package]]
+name = "smol_str"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dd538fb6910ac1099850255cf94a94df6551fbdd602454387d0adb2d1ca6dead"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "soup3"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "471f924a40f31251afc77450e781cb26d55c0b650842efafc9c6cbd2f7cc4f9f"
+dependencies = [
+ "futures-channel",
+ "gio",
+ "glib",
+ "libc",
+ "soup3-sys",
+]
+
+[[package]]
+name = "soup3-sys"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7ebe8950a680a12f24f15ebe1bf70db7af98ad242d9db43596ad3108aab86c27"
+dependencies = [
+ "gio-sys",
+ "glib-sys",
+ "gobject-sys",
+ "libc",
+ "system-deps",
+]
+
+[[package]]
+name = "spirv"
+version = "0.3.0+sdk-1.3.268.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "eda41003dc44290527a59b13432d4a0379379fa074b70174882adfbdfd917844"
+dependencies = [
+ "bitflags 2.6.0",
+]
+
+[[package]]
+name = "stable_deref_trait"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3"
+
+[[package]]
+name = "static_assertions"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
+
+[[package]]
+name = "strict-num"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6637bab7722d379c8b41ba849228d680cc12d0a45ba1fa2b48f2a30577a06731"
+
+[[package]]
+name = "string_cache"
+version = "0.8.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b"
+dependencies = [
+ "new_debug_unreachable",
+ "once_cell",
+ "parking_lot",
+ "phf_shared 0.10.0",
+ "precomputed-hash",
+ "serde",
+]
+
+[[package]]
+name = "string_cache_codegen"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6bb30289b722be4ff74a408c3cc27edeaad656e06cb1fe8fa9231fa59c728988"
+dependencies = [
+ "phf_generator 0.10.0",
+ "phf_shared 0.10.0",
+ "proc-macro2",
+ "quote",
+]
+
+[[package]]
+name = "syn"
+version = "1.0.109"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
+
+[[package]]
+name = "syn"
+version = "2.0.87"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
+
+[[package]]
+name = "synstructure"
+version = "0.13.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.87",
+]
+
+[[package]]
+name = "system-deps"
+version = "6.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a3e535eb8dded36d55ec13eddacd30dec501792ff23a0b1682c38601b8cf2349"
+dependencies = [
+ "cfg-expr",
+ "heck 0.5.0",
+ "pkg-config",
+ "toml",
+ "version-compare",
+]
+
+[[package]]
+name = "tao"
+version = "0.29.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d3a97abbc7d6cfd0720da3e06fcb1cf2ac87cbfdb5bbbce103a1279a211c4d81"
+dependencies = [
+ "bitflags 2.6.0",
+ "cocoa",
+ "core-foundation 0.10.0",
+ "core-graphics 0.24.0",
+ "crossbeam-channel",
+ "dispatch",
+ "dlopen2",
+ "dpi",
+ "gdkwayland-sys",
+ "gdkx11-sys",
+ "gtk",
+ "instant",
+ "jni",
+ "lazy_static",
+ "libc",
+ "log",
+ "ndk 0.9.0",
+ "ndk-context",
+ "ndk-sys 0.6.0+11769913",
+ "objc",
+ "once_cell",
+ "parking_lot",
+ "raw-window-handle",
+ "scopeguard",
+ "tao-macros",
+ "unicode-segmentation",
+ "url",
+ "windows 0.58.0",
+ "windows-core 0.58.0",
+ "windows-version",
+ "x11-dl",
+]
+
+[[package]]
+name = "tao-macros"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f4e16beb8b2ac17db28eab8bca40e62dbfbb34c0fcdc6d9826b11b7b5d047dfd"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.87",
+]
+
+[[package]]
+name = "target-lexicon"
+version = "0.12.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
+
+[[package]]
+name = "tendril"
+version = "0.4.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d24a120c5fc464a3458240ee02c299ebcb9d67b5249c8848b09d639dca8d7bb0"
+dependencies = [
+ "futf",
+ "mac",
+ "utf-8",
+]
+
+[[package]]
+name = "termcolor"
+version = "1.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755"
+dependencies = [
+ "winapi-util",
+]
+
+[[package]]
+name = "thin-slice"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8eaa81235c7058867fa8c0e7314f33dcce9c215f535d1913822a2b3f5e289f3c"
+
+[[package]]
+name = "thiserror"
+version = "1.0.69"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52"
+dependencies = [
+ "thiserror-impl",
+]
+
+[[package]]
+name = "thiserror-impl"
+version = "1.0.69"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.87",
+]
+
+[[package]]
+name = "time"
+version = "0.3.36"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885"
+dependencies = [
+ "deranged",
+ "itoa 1.0.11",
+ "num-conv",
+ "powerfmt",
+ "serde",
+ "time-core",
+ "time-macros",
+]
+
+[[package]]
+name = "time-core"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3"
+
+[[package]]
+name = "time-macros"
+version = "0.2.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf"
+dependencies = [
+ "num-conv",
+ "time-core",
+]
+
+[[package]]
+name = "tiny-skia"
+version = "0.11.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "83d13394d44dae3207b52a326c0c85a8bf87f1541f23b0d143811088497b09ab"
+dependencies = [
+ "arrayref",
+ "arrayvec",
+ "bytemuck",
+ "cfg-if",
+ "log",
+ "tiny-skia-path",
+]
+
+[[package]]
+name = "tiny-skia-path"
+version = "0.11.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9c9e7fc0c2e86a30b117d0462aa261b72b7a99b7ebd7deb3a14ceda95c5bdc93"
+dependencies = [
+ "arrayref",
+ "bytemuck",
+ "strict-num",
+]
+
+[[package]]
+name = "tinystr"
+version = "0.7.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f"
+dependencies = [
+ "displaydoc",
+ "zerovec",
+]
+
+[[package]]
+name = "toml"
+version = "0.8.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "185d8ab0dfbb35cf1399a6344d8484209c088f75f8f68230da55d48d95d43e3d"
+dependencies = [
+ "serde",
+ "serde_spanned",
+ "toml_datetime",
+ "toml_edit 0.20.2",
+]
+
+[[package]]
+name = "toml_datetime"
+version = "0.6.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "toml_edit"
+version = "0.19.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421"
+dependencies = [
+ "indexmap 2.6.0",
+ "toml_datetime",
+ "winnow",
+]
+
+[[package]]
+name = "toml_edit"
+version = "0.20.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338"
+dependencies = [
+ "indexmap 2.6.0",
+ "serde",
+ "serde_spanned",
+ "toml_datetime",
+ "winnow",
+]
+
+[[package]]
+name = "tracing"
+version = "0.1.40"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef"
+dependencies = [
+ "pin-project-lite",
+ "tracing-attributes",
+ "tracing-core",
+]
+
+[[package]]
+name = "tracing-attributes"
+version = "0.1.27"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.87",
+]
+
+[[package]]
+name = "tracing-core"
+version = "0.1.32"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54"
+dependencies = [
+ "once_cell",
+]
+
+[[package]]
+name = "ttf-parser"
+version = "0.25.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5902c5d130972a0000f60860bfbf46f7ca3db5391eddfedd1b8728bd9dc96c0e"
+
+[[package]]
+name = "typenum"
+version = "1.17.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825"
+
+[[package]]
+name = "unicode-ident"
+version = "1.0.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe"
+
+[[package]]
+name = "unicode-segmentation"
+version = "1.12.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493"
+
+[[package]]
+name = "unicode-width"
+version = "0.1.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af"
+
+[[package]]
+name = "unicode-xid"
+version = "0.2.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853"
+
+[[package]]
+name = "url"
+version = "2.5.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8d157f1b96d14500ffdc1f10ba712e780825526c03d9a49b4d0324b0d9113ada"
+dependencies = [
+ "form_urlencoded",
+ "idna",
+ "percent-encoding",
+]
+
+[[package]]
+name = "utf-8"
+version = "0.7.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9"
+
+[[package]]
+name = "utf16_iter"
+version = "1.0.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246"
+
+[[package]]
+name = "utf8_iter"
+version = "1.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be"
+
+[[package]]
+name = "version-compare"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "852e951cb7832cb45cb1169900d19760cfa39b82bc0ea9c0e5a14ae88411c98b"
+
+[[package]]
+name = "version_check"
+version = "0.9.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
+
+[[package]]
+name = "walkdir"
+version = "2.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b"
+dependencies = [
+ "same-file",
+ "winapi-util",
+]
+
+[[package]]
+name = "wasi"
+version = "0.9.0+wasi-snapshot-preview1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519"
+
+[[package]]
+name = "wasi"
+version = "0.11.0+wasi-snapshot-preview1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
+
+[[package]]
+name = "wasm-bindgen"
+version = "0.2.95"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e"
+dependencies = [
+ "cfg-if",
+ "once_cell",
+ "wasm-bindgen-macro",
+]
+
+[[package]]
+name = "wasm-bindgen-backend"
+version = "0.2.95"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358"
+dependencies = [
+ "bumpalo",
+ "log",
+ "once_cell",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.87",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-futures"
+version = "0.4.45"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cc7ec4f8827a71586374db3e87abdb5a2bb3a15afed140221307c3ec06b1f63b"
+dependencies = [
+ "cfg-if",
+ "js-sys",
+ "wasm-bindgen",
+ "web-sys",
+]
+
+[[package]]
+name = "wasm-bindgen-macro"
+version = "0.2.95"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56"
+dependencies = [
+ "quote",
+ "wasm-bindgen-macro-support",
+]
+
+[[package]]
+name = "wasm-bindgen-macro-support"
+version = "0.2.95"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.87",
+ "wasm-bindgen-backend",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-shared"
+version = "0.2.95"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d"
+
+[[package]]
+name = "wayland-backend"
+version = "0.3.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "056535ced7a150d45159d3a8dc30f91a2e2d588ca0b23f70e56033622b8016f6"
+dependencies = [
+ "cc",
+ "downcast-rs",
+ "rustix",
+ "scoped-tls",
+ "smallvec",
+ "wayland-sys",
+]
+
+[[package]]
+name = "wayland-client"
+version = "0.31.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b66249d3fc69f76fd74c82cc319300faa554e9d865dab1f7cd66cc20db10b280"
+dependencies = [
+ "bitflags 2.6.0",
+ "rustix",
+ "wayland-backend",
+ "wayland-scanner",
+]
+
+[[package]]
+name = "wayland-csd-frame"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "625c5029dbd43d25e6aa9615e88b829a5cad13b2819c4ae129fdbb7c31ab4c7e"
+dependencies = [
+ "bitflags 2.6.0",
+ "cursor-icon",
+ "wayland-backend",
+]
+
+[[package]]
+name = "wayland-cursor"
+version = "0.31.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "32b08bc3aafdb0035e7fe0fdf17ba0c09c268732707dca4ae098f60cb28c9e4c"
+dependencies = [
+ "rustix",
+ "wayland-client",
+ "xcursor",
+]
+
+[[package]]
+name = "wayland-protocols"
+version = "0.31.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8f81f365b8b4a97f422ac0e8737c438024b5951734506b0e1d775c73030561f4"
+dependencies = [
+ "bitflags 2.6.0",
+ "wayland-backend",
+ "wayland-client",
+ "wayland-scanner",
+]
+
+[[package]]
+name = "wayland-protocols-plasma"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "23803551115ff9ea9bce586860c5c5a971e360825a0309264102a9495a5ff479"
+dependencies = [
+ "bitflags 2.6.0",
+ "wayland-backend",
+ "wayland-client",
+ "wayland-protocols",
+ "wayland-scanner",
+]
+
+[[package]]
+name = "wayland-protocols-wlr"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ad1f61b76b6c2d8742e10f9ba5c3737f6530b4c243132c2a2ccc8aa96fe25cd6"
+dependencies = [
+ "bitflags 2.6.0",
+ "wayland-backend",
+ "wayland-client",
+ "wayland-protocols",
+ "wayland-scanner",
+]
+
+[[package]]
+name = "wayland-scanner"
+version = "0.31.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "597f2001b2e5fc1121e3d5b9791d3e78f05ba6bfa4641053846248e3a13661c3"
+dependencies = [
+ "proc-macro2",
+ "quick-xml",
+ "quote",
+]
+
+[[package]]
+name = "wayland-sys"
+version = "0.31.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "efa8ac0d8e8ed3e3b5c9fc92c7881406a268e11555abe36493efabe649a29e09"
+dependencies = [
+ "dlib",
+ "log",
+ "once_cell",
+ "pkg-config",
+]
+
+[[package]]
+name = "web-sys"
+version = "0.3.72"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f6488b90108c040df0fe62fa815cbdee25124641df01814dd7282749234c6112"
+dependencies = [
+ "js-sys",
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "web-time"
+version = "0.2.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "aa30049b1c872b72c89866d458eae9f20380ab280ffd1b1e18df2d3e2d98cfe0"
+dependencies = [
+ "js-sys",
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "webkit2gtk"
+version = "2.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "76b1bc1e54c581da1e9f179d0b38512ba358fb1af2d634a1affe42e37172361a"
+dependencies = [
+ "bitflags 1.3.2",
+ "cairo-rs",
+ "gdk",
+ "gdk-sys",
+ "gio",
+ "gio-sys",
+ "glib",
+ "glib-sys",
+ "gobject-sys",
+ "gtk",
+ "gtk-sys",
+ "javascriptcore-rs",
+ "libc",
+ "once_cell",
+ "soup3",
+ "webkit2gtk-sys",
+]
+
+[[package]]
+name = "webkit2gtk-sys"
+version = "2.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "62daa38afc514d1f8f12b8693d30d5993ff77ced33ce30cd04deebc267a6d57c"
+dependencies = [
+ "bitflags 1.3.2",
+ "cairo-sys-rs",
+ "gdk-sys",
+ "gio-sys",
+ "glib-sys",
+ "gobject-sys",
+ "gtk-sys",
+ "javascriptcore-rs-sys",
+ "libc",
+ "pkg-config",
+ "soup3-sys",
+ "system-deps",
+]
+
+[[package]]
+name = "webview2-com"
+version = "0.33.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6f61ff3d9d0ee4efcb461b14eb3acfda2702d10dc329f339303fc3e57215ae2c"
+dependencies = [
+ "webview2-com-macros",
+ "webview2-com-sys",
+ "windows 0.58.0",
+ "windows-core 0.58.0",
+ "windows-implement",
+ "windows-interface",
+]
+
+[[package]]
+name = "webview2-com-macros"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1d228f15bba3b9d56dde8bddbee66fa24545bd17b48d5128ccf4a8742b18e431"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.87",
+]
+
+[[package]]
+name = "webview2-com-sys"
+version = "0.33.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a3a3e2eeb58f82361c93f9777014668eb3d07e7d174ee4c819575a9208011886"
+dependencies = [
+ "thiserror",
+ "windows 0.58.0",
+ "windows-core 0.58.0",
+]
+
+[[package]]
+name = "wgpu"
+version = "0.19.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cbd7311dbd2abcfebaabf1841a2824ed7c8be443a0f29166e5d3c6a53a762c01"
+dependencies = [
+ "arrayvec",
+ "cfg-if",
+ "cfg_aliases",
+ "js-sys",
+ "log",
+ "naga",
+ "parking_lot",
+ "profiling",
+ "raw-window-handle",
+ "smallvec",
+ "static_assertions",
+ "wasm-bindgen",
+ "wasm-bindgen-futures",
+ "web-sys",
+ "wgpu-core",
+ "wgpu-hal",
+ "wgpu-types",
+]
+
+[[package]]
+name = "wgpu-core"
+version = "0.19.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "28b94525fc99ba9e5c9a9e24764f2bc29bad0911a7446c12f446a8277369bf3a"
+dependencies = [
+ "arrayvec",
+ "bit-vec",
+ "bitflags 2.6.0",
+ "cfg_aliases",
+ "codespan-reporting",
+ "indexmap 2.6.0",
+ "log",
+ "naga",
+ "once_cell",
+ "parking_lot",
+ "profiling",
+ "raw-window-handle",
+ "rustc-hash",
+ "smallvec",
+ "thiserror",
+ "web-sys",
+ "wgpu-hal",
+ "wgpu-types",
+]
+
+[[package]]
+name = "wgpu-hal"
+version = "0.19.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bfabcfc55fd86611a855816326b2d54c3b2fd7972c27ce414291562650552703"
+dependencies = [
+ "android_system_properties",
+ "arrayvec",
+ "ash",
+ "bit-set",
+ "bitflags 2.6.0",
+ "block",
+ "cfg_aliases",
+ "core-graphics-types 0.1.3",
+ "d3d12",
+ "glow",
+ "glutin_wgl_sys",
+ "gpu-alloc",
+ "gpu-allocator",
+ "gpu-descriptor",
+ "hassle-rs",
+ "js-sys",
+ "khronos-egl",
+ "libc",
+ "libloading 0.8.5",
+ "log",
+ "metal",
+ "naga",
+ "ndk-sys 0.5.0+25.2.9519653",
+ "objc",
+ "once_cell",
+ "parking_lot",
+ "profiling",
+ "range-alloc",
+ "raw-window-handle",
+ "renderdoc-sys",
+ "rustc-hash",
+ "smallvec",
+ "thiserror",
+ "wasm-bindgen",
+ "web-sys",
+ "wgpu-types",
+ "winapi",
+]
+
+[[package]]
+name = "wgpu-types"
+version = "0.19.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b671ff9fb03f78b46ff176494ee1ebe7d603393f42664be55b64dc8d53969805"
+dependencies = [
+ "bitflags 2.6.0",
+ "js-sys",
+ "web-sys",
+]
+
+[[package]]
+name = "widestring"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7219d36b6eac893fa81e84ebe06485e7dcbb616177469b142df14f1f4deb1311"
+
+[[package]]
+name = "winapi"
+version = "0.3.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
+dependencies = [
+ "winapi-i686-pc-windows-gnu",
+ "winapi-x86_64-pc-windows-gnu",
+]
+
+[[package]]
+name = "winapi-i686-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
+
+[[package]]
+name = "winapi-util"
+version = "0.1.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb"
+dependencies = [
+ "windows-sys 0.59.0",
+]
+
+[[package]]
+name = "winapi-x86_64-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
+
+[[package]]
+name = "windows"
+version = "0.52.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be"
+dependencies = [
+ "windows-core 0.52.0",
+ "windows-targets 0.52.6",
+]
+
+[[package]]
+name = "windows"
+version = "0.58.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6"
+dependencies = [
+ "windows-core 0.58.0",
+ "windows-targets 0.52.6",
+]
+
+[[package]]
+name = "windows-core"
+version = "0.52.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9"
+dependencies = [
+ "windows-targets 0.52.6",
+]
+
+[[package]]
+name = "windows-core"
+version = "0.58.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99"
+dependencies = [
+ "windows-implement",
+ "windows-interface",
+ "windows-result",
+ "windows-strings",
+ "windows-targets 0.52.6",
+]
+
+[[package]]
+name = "windows-implement"
+version = "0.58.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.87",
+]
+
+[[package]]
+name = "windows-interface"
+version = "0.58.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.87",
+]
+
+[[package]]
+name = "windows-result"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e"
+dependencies = [
+ "windows-targets 0.52.6",
+]
+
+[[package]]
+name = "windows-strings"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10"
+dependencies = [
+ "windows-result",
+ "windows-targets 0.52.6",
+]
+
+[[package]]
+name = "windows-sys"
+version = "0.45.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0"
+dependencies = [
+ "windows-targets 0.42.2",
+]
+
+[[package]]
+name = "windows-sys"
+version = "0.48.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"
+dependencies = [
+ "windows-targets 0.48.5",
+]
+
+[[package]]
+name = "windows-sys"
+version = "0.52.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
+dependencies = [
+ "windows-targets 0.52.6",
+]
+
+[[package]]
+name = "windows-sys"
+version = "0.59.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
+dependencies = [
+ "windows-targets 0.52.6",
+]
+
+[[package]]
+name = "windows-targets"
+version = "0.42.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071"
+dependencies = [
+ "windows_aarch64_gnullvm 0.42.2",
+ "windows_aarch64_msvc 0.42.2",
+ "windows_i686_gnu 0.42.2",
+ "windows_i686_msvc 0.42.2",
+ "windows_x86_64_gnu 0.42.2",
+ "windows_x86_64_gnullvm 0.42.2",
+ "windows_x86_64_msvc 0.42.2",
+]
+
+[[package]]
+name = "windows-targets"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c"
+dependencies = [
+ "windows_aarch64_gnullvm 0.48.5",
+ "windows_aarch64_msvc 0.48.5",
+ "windows_i686_gnu 0.48.5",
+ "windows_i686_msvc 0.48.5",
+ "windows_x86_64_gnu 0.48.5",
+ "windows_x86_64_gnullvm 0.48.5",
+ "windows_x86_64_msvc 0.48.5",
+]
+
+[[package]]
+name = "windows-targets"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
+dependencies = [
+ "windows_aarch64_gnullvm 0.52.6",
+ "windows_aarch64_msvc 0.52.6",
+ "windows_i686_gnu 0.52.6",
+ "windows_i686_gnullvm",
+ "windows_i686_msvc 0.52.6",
+ "windows_x86_64_gnu 0.52.6",
+ "windows_x86_64_gnullvm 0.52.6",
+ "windows_x86_64_msvc 0.52.6",
+]
+
+[[package]]
+name = "windows-version"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6998aa457c9ba8ff2fb9f13e9d2a930dabcea28f1d0ab94d687d8b3654844515"
+dependencies = [
+ "windows-targets 0.52.6",
+]
+
+[[package]]
+name = "windows_aarch64_gnullvm"
+version = "0.42.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8"
+
+[[package]]
+name = "windows_aarch64_gnullvm"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8"
+
+[[package]]
+name = "windows_aarch64_gnullvm"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
+
+[[package]]
+name = "windows_aarch64_msvc"
+version = "0.42.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43"
+
+[[package]]
+name = "windows_aarch64_msvc"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc"
+
+[[package]]
+name = "windows_aarch64_msvc"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
+
+[[package]]
+name = "windows_i686_gnu"
+version = "0.42.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f"
+
+[[package]]
+name = "windows_i686_gnu"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e"
+
+[[package]]
+name = "windows_i686_gnu"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
+
+[[package]]
+name = "windows_i686_gnullvm"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
+
+[[package]]
+name = "windows_i686_msvc"
+version = "0.42.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060"
+
+[[package]]
+name = "windows_i686_msvc"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406"
+
+[[package]]
+name = "windows_i686_msvc"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
+
+[[package]]
+name = "windows_x86_64_gnu"
+version = "0.42.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36"
+
+[[package]]
+name = "windows_x86_64_gnu"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e"
+
+[[package]]
+name = "windows_x86_64_gnu"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
+
+[[package]]
+name = "windows_x86_64_gnullvm"
+version = "0.42.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3"
+
+[[package]]
+name = "windows_x86_64_gnullvm"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc"
+
+[[package]]
+name = "windows_x86_64_gnullvm"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
+
+[[package]]
+name = "windows_x86_64_msvc"
+version = "0.42.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0"
+
+[[package]]
+name = "windows_x86_64_msvc"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538"
+
+[[package]]
+name = "windows_x86_64_msvc"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
+
+[[package]]
+name = "winit"
+version = "0.29.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0d59ad965a635657faf09c8f062badd885748428933dad8e8bdd64064d92e5ca"
+dependencies = [
+ "ahash",
+ "android-activity",
+ "atomic-waker",
+ "bitflags 2.6.0",
+ "bytemuck",
+ "calloop",
+ "cfg_aliases",
+ "core-foundation 0.9.4",
+ "core-graphics 0.23.2",
+ "cursor-icon",
+ "icrate",
+ "js-sys",
+ "libc",
+ "log",
+ "memmap2",
+ "ndk 0.8.0",
+ "ndk-sys 0.5.0+25.2.9519653",
+ "objc2 0.4.1",
+ "once_cell",
+ "orbclient",
+ "percent-encoding",
+ "raw-window-handle",
+ "redox_syscall 0.3.5",
+ "rustix",
+ "sctk-adwaita",
+ "smithay-client-toolkit",
+ "smol_str",
+ "unicode-segmentation",
+ "wasm-bindgen",
+ "wasm-bindgen-futures",
+ "wayland-backend",
+ "wayland-client",
+ "wayland-protocols",
+ "wayland-protocols-plasma",
+ "web-sys",
+ "web-time",
+ "windows-sys 0.48.0",
+ "x11-dl",
+ "x11rb",
+ "xkbcommon-dl",
+]
+
+[[package]]
+name = "winnow"
+version = "0.5.40"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "write16"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936"
+
+[[package]]
+name = "writeable"
+version = "0.5.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51"
+
+[[package]]
+name = "wry"
+version = "0.47.2"
+dependencies = [
+ "base64",
+ "block2 0.5.1",
+ "cookie",
+ "crossbeam-channel",
+ "dpi",
+ "dunce",
+ "gdkx11",
+ "getrandom 0.2.15",
+ "gtk",
+ "html5ever",
+ "http",
+ "http-range",
+ "javascriptcore-rs",
+ "jni",
+ "kuchikiki",
+ "libc",
+ "ndk 0.9.0",
+ "objc2 0.5.2",
+ "objc2-app-kit",
+ "objc2-foundation",
+ "objc2-ui-kit",
+ "objc2-web-kit",
+ "once_cell",
+ "percent-encoding",
+ "pollster",
+ "raw-window-handle",
+ "sha2",
+ "soup3",
+ "tao",
+ "tao-macros",
+ "thiserror",
+ "tracing",
+ "url",
+ "webkit2gtk",
+ "webkit2gtk-sys",
+ "webview2-com",
+ "wgpu",
+ "windows 0.58.0",
+ "windows-core 0.58.0",
+ "windows-version",
+ "winit",
+ "x11-dl",
+]
+
+[[package]]
+name = "x11"
+version = "2.21.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "502da5464ccd04011667b11c435cb992822c2c0dbde1770c988480d312a0db2e"
+dependencies = [
+ "libc",
+ "pkg-config",
+]
+
+[[package]]
+name = "x11-dl"
+version = "2.21.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "38735924fedd5314a6e548792904ed8c6de6636285cb9fec04d5b1db85c1516f"
+dependencies = [
+ "libc",
+ "once_cell",
+ "pkg-config",
+]
+
+[[package]]
+name = "x11rb"
+version = "0.13.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5d91ffca73ee7f68ce055750bf9f6eca0780b8c85eff9bc046a3b0da41755e12"
+dependencies = [
+ "as-raw-xcb-connection",
+ "gethostname",
+ "libc",
+ "libloading 0.8.5",
+ "once_cell",
+ "rustix",
+ "x11rb-protocol",
+]
+
+[[package]]
+name = "x11rb-protocol"
+version = "0.13.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ec107c4503ea0b4a98ef47356329af139c0a4f7750e621cf2973cd3385ebcb3d"
+
+[[package]]
+name = "xcursor"
+version = "0.3.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0ef33da6b1660b4ddbfb3aef0ade110c8b8a781a3b6382fa5f2b5b040fd55f61"
+
+[[package]]
+name = "xkbcommon-dl"
+version = "0.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d039de8032a9a8856a6be89cea3e5d12fdd82306ab7c94d74e6deab2460651c5"
+dependencies = [
+ "bitflags 2.6.0",
+ "dlib",
+ "log",
+ "once_cell",
+ "xkeysym",
+]
+
+[[package]]
+name = "xkeysym"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b9cc00251562a284751c9973bace760d86c0276c471b4be569fe6b068ee97a56"
+
+[[package]]
+name = "xml-rs"
+version = "0.8.23"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "af310deaae937e48a26602b730250b4949e125f468f11e6990be3e5304ddd96f"
+
+[[package]]
+name = "yoke"
+version = "0.7.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6c5b1314b079b0930c31e3af543d8ee1757b1951ae1e1565ec704403a7240ca5"
+dependencies = [
+ "serde",
+ "stable_deref_trait",
+ "yoke-derive",
+ "zerofrom",
+]
+
+[[package]]
+name = "yoke-derive"
+version = "0.7.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "28cc31741b18cb6f1d5ff12f5b7523e3d6eb0852bbbad19d73905511d9849b95"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.87",
+ "synstructure",
+]
+
+[[package]]
+name = "zerocopy"
+version = "0.7.35"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0"
+dependencies = [
+ "byteorder",
+ "zerocopy-derive",
+]
+
+[[package]]
+name = "zerocopy-derive"
+version = "0.7.35"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.87",
+]
+
+[[package]]
+name = "zerofrom"
+version = "0.1.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "91ec111ce797d0e0784a1116d0ddcdbea84322cd79e5d5ad173daeba4f93ab55"
+dependencies = [
+ "zerofrom-derive",
+]
+
+[[package]]
+name = "zerofrom-derive"
+version = "0.1.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0ea7b4a3637ea8669cedf0f1fd5c286a17f3de97b8dd5a70a6c167a1730e63a5"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.87",
+ "synstructure",
+]
+
+[[package]]
+name = "zerovec"
+version = "0.10.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079"
+dependencies = [
+ "yoke",
+ "zerofrom",
+ "zerovec-derive",
+]
+
+[[package]]
+name = "zerovec-derive"
+version = "0.10.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.87",
+]
diff --git a/vendor/wry/Cargo.toml b/vendor/wry/Cargo.toml
new file mode 100644
index 0000000..d830b50
--- /dev/null
+++ b/vendor/wry/Cargo.toml
@@ -0,0 +1,368 @@
+# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
+#
+# When uploading crates to the registry Cargo will automatically
+# "normalize" Cargo.toml files for maximal compatibility
+# with all versions of Cargo and also rewrite `path` dependencies
+# to registry (e.g., crates.io) dependencies.
+#
+# If you are reading this file be aware that the original Cargo.toml
+# will likely look very different (and much more reasonable).
+# See Cargo.toml.orig for the original contents.
+
+[package]
+edition = "2021"
+name = "wry"
+version = "0.47.2"
+authors = ["Tauri Programme within The Commons Conservancy"]
+build = "build.rs"
+exclude = [
+ "/.changes",
+ "/.github",
+ "/audits",
+ "/wry-logo.svg",
+]
+autobins = false
+autoexamples = false
+autotests = false
+autobenches = false
+description = "Cross-platform WebView rendering library"
+documentation = "https://docs.rs/wry"
+readme = "README.md"
+categories = ["gui"]
+license = "Apache-2.0 OR MIT"
+repository = "https://github.com/tauri-apps/wry"
+
+[package.metadata.docs.rs]
+features = [
+ "drag-drop",
+ "protocol",
+ "os-webview",
+]
+no-default-features = true
+rustc-args = [
+ "--cfg",
+ "docsrs",
+]
+rustdoc-args = [
+ "--cfg",
+ "docsrs",
+]
+targets = [
+ "x86_64-unknown-linux-gnu",
+ "x86_64-pc-windows-msvc",
+ "x86_64-apple-darwin",
+]
+
+[lib]
+name = "wry"
+path = "src/lib.rs"
+
+[[example]]
+name = "async_custom_protocol"
+path = "examples/async_custom_protocol.rs"
+
+[[example]]
+name = "custom_protocol"
+path = "examples/custom_protocol.rs"
+
+[[example]]
+name = "custom_titlebar"
+path = "examples/custom_titlebar.rs"
+
+[[example]]
+name = "gtk_multiwebview"
+path = "examples/gtk_multiwebview.rs"
+
+[[example]]
+name = "multiwebview"
+path = "examples/multiwebview.rs"
+
+[[example]]
+name = "multiwindow"
+path = "examples/multiwindow.rs"
+
+[[example]]
+name = "reparent"
+path = "examples/reparent.rs"
+
+[[example]]
+name = "simple"
+path = "examples/simple.rs"
+
+[[example]]
+name = "streaming"
+path = "examples/streaming.rs"
+
+[[example]]
+name = "transparent"
+path = "examples/transparent.rs"
+
+[[example]]
+name = "wgpu"
+path = "examples/wgpu.rs"
+
+[[example]]
+name = "winit"
+path = "examples/winit.rs"
+
+[dependencies.cookie]
+version = "0.18"
+
+[dependencies.dpi]
+version = "0.1"
+
+[dependencies.http]
+version = "1.1"
+
+[dependencies.once_cell]
+version = "1"
+
+[dependencies.raw-window-handle]
+version = "0.6"
+features = ["std"]
+
+[dependencies.thiserror]
+version = "1.0"
+
+[dependencies.tracing]
+version = "0.1"
+optional = true
+
+[dev-dependencies.getrandom]
+version = "0.2"
+
+[dev-dependencies.http-range]
+version = "0.1"
+
+[dev-dependencies.percent-encoding]
+version = "2.3"
+
+[dev-dependencies.pollster]
+version = "0.3.0"
+
+[dev-dependencies.tao]
+version = "0.29"
+
+[dev-dependencies.wgpu]
+version = "0.19"
+
+[dev-dependencies.winit]
+version = "0.29"
+
+[features]
+default = [
+ "drag-drop",
+ "objc-exception",
+ "protocol",
+ "os-webview",
+]
+devtools = []
+drag-drop = []
+fullscreen = []
+linux-body = [
+ "webkit2gtk/v2_40",
+ "os-webview",
+]
+mac-proxy = []
+objc-exception = ["objc2/catch-all"]
+os-webview = [
+ "javascriptcore-rs",
+ "webkit2gtk",
+ "webkit2gtk-sys",
+ "dep:gtk",
+ "soup3",
+ "x11-dl",
+ "gdkx11",
+]
+protocol = []
+serde = ["dpi/serde"]
+tracing = ["dep:tracing"]
+transparent = []
+
+[target.'cfg(any(target_os = "ios", target_os = "macos"))'.dependencies.block2]
+version = "0.5"
+
+[target.'cfg(any(target_os = "ios", target_os = "macos"))'.dependencies.objc2]
+version = "0.5"
+features = ["exception"]
+
+[target.'cfg(any(target_os = "ios", target_os = "macos"))'.dependencies.objc2-foundation]
+version = "0.2.0"
+features = [
+ "NSURLRequest",
+ "NSURL",
+ "NSString",
+ "NSKeyValueCoding",
+ "NSStream",
+ "NSDictionary",
+ "NSObject",
+ "NSData",
+ "NSKeyValueObserving",
+ "NSThread",
+ "NSJSONSerialization",
+ "NSDate",
+ "NSBundle",
+ "NSProcessInfo",
+ "NSValue",
+ "NSRange",
+ "NSRunLoop",
+]
+
+[target.'cfg(any(target_os = "ios", target_os = "macos"))'.dependencies.objc2-web-kit]
+version = "0.2.0"
+features = [
+ "objc2-app-kit",
+ "block2",
+ "WKWebView",
+ "WKWebViewConfiguration",
+ "WKWebsiteDataStore",
+ "WKDownload",
+ "WKDownloadDelegate",
+ "WKNavigation",
+ "WKNavigationDelegate",
+ "WKUserContentController",
+ "WKURLSchemeHandler",
+ "WKPreferences",
+ "WKURLSchemeTask",
+ "WKScriptMessageHandler",
+ "WKUIDelegate",
+ "WKOpenPanelParameters",
+ "WKFrameInfo",
+ "WKSecurityOrigin",
+ "WKScriptMessage",
+ "WKNavigationAction",
+ "WKWebpagePreferences",
+ "WKNavigationResponse",
+ "WKUserScript",
+ "WKHTTPCookieStore",
+]
+
+[target.'cfg(any(target_os = "ios", target_os = "macos"))'.dependencies.url]
+version = "2.5"
+
+[target.'cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "openbsd", target_os = "netbsd"))'.dependencies.gdkx11]
+version = "0.18"
+optional = true
+
+[target.'cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "openbsd", target_os = "netbsd"))'.dependencies.gtk]
+version = "0.18"
+optional = true
+
+[target.'cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "openbsd", target_os = "netbsd"))'.dependencies.javascriptcore-rs]
+version = "=1.1.2"
+features = ["v2_28"]
+optional = true
+
+[target.'cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "openbsd", target_os = "netbsd"))'.dependencies.percent-encoding]
+version = "2.3"
+
+[target.'cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "openbsd", target_os = "netbsd"))'.dependencies.soup3]
+version = "0.5"
+optional = true
+
+[target.'cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "openbsd", target_os = "netbsd"))'.dependencies.webkit2gtk]
+version = "=2.0.1"
+features = ["v2_38"]
+optional = true
+
+[target.'cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "openbsd", target_os = "netbsd"))'.dependencies.webkit2gtk-sys]
+version = "=2.0.1"
+optional = true
+
+[target.'cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "openbsd", target_os = "netbsd"))'.dependencies.x11-dl]
+version = "2.21"
+optional = true
+
+[target.'cfg(target_os = "android")'.dependencies.base64]
+version = "0.22"
+
+[target.'cfg(target_os = "android")'.dependencies.crossbeam-channel]
+version = "0.5"
+
+[target.'cfg(target_os = "android")'.dependencies.html5ever]
+version = "0.26"
+
+[target.'cfg(target_os = "android")'.dependencies.jni]
+version = "0.21"
+
+[target.'cfg(target_os = "android")'.dependencies.kuchiki]
+version = "0.8"
+package = "kuchikiki"
+
+[target.'cfg(target_os = "android")'.dependencies.libc]
+version = "0.2"
+
+[target.'cfg(target_os = "android")'.dependencies.ndk]
+version = "0.9"
+
+[target.'cfg(target_os = "android")'.dependencies.sha2]
+version = "0.10"
+
+[target.'cfg(target_os = "android")'.dependencies.tao-macros]
+version = "0.1"
+
+[target.'cfg(target_os = "ios")'.dependencies.objc2-ui-kit]
+version = "0.2.2"
+features = [
+ "UIResponder",
+ "UIScrollView",
+ "UIView",
+ "UIWindow",
+ "UIApplication",
+ "UIEvent",
+]
+
+[target.'cfg(target_os = "macos")'.dependencies.objc2-app-kit]
+version = "0.2.0"
+features = [
+ "NSApplication",
+ "NSEvent",
+ "NSWindow",
+ "NSView",
+ "NSPasteboard",
+ "NSPanel",
+ "NSResponder",
+ "NSOpenPanel",
+ "NSSavePanel",
+ "NSMenu",
+]
+
+[target.'cfg(target_os = "windows")'.dependencies.dunce]
+version = "1"
+
+[target.'cfg(target_os = "windows")'.dependencies.webview2-com]
+version = "0.33"
+
+[target.'cfg(target_os = "windows")'.dependencies.windows]
+version = "0.58"
+features = [
+ "implement",
+ "Win32_Foundation",
+ "Win32_Graphics_Gdi",
+ "Win32_System_Com",
+ "Win32_System_Com_StructuredStorage",
+ "Win32_System_LibraryLoader",
+ "Win32_System_Ole",
+ "Win32_System_SystemInformation",
+ "Win32_System_SystemServices",
+ "Win32_UI_Shell",
+ "Win32_UI_WindowsAndMessaging",
+ "Win32_Globalization",
+ "Win32_UI_HiDpi",
+ "Win32_UI_Input",
+ "Win32_UI_Input_KeyboardAndMouse",
+]
+
+[target.'cfg(target_os = "windows")'.dependencies.windows-core]
+version = "0.58"
+
+[target.'cfg(target_os = "windows")'.dependencies.windows-version]
+version = "0.1"
+
+[lints.rust.unexpected_cfgs]
+level = "warn"
+priority = 0
+check-cfg = [
+ "cfg(linux)",
+ "cfg(gtk)",
+]
diff --git a/vendor/wry/Cargo.toml.orig b/vendor/wry/Cargo.toml.orig
new file mode 100644
index 0000000..dd5a6c2
--- /dev/null
+++ b/vendor/wry/Cargo.toml.orig
@@ -0,0 +1,192 @@
+workspace = {}
+
+[package]
+name = "wry"
+version = "0.47.2"
+authors = ["Tauri Programme within The Commons Conservancy"]
+edition = "2021"
+license = "Apache-2.0 OR MIT"
+description = "Cross-platform WebView rendering library"
+readme = "README.md"
+repository = "https://github.com/tauri-apps/wry"
+documentation = "https://docs.rs/wry"
+categories = ["gui"]
+exclude = ["/.changes", "/.github", "/audits", "/wry-logo.svg"]
+
+[package.metadata.docs.rs]
+no-default-features = true
+features = ["drag-drop", "protocol", "os-webview"]
+targets = [
+ "x86_64-unknown-linux-gnu",
+ "x86_64-pc-windows-msvc",
+ "x86_64-apple-darwin",
+]
+rustc-args = ["--cfg", "docsrs"]
+rustdoc-args = ["--cfg", "docsrs"]
+
+[features]
+default = ["drag-drop", "objc-exception", "protocol", "os-webview"]
+serde = ["dpi/serde"]
+objc-exception = ["objc2/catch-all"]
+drag-drop = []
+protocol = []
+devtools = []
+transparent = []
+fullscreen = []
+linux-body = ["webkit2gtk/v2_40", "os-webview"]
+mac-proxy = []
+os-webview = [
+ "javascriptcore-rs",
+ "webkit2gtk",
+ "webkit2gtk-sys",
+ "dep:gtk",
+ "soup3",
+ "x11-dl",
+ "gdkx11",
+]
+tracing = ["dep:tracing"]
+
+[dependencies]
+tracing = { version = "0.1", optional = true }
+once_cell = "1"
+thiserror = "1.0"
+http = "1.1"
+raw-window-handle = { version = "0.6", features = ["std"] }
+dpi = "0.1"
+cookie = "0.18"
+
+[target."cfg(any(target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies]
+javascriptcore-rs = { version = "=1.1.2", features = [
+ "v2_28",
+], optional = true }
+webkit2gtk = { version = "=2.0.1", features = ["v2_38"], optional = true }
+webkit2gtk-sys = { version = "=2.0.1", optional = true }
+gtk = { version = "0.18", optional = true }
+soup3 = { version = "0.5", optional = true }
+x11-dl = { version = "2.21", optional = true }
+gdkx11 = { version = "0.18", optional = true }
+percent-encoding = "2.3"
+
+[target."cfg(target_os = \"windows\")".dependencies]
+webview2-com = "0.33"
+windows-version = "0.1"
+windows-core = "0.58"
+dunce = "1"
+
+[target."cfg(target_os = \"windows\")".dependencies.windows]
+version = "0.58"
+features = [
+ "implement",
+ "Win32_Foundation",
+ "Win32_Graphics_Gdi",
+ "Win32_System_Com",
+ "Win32_System_Com_StructuredStorage",
+ "Win32_System_LibraryLoader",
+ "Win32_System_Ole",
+ "Win32_System_SystemInformation",
+ "Win32_System_SystemServices",
+ "Win32_UI_Shell",
+ "Win32_UI_WindowsAndMessaging",
+ "Win32_Globalization",
+ "Win32_UI_HiDpi",
+ "Win32_UI_Input",
+ "Win32_UI_Input_KeyboardAndMouse",
+]
+
+[target."cfg(any(target_os = \"ios\", target_os = \"macos\"))".dependencies]
+url = "2.5"
+block2 = "0.5"
+objc2 = { version = "0.5", features = ["exception"] }
+objc2-web-kit = { version = "0.2.0", features = [
+ "objc2-app-kit",
+ "block2",
+ "WKWebView",
+ "WKWebViewConfiguration",
+ "WKWebsiteDataStore",
+ "WKDownload",
+ "WKDownloadDelegate",
+ "WKNavigation",
+ "WKNavigationDelegate",
+ "WKUserContentController",
+ "WKURLSchemeHandler",
+ "WKPreferences",
+ "WKURLSchemeTask",
+ "WKScriptMessageHandler",
+ "WKUIDelegate",
+ "WKOpenPanelParameters",
+ "WKFrameInfo",
+ "WKSecurityOrigin",
+ "WKScriptMessage",
+ "WKNavigationAction",
+ "WKWebpagePreferences",
+ "WKNavigationResponse",
+ "WKUserScript",
+ "WKHTTPCookieStore",
+] }
+objc2-foundation = { version = "0.2.0", features = [
+ "NSURLRequest",
+ "NSURL",
+ "NSString",
+ "NSKeyValueCoding",
+ "NSStream",
+ "NSDictionary",
+ "NSObject",
+ "NSData",
+ "NSKeyValueObserving",
+ "NSThread",
+ "NSJSONSerialization",
+ "NSDate",
+ "NSBundle",
+ "NSProcessInfo",
+ "NSValue",
+ "NSRange",
+ "NSRunLoop",
+] }
+
+[target."cfg(target_os = \"ios\")".dependencies]
+objc2-ui-kit = { version = "0.2.2", features = [
+ "UIResponder",
+ "UIScrollView",
+ "UIView",
+ "UIWindow",
+ "UIApplication",
+ "UIEvent",
+] }
+
+[target."cfg(target_os = \"macos\")".dependencies]
+objc2-app-kit = { version = "0.2.0", features = [
+ "NSApplication",
+ "NSEvent",
+ "NSWindow",
+ "NSView",
+ "NSPasteboard",
+ "NSPanel",
+ "NSResponder",
+ "NSOpenPanel",
+ "NSSavePanel",
+ "NSMenu",
+] }
+
+[target."cfg(target_os = \"android\")".dependencies]
+crossbeam-channel = "0.5"
+html5ever = "0.26"
+kuchiki = { package = "kuchikiki", version = "0.8" }
+sha2 = "0.10"
+base64 = "0.22"
+jni = "0.21"
+ndk = "0.9"
+tao-macros = "0.1"
+libc = "0.2"
+
+[dev-dependencies]
+pollster = "0.3.0"
+tao = "0.29"
+wgpu = "0.19"
+winit = "0.29"
+getrandom = "0.2"
+http-range = "0.1"
+percent-encoding = "2.3"
+
+[lints.rust.unexpected_cfgs]
+level = "warn"
+check-cfg = ["cfg(linux)", "cfg(gtk)"]
diff --git a/vendor/wry/LICENSE-APACHE b/vendor/wry/LICENSE-APACHE
new file mode 100644
index 0000000..16fe87b
--- /dev/null
+++ b/vendor/wry/LICENSE-APACHE
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
+
+APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+Copyright [yyyy] [name of copyright owner]
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
diff --git a/vendor/wry/LICENSE-MIT b/vendor/wry/LICENSE-MIT
new file mode 100644
index 0000000..94ef8bf
--- /dev/null
+++ b/vendor/wry/LICENSE-MIT
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2020-2023 Ngo Iok Ui & Tauri Programme within The Commons Conservancy
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/vendor/wry/LICENSE.spdx b/vendor/wry/LICENSE.spdx
new file mode 100644
index 0000000..7e0eb72
--- /dev/null
+++ b/vendor/wry/LICENSE.spdx
@@ -0,0 +1,20 @@
+SPDXVersion: SPDX-2.1
+DataLicense: CC0-1.0
+PackageName: wry
+DataFormat: SPDXRef-1
+PackageSupplier: Organization: The Tauri Programme in the Commons Conservancy
+PackageHomePage: https://tauri.app
+PackageLicenseDeclared: Apache-2.0
+PackageLicenseDeclared: MIT
+PackageCopyrightText: 2020-2023, The Tauri Programme in the Commons Conservancy
+PackageSummary: Wry is the official, rust-based webview
+windowing service for Tauri.
+
+PackageComment: The package includes the following libraries; see
+Relationship information.
+
+Created: 2020-05-20T09:00:00Z
+PackageDownloadLocation: git://github.com/tauri-apps/wry
+PackageDownloadLocation: git+https://github.com/tauri-apps/wry.git
+PackageDownloadLocation: git+ssh://github.com/tauri-apps/wry.git
+Creator: Person: Daniel Thompson-Yvetot
\ No newline at end of file
diff --git a/vendor/wry/MOBILE.md b/vendor/wry/MOBILE.md
new file mode 100644
index 0000000..e164405
--- /dev/null
+++ b/vendor/wry/MOBILE.md
@@ -0,0 +1,332 @@
+# Mobile Setup for Wry
+
+We use [cargo-mobile2](https://github.com/tauri-apps/cargo-mobile2) to create a mobile project for both Xcode and Android studio.
+
+## Prerequisite
+
+- Works on **Linux**, **Windows**, **macOS**, and **WSL**(Windows subsystem for Linux).
+- **Xcode** and [**Android Studio**](https://developer.android.com/studio) installed properly. This is **the most difficult** part IMHO. This means all toolchains and SDK are all installed. Please report an issue with **comprehensive** steps if you encounter any problem.
+
+## Setting up Android Environment
+
+### 1. Installing JDK
+
+#### Using Android Studio:
+
+If you have Android Studio installed, it ships with a version of JDK so you don't have to install it manually. It is usually at `/jre`. It will be used for `JAVA_HOME` env var.
+
+> On macOS, it can be found at `/Applications/Android\ Studio.app/Contents/jbr/Contents/Home`
+> On Windows, it can be found at `C:\Program Files\Android\Android Studio\jre`
+
+#### Using the terminal:
+
+##### Linux/WSL
+
+- Install it by running the following command based on your distro to install JDK:
+
+ - debian-based
+ ```
+ sudo apt install default-jdk
+ ```
+ - arch-based
+ ```
+ sudo pacman -S jdk-openjdk
+ ```
+
+- Set the `JAVA_HOME` env variable for this current shell (we will make it permanent later on)
+ ```bash
+ export JAVA_HOME="/usr/lib/jvm/java-11-openjdk-amd64"
+ ```
+
+#### macOS
+
+- Install openjdk from Homebrew:
+
+```
+brew install openjdk
+```
+
+- Link to system Java wrapper and set the `JAVA_HOME` env:
+
+```
+sudo ln -sfn /opt/homebrew/opt/openjdk/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk.jdk
+export JAVA_HOME="/Library/Java/JavaVirtualMachines/openjdk.jdk/Contents/Home"
+```
+
+##### Windows
+
+- Download openjdk-11
+ ```powershell
+ cd $HOME\downloads
+ Invoke-WebRequest https://download.java.net/java/GA/jdk11/9/GPL/openjdk-11.0.2_windows-x64_bin.zip -o openjdk-11.zip
+ Expand-Archive openjdk-11.zip -d .
+ mkdir $env:LocalAppData\Java
+ mv jdk-11.0.2 $env:LocalAppData\Java
+ ```
+- Set the `JAVA_HOME` env variable for this current shell (we will make it permanent later on)
+ ```powershell
+ $env:JAVA_HOME="$env:LocalAppData\Java\jdk-11.0.2"
+ ```
+
+### 2. Installing Android SDK and NDK
+
+There are two ways to install the sdk and ndk.
+
+#### Using Android Studio:
+
+You can use the SDK Manager in Android Studio to install:
+
+1. Android Sdk Platform 33
+2. Android SDK Platform-Tools
+3. NDK (Side by side) 25.0.8775105
+4. Android SDK Build-Tools 33.0.
+5. Android SDK Command-line Tools
+
+> Note: you may need to tick `Show Package Details` in the right bottom corner to be able to see some of these components
+
+#### Using the terminal:
+
+If you don't want or can't use Android Studio you can still get the SDK Manager cli quite easily and use it to install other components.
+
+> Note: The SDK Manager is part of the "Command line tools only" that can be downloaded from [here](https://developer.android.com/studio#command-tools)
+
+##### Linux/WSL/macOS
+
+Download the `cmdline-tools`
+
+```bash
+cd ~/Downloads
+
+# if you are on Linux/WSL:
+wget https://dl.google.com/android/repository/commandlinetools-linux-8512546_latest.zip -O
+# if you are on macos:
+wget https://dl.google.com/android/repository/commandlinetools-mac-8512546_latest.zip -O
+
+unzip cmdline-tools.zip
+cd cmdline-tools
+mkdir latest
+mv bin latest/
+mv lib latest/
+mv NOTICE.txt latest/
+mv source.properties latest/
+cd ..
+mkdir ~/.android # You can use another location for your SDK but I prefer using ~/.android
+mv cmdline-tools ~/.android
+```
+
+Install required SDK and NDK components
+
+```bash
+export ANDROID_HOME="$HOME/.android"
+~/.android/cmdline-tools/latest/bin/sdkmanager "platforms;android-33" "platform-tools" "ndk;25.0.8775105" "build-tools;33.0.0"
+# Install the emulator if you plan on using a virtual device later
+~/.android/cmdline-tools/latest/bin/sdkmanager "emulator"
+```
+
+##### Windows
+
+Download the `cmdline-tools`
+
+```powershell
+cd $HOME\downloads
+Invoke-WebRequest https://dl.google.com/android/repository/commandlinetools-win-8512546_latest.zip -o cmdline-tools.zip
+Expand-Archive cmdline-tools.zip -d .
+cd cmdline-tools
+mkdir latest
+mv bin latest/
+mv lib latest/
+mv NOTICE.txt latest/
+mv source.properties latest/
+cd ..
+mkdir $HOME\.android # You can use another location for your SDK but I prefer using $HOME\.android
+mv cmdline-tools $HOME\.android
+```
+
+Install required SDK and NDK components
+
+```powershell
+$env:ANDROID_HOME="$HOME\.android"
+&"$env:ANDROID_HOME\cmdline-tools\latest\bin\sdkmanager.exe" "platforms;android-33" "platform-tools" "ndk;25.0.8775105" "build-tools;33.0.0"
+# Install the emulator if you plan on using a virtual device later
+&"$env:ANDROID_HOME\cmdline-tools\latest\bin\sdkmanager.exe" "emulator"
+```
+
+> Note: the location you moved the `cmdline-tools` directory into will be the location of your android SDK.
+
+### 3. Setting up Environment Variables
+
+You'll need to set up some environment variables to get everything to work properly. The environment variables below should be all the ones your need to be able to use [cargo-mobile2](https://github.com/tauri-apps/cargo-mobile2) to build/run your android app.
+
+##### Linux/WSL/macOS
+
+- Setting `JAVA_HOME`:
+
+```bash
+# In .bashrc or .zshrc:
+export JAVA_HOME="/usr/lib/jvm/java-11-openjdk-amd64"
+# If you are using Android studio, on Linux, it is:
+export JAVA_HOME=/opt/android-studio/jre
+# And on macOS, it is:
+export JAVA_HOME=/Applications/Android\ Studio.app/Contents/jbr/Contents/Home
+```
+
+- Setting `ANDROID_HOME`:
+
+```bash
+export ANDROID_HOME="$HOME/.android"
+# If you are using Android studio, on Linux, it is:
+export ANDROID_HOME="$HOME/Android/Sdk"
+# And on macOS, it is:
+export ANDROID_HOME="$HOME/Library/Android/sdk"
+```
+
+- Setting `PATH`:
+
+```bash
+export NDK_HOME="$ANDROID_HOME/ndk/25.0.8775105" # The patch version might be different
+export PATH="$PATH:$ANDROID_HOME/cmdline-tools/latest/bin"
+export PATH="$PATH:$ANDROID_HOME/platform-tools"
+```
+
+> For WSL:
+> you also need to get ADB to connect to your emulator that is running on Windows
+>
+> ```bash
+> export WSL_HOST="192.168.1.2" # Run `ipconfig` in windows to get your computer IP
+> export ADB_SERVER_SOCKET=tcp:$WSL_HOST:5037
+> ```
+
+After updating `.bashrc` either run `source ~/.bashrc` or reopen your terminal to apply the changes.
+
+##### Windows
+
+Open a powershell instance and run the following commands in order
+
+```powershell
+Function Add-EnvVar($name, $value) { [System.Environment]::SetEnvironmentVariable("$name", "$value", "User") }
+Function Add-PATHEntry($path) { $newPath = [System.Environment]::GetEnvironmentVariable("Path", "User") + ";" + $path; [System.Environment]::SetEnvironmentVariable("Path", "$newPath", "User") }
+
+Add-EnvVar JAVA_HOME "$env:LocalAppData\Java\jdk-11.0.2" # if you are using Android studio, the location is different, see the section above about JDK
+$env:SDK_ROOT="$HOME\.android"# if you are using Android studio, the sdk location will be at `$env:LocalAppData\Android\Sdk`
+Add-EnvVar ANDROID_HOME "$env:SDK_ROOT"
+Add-EnvVar NDK_HOME "$env:SDK_ROOT\ndk\25.0.8775105"
+
+Add-PATHEntry "$env:SDK_ROOT\cmdline-tools\latest\bin"
+Add-PATHEntry "$env:SDK_ROOT\platform-tools"
+```
+
+> IMPORTANT: you need to reboot your Windows machine in order for the environement variables to be loaded correctly.
+
+You should now have all the environment variables required and the cmdline-tools available in your PATH. You can verify this by running `sdkmanager` which should now be showing its help info.
+
+### 4. Install Rust android targets:
+
+```shell
+rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android
+```
+
+## Getting Started
+
+Now lets bootstrap a project to develop a tauri or wry project for mobile.
+
+- Install [cargo-mobile2](https://github.com/tauri-apps/cargo-mobile2) CLI by running:
+ ```bash
+ cargo install --git https://github.com/tauri-apps/cargo-mobile2
+ ```
+- Create a directory and init the project.
+ ```bash
+ mkdir hello
+ cd hello
+ cargo mobile init
+ # Project name (hello):
+ # Stylized name (Hello):
+ # Domain (example.com): tauri.app
+ # Detected template packs:
+ # [0] bevy
+ # [1] bevy-demo
+ # [2] wgpu
+ # [3] winit
+ # [4] wry
+ # Enter an index for a template pack above.
+ # Template pack (0): 4
+ ```
+
+## Build and Run on Device
+
+### Android
+
+> Make sure you're device is connected to adb
+> you can check by running `cargo android list` or `adb devices`
+
+- `cargo android run`
+
+### iOS
+
+- `cargo build --target aarch64-apple-ios`
+- `cargo apple run`
+
+First time running the app will be blocked. Go to your phone's `Settings > Privacy & Security > Developer Mode` to enable developer mode. And then go to `Settings -> General -> VPN and device management -> From "Developer App"` section to press "Apple Development: APPLE_ID" -> Trust.
+
+## Build and Run on Emulator
+
+### Android
+
+##### Using Android Studio
+
+- Open the project in Android Studio `cargo android open`
+- Click `Trust Project`, `Use Embedded JDK`
+- Choose an emulator. I usually choose Pixel 4 API 32
+- (optional) if you face this error `Device supports x86, but APK only supports armeabi-v7a` then check this [Stack Overflow answer](https://stackoverflow.com/questions/41775988/what-is-the-reason-for-the-error-device-supports-x86-but-apk-only-supports-arm/43742161#43742161) to fix it.
+- Press run button.
+
+##### Without Android Studio
+
+If you don't have access to Android Studio or don't want or when running in WSL, you can build and run the generated project directly from the terminal
+
+1. List available emulators
+ - Linux/WSL/macOS:
+ ```bash
+ $ANDROID_HOME/emulator/emulator -list-avds
+ ```
+ - Windows:
+ ```powershell
+ &"$env:ANDROID_HOME\emulator\emulator" -list-avds
+ ```
+ you should now see a list of available emulators like the following, you'll need one of them for the next step:
+ ```
+ Resizable_API_33
+ Pixel_5_API_33
+ ```
+2. Start the emulator with the name of the desired emulator:
+ - Linux/WSL/macOS:
+ ```bash
+ $ANDROID_HOME/emulator/emulator -avd Resizable_API_33
+ ```
+ - Windows:
+ ```powershell
+ &"$env:ANDROID_HOME\emulator\emulator" -avd Resizable_API_33
+ ```
+3. In a new terminal window, run:
+ ```bash
+ cargo android run
+ ```
+
+### iOS
+
+- If you are on x86_64: `cargo build --target x86_64-apple-ios`
+- If you are on M1: `cargo build --target aarch64-apple-ios-sim`
+- `cargo apple open`
+- Choose a simulator.
+- Press run button.
+
+## Devtools
+
+Set `devtools` attribute to true when building webview.
+
+### Android
+
+Open `chrome://inspect/#devices` in Chrome to get the devtools window.
+
+### iOS
+
+Open Safari > Develop > [Your Device Name] > [Your WebView].
diff --git a/vendor/wry/README.md b/vendor/wry/README.md
new file mode 100644
index 0000000..296be5a
--- /dev/null
+++ b/vendor/wry/README.md
@@ -0,0 +1,205 @@
+
+
+[](https://crates.io/crates/wry) [](https://docs.rs/wry/)
+[](https://opencollective.com/tauri)
+[](https://discord.gg/SpmNs4S)
+[](https://tauri.app)
+[](https://good-labs.github.io/greater-good-affirmation)
+[](https://opencollective.com/tauri)
+
+Cross-platform WebView rendering library in Rust that supports all major desktop platforms like Windows, macOS, and Linux.
+
+
+
+## Overview
+
+WRY connects the web engine on each platform and provides easy to use and unified interface to render WebView.
+The webview requires a running event loop and a window type that implements `HasWindowHandle`,
+or a gtk container widget if you need to support X11 and Wayland.
+You can use a windowing library like `tao` or `winit`.
+
+## Usage
+
+The minimum example to create a Window and browse a website looks like following:
+
+```rust
+fn main() -> wry::Result<()> {
+ use tao::{
+ event::{Event, StartCause, WindowEvent},
+ event_loop::{ControlFlow, EventLoop},
+ window::WindowBuilder,
+ };
+ use wry::WebViewBuilder;
+
+ let event_loop = EventLoop::new();
+ let window = WindowBuilder::new()
+ .with_title("Hello World")
+ .build(&event_loop)
+ .unwrap();
+
+ let webview = WebViewBuilder::new()
+ .with_url("https://tauri.app")
+ .build(&window)?;
+
+ event_loop.run(move |event, _, control_flow| {
+ *control_flow = ControlFlow::Wait;
+
+ match event {
+ Event::NewEvents(StartCause::Init) => println!("Wry has started!"),
+ Event::WindowEvent {
+ event: WindowEvent::CloseRequested,
+ ..
+ } => *control_flow = ControlFlow::Exit,
+ _ => (),
+ }
+ });
+}
+```
+
+There are also more samples under `examples`, you can enter commands like the following to try them:
+
+```
+cargo run --example multiwindow
+```
+
+For more information, please read the documentation below.
+
+## [Documentation](https://docs.rs/wry)
+
+## Platform-specific notes
+
+Here is the underlying web engine each platform uses, and some dependencies you might need to install.
+
+### Linux
+
+Wry also needs [WebKitGTK](https://webkitgtk.org/) for WebView. So please make sure the following packages are installed:
+
+#### Arch Linux / Manjaro:
+
+```bash
+sudo pacman -S webkit2gtk-4.1
+```
+
+#### Debian / Ubuntu:
+
+```bash
+sudo apt install libwebkit2gtk-4.1-dev
+```
+
+#### Fedora
+
+```bash
+sudo dnf install gtk3-devel webkit2gtk4.1-devel
+```
+
+### Nix & NixOS
+
+ ```Nix
+# shell.nix
+
+ let
+ # Unstable Channel | Rolling Release
+ pkgs = import (fetchTarball("channel:nixpkgs-unstable")) { };
+ packages = with pkgs; [
+ pkg-config
+ webkitgtk_4_1
+ ];
+ in
+ pkgs.mkShell {
+ buildInputs = packages;
+ }
+ ```
+
+ ```sh
+ nix-shell shell.nix
+ ```
+
+#### GUIX
+
+ ```scheme
+;; manifest.scm
+
+ (specifications->manifest
+ '("pkg-config" ; Helper tool used when compiling
+ "webkitgtk" ; Web content engine fot GTK+
+ ))
+ ```
+
+```sh
+guix shell -m manifest.scm
+````
+
+### macOS
+
+WebKit is native on macOS so everything should be fine.
+
+If you are cross-compiling for macOS using [osxcross](https://github.com/tpoechtrager/osxcross) and encounter a runtime panic like `Class with name WKWebViewConfiguration could not be found` it's possible that `WebKit.framework` has not been linked correctly, to fix this set the `RUSTFLAGS` environment variable:
+
+```
+RUSTFLAGS="-l framework=WebKit" cargo build --target=x86_64-apple-darwin --release
+```
+
+### Windows
+
+WebView2 provided by Microsoft Edge Chromium is used. So wry supports Windows 7, 8, 10 and 11.
+
+### Android / iOS
+
+Wry supports mobile with the help of [`cargo-mobile2`](https://github.com/tauri-apps/cargo-mobile2) CLI to create template project. If you are interested in playing or hacking it, please follow [MOBILE.md](MOBILE.md).
+
+If you wish to create Android project yourself, there is a few requirements that your application needs to uphold:
+
+1. You need to set a few environment variables that will be used to generate the necessary kotlin
+ files that you need to include in your Android application for wry to function properly:
+
+ - `WRY_ANDROID_PACKAGE`: which is the reversed domain name of your android project and the app name in snake_case, for example, `com.wry.example.wry_app`
+ - `WRY_ANDROID_LIBRARY`: for example, if your cargo project has a lib name `wry_app`, it will generate `libwry_app.so` so you set this env var to `wry_app`
+ - `WRY_ANDROID_KOTLIN_FILES_OUT_DIR`: for example, `path/to/app/src/main/kotlin/com/wry/example`
+
+2. Your main Android Activity needs to inherit `AppCompatActivity`, preferably it should use the generated `WryActivity` or inherit it.
+3. Your Rust app needs to call `wry::android_setup` function to setup the necessary logic to be able to create webviews later on.
+4. Your Rust app needs to call `wry::android_binding!` macro to setup the JNI functions that will be called by `WryActivity` and various other places.
+
+It is recommended to use [`tao`](https://docs.rs/tao/latest/tao/) crate as it provides maximum compatibility with `wry`
+
+```rs
+#[cfg(target_os = "android")]
+{
+ tao::android_binding!(
+ com_example,
+ wry_app,
+ WryActivity,
+ wry::android_setup, // pass the wry::android_setup function to tao which will invoke when the event loop is created
+ _start_app
+ );
+ wry::android_binding!(com_example, ttt);
+}
+```
+
+- `WRY_ANDROID_PACKAGE` which is the reversed domain name of your android project and the app name in snake_case for example: `com.wry.example.wry_app`
+- `WRY_ANDROID_LIBRARY` for example: if your cargo project has a lib name `wry_app`, it will generate `libwry_app.so` so you set this env var to `wry_app`
+- `WRY_ANDROID_KOTLIN_FILES_OUT_DIR` for example: `path/to/app/src/main/kotlin/com/wry/example`
+
+## Partners
+
+
+
+
+
+
+
+
+
+
+
+
+
+For the complete list of sponsors please visit our [website](https://tauri.app#sponsors) and [Open Collective](https://opencollective.com/tauri).
+
+## License
+
+Apache-2.0/MIT
diff --git a/vendor/wry/SECURITY.md b/vendor/wry/SECURITY.md
new file mode 100644
index 0000000..cbd06de
--- /dev/null
+++ b/vendor/wry/SECURITY.md
@@ -0,0 +1,19 @@
+# Security Policy
+
+## Supported Versions
+
+| Version | Supported |
+| ------- | ------------------ |
+| > 1.0 | :white_check_mark: |
+| < 1.0 | :x: |
+
+## Reporting a Vulnerability
+
+If you have found a potential security threat, vulnerability or exploit in Tauri
+or one of its upstream dependencies, please DON’T create a pull-request, DON’T
+file an issue on GitHub, DON’T mention it on Discord and DON’T create a forum thread.
+
+We will be adding contact information to this page very soon.
+
+At the current time we do not have the financial ability to reward bounties,
+but in extreme cases will at our discretion consider a reward.
diff --git a/vendor/wry/build.rs b/vendor/wry/build.rs
new file mode 100644
index 0000000..13ff4cf
--- /dev/null
+++ b/vendor/wry/build.rs
@@ -0,0 +1,118 @@
+// Copyright 2020-2023 Tauri Programme within The Commons Conservancy
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-License-Identifier: MIT
+
+fn main() {
+ let target_os = std::env::var("CARGO_CFG_TARGET_OS").unwrap_or_default();
+ if target_os == "macos" || target_os == "ios" {
+ println!("cargo:rustc-link-lib=framework=WebKit");
+ }
+
+ if target_os == "android" {
+ use std::{fs, path::PathBuf};
+
+ fn env_var(var: &str) -> String {
+ std::env::var(var).unwrap_or_else(|_| {
+ panic!("`{var}` is not set, which is needed to generate the kotlin files for android.")
+ })
+ }
+
+ println!("cargo:rerun-if-env-changed=WRY_ANDROID_PACKAGE");
+ println!("cargo:rerun-if-env-changed=WRY_ANDROID_LIBRARY");
+ println!("cargo:rerun-if-env-changed=WRY_ANDROID_KOTLIN_FILES_OUT_DIR");
+
+ if let Ok(kotlin_out_dir) = std::env::var("WRY_ANDROID_KOTLIN_FILES_OUT_DIR") {
+ let package = env_var("WRY_ANDROID_PACKAGE");
+ let library = env_var("WRY_ANDROID_LIBRARY");
+
+ let kotlin_out_dir = PathBuf::from(&kotlin_out_dir)
+ .canonicalize()
+ .unwrap_or_else(move |_| {
+ panic!("Failed to canonicalize `WRY_ANDROID_KOTLIN_FILES_OUT_DIR` path {kotlin_out_dir}")
+ });
+
+ let kotlin_files_path =
+ PathBuf::from(env_var("CARGO_MANIFEST_DIR")).join("src/android/kotlin");
+ println!("cargo:rerun-if-changed={}", kotlin_files_path.display());
+ let kotlin_files = fs::read_dir(kotlin_files_path).expect("failed to read kotlin directory");
+
+ for file in kotlin_files {
+ let file = file.unwrap();
+
+ let class_extension_env = format!(
+ "WRY_{}_CLASS_EXTENSION",
+ file
+ .path()
+ .file_stem()
+ .unwrap()
+ .to_string_lossy()
+ .to_uppercase()
+ );
+ let class_init_env = format!(
+ "WRY_{}_CLASS_INIT",
+ file
+ .path()
+ .file_stem()
+ .unwrap()
+ .to_string_lossy()
+ .to_uppercase()
+ );
+
+ println!("cargo:rerun-if-env-changed={class_extension_env}");
+ println!("cargo:rerun-if-env-changed={class_init_env}");
+
+ let content = fs::read_to_string(file.path())
+ .expect("failed to read kotlin file as string")
+ .replace("{{package}}", &package)
+ .replace("{{package-unescaped}}", &package.replace('`', ""))
+ .replace("{{library}}", &library)
+ .replace(
+ "{{class-extension}}",
+ &std::env::var(&class_extension_env).unwrap_or_default(),
+ )
+ .replace(
+ "{{class-init}}",
+ &std::env::var(&class_init_env).unwrap_or_default(),
+ );
+
+ let auto_generated_comment = match file
+ .path()
+ .extension()
+ .unwrap_or_default()
+ .to_str()
+ .unwrap_or_default()
+ {
+ "pro" => "# THIS FILE IS AUTO-GENERATED. DO NOT MODIFY!!\n\n",
+ "kt" => "/* THIS FILE IS AUTO-GENERATED. DO NOT MODIFY!! */\n\n",
+ _ => "String::new()",
+ };
+ let mut out = String::from(auto_generated_comment);
+ out.push_str(&content);
+
+ let out_path = kotlin_out_dir.join(file.file_name());
+ // Overwrite only if changed to not trigger rebuilds
+ if fs::read_to_string(&out_path).map_or(true, |o| o != out) {
+ fs::write(&out_path, out).expect("Failed to write kotlin file");
+ }
+ println!("cargo:rerun-if-changed={}", out_path.display());
+ }
+ }
+ }
+
+ let target = std::env::var("TARGET").unwrap_or_default();
+ let android = target.contains("android");
+ let linux = !android
+ && (target.contains("linux")
+ || target.contains("freebsd")
+ || target.contains("dragonfly")
+ || target.contains("netbsd")
+ || target.contains("openbsd"));
+ alias("linux", linux);
+ alias("gtk", cfg!(feature = "os-webview") && linux);
+}
+
+fn alias(alias: &str, condition: bool) {
+ if condition {
+ println!("cargo:rustc-cfg={alias}");
+ }
+}
diff --git a/vendor/wry/examples/async_custom_protocol.rs b/vendor/wry/examples/async_custom_protocol.rs
new file mode 100644
index 0000000..131f9a7
--- /dev/null
+++ b/vendor/wry/examples/async_custom_protocol.rs
@@ -0,0 +1,103 @@
+// Copyright 2020-2023 Tauri Programme within The Commons Conservancy
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-License-Identifier: MIT
+
+use std::path::PathBuf;
+
+use tao::{
+ event::{Event, WindowEvent},
+ event_loop::{ControlFlow, EventLoop},
+ window::WindowBuilder,
+};
+use wry::{
+ http::{header::CONTENT_TYPE, Request, Response},
+ WebViewBuilder,
+};
+
+fn main() -> wry::Result<()> {
+ let event_loop = EventLoop::new();
+ let window = WindowBuilder::new().build(&event_loop).unwrap();
+
+ let builder = WebViewBuilder::new()
+ .with_asynchronous_custom_protocol("wry".into(), move |_webview_id, request, responder| {
+ match get_wry_response(request) {
+ Ok(http_response) => responder.respond(http_response),
+ Err(e) => responder.respond(
+ http::Response::builder()
+ .header(CONTENT_TYPE, "text/plain")
+ .status(500)
+ .body(e.to_string().as_bytes().to_vec())
+ .unwrap(),
+ ),
+ }
+ })
+ // tell the webview to load the custom protocol
+ .with_url("wry://localhost");
+
+ #[cfg(any(
+ target_os = "windows",
+ target_os = "macos",
+ target_os = "ios",
+ target_os = "android"
+ ))]
+ let _webview = builder.build(&window)?;
+ #[cfg(not(any(
+ target_os = "windows",
+ target_os = "macos",
+ target_os = "ios",
+ target_os = "android"
+ )))]
+ let _webview = {
+ use tao::platform::unix::WindowExtUnix;
+ use wry::WebViewBuilderExtUnix;
+ let vbox = window.default_vbox().unwrap();
+ builder.build_gtk(vbox)?
+ };
+
+ event_loop.run(move |event, _, control_flow| {
+ *control_flow = ControlFlow::Wait;
+
+ if let Event::WindowEvent {
+ event: WindowEvent::CloseRequested,
+ ..
+ } = event
+ {
+ *control_flow = ControlFlow::Exit
+ }
+ });
+}
+
+fn get_wry_response(
+ request: Request>,
+) -> Result>, Box> {
+ let path = request.uri().path();
+ // Read the file content from file path
+ let root = PathBuf::from("examples/custom_protocol");
+ let path = if path == "/" {
+ "index.html"
+ } else {
+ // removing leading slash
+ &path[1..]
+ };
+ let content = std::fs::read(std::fs::canonicalize(root.join(path))?)?;
+
+ // Return asset contents and mime types based on file extentions
+ // If you don't want to do this manually, there are some crates for you.
+ // Such as `infer` and `mime_guess`.
+ let mimetype = if path.ends_with(".html") || path == "/" {
+ "text/html"
+ } else if path.ends_with(".js") {
+ "text/javascript"
+ } else if path.ends_with(".png") {
+ "image/png"
+ } else if path.ends_with(".wasm") {
+ "application/wasm"
+ } else {
+ unimplemented!();
+ };
+
+ Response::builder()
+ .header(CONTENT_TYPE, mimetype)
+ .body(content)
+ .map_err(Into::into)
+}
diff --git a/vendor/wry/examples/custom_protocol.rs b/vendor/wry/examples/custom_protocol.rs
new file mode 100644
index 0000000..b31fbcf
--- /dev/null
+++ b/vendor/wry/examples/custom_protocol.rs
@@ -0,0 +1,103 @@
+// Copyright 2020-2023 Tauri Programme within The Commons Conservancy
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-License-Identifier: MIT
+
+use std::path::PathBuf;
+
+use tao::{
+ event::{Event, WindowEvent},
+ event_loop::{ControlFlow, EventLoop},
+ window::WindowBuilder,
+};
+use wry::{
+ http::{header::CONTENT_TYPE, Request, Response},
+ WebViewBuilder,
+};
+
+fn main() -> wry::Result<()> {
+ let event_loop = EventLoop::new();
+ let window = WindowBuilder::new().build(&event_loop).unwrap();
+
+ let builder = WebViewBuilder::new()
+ .with_custom_protocol(
+ "wry".into(),
+ move |_webview_id, request| match get_wry_response(request) {
+ Ok(r) => r.map(Into::into),
+ Err(e) => http::Response::builder()
+ .header(CONTENT_TYPE, "text/plain")
+ .status(500)
+ .body(e.to_string().as_bytes().to_vec())
+ .unwrap()
+ .map(Into::into),
+ },
+ )
+ // tell the webview to load the custom protocol
+ .with_url("wry://localhost");
+
+ #[cfg(any(
+ target_os = "windows",
+ target_os = "macos",
+ target_os = "ios",
+ target_os = "android"
+ ))]
+ let _webview = builder.build(&window)?;
+ #[cfg(not(any(
+ target_os = "windows",
+ target_os = "macos",
+ target_os = "ios",
+ target_os = "android"
+ )))]
+ let _webview = {
+ use tao::platform::unix::WindowExtUnix;
+ use wry::WebViewBuilderExtUnix;
+ let vbox = window.default_vbox().unwrap();
+ builder.build_gtk(vbox)?
+ };
+
+ event_loop.run(move |event, _, control_flow| {
+ *control_flow = ControlFlow::Wait;
+
+ if let Event::WindowEvent {
+ event: WindowEvent::CloseRequested,
+ ..
+ } = event
+ {
+ *control_flow = ControlFlow::Exit
+ }
+ });
+}
+
+fn get_wry_response(
+ request: Request>,
+) -> Result>, Box> {
+ let path = request.uri().path();
+ // Read the file content from file path
+ let root = PathBuf::from("examples/custom_protocol");
+ let path = if path == "/" {
+ "index.html"
+ } else {
+ // removing leading slash
+ &path[1..]
+ };
+ let content = std::fs::read(std::fs::canonicalize(root.join(path))?)?;
+
+ // Return asset contents and mime types based on file extentions
+ // If you don't want to do this manually, there are some crates for you.
+ // Such as `infer` and `mime_guess`.
+ let mimetype = if path.ends_with(".html") || path == "/" {
+ "text/html"
+ } else if path.ends_with(".js") {
+ "text/javascript"
+ } else if path.ends_with(".png") {
+ "image/png"
+ } else if path.ends_with(".wasm") {
+ "application/wasm"
+ } else {
+ unimplemented!();
+ };
+
+ Response::builder()
+ .header(CONTENT_TYPE, mimetype)
+ .body(content)
+ .map_err(Into::into)
+}
diff --git a/vendor/wry/examples/custom_protocol/index.html b/vendor/wry/examples/custom_protocol/index.html
new file mode 100644
index 0000000..0a92c75
--- /dev/null
+++ b/vendor/wry/examples/custom_protocol/index.html
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+ Welcome to WRY!
+ Page 1
+
+
+ Link
+
+
+
+
diff --git a/vendor/wry/examples/custom_protocol/script.js b/vendor/wry/examples/custom_protocol/script.js
new file mode 100644
index 0000000..f6f257d
--- /dev/null
+++ b/vendor/wry/examples/custom_protocol/script.js
@@ -0,0 +1,22 @@
+// Copyright 2020-2023 Tauri Programme within The Commons Conservancy
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-License-Identifier: MIT
+if (window.location.pathname.startsWith("/page2")) {
+ console.log("hello from javascript in page2");
+} else {
+ console.log("hello from javascript in page1");
+
+ if (typeof WebAssembly.instantiateStreaming !== "undefined") {
+ WebAssembly.instantiateStreaming(fetch("/wasm.wasm")).then((wasm) => {
+ console.log(wasm.instance.exports.main()); // should log 42
+ });
+ } else {
+ // Older WKWebView may not support `WebAssembly.instantiateStreaming` yet.
+ fetch("/wasm.wasm")
+ .then((response) => response.arrayBuffer())
+ .then((bytes) => WebAssembly.instantiate(bytes))
+ .then((wasm) => {
+ console.log(wasm.instance.exports.main()); // should log 42
+ });
+ }
+}
diff --git a/vendor/wry/examples/custom_protocol/subpage.html b/vendor/wry/examples/custom_protocol/subpage.html
new file mode 100644
index 0000000..db373d5
--- /dev/null
+++ b/vendor/wry/examples/custom_protocol/subpage.html
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ Page 2
+ Back home
+
+
+
+
\ No newline at end of file
diff --git a/vendor/wry/examples/custom_protocol/wasm.wasm b/vendor/wry/examples/custom_protocol/wasm.wasm
new file mode 100644
index 0000000..8ffac94
Binary files /dev/null and b/vendor/wry/examples/custom_protocol/wasm.wasm differ
diff --git a/vendor/wry/examples/custom_titlebar.rs b/vendor/wry/examples/custom_titlebar.rs
new file mode 100644
index 0000000..226207a
--- /dev/null
+++ b/vendor/wry/examples/custom_titlebar.rs
@@ -0,0 +1,304 @@
+// Copyright 2020-2023 Tauri Programme within The Commons Conservancy
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-License-Identifier: MIT
+
+use tao::{
+ dpi::PhysicalSize,
+ event::{Event, StartCause, WindowEvent},
+ event_loop::{ControlFlow, EventLoopBuilder},
+ window::{CursorIcon, ResizeDirection, Window, WindowBuilder},
+};
+use wry::{http::Request, WebViewBuilder};
+
+#[derive(Debug)]
+enum HitTestResult {
+ Client,
+ Left,
+ Right,
+ Top,
+ Bottom,
+ TopLeft,
+ TopRight,
+ BottomLeft,
+ BottomRight,
+ NoWhere,
+}
+
+impl HitTestResult {
+ fn drag_resize_window(&self, window: &Window) {
+ let _ = window.drag_resize_window(match self {
+ HitTestResult::Left => ResizeDirection::West,
+ HitTestResult::Right => ResizeDirection::East,
+ HitTestResult::Top => ResizeDirection::North,
+ HitTestResult::Bottom => ResizeDirection::South,
+ HitTestResult::TopLeft => ResizeDirection::NorthWest,
+ HitTestResult::TopRight => ResizeDirection::NorthEast,
+ HitTestResult::BottomLeft => ResizeDirection::SouthWest,
+ HitTestResult::BottomRight => ResizeDirection::SouthEast,
+ _ => unreachable!(),
+ });
+ }
+
+ fn change_cursor(&self, window: &Window) {
+ window.set_cursor_icon(match self {
+ HitTestResult::Left => CursorIcon::WResize,
+ HitTestResult::Right => CursorIcon::EResize,
+ HitTestResult::Top => CursorIcon::NResize,
+ HitTestResult::Bottom => CursorIcon::SResize,
+ HitTestResult::TopLeft => CursorIcon::NwResize,
+ HitTestResult::TopRight => CursorIcon::NeResize,
+ HitTestResult::BottomLeft => CursorIcon::SwResize,
+ HitTestResult::BottomRight => CursorIcon::SeResize,
+ _ => CursorIcon::Default,
+ });
+ }
+}
+
+fn hit_test(window_size: PhysicalSize, x: i32, y: i32, scale: f64) -> HitTestResult {
+ const BORDERLESS_RESIZE_INSET: f64 = 5.0;
+
+ const CLIENT: isize = 0b0000;
+ const LEFT: isize = 0b0001;
+ const RIGHT: isize = 0b0010;
+ const TOP: isize = 0b0100;
+ const BOTTOM: isize = 0b1000;
+ const TOPLEFT: isize = TOP | LEFT;
+ const TOPRIGHT: isize = TOP | RIGHT;
+ const BOTTOMLEFT: isize = BOTTOM | LEFT;
+ const BOTTOMRIGHT: isize = BOTTOM | RIGHT;
+
+ let top = 0;
+ let left = 0;
+ let bottom = top + window_size.height as i32;
+ let right = left + window_size.width as i32;
+
+ let inset = (BORDERLESS_RESIZE_INSET * scale) as i32;
+
+ #[rustfmt::skip]
+ let result =
+ (LEFT * (if x < (left + inset) { 1 } else { 0 }))
+ | (RIGHT * (if x >= (right - inset) { 1 } else { 0 }))
+ | (TOP * (if y < (top + inset) { 1 } else { 0 }))
+ | (BOTTOM * (if y >= (bottom - inset) { 1 } else { 0 }));
+
+ match result {
+ CLIENT => HitTestResult::Client,
+ LEFT => HitTestResult::Left,
+ RIGHT => HitTestResult::Right,
+ TOP => HitTestResult::Top,
+ BOTTOM => HitTestResult::Bottom,
+ TOPLEFT => HitTestResult::TopLeft,
+ TOPRIGHT => HitTestResult::TopRight,
+ BOTTOMLEFT => HitTestResult::BottomLeft,
+ BOTTOMRIGHT => HitTestResult::BottomRight,
+ _ => HitTestResult::NoWhere,
+ }
+}
+
+enum UserEvent {
+ Minimize,
+ Maximize,
+ DragWindow,
+ CloseWindow,
+ MouseDown(i32, i32),
+ MouseMove(i32, i32),
+}
+
+fn main() -> wry::Result<()> {
+ let event_loop = EventLoopBuilder::::with_user_event().build();
+ let window = WindowBuilder::new()
+ .with_decorations(false)
+ .build(&event_loop)
+ .unwrap();
+
+ const HTML: &str = r#"
+
+
+
+
+
+
+
+
+
+ WRYYYYYYYYYYYYYYYYYYYYYY!
+
+
+
+
+
+"#;
+
+ let proxy = event_loop.create_proxy();
+ let handler = move |req: Request| {
+ let body = req.body();
+ let mut req = body.split([':', ',']);
+ match req.next().unwrap() {
+ "minimize" => {
+ let _ = proxy.send_event(UserEvent::Minimize);
+ }
+ "maximize" => {
+ let _ = proxy.send_event(UserEvent::Maximize);
+ }
+ "drag_window" => {
+ let _ = proxy.send_event(UserEvent::DragWindow);
+ }
+ "close" => {
+ let _ = proxy.send_event(UserEvent::CloseWindow);
+ }
+ "mousedown" => {
+ let x = req.next().unwrap().parse().unwrap();
+ let y = req.next().unwrap().parse().unwrap();
+ let _ = proxy.send_event(UserEvent::MouseDown(x, y));
+ }
+ "mousemove" => {
+ let x = req.next().unwrap().parse().unwrap();
+ let y = req.next().unwrap().parse().unwrap();
+ let _ = proxy.send_event(UserEvent::MouseMove(x, y));
+ }
+ _ => {}
+ }
+ };
+
+ let builder = WebViewBuilder::new()
+ .with_html(HTML)
+ .with_ipc_handler(handler)
+ .with_accept_first_mouse(true);
+
+ #[cfg(any(
+ target_os = "windows",
+ target_os = "macos",
+ target_os = "ios",
+ target_os = "android"
+ ))]
+ let webview = builder.build(&window)?;
+ #[cfg(not(any(
+ target_os = "windows",
+ target_os = "macos",
+ target_os = "ios",
+ target_os = "android"
+ )))]
+ let webview = {
+ use tao::platform::unix::WindowExtUnix;
+ use wry::WebViewBuilderExtUnix;
+ let vbox = window.default_vbox().unwrap();
+ builder.build_gtk(vbox)?
+ };
+
+ let mut webview = Some(webview);
+
+ event_loop.run(move |event, _, control_flow| {
+ *control_flow = ControlFlow::Wait;
+
+ match event {
+ Event::NewEvents(StartCause::Init) => println!("Wry application started!"),
+ Event::WindowEvent {
+ event: WindowEvent::CloseRequested,
+ ..
+ }
+ | Event::UserEvent(UserEvent::CloseWindow) => {
+ let _ = webview.take();
+ *control_flow = ControlFlow::Exit
+ }
+
+ Event::UserEvent(e) => match e {
+ UserEvent::Minimize => window.set_minimized(true),
+ UserEvent::Maximize => window.set_maximized(!window.is_maximized()),
+ UserEvent::DragWindow => window.drag_window().unwrap(),
+ UserEvent::MouseDown(x, y) => {
+ let res = hit_test(window.inner_size(), x, y, window.scale_factor());
+ match res {
+ HitTestResult::Client | HitTestResult::NoWhere => {}
+ _ => res.drag_resize_window(&window),
+ }
+ }
+ UserEvent::MouseMove(x, y) => {
+ hit_test(window.inner_size(), x, y, window.scale_factor()).change_cursor(&window);
+ }
+ UserEvent::CloseWindow => { /* handled above */ }
+ },
+ _ => (),
+ }
+ });
+}
diff --git a/vendor/wry/examples/gtk_multiwebview.rs b/vendor/wry/examples/gtk_multiwebview.rs
new file mode 100644
index 0000000..b6497c7
--- /dev/null
+++ b/vendor/wry/examples/gtk_multiwebview.rs
@@ -0,0 +1,124 @@
+// Copyright 2020-2023 Tauri Programme within The Commons Conservancy
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-License-Identifier: MIT
+
+use tao::{
+ event::{Event, WindowEvent},
+ event_loop::{ControlFlow, EventLoop},
+ window::WindowBuilder,
+};
+use wry::{
+ dpi::{LogicalPosition, LogicalSize},
+ Rect, WebViewBuilder,
+};
+
+fn main() -> wry::Result<()> {
+ let event_loop = EventLoop::new();
+ let window = WindowBuilder::new().build(&event_loop).unwrap();
+
+ let build_webview = |builder: WebViewBuilder<'_>| -> wry::Result {
+ #[cfg(any(
+ target_os = "windows",
+ target_os = "macos",
+ target_os = "ios",
+ target_os = "android"
+ ))]
+ let webview = builder.build(&window)?;
+
+ #[cfg(not(any(
+ target_os = "windows",
+ target_os = "macos",
+ target_os = "ios",
+ target_os = "android"
+ )))]
+ let webview = {
+ use gtk::prelude::*;
+ use tao::platform::unix::WindowExtUnix;
+ use wry::WebViewBuilderExtUnix;
+
+ let fixed = gtk::Fixed::new();
+ let vbox = window.default_vbox().unwrap();
+ vbox.pack_start(&fixed, true, true, 0);
+ fixed.show_all();
+ builder.build_gtk(&fixed)?
+ };
+
+ Ok(webview)
+ };
+
+ let size = window.inner_size().to_logical::(window.scale_factor());
+
+ let builder = WebViewBuilder::new()
+ .with_bounds(Rect {
+ position: LogicalPosition::new(0, 0).into(),
+ size: LogicalSize::new(size.width / 2, size.height / 2).into(),
+ })
+ .with_url("https://tauri.app");
+ let webview = build_webview(builder)?;
+
+ let builder2 = WebViewBuilder::new()
+ .with_bounds(Rect {
+ position: LogicalPosition::new(size.width / 2, 0).into(),
+ size: LogicalSize::new(size.width / 2, size.height / 2).into(),
+ })
+ .with_url("https://github.com/tauri-apps/wry");
+ let webview2 = build_webview(builder2)?;
+
+ let builder3 = WebViewBuilder::new()
+ .with_bounds(Rect {
+ position: LogicalPosition::new(0, size.height / 2).into(),
+ size: LogicalSize::new(size.width / 2, size.height / 2).into(),
+ })
+ .with_url("https://twitter.com/TauriApps");
+ let webview3 = build_webview(builder3)?;
+
+ let builder4 = WebViewBuilder::new()
+ .with_bounds(Rect {
+ position: LogicalPosition::new(size.width / 2, size.height / 2).into(),
+ size: LogicalSize::new(size.width / 2, size.height / 2).into(),
+ })
+ .with_url("https://google.com");
+ let webview4 = build_webview(builder4)?;
+
+ event_loop.run(move |event, _, control_flow| {
+ *control_flow = ControlFlow::Wait;
+
+ match event {
+ Event::WindowEvent {
+ event: WindowEvent::Resized(size),
+ ..
+ } => {
+ let size = size.to_logical::(window.scale_factor());
+ webview
+ .set_bounds(Rect {
+ position: LogicalPosition::new(0, 0).into(),
+ size: LogicalSize::new(size.width / 2, size.height / 2).into(),
+ })
+ .unwrap();
+ webview2
+ .set_bounds(Rect {
+ position: LogicalPosition::new(size.width / 2, 0).into(),
+ size: LogicalSize::new(size.width / 2, size.height / 2).into(),
+ })
+ .unwrap();
+ webview3
+ .set_bounds(Rect {
+ position: LogicalPosition::new(0, size.height / 2).into(),
+ size: LogicalSize::new(size.width / 2, size.height / 2).into(),
+ })
+ .unwrap();
+ webview4
+ .set_bounds(Rect {
+ position: LogicalPosition::new(size.width / 2, size.height / 2).into(),
+ size: LogicalSize::new(size.width / 2, size.height / 2).into(),
+ })
+ .unwrap();
+ }
+ Event::WindowEvent {
+ event: WindowEvent::CloseRequested,
+ ..
+ } => *control_flow = ControlFlow::Exit,
+ _ => {}
+ }
+ });
+}
diff --git a/vendor/wry/examples/multiwebview.rs b/vendor/wry/examples/multiwebview.rs
new file mode 100644
index 0000000..f7ed2aa
--- /dev/null
+++ b/vendor/wry/examples/multiwebview.rs
@@ -0,0 +1,132 @@
+// Copyright 2020-2023 Tauri Programme within The Commons Conservancy
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-License-Identifier: MIT
+
+use winit::{
+ event::{Event, WindowEvent},
+ event_loop::{ControlFlow, EventLoop},
+ window::WindowBuilder,
+};
+use wry::{
+ dpi::{LogicalPosition, LogicalSize},
+ Rect, WebViewBuilder,
+};
+
+fn main() -> wry::Result<()> {
+ #[cfg(any(
+ target_os = "linux",
+ target_os = "dragonfly",
+ target_os = "freebsd",
+ target_os = "netbsd",
+ target_os = "openbsd",
+ ))]
+ {
+ use gtk::prelude::DisplayExtManual;
+
+ gtk::init()?;
+ if gtk::gdk::Display::default().unwrap().backend().is_wayland() {
+ panic!("This example doesn't support wayland!");
+ }
+
+ // we need to ignore this error here otherwise it will be catched by winit and will be
+ // make the example crash
+ winit::platform::x11::register_xlib_error_hook(Box::new(|_display, error| {
+ let error = error as *mut x11_dl::xlib::XErrorEvent;
+ (unsafe { (*error).error_code }) == 170
+ }));
+ }
+
+ let event_loop = EventLoop::new().unwrap();
+ let window = WindowBuilder::new()
+ .with_inner_size(winit::dpi::LogicalSize::new(800, 800))
+ .build(&event_loop)
+ .unwrap();
+
+ let size = window.inner_size().to_logical::(window.scale_factor());
+
+ let webview = WebViewBuilder::new()
+ .with_bounds(Rect {
+ position: LogicalPosition::new(0, 0).into(),
+ size: LogicalSize::new(size.width / 2, size.height / 2).into(),
+ })
+ .with_url("https://tauri.app")
+ .build(&window)?;
+ let webview2 = WebViewBuilder::new()
+ .with_bounds(Rect {
+ position: LogicalPosition::new(size.width / 2, 0).into(),
+ size: LogicalSize::new(size.width / 2, size.height / 2).into(),
+ })
+ .with_url("https://github.com/tauri-apps/wry")
+ .build(&window)?;
+ let webview3 = WebViewBuilder::new()
+ .with_bounds(Rect {
+ position: LogicalPosition::new(0, size.height / 2).into(),
+ size: LogicalSize::new(size.width / 2, size.height / 2).into(),
+ })
+ .with_url("https://twitter.com/TauriApps")
+ .build(&window)?;
+ let webview4 = WebViewBuilder::new()
+ .with_bounds(Rect {
+ position: LogicalPosition::new(size.width / 2, size.height / 2).into(),
+ size: LogicalSize::new(size.width / 2, size.height / 2).into(),
+ })
+ .with_url("https://google.com")
+ .build(&window)?;
+
+ event_loop
+ .run(move |event, evl| {
+ evl.set_control_flow(ControlFlow::Poll);
+
+ #[cfg(any(
+ target_os = "linux",
+ target_os = "dragonfly",
+ target_os = "freebsd",
+ target_os = "netbsd",
+ target_os = "openbsd",
+ ))]
+ while gtk::events_pending() {
+ gtk::main_iteration_do(false);
+ }
+
+ match event {
+ Event::WindowEvent {
+ event: WindowEvent::Resized(size),
+ ..
+ } => {
+ let size = size.to_logical::(window.scale_factor());
+ webview
+ .set_bounds(Rect {
+ position: LogicalPosition::new(0, 0).into(),
+ size: LogicalSize::new(size.width / 2, size.height / 2).into(),
+ })
+ .unwrap();
+ webview2
+ .set_bounds(Rect {
+ position: LogicalPosition::new(size.width / 2, 0).into(),
+ size: LogicalSize::new(size.width / 2, size.height / 2).into(),
+ })
+ .unwrap();
+ webview3
+ .set_bounds(Rect {
+ position: LogicalPosition::new(0, size.height / 2).into(),
+ size: LogicalSize::new(size.width / 2, size.height / 2).into(),
+ })
+ .unwrap();
+ webview4
+ .set_bounds(Rect {
+ position: LogicalPosition::new(size.width / 2, size.height / 2).into(),
+ size: LogicalSize::new(size.width / 2, size.height / 2).into(),
+ })
+ .unwrap();
+ }
+ Event::WindowEvent {
+ event: WindowEvent::CloseRequested,
+ ..
+ } => evl.exit(),
+ _ => {}
+ }
+ })
+ .unwrap();
+
+ Ok(())
+}
diff --git a/vendor/wry/examples/multiwindow.rs b/vendor/wry/examples/multiwindow.rs
new file mode 100644
index 0000000..6b8a159
--- /dev/null
+++ b/vendor/wry/examples/multiwindow.rs
@@ -0,0 +1,125 @@
+// Copyright 2020-2023 Tauri Programme within The Commons Conservancy
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-License-Identifier: MIT
+
+use std::collections::HashMap;
+use tao::{
+ event::{Event, WindowEvent},
+ event_loop::{ControlFlow, EventLoopBuilder, EventLoopProxy, EventLoopWindowTarget},
+ window::{Window, WindowBuilder, WindowId},
+};
+use wry::{http::Request, WebView, WebViewBuilder};
+
+enum UserEvent {
+ CloseWindow(WindowId),
+ NewTitle(WindowId, String),
+ NewWindow,
+}
+
+fn main() -> wry::Result<()> {
+ let event_loop = EventLoopBuilder::::with_user_event().build();
+ let mut webviews = HashMap::new();
+ let proxy = event_loop.create_proxy();
+
+ let new_window = create_new_window(
+ format!("Window {}", webviews.len() + 1),
+ &event_loop,
+ proxy.clone(),
+ );
+ webviews.insert(new_window.0.id(), (new_window.0, new_window.1));
+
+ event_loop.run(move |event, event_loop, control_flow| {
+ *control_flow = ControlFlow::Wait;
+
+ match event {
+ Event::WindowEvent {
+ event: WindowEvent::CloseRequested,
+ window_id,
+ ..
+ } => {
+ webviews.remove(&window_id);
+ if webviews.is_empty() {
+ *control_flow = ControlFlow::Exit
+ }
+ }
+ Event::UserEvent(UserEvent::NewWindow) => {
+ let new_window = create_new_window(
+ format!("Window {}", webviews.len() + 1),
+ event_loop,
+ proxy.clone(),
+ );
+ webviews.insert(new_window.0.id(), (new_window.0, new_window.1));
+ }
+ Event::UserEvent(UserEvent::CloseWindow(id)) => {
+ webviews.remove(&id);
+ if webviews.is_empty() {
+ *control_flow = ControlFlow::Exit
+ }
+ }
+
+ Event::UserEvent(UserEvent::NewTitle(id, title)) => {
+ webviews.get(&id).unwrap().0.set_title(&title);
+ }
+ _ => (),
+ }
+ });
+}
+
+fn create_new_window(
+ title: String,
+ event_loop: &EventLoopWindowTarget,
+ proxy: EventLoopProxy,
+) -> (Window, WebView) {
+ let window = WindowBuilder::new()
+ .with_title(title)
+ .build(event_loop)
+ .unwrap();
+ let window_id = window.id();
+ let handler = move |req: Request| {
+ let body = req.body();
+ match body.as_str() {
+ "new-window" => {
+ let _ = proxy.send_event(UserEvent::NewWindow);
+ }
+ "close" => {
+ let _ = proxy.send_event(UserEvent::CloseWindow(window_id));
+ }
+ _ if body.starts_with("change-title") => {
+ let title = body.replace("change-title:", "");
+ let _ = proxy.send_event(UserEvent::NewTitle(window_id, title));
+ }
+ _ => {}
+ }
+ };
+
+ let builder = WebViewBuilder::new()
+ .with_html(
+ r#"
+ Open a new window
+ Close current window
+
+ "#,
+ )
+ .with_ipc_handler(handler);
+
+ #[cfg(any(
+ target_os = "windows",
+ target_os = "macos",
+ target_os = "ios",
+ target_os = "android"
+ ))]
+ let webview = builder.build(&window).unwrap();
+ #[cfg(not(any(
+ target_os = "windows",
+ target_os = "macos",
+ target_os = "ios",
+ target_os = "android"
+ )))]
+ let webview = {
+ use tao::platform::unix::WindowExtUnix;
+ use wry::WebViewBuilderExtUnix;
+ let vbox = window.default_vbox().unwrap();
+ builder.build_gtk(vbox).unwrap()
+ };
+ (window, webview)
+}
diff --git a/vendor/wry/examples/reparent.rs b/vendor/wry/examples/reparent.rs
new file mode 100644
index 0000000..1b54765
--- /dev/null
+++ b/vendor/wry/examples/reparent.rs
@@ -0,0 +1,111 @@
+// Copyright 2020-2023 Tauri Programme within The Commons Conservancy
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-License-Identifier: MIT
+
+use tao::{
+ event::{ElementState, Event, KeyEvent, WindowEvent},
+ event_loop::{ControlFlow, EventLoop},
+ keyboard::Key,
+ window::WindowBuilder,
+};
+use wry::WebViewBuilder;
+
+#[cfg(target_os = "macos")]
+use {objc2_app_kit::NSWindow, tao::platform::macos::WindowExtMacOS, wry::WebViewExtMacOS};
+#[cfg(target_os = "windows")]
+use {tao::platform::windows::WindowExtWindows, wry::WebViewExtWindows};
+
+#[cfg(not(any(
+ target_os = "windows",
+ target_os = "macos",
+ target_os = "ios",
+ target_os = "android"
+)))]
+#[cfg(not(any(
+ target_os = "windows",
+ target_os = "macos",
+ target_os = "ios",
+ target_os = "android"
+)))]
+use {
+ tao::platform::unix::WindowExtUnix,
+ wry::{WebViewBuilderExtUnix, WebViewExtUnix},
+};
+
+fn main() -> wry::Result<()> {
+ let event_loop = EventLoop::new();
+ let window = WindowBuilder::new().build(&event_loop).unwrap();
+ let window2 = WindowBuilder::new().build(&event_loop).unwrap();
+
+ let builder = WebViewBuilder::new().with_url("https://tauri.app");
+
+ #[cfg(any(
+ target_os = "windows",
+ target_os = "macos",
+ target_os = "ios",
+ target_os = "android"
+ ))]
+ let webview = builder.build(&window)?;
+ #[cfg(not(any(
+ target_os = "windows",
+ target_os = "macos",
+ target_os = "ios",
+ target_os = "android"
+ )))]
+ let webview = {
+ use tao::platform::unix::WindowExtUnix;
+ let vbox = window.default_vbox().unwrap();
+ builder.build_gtk(vbox)?
+ };
+
+ let mut webview_container = window.id();
+
+ event_loop.run(move |event, _event_loop, control_flow| {
+ *control_flow = ControlFlow::Wait;
+
+ match event {
+ Event::WindowEvent {
+ event: WindowEvent::CloseRequested,
+ ..
+ } => *control_flow = ControlFlow::Exit,
+
+ Event::WindowEvent {
+ event:
+ WindowEvent::KeyboardInput {
+ event:
+ KeyEvent {
+ logical_key: Key::Character("x"),
+ state: ElementState::Pressed,
+ ..
+ },
+ ..
+ },
+ ..
+ } => {
+ let new_parent = if webview_container == window.id() {
+ &window2
+ } else {
+ &window
+ };
+ webview_container = new_parent.id();
+
+ #[cfg(target_os = "macos")]
+ webview
+ .reparent(new_parent.ns_window() as *mut NSWindow)
+ .unwrap();
+ #[cfg(not(any(
+ target_os = "windows",
+ target_os = "macos",
+ target_os = "ios",
+ target_os = "android"
+ )))]
+ webview
+ .reparent(new_parent.default_vbox().unwrap())
+ .unwrap();
+ #[cfg(target_os = "windows")]
+ webview.reparent(new_parent.hwnd()).unwrap();
+ }
+ _ => {}
+ }
+ });
+}
diff --git a/vendor/wry/examples/simple.rs b/vendor/wry/examples/simple.rs
new file mode 100644
index 0000000..2cf47f6
--- /dev/null
+++ b/vendor/wry/examples/simple.rs
@@ -0,0 +1,65 @@
+// Copyright 2020-2023 Tauri Programme within The Commons Conservancy
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-License-Identifier: MIT
+
+use tao::{
+ event::{Event, WindowEvent},
+ event_loop::{ControlFlow, EventLoop},
+ window::WindowBuilder,
+};
+use wry::WebViewBuilder;
+
+fn main() -> wry::Result<()> {
+ let event_loop = EventLoop::new();
+ let window = WindowBuilder::new().build(&event_loop).unwrap();
+
+ let builder = WebViewBuilder::new()
+ .with_url("http://tauri.app")
+ .with_drag_drop_handler(|e| {
+ match e {
+ wry::DragDropEvent::Enter { paths, position } => {
+ println!("DragEnter: {position:?} {paths:?} ")
+ }
+ wry::DragDropEvent::Over { position } => println!("DragOver: {position:?} "),
+ wry::DragDropEvent::Drop { paths, position } => {
+ println!("DragDrop: {position:?} {paths:?} ")
+ }
+ wry::DragDropEvent::Leave => println!("DragLeave"),
+ _ => {}
+ }
+
+ true
+ });
+
+ #[cfg(any(
+ target_os = "windows",
+ target_os = "macos",
+ target_os = "ios",
+ target_os = "android"
+ ))]
+ let _webview = builder.build(&window)?;
+ #[cfg(not(any(
+ target_os = "windows",
+ target_os = "macos",
+ target_os = "ios",
+ target_os = "android"
+ )))]
+ let _webview = {
+ use tao::platform::unix::WindowExtUnix;
+ use wry::WebViewBuilderExtUnix;
+ let vbox = window.default_vbox().unwrap();
+ builder.build_gtk(vbox)?
+ };
+
+ event_loop.run(move |event, _, control_flow| {
+ *control_flow = ControlFlow::Wait;
+
+ if let Event::WindowEvent {
+ event: WindowEvent::CloseRequested,
+ ..
+ } = event
+ {
+ *control_flow = ControlFlow::Exit;
+ }
+ });
+}
diff --git a/vendor/wry/examples/streaming.rs b/vendor/wry/examples/streaming.rs
new file mode 100644
index 0000000..3c313a8
--- /dev/null
+++ b/vendor/wry/examples/streaming.rs
@@ -0,0 +1,262 @@
+// Copyright 2020-2023 Tauri Programme within The Commons Conservancy
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-License-Identifier: MIT
+
+use std::{
+ io::{Read, Seek, SeekFrom, Write},
+ path::PathBuf,
+};
+
+use http::{header, StatusCode};
+use http_range::HttpRange;
+use tao::{
+ event::{Event, WindowEvent},
+ event_loop::{ControlFlow, EventLoop},
+ window::WindowBuilder,
+};
+use wry::{
+ http::{header::*, Request, Response},
+ WebViewBuilder,
+};
+
+fn main() -> wry::Result<()> {
+ let event_loop = EventLoop::new();
+ let window = WindowBuilder::new().build(&event_loop).unwrap();
+
+ let builder = WebViewBuilder::new()
+ .with_custom_protocol(
+ "wry".into(),
+ move |_webview_id, request| match wry_protocol(request) {
+ Ok(r) => r.map(Into::into),
+ Err(e) => http::Response::builder()
+ .header(CONTENT_TYPE, "text/plain")
+ .status(500)
+ .body(e.to_string().as_bytes().to_vec())
+ .unwrap()
+ .map(Into::into),
+ },
+ )
+ .with_custom_protocol(
+ "stream".into(),
+ move |_webview_id, request| match stream_protocol(request) {
+ Ok(r) => r.map(Into::into),
+ Err(e) => http::Response::builder()
+ .header(CONTENT_TYPE, "text/plain")
+ .status(500)
+ .body(e.to_string().as_bytes().to_vec())
+ .unwrap()
+ .map(Into::into),
+ },
+ )
+ // tell the webview to load the custom protocol
+ .with_url("wry://localhost");
+
+ #[cfg(any(
+ target_os = "windows",
+ target_os = "macos",
+ target_os = "ios",
+ target_os = "android"
+ ))]
+ let _webview = builder.build(&window)?;
+ #[cfg(not(any(
+ target_os = "windows",
+ target_os = "macos",
+ target_os = "ios",
+ target_os = "android"
+ )))]
+ let _webview = {
+ use tao::platform::unix::WindowExtUnix;
+ use wry::WebViewBuilderExtUnix;
+ let vbox = window.default_vbox().unwrap();
+ builder.build_gtk(vbox)?
+ };
+
+ event_loop.run(move |event, _, control_flow| {
+ *control_flow = ControlFlow::Wait;
+
+ if let Event::WindowEvent {
+ event: WindowEvent::CloseRequested,
+ ..
+ } = event
+ {
+ *control_flow = ControlFlow::Exit
+ }
+ });
+}
+
+fn wry_protocol(
+ request: Request>,
+) -> Result>, Box> {
+ let path = request.uri().path();
+ // Read the file content from file path
+ let root = PathBuf::from("examples/streaming");
+ let path = if path == "/" {
+ "index.html"
+ } else {
+ // removing leading slash
+ &path[1..]
+ };
+ let content = std::fs::read(std::fs::canonicalize(root.join(path))?)?;
+
+ // Return asset contents and mime types based on file extentions
+ // If you don't want to do this manually, there are some crates for you.
+ // Such as `infer` and `mime_guess`.
+ let mimetype = if path.ends_with(".html") || path == "/" {
+ "text/html"
+ } else if path.ends_with(".js") {
+ "text/javascript"
+ } else {
+ unimplemented!();
+ };
+
+ Response::builder()
+ .header(CONTENT_TYPE, mimetype)
+ .body(content)
+ .map_err(Into::into)
+}
+
+fn stream_protocol(
+ request: http::Request>,
+) -> Result>, Box> {
+ // skip leading `/`
+ let path = percent_encoding::percent_decode(request.uri().path()[1..].as_bytes())
+ .decode_utf8_lossy()
+ .to_string();
+
+ let mut file = std::fs::File::open(path)?;
+
+ // get file length
+ let len = {
+ let old_pos = file.stream_position()?;
+ let len = file.seek(SeekFrom::End(0))?;
+ file.seek(SeekFrom::Start(old_pos))?;
+ len
+ };
+
+ let mut resp = Response::builder().header(CONTENT_TYPE, "video/mp4");
+
+ // if the webview sent a range header, we need to send a 206 in return
+ // Actually only macOS and Windows are supported. Linux will ALWAYS return empty headers.
+ let http_response = if let Some(range_header) = request.headers().get("range") {
+ let not_satisfiable = || {
+ Response::builder()
+ .status(StatusCode::RANGE_NOT_SATISFIABLE)
+ .header(header::CONTENT_RANGE, format!("bytes */{len}"))
+ .body(vec![])
+ };
+
+ // parse range header
+ let ranges = if let Ok(ranges) = HttpRange::parse(range_header.to_str()?, len) {
+ ranges
+ .iter()
+ // map the output back to spec range , example: 0-499
+ .map(|r| (r.start, r.start + r.length - 1))
+ .collect::>()
+ } else {
+ return Ok(not_satisfiable()?);
+ };
+
+ /// The Maximum bytes we send in one range
+ const MAX_LEN: u64 = 1000 * 1024;
+
+ if ranges.len() == 1 {
+ let &(start, mut end) = ranges.first().unwrap();
+
+ // check if a range is not satisfiable
+ //
+ // this should be already taken care of by HttpRange::parse
+ // but checking here again for extra assurance
+ if start >= len || end >= len || end < start {
+ return Ok(not_satisfiable()?);
+ }
+
+ // adjust end byte for MAX_LEN
+ end = start + (end - start).min(len - start).min(MAX_LEN - 1);
+
+ // calculate number of bytes needed to be read
+ let bytes_to_read = end + 1 - start;
+
+ // allocate a buf with a suitable capacity
+ let mut buf = Vec::with_capacity(bytes_to_read as usize);
+ // seek the file to the starting byte
+ file.seek(SeekFrom::Start(start))?;
+ // read the needed bytes
+ file.take(bytes_to_read).read_to_end(&mut buf)?;
+
+ resp = resp.header(CONTENT_RANGE, format!("bytes {start}-{end}/{len}"));
+ resp = resp.header(CONTENT_LENGTH, end + 1 - start);
+ resp = resp.status(StatusCode::PARTIAL_CONTENT);
+ resp.body(buf)
+ } else {
+ let mut buf = Vec::new();
+ let ranges = ranges
+ .iter()
+ .filter_map(|&(start, mut end)| {
+ // filter out unsatisfiable ranges
+ //
+ // this should be already taken care of by HttpRange::parse
+ // but checking here again for extra assurance
+ if start >= len || end >= len || end < start {
+ None
+ } else {
+ // adjust end byte for MAX_LEN
+ end = start + (end - start).min(len - start).min(MAX_LEN - 1);
+ Some((start, end))
+ }
+ })
+ .collect::>();
+
+ let boundary = random_boundary();
+ let boundary_sep = format!("\r\n--{boundary}\r\n");
+ let boundary_closer = format!("\r\n--{boundary}\r\n");
+
+ resp = resp.header(
+ CONTENT_TYPE,
+ format!("multipart/byteranges; boundary={boundary}"),
+ );
+
+ for (end, start) in ranges {
+ // a new range is being written, write the range boundary
+ buf.write_all(boundary_sep.as_bytes())?;
+
+ // write the needed headers `Content-Type` and `Content-Range`
+ buf.write_all(format!("{CONTENT_TYPE}: video/mp4\r\n").as_bytes())?;
+ buf.write_all(format!("{CONTENT_RANGE}: bytes {start}-{end}/{len}\r\n").as_bytes())?;
+
+ // write the separator to indicate the start of the range body
+ buf.write_all("\r\n".as_bytes())?;
+
+ // calculate number of bytes needed to be read
+ let bytes_to_read = end + 1 - start;
+
+ let mut local_buf = vec![0_u8; bytes_to_read as usize];
+ file.seek(SeekFrom::Start(start))?;
+ file.read_exact(&mut local_buf)?;
+ buf.extend_from_slice(&local_buf);
+ }
+ // all ranges have been written, write the closing boundary
+ buf.write_all(boundary_closer.as_bytes())?;
+
+ resp.body(buf)
+ }
+ } else {
+ resp = resp.header(CONTENT_LENGTH, len);
+ let mut buf = Vec::with_capacity(len as usize);
+ file.read_to_end(&mut buf)?;
+ resp.body(buf)
+ };
+
+ http_response.map_err(Into::into)
+}
+
+fn random_boundary() -> String {
+ let mut x = [0_u8; 30];
+ getrandom::getrandom(&mut x).expect("failed to get random bytes");
+ (x[..])
+ .iter()
+ .map(|&x| format!("{x:x}"))
+ .fold(String::new(), |mut a, x| {
+ a.push_str(x.as_str());
+ a
+ })
+}
diff --git a/vendor/wry/examples/streaming/index.html b/vendor/wry/examples/streaming/index.html
new file mode 100644
index 0000000..547cef0
--- /dev/null
+++ b/vendor/wry/examples/streaming/index.html
@@ -0,0 +1,38 @@
+
+
+
+
+
+ Document
+
+
+ Enter a path to a video to play, then hit Enter or click Start
+
+
+
+
+
+
diff --git a/vendor/wry/examples/transparent.rs b/vendor/wry/examples/transparent.rs
new file mode 100644
index 0000000..0802012
--- /dev/null
+++ b/vendor/wry/examples/transparent.rs
@@ -0,0 +1,80 @@
+// Copyright 2020-2023 Tauri Programme within The Commons Conservancy
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-License-Identifier: MIT
+
+use tao::{
+ event::{Event, WindowEvent},
+ event_loop::{ControlFlow, EventLoop},
+ window::WindowBuilder,
+};
+use wry::WebViewBuilder;
+
+fn main() -> wry::Result<()> {
+ let event_loop = EventLoop::new();
+ #[allow(unused_mut)]
+ let mut builder = WindowBuilder::new()
+ .with_decorations(false)
+ // There are actually three layer of background color when creating webview window.
+ // The first is window background...
+ .with_transparent(true);
+ #[cfg(target_os = "windows")]
+ {
+ use tao::platform::windows::WindowBuilderExtWindows;
+ builder = builder.with_undecorated_shadow(false);
+ }
+ let window = builder.build(&event_loop).unwrap();
+
+ #[cfg(target_os = "windows")]
+ {
+ use tao::platform::windows::WindowExtWindows;
+ window.set_undecorated_shadow(true);
+ }
+
+ let builder = WebViewBuilder::new()
+ // The second is on webview...
+ // Feature `transparent` is required for transparency to work.
+ .with_transparent(true)
+ // And the last is in html.
+ .with_html(
+ r#"
+
+
+ "#,
+ );
+
+ #[cfg(any(
+ target_os = "windows",
+ target_os = "macos",
+ target_os = "ios",
+ target_os = "android"
+ ))]
+ let _webview = builder.build(&window)?;
+ #[cfg(not(any(
+ target_os = "windows",
+ target_os = "macos",
+ target_os = "ios",
+ target_os = "android"
+ )))]
+ let _webview = {
+ use tao::platform::unix::WindowExtUnix;
+ use wry::WebViewBuilderExtUnix;
+ let vbox = window.default_vbox().unwrap();
+ builder.build_gtk(vbox)?
+ };
+
+ event_loop.run(move |event, _, control_flow| {
+ *control_flow = ControlFlow::Wait;
+
+ if let Event::WindowEvent {
+ event: WindowEvent::CloseRequested,
+ ..
+ } = event
+ {
+ *control_flow = ControlFlow::Exit
+ }
+ });
+}
diff --git a/vendor/wry/examples/wgpu.rs b/vendor/wry/examples/wgpu.rs
new file mode 100644
index 0000000..5fe3f9a
--- /dev/null
+++ b/vendor/wry/examples/wgpu.rs
@@ -0,0 +1,224 @@
+use std::borrow::Cow;
+use winit::{
+ event::{Event, WindowEvent},
+ event_loop::{ControlFlow, EventLoop},
+ window::Window,
+};
+use wry::{
+ dpi::{LogicalPosition, LogicalSize},
+ Rect, WebViewBuilder,
+};
+
+async fn run(event_loop: EventLoop<()>, window: Window) {
+ let size = window.inner_size();
+
+ let instance = wgpu::Instance::default();
+
+ let surface = instance.create_surface(&window).unwrap();
+ let adapter = instance
+ .request_adapter(&wgpu::RequestAdapterOptions {
+ power_preference: wgpu::PowerPreference::default(),
+ force_fallback_adapter: false,
+ // Request an adapter which can render to our surface
+ compatible_surface: Some(&surface),
+ })
+ .await
+ .expect("Failed to find an appropriate adapter");
+
+ // Create the logical device and command queue
+ let (device, queue) = adapter
+ .request_device(
+ &wgpu::DeviceDescriptor {
+ label: None,
+ required_features: wgpu::Features::empty(),
+ // Make sure we use the texture resolution limits from the adapter, so we can support images the size of the swapchain.
+ required_limits: wgpu::Limits::downlevel_webgl2_defaults()
+ .using_resolution(adapter.limits()),
+ },
+ None,
+ )
+ .await
+ .expect("Failed to create device");
+
+ // Load the shaders from disk
+ let shader = device.create_shader_module(wgpu::ShaderModuleDescriptor {
+ label: None,
+ source: wgpu::ShaderSource::Wgsl(Cow::Borrowed(
+ r#"
+@vertex
+fn vs_main(@builtin(vertex_index) in_vertex_index: u32) -> @builtin(position) vec4 {
+ let x = f32(i32(in_vertex_index) - 1);
+ let y = f32(i32(in_vertex_index & 1u) * 2 - 1);
+ return vec4(x, y, 0.0, 1.0);
+}
+
+@fragment
+fn fs_main() -> @location(0) vec4 {
+ return vec4(1.0, 0.0, 0.0, 1.0);
+}
+"#,
+ )),
+ });
+
+ let pipeline_layout = device.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor {
+ label: None,
+ bind_group_layouts: &[],
+ push_constant_ranges: &[],
+ });
+
+ let swapchain_capabilities = surface.get_capabilities(&adapter);
+ let swapchain_format = swapchain_capabilities.formats[0];
+
+ let render_pipeline = device.create_render_pipeline(&wgpu::RenderPipelineDescriptor {
+ label: None,
+ layout: Some(&pipeline_layout),
+ vertex: wgpu::VertexState {
+ module: &shader,
+ entry_point: "vs_main",
+ buffers: &[],
+ },
+ fragment: Some(wgpu::FragmentState {
+ module: &shader,
+ entry_point: "fs_main",
+ targets: &[Some(swapchain_format.into())],
+ }),
+ primitive: wgpu::PrimitiveState::default(),
+ depth_stencil: None,
+ multisample: wgpu::MultisampleState::default(),
+ multiview: None,
+ });
+
+ let mut config = wgpu::SurfaceConfiguration {
+ usage: wgpu::TextureUsages::RENDER_ATTACHMENT,
+ format: swapchain_format,
+ width: size.width,
+ height: size.height,
+ present_mode: wgpu::PresentMode::Fifo,
+ desired_maximum_frame_latency: 2,
+ alpha_mode: swapchain_capabilities.alpha_modes[0],
+ view_formats: vec![],
+ };
+
+ surface.configure(&device, &config);
+
+ let _webview = WebViewBuilder::new()
+ .with_bounds(Rect {
+ position: LogicalPosition::new(100, 100).into(),
+ size: LogicalSize::new(200, 200).into(),
+ })
+ .with_transparent(true)
+ .with_html(
+ r#"
+
+
+ "#,
+ )
+ .build_as_child(&window)
+ .unwrap();
+
+ event_loop
+ .run(|event, evl| {
+ evl.set_control_flow(ControlFlow::Poll);
+
+ match event {
+ Event::WindowEvent {
+ event: WindowEvent::Resized(size),
+ ..
+ } => {
+ // Reconfigure the surface with the new size
+ config.width = size.width;
+ config.height = size.height;
+ surface.configure(&device, &config);
+ // On macos the window needs to be redrawn manually after resizing
+ window.request_redraw();
+ }
+ Event::WindowEvent {
+ event: WindowEvent::RedrawRequested,
+ ..
+ } => {
+ let frame = surface
+ .get_current_texture()
+ .expect("Failed to acquire next swap chain texture");
+ let view = frame
+ .texture
+ .create_view(&wgpu::TextureViewDescriptor::default());
+ let mut encoder =
+ device.create_command_encoder(&wgpu::CommandEncoderDescriptor { label: None });
+ {
+ let mut rpass = encoder.begin_render_pass(&wgpu::RenderPassDescriptor {
+ label: None,
+ color_attachments: &[Some(wgpu::RenderPassColorAttachment {
+ view: &view,
+ resolve_target: None,
+ ops: wgpu::Operations {
+ load: wgpu::LoadOp::Clear(wgpu::Color::TRANSPARENT),
+ store: wgpu::StoreOp::Store,
+ },
+ })],
+ depth_stencil_attachment: None,
+ timestamp_writes: None,
+ occlusion_query_set: None,
+ });
+ rpass.set_pipeline(&render_pipeline);
+ rpass.draw(0..3, 0..1);
+ }
+
+ queue.submit(Some(encoder.finish()));
+ frame.present();
+ }
+ Event::WindowEvent {
+ event: WindowEvent::CloseRequested,
+ ..
+ } => evl.exit(),
+ _ => {}
+ }
+
+ #[cfg(any(
+ target_os = "linux",
+ target_os = "dragonfly",
+ target_os = "freebsd",
+ target_os = "netbsd",
+ target_os = "openbsd",
+ ))]
+ while gtk::events_pending() {
+ gtk::main_iteration_do(false);
+ }
+ })
+ .unwrap();
+}
+
+fn main() {
+ #[cfg(any(
+ target_os = "linux",
+ target_os = "dragonfly",
+ target_os = "freebsd",
+ target_os = "netbsd",
+ target_os = "openbsd",
+ ))]
+ {
+ use gtk::prelude::DisplayExtManual;
+
+ gtk::init().unwrap();
+ if gtk::gdk::Display::default().unwrap().backend().is_wayland() {
+ panic!("This example doesn't support wayland!");
+ }
+
+ // we need to ignore this error here otherwise it will be catched by winit and will be
+ // make the example crash
+ winit::platform::x11::register_xlib_error_hook(Box::new(|_display, error| {
+ let error = error as *mut x11_dl::xlib::XErrorEvent;
+ (unsafe { (*error).error_code }) == 170
+ }));
+ }
+
+ let event_loop = EventLoop::new().unwrap();
+ let window = winit::window::WindowBuilder::new()
+ .with_transparent(true)
+ .build(&event_loop)
+ .unwrap();
+ pollster::block_on(run(event_loop, window));
+}
diff --git a/vendor/wry/examples/winit.rs b/vendor/wry/examples/winit.rs
new file mode 100644
index 0000000..dcbdad5
--- /dev/null
+++ b/vendor/wry/examples/winit.rs
@@ -0,0 +1,85 @@
+// Copyright 2020-2023 Tauri Programme within The Commons Conservancy
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-License-Identifier: MIT
+
+use dpi::{LogicalPosition, LogicalSize};
+use winit::{
+ event::{Event, WindowEvent},
+ event_loop::{ControlFlow, EventLoop},
+ window::WindowBuilder,
+};
+use wry::{Rect, WebViewBuilder};
+
+fn main() -> wry::Result<()> {
+ #[cfg(any(
+ target_os = "linux",
+ target_os = "dragonfly",
+ target_os = "freebsd",
+ target_os = "netbsd",
+ target_os = "openbsd",
+ ))]
+ {
+ use gtk::prelude::DisplayExtManual;
+
+ gtk::init().unwrap();
+ if gtk::gdk::Display::default().unwrap().backend().is_wayland() {
+ panic!("This example doesn't support wayland!");
+ }
+
+ // we need to ignore this error here otherwise it will be catched by winit and will be
+ // make the example crash
+ winit::platform::x11::register_xlib_error_hook(Box::new(|_display, error| {
+ let error = error as *mut x11_dl::xlib::XErrorEvent;
+ (unsafe { (*error).error_code }) == 170
+ }));
+ }
+
+ let event_loop = EventLoop::new().unwrap();
+ let window = WindowBuilder::new()
+ .with_inner_size(winit::dpi::LogicalSize::new(800, 800))
+ .build(&event_loop)
+ .unwrap();
+
+ let webview = WebViewBuilder::new()
+ .with_url("https://tauri.app")
+ .build_as_child(&window)?;
+
+ event_loop
+ .run(move |event, evl| {
+ evl.set_control_flow(ControlFlow::Poll);
+
+ #[cfg(any(
+ target_os = "linux",
+ target_os = "dragonfly",
+ target_os = "freebsd",
+ target_os = "netbsd",
+ target_os = "openbsd",
+ ))]
+ while gtk::events_pending() {
+ gtk::main_iteration_do(false);
+ }
+
+ match event {
+ Event::WindowEvent {
+ event: WindowEvent::Resized(size),
+ ..
+ } => {
+ let size = size.to_logical::(window.scale_factor());
+ webview
+ .set_bounds(Rect {
+ position: LogicalPosition::new(0, 0).into(),
+ size: LogicalSize::new(size.width, size.height).into(),
+ })
+ .unwrap();
+ }
+ Event::WindowEvent {
+ event: WindowEvent::CloseRequested,
+ ..
+ } => evl.exit(),
+ _ => {}
+ }
+ })
+ .unwrap();
+
+ Ok(())
+}
diff --git a/vendor/wry/renovate.json b/vendor/wry/renovate.json
new file mode 100644
index 0000000..f45d8f1
--- /dev/null
+++ b/vendor/wry/renovate.json
@@ -0,0 +1,5 @@
+{
+ "extends": [
+ "config:base"
+ ]
+}
diff --git a/vendor/wry/rustfmt.toml b/vendor/wry/rustfmt.toml
new file mode 100644
index 0000000..a90653d
--- /dev/null
+++ b/vendor/wry/rustfmt.toml
@@ -0,0 +1,15 @@
+max_width = 100
+hard_tabs = false
+tab_spaces = 2
+newline_style = "Unix"
+use_small_heuristics = "Default"
+reorder_imports = true
+reorder_modules = true
+remove_nested_parens = true
+edition = "2018"
+merge_derives = true
+use_try_shorthand = false
+use_field_init_shorthand = false
+force_explicit_abi = true
+imports_granularity = "Crate"
+#license_template_path = ".license_template"
diff --git a/vendor/wry/src/android/binding.rs b/vendor/wry/src/android/binding.rs
new file mode 100644
index 0000000..fafad29
--- /dev/null
+++ b/vendor/wry/src/android/binding.rs
@@ -0,0 +1,414 @@
+// Copyright 2020-2023 Tauri Programme within The Commons Conservancy
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-License-Identifier: MIT
+
+use http::{
+ header::{HeaderName, HeaderValue, CONTENT_LENGTH, CONTENT_TYPE},
+ Request,
+};
+use jni::errors::Result as JniResult;
+pub use jni::{
+ self,
+ objects::{GlobalRef, JClass, JMap, JObject, JString},
+ sys::{jboolean, jint, jobject, jstring},
+ JNIEnv,
+};
+pub use ndk;
+
+use super::{
+ ASSET_LOADER_DOMAIN, EVAL_CALLBACKS, IPC, ON_LOAD_HANDLER, REQUEST_HANDLER, TITLE_CHANGE_HANDLER,
+ URL_LOADING_OVERRIDE, WITH_ASSET_LOADER,
+};
+
+use crate::PageLoadEvent;
+
+#[macro_export]
+macro_rules! android_binding {
+ ($domain:ident, $package:ident) => {
+ ::wry::android_binding!($domain, $package, ::wry)
+ };
+ // use imported `android_setup` just to force the import path to use `wry::{}`
+ // as the macro breaks without braces
+ ($domain:ident, $package:ident, $wry:path) => {{
+ use $wry::{android_setup as _, prelude::*};
+
+ android_fn!($domain, $package, WryActivity, onActivityDestroy, [JObject]);
+
+ android_fn!(
+ $domain,
+ $package,
+ RustWebViewClient,
+ handleRequest,
+ [JString, JObject, jboolean],
+ jobject
+ );
+ android_fn!(
+ $domain,
+ $package,
+ RustWebViewClient,
+ withAssetLoader,
+ [],
+ jboolean
+ );
+ android_fn!(
+ $domain,
+ $package,
+ RustWebViewClient,
+ assetLoaderDomain,
+ [],
+ jstring
+ );
+ android_fn!(
+ $domain,
+ $package,
+ RustWebViewClient,
+ shouldOverride,
+ [JString],
+ jboolean
+ );
+ android_fn!(
+ $domain,
+ $package,
+ RustWebView,
+ shouldOverride,
+ [JString],
+ jboolean
+ );
+ android_fn!($domain, $package, RustWebView, onEval, [jint, JString]);
+ android_fn!(
+ $domain,
+ $package,
+ RustWebViewClient,
+ onPageLoading,
+ [JString]
+ );
+ android_fn!(
+ $domain,
+ $package,
+ RustWebViewClient,
+ onPageLoaded,
+ [JString]
+ );
+ android_fn!($domain, $package, Ipc, ipc, [JString, JString]);
+ android_fn!(
+ $domain,
+ $package,
+ RustWebChromeClient,
+ handleReceivedTitle,
+ [JObject, JString],
+ );
+ }};
+}
+
+fn handle_request(
+ env: &mut JNIEnv,
+ webview_id: JString,
+ request: JObject,
+ is_document_start_script_enabled: jboolean,
+) -> JniResult {
+ if let Some(handler) = REQUEST_HANDLER.borrow().as_ref() {
+ #[cfg(feature = "tracing")]
+ let span =
+ tracing::info_span!(parent: None, "wry::custom_protocol::handle", uri = tracing::field::Empty).entered();
+
+ let mut request_builder = Request::builder();
+
+ let uri = env
+ .call_method(&request, "getUrl", "()Landroid/net/Uri;", &[])?
+ .l()?;
+ let url: JString = env
+ .call_method(&uri, "toString", "()Ljava/lang/String;", &[])?
+ .l()?
+ .into();
+ let url = env.get_string(&url)?.to_string_lossy().to_string();
+
+ #[cfg(feature = "tracing")]
+ span.record("uri", &url);
+
+ request_builder = request_builder.uri(&url);
+
+ let method = env
+ .call_method(&request, "getMethod", "()Ljava/lang/String;", &[])?
+ .l()
+ .map(JString::from)?;
+ request_builder = request_builder.method(
+ env
+ .get_string(&method)?
+ .to_string_lossy()
+ .to_string()
+ .as_str(),
+ );
+
+ let request_headers = env
+ .call_method(request, "getRequestHeaders", "()Ljava/util/Map;", &[])?
+ .l()?;
+ let request_headers = JMap::from_env(env, &request_headers)?;
+ let mut iter = request_headers.iter(env)?;
+ while let Some((header, value)) = iter.next(env)? {
+ let header = JString::from(header);
+ let value = JString::from(value);
+ let header = env.get_string(&header)?;
+ let value = env.get_string(&value)?;
+ if let (Ok(header), Ok(value)) = (
+ HeaderName::from_bytes(header.to_bytes()),
+ HeaderValue::from_bytes(value.to_bytes()),
+ ) {
+ request_builder = request_builder.header(header, value);
+ }
+ }
+
+ let final_request = match request_builder.body(Vec::new()) {
+ Ok(req) => req,
+ Err(e) => {
+ #[cfg(feature = "tracing")]
+ tracing::warn!("Failed to build response: {}", e);
+ return Ok(*JObject::null());
+ }
+ };
+
+ let webview_id = env.get_string(&webview_id)?;
+ let webview_id = webview_id.to_str().ok().unwrap_or_default();
+
+ let response = {
+ #[cfg(feature = "tracing")]
+ let _span = tracing::info_span!("wry::custom_protocol::call_handler").entered();
+ (handler.handler)(
+ webview_id,
+ final_request,
+ is_document_start_script_enabled != 0,
+ )
+ };
+ if let Some(response) = response {
+ let status = response.status();
+ let status_code = status.as_u16() as i32;
+ let status_err = if status_code < 100 {
+ Some("Status code can't be less than 100")
+ } else if status_code > 599 {
+ Some("statusCode can't be greater than 599.")
+ } else if status_code > 299 && status_code < 400 {
+ Some("statusCode can't be in the [300, 399] range.")
+ } else {
+ None
+ };
+ if let Some(err) = status_err {
+ #[cfg(feature = "tracing")]
+ tracing::warn!("{}", err);
+ return Ok(*JObject::null());
+ }
+
+ let reason_phrase = status.canonical_reason().unwrap_or("OK");
+ let (mime_type, encoding) = if let Some(content_type) = response.headers().get(CONTENT_TYPE) {
+ let content_type = content_type.to_str().unwrap().trim();
+ let mut s = content_type.split(';');
+ let mime_type = s.next().unwrap().trim();
+ let mut encoding = None;
+ for token in s {
+ let token = token.trim();
+ if token.starts_with("charset=") {
+ encoding.replace(token.split('=').nth(1).unwrap());
+ break;
+ }
+ }
+ (
+ env.new_string(mime_type)?,
+ if let Some(encoding) = encoding {
+ env.new_string(encoding)?
+ } else {
+ JString::default()
+ },
+ )
+ } else {
+ (JString::default(), JString::default())
+ };
+
+ let headers = response.headers();
+ let obj = env.new_object("java/util/HashMap", "()V", &[])?;
+ let response_headers = {
+ let headers_map = JMap::from_env(env, &obj)?;
+ for (name, value) in headers.iter() {
+ // WebResourceResponse will automatically generate Content-Type and
+ // Content-Length headers so we should skip them to avoid duplication.
+ if name == CONTENT_TYPE || name == CONTENT_LENGTH {
+ continue;
+ }
+ let key = env.new_string(name)?;
+ let value = env.new_string(value.to_str().unwrap_or_default())?;
+ headers_map.put(env, &key, &value)?;
+ }
+ headers_map
+ };
+
+ let bytes = response.body();
+
+ let byte_array_input_stream = env.find_class("java/io/ByteArrayInputStream")?;
+ let byte_array = env.byte_array_from_slice(bytes)?;
+ let stream = env.new_object(byte_array_input_stream, "([B)V", &[(&byte_array).into()])?;
+
+ let reason_phrase = env.new_string(reason_phrase)?;
+
+ let web_resource_response_class = env.find_class("android/webkit/WebResourceResponse")?;
+ let web_resource_response = env.new_object(
+ web_resource_response_class,
+ "(Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;Ljava/util/Map;Ljava/io/InputStream;)V",
+ &[(&mime_type).into(), (&encoding).into(), status_code.into(), (&reason_phrase).into(), (&response_headers).into(), (&stream).into()],
+ )?;
+
+ return Ok(*web_resource_response);
+ }
+ }
+
+ Ok(*JObject::null())
+}
+
+#[allow(non_snake_case)]
+pub unsafe fn onActivityDestroy(_: JNIEnv, _: JClass, _: JObject) {
+ super::MainPipe::send(super::WebViewMessage::OnDestroy);
+}
+
+#[allow(non_snake_case)]
+pub unsafe fn handleRequest(
+ mut env: JNIEnv,
+ _: JClass,
+ webview_id: JString,
+ request: JObject,
+ is_document_start_script_enabled: jboolean,
+) -> jobject {
+ match handle_request(
+ &mut env,
+ webview_id,
+ request,
+ is_document_start_script_enabled,
+ ) {
+ Ok(response) => response,
+ Err(e) => {
+ #[cfg(feature = "tracing")]
+ tracing::warn!("Failed to handle request: {}", e);
+ JObject::null().as_raw()
+ }
+ }
+}
+
+#[allow(non_snake_case)]
+pub unsafe fn shouldOverride(mut env: JNIEnv, _: JClass, url: JString) -> jboolean {
+ match env.get_string(&url) {
+ Ok(url) => {
+ let url = url.to_string_lossy().to_string();
+ URL_LOADING_OVERRIDE
+ .borrow()
+ .as_ref()
+ // We negate the result of the function because the logic for the android
+ // client is different from how the navigation_handler is defined.
+ //
+ // https://developer.android.com/reference/android/webkit/WebViewClient#shouldOverrideUrlLoading(android.webkit.WebView,%20android.webkit.WebResourceRequest)
+ .map(|f| !(f.handler)(url))
+ .unwrap_or(false)
+ }
+ Err(e) => {
+ #[cfg(feature = "tracing")]
+ tracing::warn!("Failed to parse JString: {}", e);
+ false
+ }
+ }
+ .into()
+}
+
+#[allow(non_snake_case)]
+pub unsafe fn onEval(mut env: JNIEnv, _: JClass, id: jint, result: JString) {
+ match env.get_string(&result) {
+ Ok(result) => {
+ if let Some(cb) = EVAL_CALLBACKS
+ .get_or_init(Default::default)
+ .lock()
+ .unwrap()
+ .get(&id)
+ {
+ cb(result.into());
+ }
+ }
+ Err(e) => {
+ #[cfg(feature = "tracing")]
+ tracing::warn!("Failed to parse JString: {}", e);
+ }
+ }
+}
+
+pub unsafe fn ipc(mut env: JNIEnv, _: JClass, url: JString, body: JString) {
+ match (env.get_string(&url), env.get_string(&body)) {
+ (Ok(url), Ok(body)) => {
+ #[cfg(feature = "tracing")]
+ let _span = tracing::info_span!(parent: None, "wry::ipc::handle").entered();
+
+ let url = url.to_string_lossy().to_string();
+ let body = body.to_string_lossy().to_string();
+ if let Some(ipc) = IPC.borrow().as_ref() {
+ (ipc.handler)(Request::builder().uri(url).body(body).unwrap())
+ }
+ }
+ (Err(e), _) | (_, Err(e)) => {
+ #[cfg(feature = "tracing")]
+ tracing::warn!("Failed to parse JString: {}", e)
+ }
+ }
+}
+
+#[allow(non_snake_case)]
+pub unsafe fn handleReceivedTitle(mut env: JNIEnv, _: JClass, _webview: JObject, title: JString) {
+ match env.get_string(&title) {
+ Ok(title) => {
+ let title = title.to_string_lossy().to_string();
+ if let Some(title_handler) = TITLE_CHANGE_HANDLER.borrow().as_ref() {
+ (title_handler.handler)(title)
+ }
+ }
+ Err(e) => {
+ #[cfg(feature = "tracing")]
+ tracing::warn!("Failed to parse JString: {}", e)
+ }
+ }
+}
+
+#[allow(non_snake_case)]
+pub unsafe fn withAssetLoader(_: JNIEnv, _: JClass) -> jboolean {
+ (*WITH_ASSET_LOADER.borrow().as_ref().unwrap_or(&false)).into()
+}
+
+#[allow(non_snake_case)]
+pub unsafe fn assetLoaderDomain(env: JNIEnv, _: JClass) -> jstring {
+ if let Some(domain) = ASSET_LOADER_DOMAIN.borrow().as_ref() {
+ env.new_string(domain).unwrap().as_raw()
+ } else {
+ env.new_string("wry.assets").unwrap().as_raw()
+ }
+}
+
+#[allow(non_snake_case)]
+pub unsafe fn onPageLoading(mut env: JNIEnv, _: JClass, url: JString) {
+ match env.get_string(&url) {
+ Ok(url) => {
+ let url = url.to_string_lossy().to_string();
+ if let Some(on_load) = ON_LOAD_HANDLER.borrow().as_ref() {
+ (on_load.handler)(PageLoadEvent::Started, url)
+ }
+ }
+ Err(e) => {
+ #[cfg(feature = "tracing")]
+ tracing::warn!("Failed to parse JString: {}", e)
+ }
+ }
+}
+
+#[allow(non_snake_case)]
+pub unsafe fn onPageLoaded(mut env: JNIEnv, _: JClass, url: JString) {
+ match env.get_string(&url) {
+ Ok(url) => {
+ let url = url.to_string_lossy().to_string();
+ if let Some(on_load) = ON_LOAD_HANDLER.borrow().as_ref() {
+ (on_load.handler)(PageLoadEvent::Finished, url)
+ }
+ }
+ Err(e) => {
+ #[cfg(feature = "tracing")]
+ tracing::warn!("Failed to parse JString: {}", e)
+ }
+ }
+}
diff --git a/vendor/wry/src/android/kotlin/Ipc.kt b/vendor/wry/src/android/kotlin/Ipc.kt
new file mode 100644
index 0000000..e8f8761
--- /dev/null
+++ b/vendor/wry/src/android/kotlin/Ipc.kt
@@ -0,0 +1,31 @@
+// Copyright 2020-2023 Tauri Programme within The Commons Conservancy
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-License-Identifier: MIT
+
+@file:Suppress("unused")
+
+package {{package}}
+
+import android.webkit.*
+
+class Ipc(val webViewClient: RustWebViewClient) {
+ @JavascriptInterface
+ fun postMessage(message: String?) {
+ message?.let {m ->
+ // we're not using WebView::getUrl() here because it needs to be executed on the main thread
+ // and it would slow down the Ipc
+ // so instead we track the current URL on the webview client
+ this.ipc(webViewClient.currentUrl, m)
+ }
+ }
+
+ companion object {
+ init {
+ System.loadLibrary("{{library}}")
+ }
+ }
+
+ private external fun ipc(url: String, message: String)
+
+ {{class-extension}}
+}
diff --git a/vendor/wry/src/android/kotlin/Logger.kt b/vendor/wry/src/android/kotlin/Logger.kt
new file mode 100644
index 0000000..3666ad2
--- /dev/null
+++ b/vendor/wry/src/android/kotlin/Logger.kt
@@ -0,0 +1,87 @@
+// Copyright 2020-2023 Tauri Programme within The Commons Conservancy
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-License-Identifier: MIT
+
+@file:Suppress("unused", "MemberVisibilityCanBePrivate")
+
+package {{package}}
+
+// taken from https://github.com/ionic-team/capacitor/blob/6658bca41e78239347e458175b14ca8bd5c1d6e8/android/capacitor/src/main/java/com/getcapacitor/Logger.java
+
+import android.text.TextUtils
+import android.util.Log
+
+class Logger {
+ companion object {
+ private const val LOG_TAG_CORE = "Tauri"
+
+ fun tags(vararg subtags: String): String {
+ return if (subtags.isNotEmpty()) {
+ LOG_TAG_CORE + "/" + TextUtils.join("/", subtags)
+ } else LOG_TAG_CORE
+ }
+
+ fun verbose(message: String) {
+ verbose(LOG_TAG_CORE, message)
+ }
+
+ private fun verbose(tag: String, message: String) {
+ if (!shouldLog()) {
+ return
+ }
+ Log.v(tag, message)
+ }
+
+ fun debug(message: String) {
+ debug(LOG_TAG_CORE, message)
+ }
+
+ fun debug(tag: String, message: String) {
+ if (!shouldLog()) {
+ return
+ }
+ Log.d(tag, message)
+ }
+
+ fun info(message: String) {
+ info(LOG_TAG_CORE, message)
+ }
+
+ fun info(tag: String, message: String) {
+ if (!shouldLog()) {
+ return
+ }
+ Log.i(tag, message)
+ }
+
+ fun warn(message: String) {
+ warn(LOG_TAG_CORE, message)
+ }
+
+ fun warn(tag: String, message: String) {
+ if (!shouldLog()) {
+ return
+ }
+ Log.w(tag, message)
+ }
+
+ fun error(message: String) {
+ error(LOG_TAG_CORE, message, null)
+ }
+
+ fun error(message: String, e: Throwable?) {
+ error(LOG_TAG_CORE, message, e)
+ }
+
+ fun error(tag: String, message: String, e: Throwable?) {
+ if (!shouldLog()) {
+ return
+ }
+ Log.e(tag, message, e)
+ }
+
+ private fun shouldLog(): Boolean {
+ return BuildConfig.DEBUG
+ }
+ }
+}
diff --git a/vendor/wry/src/android/kotlin/PermissionHelper.kt b/vendor/wry/src/android/kotlin/PermissionHelper.kt
new file mode 100644
index 0000000..b2471e5
--- /dev/null
+++ b/vendor/wry/src/android/kotlin/PermissionHelper.kt
@@ -0,0 +1,115 @@
+// Copyright 2020-2023 Tauri Programme within The Commons Conservancy
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-License-Identifier: MIT
+
+package {{package}}
+
+// taken from https://github.com/ionic-team/capacitor/blob/6658bca41e78239347e458175b14ca8bd5c1d6e8/android/capacitor/src/main/java/com/getcapacitor/PermissionHelper.java
+
+import android.content.Context
+import android.content.pm.PackageManager
+import android.os.Build
+import androidx.core.app.ActivityCompat
+import java.util.ArrayList
+
+object PermissionHelper {
+ /**
+ * Checks if a list of given permissions are all granted by the user
+ *
+ * @param permissions Permissions to check.
+ * @return True if all permissions are granted, false if at least one is not.
+ */
+ fun hasPermissions(context: Context?, permissions: Array): Boolean {
+ for (perm in permissions) {
+ if (ActivityCompat.checkSelfPermission(
+ context!!,
+ perm
+ ) != PackageManager.PERMISSION_GRANTED
+ ) {
+ return false
+ }
+ }
+ return true
+ }
+
+ /**
+ * Check whether the given permission has been defined in the AndroidManifest.xml
+ *
+ * @param permission A permission to check.
+ * @return True if the permission has been defined in the Manifest, false if not.
+ */
+ fun hasDefinedPermission(context: Context, permission: String): Boolean {
+ var hasPermission = false
+ val requestedPermissions = getManifestPermissions(context)
+ if (!requestedPermissions.isNullOrEmpty()) {
+ val requestedPermissionsList = listOf(*requestedPermissions)
+ val requestedPermissionsArrayList = ArrayList(requestedPermissionsList)
+ if (requestedPermissionsArrayList.contains(permission)) {
+ hasPermission = true
+ }
+ }
+ return hasPermission
+ }
+
+ /**
+ * Check whether all of the given permissions have been defined in the AndroidManifest.xml
+ * @param context the app context
+ * @param permissions a list of permissions
+ * @return true only if all permissions are defined in the AndroidManifest.xml
+ */
+ fun hasDefinedPermissions(context: Context, permissions: Array): Boolean {
+ for (permission in permissions) {
+ if (!hasDefinedPermission(context, permission)) {
+ return false
+ }
+ }
+ return true
+ }
+
+ /**
+ * Get the permissions defined in AndroidManifest.xml
+ *
+ * @return The permissions defined in AndroidManifest.xml
+ */
+ private fun getManifestPermissions(context: Context): Array? {
+ var requestedPermissions: Array? = null
+ try {
+ val pm = context.packageManager
+ val packageInfo = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
+ pm.getPackageInfo(context.packageName, PackageManager.PackageInfoFlags.of(PackageManager.GET_PERMISSIONS.toLong()))
+ } else {
+ @Suppress("DEPRECATION")
+ pm.getPackageInfo(context.packageName, PackageManager.GET_PERMISSIONS)
+ }
+ if (packageInfo != null) {
+ requestedPermissions = packageInfo.requestedPermissions
+ }
+ } catch (_: Exception) {
+ }
+ return requestedPermissions
+ }
+
+ /**
+ * Given a list of permissions, return a new list with the ones not present in AndroidManifest.xml
+ *
+ * @param neededPermissions The permissions needed.
+ * @return The permissions not present in AndroidManifest.xml
+ */
+ fun getUndefinedPermissions(context: Context, neededPermissions: Array): Array {
+ val undefinedPermissions = ArrayList()
+ val requestedPermissions = getManifestPermissions(context)
+ if (!requestedPermissions.isNullOrEmpty()) {
+ val requestedPermissionsList = listOf(*requestedPermissions)
+ val requestedPermissionsArrayList = ArrayList(requestedPermissionsList)
+ for (permission in neededPermissions) {
+ if (!requestedPermissionsArrayList.contains(permission)) {
+ undefinedPermissions.add(permission)
+ }
+ }
+ var undefinedPermissionArray = arrayOfNulls(undefinedPermissions.size)
+ undefinedPermissionArray = undefinedPermissions.toArray(undefinedPermissionArray)
+ return undefinedPermissionArray
+ }
+ return neededPermissions
+ }
+}
diff --git a/vendor/wry/src/android/kotlin/RustWebChromeClient.kt b/vendor/wry/src/android/kotlin/RustWebChromeClient.kt
new file mode 100644
index 0000000..b891926
--- /dev/null
+++ b/vendor/wry/src/android/kotlin/RustWebChromeClient.kt
@@ -0,0 +1,493 @@
+// Copyright 2020-2023 Tauri Programme within The Commons Conservancy
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-License-Identifier: MIT
+
+@file:Suppress("ObsoleteSdkInt", "RedundantOverride", "QueryPermissionsNeeded", "SimpleDateFormat")
+
+package {{package}}
+
+// taken from https://github.com/ionic-team/capacitor/blob/6658bca41e78239347e458175b14ca8bd5c1d6e8/android/capacitor/src/main/java/com/getcapacitor/BridgeWebChromeClient.java
+
+import android.Manifest
+import android.app.Activity
+import android.app.AlertDialog
+import android.content.ActivityNotFoundException
+import android.content.DialogInterface
+import android.content.Intent
+import android.net.Uri
+import android.os.Build
+import android.os.Environment
+import android.provider.MediaStore
+import android.view.View
+import android.webkit.*
+import android.widget.EditText
+import androidx.activity.result.ActivityResult
+import androidx.activity.result.ActivityResultCallback
+import androidx.activity.result.ActivityResultLauncher
+import androidx.activity.result.contract.ActivityResultContracts
+import androidx.core.content.FileProvider
+import java.io.File
+import java.io.IOException
+import java.text.SimpleDateFormat
+import java.util.*
+
+class RustWebChromeClient(appActivity: WryActivity) : WebChromeClient() {
+ private interface PermissionListener {
+ fun onPermissionSelect(isGranted: Boolean?)
+ }
+
+ private interface ActivityResultListener {
+ fun onActivityResult(result: ActivityResult?)
+ }
+
+ private val activity: WryActivity
+ private var permissionLauncher: ActivityResultLauncher>
+ private var activityLauncher: ActivityResultLauncher
+ private var permissionListener: PermissionListener? = null
+ private var activityListener: ActivityResultListener? = null
+
+ init {
+ activity = appActivity
+ val permissionCallback =
+ ActivityResultCallback { isGranted: Map ->
+ if (permissionListener != null) {
+ var granted = true
+ for ((_, value) in isGranted) {
+ if (!value) granted = false
+ }
+ permissionListener!!.onPermissionSelect(granted)
+ }
+ }
+ permissionLauncher =
+ activity.registerForActivityResult(ActivityResultContracts.RequestMultiplePermissions(), permissionCallback)
+ activityLauncher = activity.registerForActivityResult(
+ ActivityResultContracts.StartActivityForResult()
+ ) { result ->
+ if (activityListener != null) {
+ activityListener!!.onActivityResult(result)
+ }
+ }
+ }
+
+ /**
+ * Render web content in `view`.
+ *
+ * Both this method and [.onHideCustomView] are required for
+ * rendering web content in full screen.
+ *
+ * @see [](https://developer.android.com/reference/android/webkit/WebChromeClient.onShowCustomView
+ ) */
+ override fun onShowCustomView(view: View, callback: CustomViewCallback) {
+ callback.onCustomViewHidden()
+ super.onShowCustomView(view, callback)
+ }
+
+ /**
+ * Render web content in the original Web View again.
+ *
+ * Do not remove this method--@see #onShowCustomView(View, CustomViewCallback).
+ */
+ override fun onHideCustomView() {
+ super.onHideCustomView()
+ }
+
+ override fun onPermissionRequest(request: PermissionRequest) {
+ val isRequestPermissionRequired = Build.VERSION.SDK_INT >= Build.VERSION_CODES.M
+ val permissionList: MutableList = ArrayList()
+ if (listOf(*request.resources).contains("android.webkit.resource.VIDEO_CAPTURE")) {
+ permissionList.add(Manifest.permission.CAMERA)
+ }
+ if (listOf(*request.resources).contains("android.webkit.resource.AUDIO_CAPTURE")) {
+ permissionList.add(Manifest.permission.MODIFY_AUDIO_SETTINGS)
+ permissionList.add(Manifest.permission.RECORD_AUDIO)
+ }
+ if (permissionList.isNotEmpty() && isRequestPermissionRequired) {
+ val permissions = permissionList.toTypedArray()
+ permissionListener = object : PermissionListener {
+ override fun onPermissionSelect(isGranted: Boolean?) {
+ if (isGranted == true) {
+ request.grant(request.resources)
+ } else {
+ request.deny()
+ }
+ }
+ }
+ permissionLauncher.launch(permissions)
+ } else {
+ request.grant(request.resources)
+ }
+ }
+
+ /**
+ * Show the browser alert modal
+ * @param view
+ * @param url
+ * @param message
+ * @param result
+ * @return
+ */
+ override fun onJsAlert(view: WebView, url: String, message: String, result: JsResult): Boolean {
+ if (activity.isFinishing) {
+ return true
+ }
+ val builder = AlertDialog.Builder(view.context)
+ builder
+ .setMessage(message)
+ .setPositiveButton(
+ "OK"
+ ) { dialog: DialogInterface, _: Int ->
+ dialog.dismiss()
+ result.confirm()
+ }
+ .setOnCancelListener { dialog: DialogInterface ->
+ dialog.dismiss()
+ result.cancel()
+ }
+ val dialog = builder.create()
+ dialog.show()
+ return true
+ }
+
+ /**
+ * Show the browser confirm modal
+ * @param view
+ * @param url
+ * @param message
+ * @param result
+ * @return
+ */
+ override fun onJsConfirm(view: WebView, url: String, message: String, result: JsResult): Boolean {
+ if (activity.isFinishing) {
+ return true
+ }
+ val builder = AlertDialog.Builder(view.context)
+ builder
+ .setMessage(message)
+ .setPositiveButton(
+ "OK"
+ ) { dialog: DialogInterface, _: Int ->
+ dialog.dismiss()
+ result.confirm()
+ }
+ .setNegativeButton(
+ "Cancel"
+ ) { dialog: DialogInterface, _: Int ->
+ dialog.dismiss()
+ result.cancel()
+ }
+ .setOnCancelListener { dialog: DialogInterface ->
+ dialog.dismiss()
+ result.cancel()
+ }
+ val dialog = builder.create()
+ dialog.show()
+ return true
+ }
+
+ /**
+ * Show the browser prompt modal
+ * @param view
+ * @param url
+ * @param message
+ * @param defaultValue
+ * @param result
+ * @return
+ */
+ override fun onJsPrompt(
+ view: WebView,
+ url: String,
+ message: String,
+ defaultValue: String,
+ result: JsPromptResult
+ ): Boolean {
+ if (activity.isFinishing) {
+ return true
+ }
+ val builder = AlertDialog.Builder(view.context)
+ val input = EditText(view.context)
+ builder
+ .setMessage(message)
+ .setView(input)
+ .setPositiveButton(
+ "OK"
+ ) { dialog: DialogInterface, _: Int ->
+ dialog.dismiss()
+ val inputText1 = input.text.toString().trim { it <= ' ' }
+ result.confirm(inputText1)
+ }
+ .setNegativeButton(
+ "Cancel"
+ ) { dialog: DialogInterface, _: Int ->
+ dialog.dismiss()
+ result.cancel()
+ }
+ .setOnCancelListener { dialog: DialogInterface ->
+ dialog.dismiss()
+ result.cancel()
+ }
+ val dialog = builder.create()
+ dialog.show()
+ return true
+ }
+
+ /**
+ * Handle the browser geolocation permission prompt
+ * @param origin
+ * @param callback
+ */
+ override fun onGeolocationPermissionsShowPrompt(
+ origin: String,
+ callback: GeolocationPermissions.Callback
+ ) {
+ super.onGeolocationPermissionsShowPrompt(origin, callback)
+ Logger.debug("onGeolocationPermissionsShowPrompt: DOING IT HERE FOR ORIGIN: $origin")
+ val geoPermissions =
+ arrayOf(Manifest.permission.ACCESS_COARSE_LOCATION, Manifest.permission.ACCESS_FINE_LOCATION)
+ if (!PermissionHelper.hasPermissions(activity, geoPermissions)) {
+ permissionListener = object : PermissionListener {
+ override fun onPermissionSelect(isGranted: Boolean?) {
+ if (isGranted == true) {
+ callback.invoke(origin, true, false)
+ } else {
+ val coarsePermission =
+ arrayOf(Manifest.permission.ACCESS_COARSE_LOCATION)
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S &&
+ PermissionHelper.hasPermissions(activity, coarsePermission)
+ ) {
+ callback.invoke(origin, true, false)
+ } else {
+ callback.invoke(origin, false, false)
+ }
+ }
+ }
+ }
+ permissionLauncher.launch(geoPermissions)
+ } else {
+ // permission is already granted
+ callback.invoke(origin, true, false)
+ Logger.debug("onGeolocationPermissionsShowPrompt: has required permission")
+ }
+ }
+
+ override fun onShowFileChooser(
+ webView: WebView,
+ filePathCallback: ValueCallback?>,
+ fileChooserParams: FileChooserParams
+ ): Boolean {
+ val acceptTypes = listOf(*fileChooserParams.acceptTypes)
+ val captureEnabled = fileChooserParams.isCaptureEnabled
+ val capturePhoto = captureEnabled && acceptTypes.contains("image/*")
+ val captureVideo = captureEnabled && acceptTypes.contains("video/*")
+ if (capturePhoto || captureVideo) {
+ if (isMediaCaptureSupported) {
+ showMediaCaptureOrFilePicker(filePathCallback, fileChooserParams, captureVideo)
+ } else {
+ permissionListener = object : PermissionListener {
+ override fun onPermissionSelect(isGranted: Boolean?) {
+ if (isGranted == true) {
+ showMediaCaptureOrFilePicker(filePathCallback, fileChooserParams, captureVideo)
+ } else {
+ Logger.warn(Logger.tags("FileChooser"), "Camera permission not granted")
+ filePathCallback.onReceiveValue(null)
+ }
+ }
+ }
+ val camPermission = arrayOf(Manifest.permission.CAMERA)
+ permissionLauncher.launch(camPermission)
+ }
+ } else {
+ showFilePicker(filePathCallback, fileChooserParams)
+ }
+ return true
+ }
+
+ private val isMediaCaptureSupported: Boolean
+ get() {
+ val permissions = arrayOf(Manifest.permission.CAMERA)
+ return PermissionHelper.hasPermissions(activity, permissions) ||
+ !PermissionHelper.hasDefinedPermission(activity, Manifest.permission.CAMERA)
+ }
+
+ private fun showMediaCaptureOrFilePicker(
+ filePathCallback: ValueCallback?>,
+ fileChooserParams: FileChooserParams,
+ isVideo: Boolean
+ ) {
+ val isVideoCaptureSupported = true
+ val shown = if (isVideo && isVideoCaptureSupported) {
+ showVideoCapturePicker(filePathCallback)
+ } else {
+ showImageCapturePicker(filePathCallback)
+ }
+ if (!shown) {
+ Logger.warn(
+ Logger.tags("FileChooser"),
+ "Media capture intent could not be launched. Falling back to default file picker."
+ )
+ showFilePicker(filePathCallback, fileChooserParams)
+ }
+ }
+
+ private fun showImageCapturePicker(filePathCallback: ValueCallback?>): Boolean {
+ val takePictureIntent = Intent(MediaStore.ACTION_IMAGE_CAPTURE)
+ if (takePictureIntent.resolveActivity(activity.packageManager) == null) {
+ return false
+ }
+ val imageFileUri: Uri = try {
+ createImageFileUri()
+ } catch (ex: Exception) {
+ Logger.error("Unable to create temporary media capture file: " + ex.message)
+ return false
+ }
+ takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, imageFileUri)
+ activityListener = object : ActivityResultListener {
+ override fun onActivityResult(result: ActivityResult?) {
+ var res: Array? = null
+ if (result?.resultCode == Activity.RESULT_OK) {
+ res = arrayOf(imageFileUri)
+ }
+ filePathCallback.onReceiveValue(res)
+ }
+ }
+ activityLauncher.launch(takePictureIntent)
+ return true
+ }
+
+ private fun showVideoCapturePicker(filePathCallback: ValueCallback?>): Boolean {
+ val takeVideoIntent = Intent(MediaStore.ACTION_VIDEO_CAPTURE)
+ if (takeVideoIntent.resolveActivity(activity.packageManager) == null) {
+ return false
+ }
+ activityListener = object : ActivityResultListener {
+ override fun onActivityResult(result: ActivityResult?) {
+ var res: Array? = null
+ if (result?.resultCode == Activity.RESULT_OK) {
+ res = arrayOf(result.data!!.data)
+ }
+ filePathCallback.onReceiveValue(res)
+ }
+ }
+ activityLauncher.launch(takeVideoIntent)
+ return true
+ }
+
+ private fun showFilePicker(
+ filePathCallback: ValueCallback?>,
+ fileChooserParams: FileChooserParams
+ ) {
+ val intent = fileChooserParams.createIntent()
+ if (fileChooserParams.mode == FileChooserParams.MODE_OPEN_MULTIPLE) {
+ intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true)
+ }
+ if (fileChooserParams.acceptTypes.size > 1 || intent.type!!.startsWith(".")) {
+ val validTypes = getValidTypes(fileChooserParams.acceptTypes)
+ intent.putExtra(Intent.EXTRA_MIME_TYPES, validTypes)
+ if (intent.type!!.startsWith(".")) {
+ intent.type = validTypes[0]
+ }
+ }
+ try {
+ activityListener = object : ActivityResultListener {
+ override fun onActivityResult(result: ActivityResult?) {
+ val res: Array?
+ val resultIntent = result?.data
+ if (result?.resultCode == Activity.RESULT_OK && resultIntent!!.clipData != null) {
+ val numFiles = resultIntent.clipData!!.itemCount
+ res = arrayOfNulls(numFiles)
+ for (i in 0 until numFiles) {
+ res[i] = resultIntent.clipData!!.getItemAt(i).uri
+ }
+ } else {
+ res = FileChooserParams.parseResult(
+ result?.resultCode ?: 0,
+ resultIntent
+ )
+ }
+ filePathCallback.onReceiveValue(res)
+ }
+ }
+ activityLauncher.launch(intent)
+ } catch (e: ActivityNotFoundException) {
+ filePathCallback.onReceiveValue(null)
+ }
+ }
+
+ private fun getValidTypes(currentTypes: Array): Array {
+ val validTypes: MutableList = ArrayList()
+ val mtm = MimeTypeMap.getSingleton()
+ for (mime in currentTypes) {
+ if (mime.startsWith(".")) {
+ val extension = mime.substring(1)
+ val extensionMime = mtm.getMimeTypeFromExtension(extension)
+ if (extensionMime != null && !validTypes.contains(extensionMime)) {
+ validTypes.add(extensionMime)
+ }
+ } else if (!validTypes.contains(mime)) {
+ validTypes.add(mime)
+ }
+ }
+ val validObj: Array = validTypes.toTypedArray()
+ return Arrays.copyOf(
+ validObj, validObj.size,
+ Array::class.java
+ )
+ }
+
+ override fun onConsoleMessage(consoleMessage: ConsoleMessage): Boolean {
+ val tag: String = Logger.tags("Console")
+ if (consoleMessage.message() != null && isValidMsg(consoleMessage.message())) {
+ val msg = String.format(
+ "File: %s - Line %d - Msg: %s",
+ consoleMessage.sourceId(),
+ consoleMessage.lineNumber(),
+ consoleMessage.message()
+ )
+ val level = consoleMessage.messageLevel().name
+ if ("ERROR".equals(level, ignoreCase = true)) {
+ Logger.error(tag, msg, null)
+ } else if ("WARNING".equals(level, ignoreCase = true)) {
+ Logger.warn(tag, msg)
+ } else if ("TIP".equals(level, ignoreCase = true)) {
+ Logger.debug(tag, msg)
+ } else {
+ Logger.info(tag, msg)
+ }
+ }
+ return true
+ }
+
+ private fun isValidMsg(msg: String): Boolean {
+ return !(msg.contains("%cresult %c") ||
+ msg.contains("%cnative %c") ||
+ msg.equals("[object Object]", ignoreCase = true) ||
+ msg.equals("console.groupEnd", ignoreCase = true))
+ }
+
+ @Throws(IOException::class)
+ private fun createImageFileUri(): Uri {
+ val photoFile = createImageFile(activity)
+ return FileProvider.getUriForFile(
+ activity,
+ activity.packageName.toString() + ".fileprovider",
+ photoFile
+ )
+ }
+
+ @Throws(IOException::class)
+ private fun createImageFile(activity: Activity): File {
+ // Create an image file name
+ val timeStamp = SimpleDateFormat("yyyyMMdd_HHmmss").format(Date())
+ val imageFileName = "JPEG_" + timeStamp + "_"
+ val storageDir = activity.getExternalFilesDir(Environment.DIRECTORY_PICTURES)
+ return File.createTempFile(imageFileName, ".jpg", storageDir)
+ }
+
+ override fun onReceivedTitle(
+ view: WebView,
+ title: String
+ ) {
+ handleReceivedTitle(view, title)
+ }
+
+ private external fun handleReceivedTitle(webview: WebView, title: String)
+}
diff --git a/vendor/wry/src/android/kotlin/RustWebView.kt b/vendor/wry/src/android/kotlin/RustWebView.kt
new file mode 100644
index 0000000..cb7b001
--- /dev/null
+++ b/vendor/wry/src/android/kotlin/RustWebView.kt
@@ -0,0 +1,109 @@
+// Copyright 2020-2023 Tauri Programme within The Commons Conservancy
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-License-Identifier: MIT
+
+@file:Suppress("unused", "SetJavaScriptEnabled")
+
+package {{package}}
+
+import android.annotation.SuppressLint
+import android.webkit.*
+import android.content.Context
+import androidx.webkit.WebViewCompat
+import androidx.webkit.WebViewFeature
+import kotlin.collections.Map
+
+@SuppressLint("RestrictedApi")
+class RustWebView(context: Context, val initScripts: Array, val id: String): WebView(context) {
+ val isDocumentStartScriptEnabled: Boolean
+
+ init {
+ settings.javaScriptEnabled = true
+ settings.domStorageEnabled = true
+ settings.setGeolocationEnabled(true)
+ settings.databaseEnabled = true
+ settings.mediaPlaybackRequiresUserGesture = false
+ settings.javaScriptCanOpenWindowsAutomatically = true
+
+ if (WebViewFeature.isFeatureSupported(WebViewFeature.DOCUMENT_START_SCRIPT)) {
+ isDocumentStartScriptEnabled = true
+ for (script in initScripts) {
+ WebViewCompat.addDocumentStartJavaScript(this, script, setOf("*"));
+ }
+ } else {
+ isDocumentStartScriptEnabled = false
+ }
+
+ {{class-init}}
+ }
+
+ fun loadUrlMainThread(url: String) {
+ post {
+ loadUrl(url)
+ }
+ }
+
+ fun loadUrlMainThread(url: String, additionalHttpHeaders: Map) {
+ post {
+ loadUrl(url, additionalHttpHeaders)
+ }
+ }
+
+ override fun loadUrl(url: String) {
+ if (!shouldOverride(url)) {
+ super.loadUrl(url);
+ }
+ }
+
+ override fun loadUrl(url: String, additionalHttpHeaders: Map) {
+ if (!shouldOverride(url)) {
+ super.loadUrl(url, additionalHttpHeaders);
+ }
+ }
+
+ fun loadHTMLMainThread(html: String) {
+ post {
+ super.loadData(html, "text/html", null)
+ }
+ }
+
+ fun evalScript(id: Int, script: String) {
+ post {
+ super.evaluateJavascript(script) { result ->
+ onEval(id, result)
+ }
+ }
+ }
+
+ fun clearAllBrowsingData() {
+ try {
+ super.getContext().deleteDatabase("webviewCache.db")
+ super.getContext().deleteDatabase("webview.db")
+ super.clearCache(true)
+ super.clearHistory()
+ super.clearFormData()
+ } catch (ex: Exception) {
+ Logger.error("Unable to create temporary media capture file: " + ex.message)
+ }
+ }
+
+ fun setAutoPlay(enable: Boolean) {
+ val settings = super.getSettings()
+ settings.mediaPlaybackRequiresUserGesture = !enable
+ }
+
+ fun setUserAgent(ua: String) {
+ val settings = super.getSettings()
+ settings.userAgentString = ua
+ }
+
+ fun getCookies(url: String): String {
+ val cookieManager = CookieManager.getInstance()
+ return cookieManager.getCookie(url)
+ }
+
+ private external fun shouldOverride(url: String): Boolean
+ private external fun onEval(id: Int, result: String)
+
+ {{class-extension}}
+}
diff --git a/vendor/wry/src/android/kotlin/RustWebViewClient.kt b/vendor/wry/src/android/kotlin/RustWebViewClient.kt
new file mode 100644
index 0000000..343ad14
--- /dev/null
+++ b/vendor/wry/src/android/kotlin/RustWebViewClient.kt
@@ -0,0 +1,105 @@
+// Copyright 2020-2023 Tauri Programme within The Commons Conservancy
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-License-Identifier: MIT
+
+package {{package}}
+
+import android.net.Uri
+import android.webkit.*
+import android.content.Context
+import android.graphics.Bitmap
+import android.os.Handler
+import android.os.Looper
+import androidx.webkit.WebViewAssetLoader
+
+class RustWebViewClient(context: Context): WebViewClient() {
+ private val interceptedState = mutableMapOf()
+ var currentUrl: String = "about:blank"
+ private var lastInterceptedUrl: Uri? = null
+ private var pendingUrlRedirect: String? = null
+
+ private val assetLoader = WebViewAssetLoader.Builder()
+ .setDomain(assetLoaderDomain())
+ .addPathHandler("/", WebViewAssetLoader.AssetsPathHandler(context))
+ .build()
+
+ override fun shouldInterceptRequest(
+ view: WebView,
+ request: WebResourceRequest
+ ): WebResourceResponse? {
+ pendingUrlRedirect?.let {
+ Handler(Looper.getMainLooper()).post {
+ view.loadUrl(it)
+ }
+ pendingUrlRedirect = null
+ return null
+ }
+
+ lastInterceptedUrl = request.url
+ return if (withAssetLoader()) {
+ assetLoader.shouldInterceptRequest(request.url)
+ } else {
+ val rustWebview = view as RustWebView;
+ val response = handleRequest(rustWebview.id, request, rustWebview.isDocumentStartScriptEnabled)
+ interceptedState[request.url.toString()] = response != null
+ return response
+ }
+ }
+
+ override fun shouldOverrideUrlLoading(
+ view: WebView,
+ request: WebResourceRequest
+ ): Boolean {
+ return shouldOverride(request.url.toString())
+ }
+
+ override fun onPageStarted(view: WebView, url: String, favicon: Bitmap?) {
+ currentUrl = url
+ if (interceptedState[url] == false) {
+ val webView = view as RustWebView
+ for (script in webView.initScripts) {
+ view.evaluateJavascript(script, null)
+ }
+ }
+ return onPageLoading(url)
+ }
+
+ override fun onPageFinished(view: WebView, url: String) {
+ onPageLoaded(url)
+ }
+
+ override fun onReceivedError(
+ view: WebView,
+ request: WebResourceRequest,
+ error: WebResourceError
+ ) {
+ // we get a net::ERR_CONNECTION_REFUSED when an external URL redirects to a custom protocol
+ // e.g. oauth flow, because shouldInterceptRequest is not called on redirects
+ // so we must force retry here with loadUrl() to get a chance of the custom protocol to kick in
+ if (error.errorCode == ERROR_CONNECT && request.isForMainFrame && request.url != lastInterceptedUrl) {
+ // prevent the default error page from showing
+ view.stopLoading()
+ // without this initial loadUrl the app is stuck
+ view.loadUrl(request.url.toString())
+ // ensure the URL is actually loaded - for some reason there's a race condition and we need to call loadUrl() again later
+ pendingUrlRedirect = request.url.toString()
+ } else {
+ super.onReceivedError(view, request, error)
+ }
+ }
+
+ companion object {
+ init {
+ System.loadLibrary("{{library}}")
+ }
+ }
+
+ private external fun assetLoaderDomain(): String
+ private external fun withAssetLoader(): Boolean
+ private external fun handleRequest(webviewId: String, request: WebResourceRequest, isDocumentStartScriptEnabled: Boolean): WebResourceResponse?
+ private external fun shouldOverride(url: String): Boolean
+ private external fun onPageLoading(url: String)
+ private external fun onPageLoaded(url: String)
+
+ {{class-extension}}
+}
diff --git a/vendor/wry/src/android/kotlin/WryActivity.kt b/vendor/wry/src/android/kotlin/WryActivity.kt
new file mode 100644
index 0000000..3b30135
--- /dev/null
+++ b/vendor/wry/src/android/kotlin/WryActivity.kt
@@ -0,0 +1,134 @@
+// Copyright 2020-2023 Tauri Programme within The Commons Conservancy
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-License-Identifier: MIT
+
+package {{package}}
+
+import {{package}}.RustWebView
+import android.annotation.SuppressLint
+import android.os.Build
+import android.os.Bundle
+import android.webkit.WebView
+import android.view.KeyEvent
+import androidx.appcompat.app.AppCompatActivity
+
+abstract class WryActivity : AppCompatActivity() {
+ private lateinit var mWebView: RustWebView
+
+ open fun onWebViewCreate(webView: WebView) { }
+
+ fun setWebView(webView: RustWebView) {
+ mWebView = webView
+ onWebViewCreate(webView)
+ }
+
+ val version: String
+ @SuppressLint("WebViewApiAvailability", "ObsoleteSdkInt")
+ get() {
+ // Check getCurrentWebViewPackage() directly if above Android 8
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
+ return WebView.getCurrentWebViewPackage()?.versionName ?: ""
+ }
+
+ // Otherwise manually check WebView versions
+ var webViewPackage = "com.google.android.webview"
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
+ webViewPackage = "com.android.chrome"
+ }
+ try {
+ @Suppress("DEPRECATION")
+ val info = packageManager.getPackageInfo(webViewPackage, 0)
+ return info.versionName
+ } catch (ex: Exception) {
+ Logger.warn("Unable to get package info for '$webViewPackage'$ex")
+ }
+
+ try {
+ @Suppress("DEPRECATION")
+ val info = packageManager.getPackageInfo("com.android.webview", 0)
+ return info.versionName
+ } catch (ex: Exception) {
+ Logger.warn("Unable to get package info for 'com.android.webview'$ex")
+ }
+
+ // Could not detect any webview, return empty string
+ return ""
+ }
+
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+ create(this)
+ }
+
+ override fun onStart() {
+ super.onStart()
+ start()
+ }
+
+ override fun onResume() {
+ super.onResume()
+ resume()
+ }
+
+ override fun onPause() {
+ super.onPause()
+ pause()
+ }
+
+ override fun onStop() {
+ super.onStop()
+ stop()
+ }
+
+ override fun onWindowFocusChanged(hasFocus: Boolean) {
+ super.onWindowFocusChanged(hasFocus)
+ focus(hasFocus)
+ }
+
+ override fun onSaveInstanceState(outState: Bundle) {
+ super.onSaveInstanceState(outState)
+ save()
+ }
+
+ override fun onDestroy() {
+ super.onDestroy()
+ destroy()
+ onActivityDestroy()
+ }
+
+ override fun onLowMemory() {
+ super.onLowMemory()
+ memory()
+ }
+
+ override fun onKeyDown(keyCode: Int, event: KeyEvent?): Boolean {
+ if (keyCode == KeyEvent.KEYCODE_BACK && mWebView.canGoBack()) {
+ mWebView.goBack()
+ return true
+ }
+ return super.onKeyDown(keyCode, event)
+ }
+
+ fun getAppClass(name: String): Class<*> {
+ return Class.forName(name)
+ }
+
+ companion object {
+ init {
+ System.loadLibrary("{{library}}")
+ }
+ }
+
+ private external fun create(activity: WryActivity)
+ private external fun start()
+ private external fun resume()
+ private external fun pause()
+ private external fun stop()
+ private external fun save()
+ private external fun destroy()
+ private external fun onActivityDestroy()
+ private external fun memory()
+ private external fun focus(focus: Boolean)
+
+ {{class-extension}}
+}
diff --git a/vendor/wry/src/android/kotlin/proguard-wry.pro b/vendor/wry/src/android/kotlin/proguard-wry.pro
new file mode 100644
index 0000000..a84e450
--- /dev/null
+++ b/vendor/wry/src/android/kotlin/proguard-wry.pro
@@ -0,0 +1,35 @@
+# Copyright 2020-2023 Tauri Programme within The Commons Conservancy
+# SPDX-License-Identifier: Apache-2.0
+# SPDX-License-Identifier: MIT
+
+-keep class {{package-unescaped}}.* {
+ native ;
+}
+
+-keep class {{package-unescaped}}.WryActivity {
+ public (...);
+
+ void setWebView({{package-unescaped}}.RustWebView);
+ java.lang.Class getAppClass(...);
+ java.lang.String getVersion();
+}
+
+-keep class {{package-unescaped}}.Ipc {
+ public (...);
+
+ @android.webkit.JavascriptInterface public ;
+}
+
+-keep class {{package-unescaped}}.RustWebView {
+ public (...);
+
+ void loadUrlMainThread(...);
+ void loadHTMLMainThread(...);
+ void setAutoPlay(...);
+ void setUserAgent(...);
+ void evalScript(...);
+}
+
+-keep class {{package-unescaped}}.RustWebChromeClient,{{package-unescaped}}.RustWebViewClient {
+ public (...);
+}
\ No newline at end of file
diff --git a/vendor/wry/src/android/main_pipe.rs b/vendor/wry/src/android/main_pipe.rs
new file mode 100644
index 0000000..3b8e93d
--- /dev/null
+++ b/vendor/wry/src/android/main_pipe.rs
@@ -0,0 +1,447 @@
+// Copyright 2020-2023 Tauri Programme within The Commons Conservancy
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-License-Identifier: MIT
+
+use crate::{Error, RGBA};
+use crossbeam_channel::*;
+use jni::{
+ errors::Result as JniResult,
+ objects::{GlobalRef, JMap, JObject, JString},
+ JNIEnv,
+};
+use once_cell::sync::Lazy;
+use std::os::unix::prelude::*;
+
+use super::{find_class, EvalCallback, EVAL_CALLBACKS, EVAL_ID_GENERATOR, PACKAGE};
+
+static CHANNEL: Lazy<(Sender, Receiver)> = Lazy::new(|| bounded(8));
+pub static MAIN_PIPE: Lazy<[OwnedFd; 2]> = Lazy::new(|| {
+ let mut pipe: [RawFd; 2] = Default::default();
+ unsafe { libc::pipe(pipe.as_mut_ptr()) };
+ unsafe { pipe.map(|fd| OwnedFd::from_raw_fd(fd)) }
+});
+
+pub enum MainPipeState {
+ Alive,
+ Destroyed,
+}
+
+pub struct MainPipe<'a> {
+ pub env: JNIEnv<'a>,
+ pub activity: GlobalRef,
+ pub webview: Option,
+ pub webchrome_client: GlobalRef,
+}
+
+impl<'a> MainPipe<'a> {
+ pub(crate) fn send(message: WebViewMessage) {
+ let size = std::mem::size_of::();
+ if let Ok(()) = CHANNEL.0.send(message) {
+ unsafe {
+ libc::write(
+ MAIN_PIPE[1].as_raw_fd(),
+ &true as *const _ as *const _,
+ size,
+ )
+ };
+ }
+ }
+
+ pub fn recv(&mut self) -> JniResult {
+ let activity = self.activity.as_obj();
+ if let Ok(message) = CHANNEL.1.recv() {
+ match message {
+ WebViewMessage::CreateWebView(attrs) => {
+ let CreateWebViewAttributes {
+ url,
+ html,
+ #[cfg(any(debug_assertions, feature = "devtools"))]
+ devtools,
+ transparent,
+ background_color,
+ headers,
+ on_webview_created,
+ autoplay,
+ user_agent,
+ initialization_scripts,
+ id,
+ ..
+ } = attrs;
+
+ let string_class = self.env.find_class("java/lang/String")?;
+ let initialization_scripts_array = self.env.new_object_array(
+ initialization_scripts.len() as i32,
+ string_class,
+ self.env.new_string("")?,
+ )?;
+ for (i, script) in initialization_scripts.into_iter().enumerate() {
+ self.env.set_object_array_element(
+ &initialization_scripts_array,
+ i as i32,
+ self.env.new_string(script.0)?,
+ )?;
+ }
+
+ let id = self.env.new_string(id)?;
+
+ // Create webview
+ let rust_webview_class = find_class(
+ &mut self.env,
+ activity,
+ format!("{}/RustWebView", PACKAGE.get().unwrap()),
+ )?;
+ let webview = self.env.new_object(
+ &rust_webview_class,
+ "(Landroid/content/Context;[Ljava/lang/String;Ljava/lang/String;)V",
+ &[
+ activity.into(),
+ (&initialization_scripts_array).into(),
+ (&id).into(),
+ ],
+ )?;
+
+ // set media autoplay
+ self
+ .env
+ .call_method(&webview, "setAutoPlay", "(Z)V", &[autoplay.into()])?;
+
+ // set user-agent
+ if let Some(user_agent) = user_agent {
+ let user_agent = self.env.new_string(user_agent)?;
+ self.env.call_method(
+ &webview,
+ "setUserAgent",
+ "(Ljava/lang/String;)V",
+ &[(&user_agent).into()],
+ )?;
+ }
+
+ self.env.call_method(
+ activity,
+ "setWebView",
+ format!("(L{}/RustWebView;)V", PACKAGE.get().unwrap()),
+ &[(&webview).into()],
+ )?;
+
+ // Navigation
+ if let Some(u) = url {
+ if let Ok(url) = self.env.new_string(u) {
+ load_url(&mut self.env, &webview, &url, headers, true)?;
+ }
+ } else if let Some(h) = html {
+ if let Ok(html) = self.env.new_string(h) {
+ load_html(&mut self.env, &webview, &html)?;
+ }
+ }
+
+ // Enable devtools
+ #[cfg(any(debug_assertions, feature = "devtools"))]
+ self.env.call_static_method(
+ &rust_webview_class,
+ "setWebContentsDebuggingEnabled",
+ "(Z)V",
+ &[devtools.into()],
+ )?;
+
+ if transparent {
+ set_background_color(&mut self.env, &webview, (0, 0, 0, 0))?;
+ } else if let Some(color) = background_color {
+ set_background_color(&mut self.env, &webview, color)?;
+ }
+
+ // Create and set webview client
+ let client_class_name = format!("{}/RustWebViewClient", PACKAGE.get().unwrap());
+ let rust_webview_client_class =
+ find_class(&mut self.env, activity, client_class_name.clone())?;
+ let webview_client = self.env.new_object(
+ &rust_webview_client_class,
+ "(Landroid/content/Context;)V",
+ &[activity.into()],
+ )?;
+ self.env.call_method(
+ &webview,
+ "setWebViewClient",
+ "(Landroid/webkit/WebViewClient;)V",
+ &[(&webview_client).into()],
+ )?;
+
+ // set webchrome client
+ self.env.call_method(
+ &webview,
+ "setWebChromeClient",
+ "(Landroid/webkit/WebChromeClient;)V",
+ &[self.webchrome_client.as_obj().into()],
+ )?;
+
+ // Add javascript interface (IPC)
+ let ipc_class = find_class(
+ &mut self.env,
+ activity,
+ format!("{}/Ipc", PACKAGE.get().unwrap()),
+ )?;
+ let ipc = self.env.new_object(
+ ipc_class,
+ format!("(L{client_class_name};)V"),
+ &[(&webview_client).into()],
+ )?;
+ let ipc_str = self.env.new_string("ipc")?;
+ self.env.call_method(
+ &webview,
+ "addJavascriptInterface",
+ "(Ljava/lang/Object;Ljava/lang/String;)V",
+ &[(&ipc).into(), (&ipc_str).into()],
+ )?;
+
+ // Set content view
+ self.env.call_method(
+ activity,
+ "setContentView",
+ "(Landroid/view/View;)V",
+ &[(&webview).into()],
+ )?;
+
+ if let Some(on_webview_created) = on_webview_created {
+ if let Err(e) = on_webview_created(super::Context {
+ env: &mut self.env,
+ activity,
+ webview: &webview,
+ }) {
+ #[cfg(feature = "tracing")]
+ tracing::warn!("failed to run webview created hook: {e}");
+ }
+ }
+
+ let webview = self.env.new_global_ref(webview)?;
+
+ self.webview = Some(webview);
+ }
+ WebViewMessage::Eval(script, callback) => {
+ if let Some(webview) = &self.webview {
+ let id = EVAL_ID_GENERATOR.next() as i32;
+
+ #[cfg(feature = "tracing")]
+ let span = std::sync::Mutex::new(Some(SendEnteredSpan(
+ tracing::debug_span!("wry::eval").entered(),
+ )));
+
+ EVAL_CALLBACKS
+ .get_or_init(Default::default)
+ .lock()
+ .unwrap()
+ .insert(
+ id,
+ Box::new(move |result| {
+ #[cfg(feature = "tracing")]
+ span.lock().unwrap().take();
+
+ if let Some(callback) = &callback {
+ callback(result);
+ }
+ }),
+ );
+
+ let s = self.env.new_string(script)?;
+ self.env.call_method(
+ webview.as_obj(),
+ "evalScript",
+ "(ILjava/lang/String;)V",
+ &[id.into(), (&s).into()],
+ )?;
+ }
+ }
+ WebViewMessage::SetBackgroundColor(background_color) => {
+ if let Some(webview) = &self.webview {
+ set_background_color(&mut self.env, webview.as_obj(), background_color)?;
+ }
+ }
+ WebViewMessage::GetWebViewVersion(tx) => {
+ match self
+ .env
+ .call_method(activity, "getVersion", "()Ljava/lang/String;", &[])
+ .and_then(|v| v.l())
+ .and_then(|s| {
+ let s = JString::from(s);
+ self
+ .env
+ .get_string(&s)
+ .map(|v| v.to_string_lossy().to_string())
+ }) {
+ Ok(version) => {
+ tx.send(Ok(version)).unwrap();
+ }
+ Err(e) => tx.send(Err(e.into())).unwrap(),
+ }
+ }
+ WebViewMessage::GetUrl(tx) => {
+ if let Some(webview) = &self.webview {
+ let url = self
+ .env
+ .call_method(webview.as_obj(), "getUrl", "()Ljava/lang/String;", &[])
+ .and_then(|v| v.l())
+ .and_then(|s| {
+ let s = JString::from(s);
+ self
+ .env
+ .get_string(&s)
+ .map(|v| v.to_string_lossy().to_string())
+ })
+ .unwrap_or_default();
+
+ tx.send(url).unwrap()
+ }
+ }
+ WebViewMessage::Jni(f) => {
+ if let Some(w) = &self.webview {
+ f(&mut self.env, activity, w.as_obj());
+ } else {
+ f(&mut self.env, activity, &JObject::null());
+ }
+ }
+ WebViewMessage::LoadUrl(url, headers) => {
+ if let Some(webview) = &self.webview {
+ let url = self.env.new_string(url)?;
+ load_url(&mut self.env, webview.as_obj(), &url, headers, false)?;
+ }
+ }
+ WebViewMessage::ClearAllBrowsingData => {
+ if let Some(webview) = &self.webview {
+ self
+ .env
+ .call_method(webview, "clearAllBrowsingData", "()V", &[])?;
+ }
+ }
+ WebViewMessage::LoadHtml(html) => {
+ if let Some(webview) = &self.webview {
+ let html = self.env.new_string(html)?;
+ load_html(&mut self.env, webview.as_obj(), &html)?;
+ }
+ }
+ WebViewMessage::GetCookies(tx, url) => {
+ if let Some(webview) = &self.webview {
+ let url = self.env.new_string(url)?;
+ let cookies = self
+ .env
+ .call_method(
+ webview,
+ "getCookies",
+ "(Ljava/lang/String;)Ljava/lang/String;",
+ &[(&url).into()],
+ )
+ .and_then(|v| v.l())
+ .and_then(|s| {
+ let s = JString::from(s);
+ self
+ .env
+ .get_string(&s)
+ .map(|v| v.to_string_lossy().to_string())
+ })
+ .unwrap_or_default();
+
+ tx.send(
+ cookies
+ .split("; ")
+ .flat_map(|c| cookie::Cookie::parse(c.to_string()))
+ .collect(),
+ )
+ .unwrap();
+ }
+ }
+ WebViewMessage::OnDestroy => {
+ return Ok(MainPipeState::Destroyed);
+ }
+ }
+ }
+ Ok(MainPipeState::Alive)
+ }
+}
+
+fn load_url<'a>(
+ env: &mut JNIEnv<'a>,
+ webview: &JObject<'a>,
+ url: &JString<'a>,
+ headers: Option,
+ main_thread: bool,
+) -> JniResult<()> {
+ let function = if main_thread {
+ "loadUrlMainThread"
+ } else {
+ "loadUrl"
+ };
+ if let Some(headers) = headers {
+ let obj = env.new_object("java/util/HashMap", "()V", &[])?;
+ let headers_map = {
+ let headers_map = JMap::from_env(env, &obj)?;
+ for (name, value) in headers.iter() {
+ let key = env.new_string(name)?;
+ let value = env.new_string(value.to_str().unwrap_or_default())?;
+ headers_map.put(env, &key, &value)?;
+ }
+ headers_map
+ };
+ env.call_method(
+ webview,
+ function,
+ "(Ljava/lang/String;Ljava/util/Map;)V",
+ &[url.into(), (&headers_map).into()],
+ )?;
+ } else {
+ env.call_method(webview, function, "(Ljava/lang/String;)V", &[url.into()])?;
+ }
+ Ok(())
+}
+
+fn load_html<'a>(env: &mut JNIEnv<'a>, webview: &JObject<'a>, html: &JString<'a>) -> JniResult<()> {
+ env.call_method(
+ webview,
+ "loadHTMLMainThread",
+ "(Ljava/lang/String;)V",
+ &[html.into()],
+ )?;
+ Ok(())
+}
+
+fn set_background_color<'a>(
+ env: &mut JNIEnv<'a>,
+ webview: &JObject<'a>,
+ (r, g, b, a): RGBA,
+) -> JniResult<()> {
+ let color = (a as i32) << 24 | (r as i32) << 16 | (g as i32) << 8 | (b as i32);
+ env.call_method(webview, "setBackgroundColor", "(I)V", &[color.into()])?;
+ Ok(())
+}
+
+pub(crate) enum WebViewMessage {
+ CreateWebView(CreateWebViewAttributes),
+ Eval(String, Option),
+ SetBackgroundColor(RGBA),
+ GetWebViewVersion(Sender>),
+ GetUrl(Sender),
+ GetCookies(Sender>>, String),
+ Jni(Box),
+ LoadUrl(String, Option),
+ LoadHtml(String),
+ ClearAllBrowsingData,
+ OnDestroy,
+}
+
+pub(crate) struct CreateWebViewAttributes {
+ pub id: String,
+ pub url: Option,
+ pub html: Option,
+ #[cfg(any(debug_assertions, feature = "devtools"))]
+ pub devtools: bool,
+ pub transparent: bool,
+ pub background_color: Option,
+ pub headers: Option,
+ pub autoplay: bool,
+ pub on_webview_created: Option JniResult<()> + Send>>,
+ pub user_agent: Option,
+ pub initialization_scripts: Vec<(String, bool)>,
+}
+
+// SAFETY: only use this when you are sure the span will be dropped on the same thread it was entered
+#[cfg(feature = "tracing")]
+struct SendEnteredSpan(tracing::span::EnteredSpan);
+
+#[cfg(feature = "tracing")]
+unsafe impl Send for SendEnteredSpan {}
diff --git a/vendor/wry/src/android/mod.rs b/vendor/wry/src/android/mod.rs
new file mode 100644
index 0000000..e284f38
--- /dev/null
+++ b/vendor/wry/src/android/mod.rs
@@ -0,0 +1,497 @@
+// Copyright 2020-2023 Tauri Programme within The Commons Conservancy
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-License-Identifier: MIT
+
+use super::{PageLoadEvent, WebViewAttributes, RGBA};
+use crate::{RequestAsyncResponder, Result};
+use base64::{engine::general_purpose, Engine};
+use crossbeam_channel::*;
+use html5ever::{interface::QualName, namespace_url, ns, tendril::TendrilSink, LocalName};
+use http::{
+ header::{HeaderValue, CONTENT_SECURITY_POLICY, CONTENT_TYPE},
+ Request, Response as HttpResponse,
+};
+use jni::{
+ errors::Result as JniResult,
+ objects::{GlobalRef, JClass, JObject},
+ JNIEnv,
+};
+use kuchiki::NodeRef;
+use ndk::looper::{FdEvent, ThreadLooper};
+use once_cell::sync::OnceCell;
+use raw_window_handle::HasWindowHandle;
+use sha2::{Digest, Sha256};
+use std::{
+ borrow::Cow,
+ cell::RefCell,
+ collections::HashMap,
+ os::fd::{AsFd as _, AsRawFd as _},
+ sync::{mpsc::channel, Mutex},
+ time::Duration,
+};
+
+pub(crate) mod binding;
+mod main_pipe;
+use main_pipe::{CreateWebViewAttributes, MainPipe, MainPipeState, WebViewMessage, MAIN_PIPE};
+
+use crate::util::Counter;
+
+static COUNTER: Counter = Counter::new();
+const MAIN_PIPE_TIMEOUT: Duration = Duration::from_secs(10);
+
+pub struct Context<'a, 'b> {
+ pub env: &'a mut JNIEnv<'b>,
+ pub activity: &'a JObject<'b>,
+ pub webview: &'a JObject<'b>,
+}
+
+pub(crate) struct StaticCell(RefCell);
+
+unsafe impl Send for StaticCell {}
+unsafe impl Sync for StaticCell {}
+
+impl std::ops::Deref for StaticCell {
+ type Target = RefCell;
+
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+
+macro_rules! define_static_handlers {
+ ($($var:ident = $type_name:ident { $($fields:ident:$types:ty),+ $(,)? });+ $(;)?) => {
+ $(pub static $var: StaticCell> = StaticCell(RefCell::new(None));
+ pub struct $type_name {
+ $($fields: $types,)*
+ }
+ impl $type_name {
+ pub fn new($($fields: $types,)*) -> Self {
+ Self {
+ $($fields,)*
+ }
+ }
+ }
+ unsafe impl Send for $type_name {}
+ unsafe impl Sync for $type_name {})*
+ };
+}
+
+define_static_handlers! {
+ IPC = UnsafeIpc { handler: Box)> };
+ REQUEST_HANDLER = UnsafeRequestHandler { handler: Box>, bool) -> Option>>> };
+ TITLE_CHANGE_HANDLER = UnsafeTitleHandler { handler: Box };
+ URL_LOADING_OVERRIDE = UnsafeUrlLoadingOverride { handler: Box bool> };
+ ON_LOAD_HANDLER = UnsafeOnPageLoadHandler { handler: Box };
+}
+
+pub static WITH_ASSET_LOADER: StaticCell> = StaticCell(RefCell::new(None));
+pub static ASSET_LOADER_DOMAIN: StaticCell > = StaticCell(RefCell::new(None));
+
+pub(crate) static PACKAGE: OnceCell = OnceCell::new();
+
+type EvalCallback = Box;
+
+pub static EVAL_ID_GENERATOR: Counter = Counter::new();
+pub static EVAL_CALLBACKS: OnceCell>> = OnceCell::new();
+
+/// Sets up the necessary logic for wry to be able to create the webviews later.
+///
+/// This function must be run on the thread where the [`JNIEnv`] is registered and the looper is local,
+/// hence the requirement for a [`ThreadLooper`].
+pub unsafe fn android_setup(
+ package: &str,
+ mut env: JNIEnv,
+ looper: &ThreadLooper,
+ activity: GlobalRef,
+) {
+ PACKAGE.get_or_init(move || package.to_string());
+
+ // we must create the WebChromeClient here because it calls `registerForActivityResult`,
+ // which gives an `LifecycleOwners must call register before they are STARTED.` error when called outside the onCreate hook
+ let rust_webchrome_client_class = find_class(
+ &mut env,
+ activity.as_obj(),
+ format!("{}/RustWebChromeClient", PACKAGE.get().unwrap()),
+ )
+ .unwrap();
+ let webchrome_client = env
+ .new_object(
+ &rust_webchrome_client_class,
+ &format!("(L{}/WryActivity;)V", PACKAGE.get().unwrap()),
+ &[activity.as_obj().into()],
+ )
+ .unwrap();
+
+ let webchrome_client = env.new_global_ref(webchrome_client).unwrap();
+ let mut main_pipe = MainPipe {
+ env,
+ activity,
+ webview: None,
+ webchrome_client,
+ };
+
+ looper
+ .add_fd_with_callback(MAIN_PIPE[0].as_fd(), FdEvent::INPUT, move |fd, _event| {
+ let size = std::mem::size_of::();
+ let mut wake = false;
+ if libc::read(fd.as_raw_fd(), &mut wake as *mut _ as *mut _, size) == size as libc::ssize_t {
+ let res = main_pipe.recv();
+ // unregister itself on errors or destroy event
+ matches!(res, Ok(MainPipeState::Alive))
+ } else {
+ // unregister itself
+ false
+ }
+ })
+ .unwrap();
+}
+
+pub(crate) struct InnerWebView {
+ id: String,
+}
+
+impl InnerWebView {
+ pub fn new_as_child(
+ _window: &impl HasWindowHandle,
+ attributes: WebViewAttributes,
+ pl_attrs: super::PlatformSpecificWebViewAttributes,
+ ) -> Result {
+ Self::new(_window, attributes, pl_attrs)
+ }
+
+ pub fn new(
+ _window: &impl HasWindowHandle,
+ attributes: WebViewAttributes,
+ pl_attrs: super::PlatformSpecificWebViewAttributes,
+ ) -> Result {
+ let WebViewAttributes {
+ url,
+ html,
+ initialization_scripts,
+ ipc_handler,
+ #[cfg(any(debug_assertions, feature = "devtools"))]
+ devtools,
+ custom_protocols,
+ background_color,
+ transparent,
+ headers,
+ autoplay,
+ user_agent,
+ ..
+ } = attributes;
+
+ let super::PlatformSpecificWebViewAttributes {
+ on_webview_created,
+ with_asset_loader,
+ asset_loader_domain,
+ https_scheme,
+ } = pl_attrs;
+
+ let scheme = if https_scheme { "https" } else { "http" };
+
+ let url = if let Some(mut url) = url {
+ if let Some(pos) = url.find("://") {
+ let name = &url[..pos];
+ let is_custom_protocol = custom_protocols.iter().any(|(n, _)| n == name);
+ if is_custom_protocol {
+ url = url.replace(&format!("{name}://"), &format!("{scheme}://{name}."))
+ }
+ }
+
+ Some(url)
+ } else {
+ None
+ };
+
+ let id = attributes
+ .id
+ .map(|id| id.to_string())
+ .unwrap_or_else(|| COUNTER.next().to_string());
+
+ MainPipe::send(WebViewMessage::CreateWebView(CreateWebViewAttributes {
+ id: id.clone(),
+ url,
+ html,
+ #[cfg(any(debug_assertions, feature = "devtools"))]
+ devtools,
+ background_color,
+ transparent,
+ headers,
+ on_webview_created,
+ autoplay,
+ user_agent,
+ initialization_scripts: initialization_scripts.clone(),
+ }));
+
+ WITH_ASSET_LOADER.replace(Some(with_asset_loader));
+ if let Some(domain) = asset_loader_domain {
+ ASSET_LOADER_DOMAIN.replace(Some(domain));
+ }
+
+ REQUEST_HANDLER.replace(Some(
+ UnsafeRequestHandler::new(Box::new(
+ move |webview_id: &str, mut request, is_document_start_script_enabled| {
+ let uri = request.uri().to_string();
+ if let Some(custom_protocol) = custom_protocols.iter().find(|(name, _)| {
+ uri.starts_with(&format!("{scheme}://{}.", name))
+ }) {
+ let uri_res = uri
+ .replace(
+ &format!("{scheme}://{}.", custom_protocol.0),
+ &format!("{}://", custom_protocol.0),
+ )
+ .parse();
+
+ if let Ok(uri) = uri_res {
+ *request.uri_mut() = uri;
+ }
+
+ let (tx, rx) = channel();
+ let initialization_scripts = initialization_scripts.clone();
+ let responder: Box>)> =
+ Box::new(move |mut response| {
+ if !is_document_start_script_enabled {
+ #[cfg(feature = "tracing")]
+ tracing::info!("`addDocumentStartJavaScript` is not supported; injecting initialization scripts via custom protocol handler");
+ let should_inject_scripts = response
+ .headers()
+ .get(CONTENT_TYPE)
+ // Content-Type must begin with the media type, but is case-insensitive.
+ // It may also be followed by any number of semicolon-delimited key value pairs.
+ // We don't care about these here.
+ // source: https://httpwg.org/specs/rfc9110.html#rfc.section.8.3.1
+ .and_then(|content_type| content_type.to_str().ok())
+ .map(|content_type_str| {
+ content_type_str.to_lowercase().starts_with("text/html")
+ })
+ .unwrap_or_default();
+
+ if should_inject_scripts && !initialization_scripts.is_empty() {
+ let mut document = kuchiki::parse_html()
+ .one(String::from_utf8_lossy(response.body()).into_owned());
+ let csp = response.headers_mut().get_mut(CONTENT_SECURITY_POLICY);
+ let mut hashes = Vec::new();
+ with_html_head(&mut document, |head| {
+ // iterate in reverse order since we are prepending each script to the head tag
+ for script in initialization_scripts.iter().rev() {
+ let script_el = NodeRef::new_element(
+ QualName::new(None, ns!(html), "script".into()),
+ None,
+ );
+ script_el.append(NodeRef::new_text(script.0.as_str()));
+ head.prepend(script_el);
+ if csp.is_some() {
+ hashes.push(hash_script(script.0.as_str()));
+ }
+ }
+ });
+
+ if let Some(csp) = csp {
+ let csp_string = csp.to_str().unwrap().to_string();
+ let csp_string = if csp_string.contains("script-src") {
+ csp_string
+ .replace("script-src", &format!("script-src {}", hashes.join(" ")))
+ } else {
+ format!("{} script-src {}", csp_string, hashes.join(" "))
+ };
+ *csp = HeaderValue::from_str(&csp_string).unwrap();
+ }
+
+ *response.body_mut() = document.to_string().into_bytes().into();
+ }
+ }
+
+ tx.send(response).unwrap();
+ });
+
+ (custom_protocol.1)(webview_id, request, RequestAsyncResponder { responder });
+ return Some(rx.recv_timeout(MAIN_PIPE_TIMEOUT).unwrap());
+ }
+ None
+ },
+ ))
+ ));
+
+ if let Some(i) = ipc_handler {
+ IPC.replace(Some(UnsafeIpc::new(Box::new(i))));
+ }
+
+ if let Some(i) = attributes.document_title_changed_handler {
+ TITLE_CHANGE_HANDLER.replace(Some(UnsafeTitleHandler::new(i)));
+ }
+
+ if let Some(i) = attributes.navigation_handler {
+ URL_LOADING_OVERRIDE.replace(Some(UnsafeUrlLoadingOverride::new(i)));
+ }
+
+ if let Some(h) = attributes.on_page_load_handler {
+ ON_LOAD_HANDLER.replace(Some(UnsafeOnPageLoadHandler::new(h)));
+ }
+
+ Ok(Self { id })
+ }
+
+ pub fn print(&self) -> crate::Result<()> {
+ Ok(())
+ }
+
+ pub fn id(&self) -> crate::WebViewId {
+ &self.id
+ }
+
+ pub fn url(&self) -> crate::Result {
+ let (tx, rx) = bounded(1);
+ MainPipe::send(WebViewMessage::GetUrl(tx));
+ rx.recv_timeout(MAIN_PIPE_TIMEOUT).map_err(Into::into)
+ }
+
+ pub fn eval(&self, js: &str, callback: Option) -> Result<()> {
+ MainPipe::send(WebViewMessage::Eval(
+ js.into(),
+ callback.map(|c| Box::new(c) as Box),
+ ));
+ Ok(())
+ }
+
+ #[cfg(any(debug_assertions, feature = "devtools"))]
+ pub fn open_devtools(&self) {}
+
+ #[cfg(any(debug_assertions, feature = "devtools"))]
+ pub fn close_devtools(&self) {}
+
+ #[cfg(any(debug_assertions, feature = "devtools"))]
+ pub fn is_devtools_open(&self) -> bool {
+ false
+ }
+
+ pub fn zoom(&self, _scale_factor: f64) -> Result<()> {
+ Ok(())
+ }
+
+ pub fn set_background_color(&self, background_color: RGBA) -> Result<()> {
+ MainPipe::send(WebViewMessage::SetBackgroundColor(background_color));
+ Ok(())
+ }
+
+ pub fn load_url(&self, url: &str) -> Result<()> {
+ MainPipe::send(WebViewMessage::LoadUrl(url.to_string(), None));
+ Ok(())
+ }
+
+ pub fn load_url_with_headers(&self, url: &str, headers: http::HeaderMap) -> Result<()> {
+ MainPipe::send(WebViewMessage::LoadUrl(url.to_string(), Some(headers)));
+ Ok(())
+ }
+
+ pub fn load_html(&self, html: &str) -> Result<()> {
+ MainPipe::send(WebViewMessage::LoadHtml(html.to_string()));
+ Ok(())
+ }
+
+ pub fn clear_all_browsing_data(&self) -> Result<()> {
+ MainPipe::send(WebViewMessage::ClearAllBrowsingData);
+ Ok(())
+ }
+
+ pub fn cookies_for_url(&self, url: &str) -> Result>> {
+ let (tx, rx) = bounded(1);
+ MainPipe::send(WebViewMessage::GetCookies(tx, url.to_string()));
+ rx.recv_timeout(MAIN_PIPE_TIMEOUT).map_err(Into::into)
+ }
+
+ pub fn cookies(&self) -> Result>> {
+ Ok(Vec::new())
+ }
+
+ pub fn bounds(&self) -> Result {
+ Ok(crate::Rect::default())
+ }
+
+ pub fn set_bounds(&self, _bounds: crate::Rect) -> Result<()> {
+ // Unsupported
+ Ok(())
+ }
+
+ pub fn set_visible(&self, _visible: bool) -> Result<()> {
+ // Unsupported
+ Ok(())
+ }
+
+ pub fn focus(&self) -> Result<()> {
+ // Unsupported
+ Ok(())
+ }
+
+ pub fn focus_parent(&self) -> Result<()> {
+ // Unsupported
+ Ok(())
+ }
+}
+
+#[derive(Clone, Copy)]
+pub struct JniHandle;
+
+impl JniHandle {
+ /// Execute jni code on the thread of the webview.
+ /// Provided function will be provided with the jni evironment, Android activity and WebView
+ pub fn exec(&self, func: F)
+ where
+ F: FnOnce(&mut JNIEnv, &JObject, &JObject) + Send + 'static,
+ {
+ MainPipe::send(WebViewMessage::Jni(Box::new(func)));
+ }
+}
+
+pub fn platform_webview_version() -> Result {
+ let (tx, rx) = bounded(1);
+ MainPipe::send(WebViewMessage::GetWebViewVersion(tx));
+ rx.recv_timeout(MAIN_PIPE_TIMEOUT).unwrap()
+}
+
+fn with_html_head(document: &mut NodeRef, f: F) {
+ if let Ok(ref node) = document.select_first("head") {
+ f(node.as_node())
+ } else {
+ let node = NodeRef::new_element(
+ QualName::new(None, ns!(html), LocalName::from("head")),
+ None,
+ );
+ f(&node);
+ document.prepend(node)
+ }
+}
+
+fn hash_script(script: &str) -> String {
+ let mut hasher = Sha256::new();
+ hasher.update(script);
+ let hash = hasher.finalize();
+ format!("'sha256-{}'", general_purpose::STANDARD.encode(hash))
+}
+
+/// Finds a class in the project scope.
+pub fn find_class<'a>(
+ env: &mut JNIEnv<'a>,
+ activity: &JObject<'_>,
+ name: String,
+) -> JniResult> {
+ let class_name = env.new_string(name.replace('/', "."))?;
+ let my_class = env
+ .call_method(
+ activity,
+ "getAppClass",
+ "(Ljava/lang/String;)Ljava/lang/Class;",
+ &[(&class_name).into()],
+ )?
+ .l()?;
+ Ok(my_class.into())
+}
+
+/// Dispatch a closure to run on the Android context.
+///
+/// The closure takes the JNI env, the Android activity instance and the possibly null webview.
+pub fn dispatch(func: F)
+where
+ F: FnOnce(&mut JNIEnv, &JObject, &JObject) + Send + 'static,
+{
+ MainPipe::send(WebViewMessage::Jni(Box::new(func)));
+}
diff --git a/vendor/wry/src/error.rs b/vendor/wry/src/error.rs
new file mode 100644
index 0000000..d9e8ef6
--- /dev/null
+++ b/vendor/wry/src/error.rs
@@ -0,0 +1,74 @@
+/// Convenient type alias of Result type for wry.
+pub type Result = std::result::Result;
+
+/// Errors returned by wry.
+#[non_exhaustive]
+#[derive(thiserror::Error, Debug)]
+pub enum Error {
+ #[cfg(gtk)]
+ #[error(transparent)]
+ GlibError(#[from] gtk::glib::Error),
+ #[cfg(gtk)]
+ #[error(transparent)]
+ GlibBoolError(#[from] gtk::glib::BoolError),
+ #[cfg(gtk)]
+ #[error("Fail to fetch security manager")]
+ MissingManager,
+ #[cfg(gtk)]
+ #[error("Couldn't find X11 Display")]
+ X11DisplayNotFound,
+ #[cfg(gtk)]
+ #[error(transparent)]
+ XlibError(#[from] x11_dl::error::OpenError),
+ #[error("Failed to initialize the script")]
+ InitScriptError,
+ #[error("Bad RPC request: {0} ((1))")]
+ RpcScriptError(String, String),
+ #[error(transparent)]
+ NulError(#[from] std::ffi::NulError),
+ #[error(transparent)]
+ ReceiverError(#[from] std::sync::mpsc::RecvError),
+ #[cfg(target_os = "android")]
+ #[error(transparent)]
+ ReceiverTimeoutError(#[from] crossbeam_channel::RecvTimeoutError),
+ #[error(transparent)]
+ SenderError(#[from] std::sync::mpsc::SendError),
+ #[error("Failed to send the message")]
+ MessageSender,
+ #[error("IO error: {0}")]
+ Io(#[from] std::io::Error),
+ #[cfg(target_os = "windows")]
+ #[error("WebView2 error: {0}")]
+ WebView2Error(webview2_com::Error),
+ #[error(transparent)]
+ HttpError(#[from] http::Error),
+ #[error("Infallible error, something went really wrong: {0}")]
+ Infallible(#[from] std::convert::Infallible),
+ #[cfg(target_os = "android")]
+ #[error(transparent)]
+ JniError(#[from] jni::errors::Error),
+ #[error("Failed to create proxy endpoint")]
+ ProxyEndpointCreationFailed,
+ #[error(transparent)]
+ WindowHandleError(#[from] raw_window_handle::HandleError),
+ #[error("the window handle kind is not supported")]
+ UnsupportedWindowHandle,
+ #[error(transparent)]
+ Utf8Error(#[from] std::str::Utf8Error),
+ #[cfg(target_os = "android")]
+ #[error(transparent)]
+ CrossBeamRecvError(#[from] crossbeam_channel::RecvError),
+ #[error("not on the main thread")]
+ NotMainThread,
+ #[error("Custom protocol task is invalid.")]
+ CustomProtocolTaskInvalid,
+ #[error("Failed to register URL scheme: {0}, could be due to invalid URL scheme or the scheme is already registered.")]
+ UrlSchemeRegisterError(String),
+ #[error("Duplicate custom protocol registered on Linux: {0}")]
+ DuplicateCustomProtocol(String),
+ #[error("Duplicate custom protocol registered on the same web context on Linux: {0}")]
+ ContextDuplicateCustomProtocol(String),
+ #[error(transparent)]
+ #[cfg(any(target_os = "macos", target_os = "ios"))]
+ UrlPrase(#[from] url::ParseError),
+}
diff --git a/vendor/wry/src/lib.rs b/vendor/wry/src/lib.rs
new file mode 100644
index 0000000..eb98f3d
--- /dev/null
+++ b/vendor/wry/src/lib.rs
@@ -0,0 +1,1968 @@
+// Copyright 2020-2023 Tauri Programme within The Commons Conservancy
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-License-Identifier: MIT
+
+//! Wry is a Cross-platform WebView rendering library.
+//!
+//! The webview requires a running event loop and a window type that implements [`HasWindowHandle`],
+//! or a gtk container widget if you need to support X11 and Wayland.
+//! You can use a windowing library like [`tao`] or [`winit`].
+//!
+//! ## Examples
+//!
+//! This example leverages the [`HasWindowHandle`] and supports Windows, macOS, iOS, Android and Linux (X11 Only).
+//! See the following example using [`winit`].
+//!
+//! ```no_run
+//! # use wry::{WebViewBuilder, raw_window_handle};
+//! # use winit::{window::WindowBuilder, event_loop::EventLoop};
+//! let event_loop = EventLoop::new().unwrap();
+//! let window = WindowBuilder::new().build(&event_loop).unwrap();
+//!
+//! let webview = WebViewBuilder::new()
+//! .with_url("https://tauri.app")
+//! .build(&window)
+//! .unwrap();
+//! ```
+//!
+//! If you also want to support Wayland too, then we recommend you use [`WebViewBuilderExtUnix::new_gtk`] on Linux.
+//! See the following example using [`tao`].
+//!
+//! ```no_run
+//! # use wry::WebViewBuilder;
+//! # use tao::{window::WindowBuilder, event_loop::EventLoop};
+//! # #[cfg(target_os = "linux")]
+//! # use tao::platform::unix::WindowExtUnix;
+//! # #[cfg(target_os = "linux")]
+//! # use wry::WebViewBuilderExtUnix;
+//! let event_loop = EventLoop::new();
+//! let window = WindowBuilder::new().build(&event_loop).unwrap();
+//!
+//! let builder = WebViewBuilder::new().with_url("https://tauri.app");
+//!
+//! #[cfg(not(target_os = "linux"))]
+//! let webview = builder.build(&window).unwrap();
+//! #[cfg(target_os = "linux")]
+//! let webview = builder.build_gtk(window.gtk_window()).unwrap();
+//! ```
+//!
+//! ## Child webviews
+//!
+//! You can use [`WebView::new_as_child`] or [`WebViewBuilder::new_as_child`] to create the webview as a child inside another window. This is supported on
+//! macOS, Windows and Linux (X11 Only).
+//!
+//! ```no_run
+//! # use wry::{WebViewBuilder, raw_window_handle, Rect, dpi::*};
+//! # use winit::{window::WindowBuilder, event_loop::EventLoop};
+//! let event_loop = EventLoop::new().unwrap();
+//! let window = WindowBuilder::new().build(&event_loop).unwrap();
+//!
+//! let webview = WebViewBuilder::new()
+//! .with_url("https://tauri.app")
+//! .with_bounds(Rect {
+//! position: LogicalPosition::new(100, 100).into(),
+//! size: LogicalSize::new(200, 200).into(),
+//! })
+//! .build_as_child(&window)
+//! .unwrap();
+//! ```
+//!
+//! If you want to support X11 and Wayland at the same time, we recommend using
+//! [`WebViewExtUnix::new_gtk`] or [`WebViewBuilderExtUnix::new_gtk`] with [`gtk::Fixed`].
+//!
+//! ```no_run
+//! # use wry::{WebViewBuilder, raw_window_handle, Rect, dpi::*};
+//! # use tao::{window::WindowBuilder, event_loop::EventLoop};
+//! # #[cfg(target_os = "linux")]
+//! # use wry::WebViewBuilderExtUnix;
+//! # #[cfg(target_os = "linux")]
+//! # use tao::platform::unix::WindowExtUnix;
+//! let event_loop = EventLoop::new();
+//! let window = WindowBuilder::new().build(&event_loop).unwrap();
+//!
+//! let builder = WebViewBuilder::new()
+//! .with_url("https://tauri.app")
+//! .with_bounds(Rect {
+//! position: LogicalPosition::new(100, 100).into(),
+//! size: LogicalSize::new(200, 200).into(),
+//! });
+//!
+//! #[cfg(not(target_os = "linux"))]
+//! let webview = builder.build_as_child(&window).unwrap();
+//! #[cfg(target_os = "linux")]
+//! let webview = {
+//! # use gtk::prelude::*;
+//! let vbox = window.default_vbox().unwrap(); // tao adds a gtk::Box by default
+//! let fixed = gtk::Fixed::new();
+//! fixed.show_all();
+//! vbox.pack_start(&fixed, true, true, 0);
+//! builder.build_gtk(&fixed).unwrap()
+//! };
+//! ```
+//!
+//! ## Platform Considerations
+//!
+//! Note that on Linux, we use webkit2gtk webviews so if the windowing library doesn't support gtk (as in [`winit`])
+//! you'll need to call [`gtk::init`] before creating the webview and then call [`gtk::main_iteration_do`] alongside
+//! your windowing library event loop.
+//!
+//! ```no_run
+//! # use winit::{event_loop::EventLoop, window::Window};
+//! # use wry::{WebView, WebViewAttributes};
+//! #[cfg(target_os = "linux")]
+//! gtk::init().unwrap(); // <----- IMPORTANT
+//! let event_loop = EventLoop::new().unwrap();
+//!
+//! let window = Window::new(&event_loop).unwrap();
+//! let webview = WebView::new(&window, WebViewAttributes::default());
+//!
+//! event_loop.run(|_e, _evl|{
+//! // process winit events
+//!
+//! // then advance gtk event loop <----- IMPORTANT
+//! #[cfg(target_os = "linux")]
+//! while gtk::events_pending() {
+//! gtk::main_iteration_do(false);
+//! }
+//! }).unwrap();
+//! ```
+//!
+//! ## Android
+//!
+//! In order for `wry` to be able to create webviews on Android, there is a few requirements that your application needs to uphold:
+//! 1. You need to set a few environment variables that will be used to generate the necessary kotlin
+//! files that you need to include in your Android application for wry to function properly.
+//! - `WRY_ANDROID_PACKAGE`: which is the reversed domain name of your android project and the app name in snake_case, for example, `com.wry.example.wry_app`
+//! - `WRY_ANDROID_LIBRARY`: for example, if your cargo project has a lib name `wry_app`, it will generate `libwry_app.so` so you se this env var to `wry_app`
+//! - `WRY_ANDROID_KOTLIN_FILES_OUT_DIR`: for example, `path/to/app/src/main/kotlin/com/wry/example`
+//! 2. Your main Android Activity needs to inherit `AppCompatActivity`, preferably it should use the generated `WryActivity` or inherit it.
+//! 3. Your Rust app needs to call `wry::android_setup` function to setup the necessary logic to be able to create webviews later on.
+//! 4. Your Rust app needs to call `wry::android_binding!` macro to setup the JNI functions that will be called by `WryActivity` and various other places.
+//!
+//! It is recommended to use [`tao`](https://docs.rs/tao/latest/tao/) crate as it provides maximum compatibility with `wry`
+//!
+//! ```
+//! #[cfg(target_os = "android")]
+//! {
+//! tao::android_binding!(
+//! com_example,
+//! wry_app,
+//! WryActivity,
+//! wry::android_setup, // pass the wry::android_setup function to tao which will invoke when the event loop is created
+//! _start_app
+//! );
+//! wry::android_binding!(com_example, ttt);
+//! }
+//! ```
+//!
+//! If this feels overwhelming, you can just use the preconfigured template from [`cargo-mobile2`](https://github.com/tauri-apps/cargo-mobile2).
+//!
+//! For more inforamtion, checkout [MOBILE.md](https://github.com/tauri-apps/wry/blob/dev/MOBILE.md).
+//!
+//! ## Feature flags
+//!
+//! Wry uses a set of feature flags to toggle several advanced features.
+//!
+//! - `os-webview` (default): Enables the default WebView framework on the platform. This must be enabled
+//! for the crate to work. This feature was added in preparation of other ports like cef and servo.
+//! - `protocol` (default): Enables [`WebViewBuilder::with_custom_protocol`] to define custom URL scheme for handling tasks like
+//! loading assets.
+//! - `drag-drop` (default): Enables [`WebViewBuilder::with_drag_drop_handler`] to control the behaviour when there are files
+//! interacting with the window.
+//! - `devtools`: Enables devtools on release builds. Devtools are always enabled in debug builds.
+//! On **macOS**, enabling devtools, requires calling private apis so you should not enable this flag in release
+//! build if your app needs to publish to App Store.
+//! - `transparent`: Transparent background on **macOS** requires calling private functions.
+//! Avoid this in release build if your app needs to publish to App Store.
+//! - `fullscreen`: Fullscreen video and other media on **macOS** requires calling private functions.
+//! Avoid this in release build if your app needs to publish to App Store.
+//! libraries and prevent from building documentation on doc.rs fails.
+//! - `linux-body`: Enables body support of custom protocol request on Linux. Requires
+//! webkit2gtk v2.40 or above.
+//! - `tracing`: enables [`tracing`] for `evaluate_script`, `ipc_handler` and `custom_protocols.
+//!
+//! [`tao`]: https://docs.rs/tao
+//! [`winit`]: https://docs.rs/winit
+//! [`tracing`]: https://docs.rs/tracing
+
+#![allow(clippy::new_without_default)]
+#![allow(clippy::default_constructed_unit_structs)]
+#![allow(clippy::type_complexity)]
+#![cfg_attr(docsrs, feature(doc_cfg))]
+
+// #[cfg(any(target_os = "macos", target_os = "ios"))]
+// #[macro_use]
+// extern crate objc;
+
+mod error;
+mod proxy;
+#[cfg(any(target_os = "macos", target_os = "android", target_os = "ios"))]
+mod util;
+mod web_context;
+
+#[cfg(target_os = "android")]
+pub(crate) mod android;
+#[cfg(target_os = "android")]
+pub use crate::android::android_setup;
+#[cfg(target_os = "android")]
+pub mod prelude {
+ pub use crate::android::{binding::*, dispatch, find_class, Context};
+ pub use tao_macros::{android_fn, generate_package_name};
+}
+#[cfg(target_os = "android")]
+pub use android::JniHandle;
+#[cfg(target_os = "android")]
+use android::*;
+
+#[cfg(gtk)]
+pub(crate) mod webkitgtk;
+/// Re-exported [raw-window-handle](https://docs.rs/raw-window-handle/latest/raw_window_handle/) crate.
+pub use raw_window_handle;
+use raw_window_handle::HasWindowHandle;
+#[cfg(gtk)]
+use webkitgtk::*;
+
+#[cfg(any(target_os = "macos", target_os = "ios"))]
+use objc2::rc::Retained;
+#[cfg(target_os = "macos")]
+use objc2_app_kit::NSWindow;
+#[cfg(any(target_os = "macos", target_os = "ios"))]
+use objc2_web_kit::WKUserContentController;
+#[cfg(any(target_os = "macos", target_os = "ios"))]
+pub(crate) mod wkwebview;
+#[cfg(any(target_os = "macos", target_os = "ios"))]
+use wkwebview::*;
+#[cfg(any(target_os = "macos", target_os = "ios"))]
+pub use wkwebview::{PrintMargin, PrintOptions, WryWebView};
+
+#[cfg(target_os = "windows")]
+pub(crate) mod webview2;
+#[cfg(target_os = "windows")]
+pub use self::webview2::ScrollBarStyle;
+#[cfg(target_os = "windows")]
+use self::webview2::*;
+#[cfg(target_os = "windows")]
+use webview2_com::Microsoft::Web::WebView2::Win32::ICoreWebView2Controller;
+
+use std::{borrow::Cow, collections::HashMap, path::PathBuf, rc::Rc};
+
+use http::{Request, Response};
+
+pub use cookie;
+pub use dpi;
+pub use error::*;
+pub use http;
+pub use proxy::{ProxyConfig, ProxyEndpoint};
+pub use web_context::WebContext;
+
+/// A rectangular region.
+#[derive(Clone, Copy, Debug)]
+pub struct Rect {
+ /// Rect position.
+ pub position: dpi::Position,
+ /// Rect size.
+ pub size: dpi::Size,
+}
+
+impl Default for Rect {
+ fn default() -> Self {
+ Self {
+ position: dpi::LogicalPosition::new(0, 0).into(),
+ size: dpi::LogicalSize::new(0, 0).into(),
+ }
+ }
+}
+
+/// Resolves a custom protocol [`Request`] asynchronously.
+///
+/// See [`WebViewBuilder::with_asynchronous_custom_protocol`] for more information.
+pub struct RequestAsyncResponder {
+ pub(crate) responder: Box>)>,
+}
+
+// SAFETY: even though the webview bindings do not indicate the responder is Send,
+// it actually is and we need it in order to let the user do the protocol computation
+// on a separate thread or async task.
+unsafe impl Send for RequestAsyncResponder {}
+
+impl RequestAsyncResponder {
+ /// Resolves the request with the given response.
+ pub fn respond>>(self, response: Response) {
+ let (parts, body) = response.into_parts();
+ (self.responder)(Response::from_parts(parts, body.into()))
+ }
+}
+
+/// An id for a webview
+pub type WebViewId<'a> = &'a str;
+
+pub struct WebViewAttributes<'a> {
+ /// An id that will be passed when this webview makes requests in certain callbacks.
+ pub id: Option>,
+
+ /// Web context to be shared with this webview.
+ pub context: Option<&'a mut WebContext>,
+
+ /// Whether the WebView should have a custom user-agent.
+ pub user_agent: Option,
+
+ /// Whether the WebView window should be visible.
+ pub visible: bool,
+
+ /// Whether the WebView should be transparent.
+ ///
+ /// ## Platform-specific:
+ ///
+ /// **Windows 7**: Not supported.
+ pub transparent: bool,
+
+ /// Specify the webview background color. This will be ignored if `transparent` is set to `true`.
+ ///
+ /// The color uses the RGBA format.
+ ///
+ /// ## Platform-specific:
+ ///
+ /// - **macOS / iOS**: Not implemented.
+ /// - **Windows**:
+ /// - On Windows 7, transparency is not supported and the alpha value will be ignored.
+ /// - On Windows higher than 7: translucent colors are not supported so any alpha value other than `0` will be replaced by `255`
+ pub background_color: Option,
+
+ /// Whether load the provided URL to [`WebView`].
+ ///
+ /// ## Note
+ ///
+ /// Data URLs are not supported, use [`html`](Self::html) option instead.
+ pub url: Option,
+
+ /// Headers used when loading the requested [`url`](Self::url).
+ pub headers: Option,
+
+ /// Whether page zooming by hotkeys is enabled
+ ///
+ /// ## Platform-specific
+ ///
+ /// **macOS / Linux / Android / iOS**: Unsupported
+ pub zoom_hotkeys_enabled: bool,
+
+ /// Whether load the provided html string to [`WebView`].
+ /// This will be ignored if the `url` is provided.
+ ///
+ /// # Warning
+ ///
+ /// The Page loaded from html string will have `null` origin.
+ ///
+ /// ## PLatform-specific:
+ ///
+ /// - **Windows:** the string can not be larger than 2 MB (2 * 1024 * 1024 bytes) in total size
+ pub html: Option,
+
+ /// A list of initialization javascript scripts to run when loading new pages.
+ /// When webview load a new page, this initialization code will be executed.
+ /// It is guaranteed that code is executed before `window.onload`.
+ ///
+ /// Second parameter represents if script should be added to main frame only or sub frames also.
+ /// `true` for main frame only, `false` for sub frames.
+ ///
+ /// ## Platform-specific
+ ///
+ /// - **Android:** The Android WebView does not provide an API for initialization scripts,
+ /// so we prepend them to each HTML head. They are only implemented on custom protocol URLs.
+ pub initialization_scripts: Vec<(String, bool)>,
+
+ /// A list of custom loading protocols with pairs of scheme uri string and a handling
+ /// closure.
+ ///
+ /// The closure takes an Id ([WebViewId]), [Request] and [RequestAsyncResponder] as arguments and returns a [Response].
+ ///
+ /// # Note
+ ///
+ /// If using a shared [WebContext], make sure custom protocols were not already registered on that web context on Linux.
+ ///
+ /// # Warning
+ ///
+ /// Pages loaded from custom protocol will have different Origin on different platforms. And
+ /// servers which enforce CORS will need to add exact same Origin header in `Access-Control-Allow-Origin`
+ /// if you wish to send requests with native `fetch` and `XmlHttpRequest` APIs. Here are the
+ /// different Origin headers across platforms:
+ ///
+ /// - macOS, iOS and Linux: `://` (so it will be `wry://path/to/page/`).
+ /// - Windows and Android: `http://.` by default (so it will be `http://wry.path/to/page). To use `https` instead of `http`, use [`WebViewBuilderExtWindows::with_https_scheme`] and [`WebViewBuilderExtAndroid::with_https_scheme`].
+ ///
+ /// # Reading assets on mobile
+ ///
+ /// - Android: Android has `assets` and `resource` path finder to
+ /// locate your files in those directories. For more information, see [Loading in-app content](https://developer.android.com/guide/webapps/load-local-content) page.
+ /// - iOS: To get the path of your assets, you can call [`CFBundle::resources_path`](https://docs.rs/core-foundation/latest/core_foundation/bundle/struct.CFBundle.html#method.resources_path). So url like `wry://assets/index.html` could get the html file in assets directory.
+ pub custom_protocols:
+ HashMap>, RequestAsyncResponder)>>,
+
+ /// The IPC handler to receive the message from Javascript on webview
+ /// using `window.ipc.postMessage("insert_message_here")` to host Rust code.
+ pub ipc_handler: Option)>>,
+
+ /// A handler closure to process incoming [`DragDropEvent`] of the webview.
+ ///
+ /// # Blocking OS Default Behavior
+ /// Return `true` in the callback to block the OS' default behavior.
+ ///
+ /// Note, that if you do block this behavior, it won't be possible to drop files on ` ` forms.
+ /// Also note, that it's not possible to manually set the value of a ` ` via JavaScript for security reasons.
+ #[cfg(feature = "drag-drop")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "drag-drop")))]
+ pub drag_drop_handler: Option bool>>,
+ #[cfg(not(feature = "drag-drop"))]
+ drag_drop_handler: Option bool>>,
+
+ /// A navigation handler to decide if incoming url is allowed to navigate.
+ ///
+ /// The closure take a `String` parameter as url and returns a `bool` to determine whether the navigation should happen.
+ /// `true` allows to navigate and `false` does not.
+ pub navigation_handler: Option bool>>,
+
+ /// A download started handler to manage incoming downloads.
+ ///
+ /// The closure takes two parameters, the first is a `String` representing the url being downloaded from and and the
+ /// second is a mutable `PathBuf` reference that (possibly) represents where the file will be downloaded to. The latter
+ /// parameter can be used to set the download location by assigning a new path to it, the assigned path _must_ be
+ /// absolute. The closure returns a `bool` to allow or deny the download.
+ pub download_started_handler: Option bool + 'static>>,
+
+ /// A download completion handler to manage downloads that have finished.
+ ///
+ /// The closure is fired when the download completes, whether it was successful or not.
+ /// The closure takes a `String` representing the URL of the original download request, an `Option`
+ /// potentially representing the filesystem path the file was downloaded to, and a `bool` indicating if the download
+ /// succeeded. A value of `None` being passed instead of a `PathBuf` does not necessarily indicate that the download
+ /// did not succeed, and may instead indicate some other failure, always check the third parameter if you need to
+ /// know if the download succeeded.
+ ///
+ /// ## Platform-specific:
+ ///
+ /// - **macOS**: The second parameter indicating the path the file was saved to, is always empty,
+ /// due to API limitations.
+ pub download_completed_handler: Option, bool) + 'static>>,
+
+ /// A new window handler to decide if incoming url is allowed to open in a new window.
+ ///
+ /// The closure take a `String` parameter as url and return `bool` to determine whether the window should open.
+ /// `true` allows to open and `false` does not.
+ pub new_window_req_handler: Option bool>>,
+
+ /// Enables clipboard access for the page rendered on **Linux** and **Windows**.
+ ///
+ /// macOS doesn't provide such method and is always enabled by default. But your app will still need to add menu
+ /// item accelerators to use the clipboard shortcuts.
+ pub clipboard: bool,
+
+ /// Enable web inspector which is usually called browser devtools.
+ ///
+ /// Note this only enables devtools to the webview. To open it, you can call
+ /// [`WebView::open_devtools`], or right click the page and open it from the context menu.
+ ///
+ /// ## Platform-specific
+ ///
+ /// - macOS: This will call private functions on **macOS**. It is enabled in **debug** builds,
+ /// but requires `devtools` feature flag to actually enable it in **release** builds.
+ /// - Android: Open `chrome://inspect/#devices` in Chrome to get the devtools window. Wry's `WebView` devtools API isn't supported on Android.
+ /// - iOS: Open Safari > Develop > [Your Device Name] > [Your WebView] to get the devtools window.
+ pub devtools: bool,
+
+ /// Whether clicking an inactive window also clicks through to the webview. Default is `false`.
+ ///
+ /// ## Platform-specific
+ ///
+ /// This configuration only impacts macOS.
+ pub accept_first_mouse: bool,
+
+ /// Indicates whether horizontal swipe gestures trigger backward and forward page navigation.
+ ///
+ /// ## Platform-specific:
+ ///
+ /// - Windows: Setting to `false` does nothing on WebView2 Runtime version before 92.0.902.0,
+ /// see https://learn.microsoft.com/en-us/microsoft-edge/webview2/release-notes/archive?tabs=dotnetcsharp#10902-prerelease
+ ///
+ /// - **Android / iOS:** Unsupported.
+ pub back_forward_navigation_gestures: bool,
+
+ /// Set a handler closure to process the change of the webview's document title.
+ pub document_title_changed_handler: Option>,
+
+ /// Run the WebView with incognito mode. Note that WebContext will be ingored if incognito is
+ /// enabled.
+ ///
+ /// ## Platform-specific:
+ ///
+ /// - Windows: Requires WebView2 Runtime version 101.0.1210.39 or higher, does nothing on older versions,
+ /// see https://learn.microsoft.com/en-us/microsoft-edge/webview2/release-notes/archive?tabs=dotnetcsharp#10121039
+ /// - **Android:** Unsupported yet.
+ pub incognito: bool,
+
+ /// Whether all media can be played without user interaction.
+ pub autoplay: bool,
+
+ /// Set a handler closure to process page load events.
+ pub on_page_load_handler: Option>,
+
+ /// Set a proxy configuration for the webview. Supports HTTP CONNECT and SOCKSv5 proxies
+ ///
+ /// - **macOS**: Requires macOS 14.0+ and the `mac-proxy` feature flag to be enabled.
+ /// - **Android / iOS:** Not supported.
+ pub proxy_config: Option,
+
+ /// Whether the webview should be focused when created.
+ ///
+ /// ## Platform-specific:
+ ///
+ /// - **macOS / Android / iOS:** Unsupported.
+ pub focused: bool,
+
+ /// The webview bounds. Defaults to `x: 0, y: 0, width: 200, height: 200`.
+ /// This is only effective if the webview was created by [`WebView::new_as_child`] or [`WebViewBuilder::new_as_child`]
+ /// or on Linux, if was created by [`WebViewExtUnix::new_gtk`] or [`WebViewBuilderExtUnix::new_gtk`] with [`gtk::Fixed`].
+ pub bounds: Option,
+}
+
+impl<'a> Default for WebViewAttributes<'a> {
+ fn default() -> Self {
+ Self {
+ id: Default::default(),
+ context: None,
+ user_agent: None,
+ visible: true,
+ transparent: false,
+ background_color: None,
+ url: None,
+ headers: None,
+ html: None,
+ initialization_scripts: Default::default(),
+ custom_protocols: Default::default(),
+ ipc_handler: None,
+ drag_drop_handler: None,
+ navigation_handler: None,
+ download_started_handler: None,
+ download_completed_handler: None,
+ new_window_req_handler: None,
+ clipboard: false,
+ #[cfg(debug_assertions)]
+ devtools: true,
+ #[cfg(not(debug_assertions))]
+ devtools: false,
+ zoom_hotkeys_enabled: false,
+ accept_first_mouse: false,
+ back_forward_navigation_gestures: false,
+ document_title_changed_handler: None,
+ incognito: false,
+ autoplay: true,
+ on_page_load_handler: None,
+ proxy_config: None,
+ focused: true,
+ bounds: Some(Rect {
+ position: dpi::LogicalPosition::new(0, 0).into(),
+ size: dpi::LogicalSize::new(200, 200).into(),
+ }),
+ }
+ }
+}
+
+struct WebviewBuilderParts<'a> {
+ attrs: WebViewAttributes<'a>,
+ platform_specific: PlatformSpecificWebViewAttributes,
+}
+
+/// Builder type of [`WebView`].
+///
+/// [`WebViewBuilder`] / [`WebView`] are the basic building blocks to construct WebView contents and
+/// scripts for those who prefer to control fine grained window creation and event handling.
+/// [`WebViewBuilder`] provides ability to setup initialization before web engine starts.
+pub struct WebViewBuilder<'a> {
+ inner: Result>,
+}
+
+impl<'a> WebViewBuilder<'a> {
+ /// Create a new [`WebViewBuilder`].
+ pub fn new() -> Self {
+ Self {
+ inner: Ok(WebviewBuilderParts {
+ attrs: WebViewAttributes::default(),
+ #[allow(clippy::default_constructed_unit_structs)]
+ platform_specific: PlatformSpecificWebViewAttributes::default(),
+ }),
+ }
+ }
+
+ /// Create a new [`WebViewBuilder`] with a web context that can be shared with multiple [`WebView`]s.
+ pub fn with_web_context(web_context: &'a mut WebContext) -> Self {
+ let mut attrs = WebViewAttributes::default();
+ attrs.context = Some(web_context);
+
+ Self {
+ inner: Ok(WebviewBuilderParts {
+ attrs,
+ #[allow(clippy::default_constructed_unit_structs)]
+ platform_specific: PlatformSpecificWebViewAttributes::default(),
+ }),
+ }
+ }
+
+ /// Create a new [`WebViewBuilder`] with the given [`WebViewAttributes`]
+ pub fn with_attributes(attrs: WebViewAttributes<'a>) -> Self {
+ Self {
+ inner: Ok(WebviewBuilderParts {
+ attrs,
+ #[allow(clippy::default_constructed_unit_structs)]
+ platform_specific: PlatformSpecificWebViewAttributes::default(),
+ }),
+ }
+ }
+
+ fn and_then(self, func: F) -> Self
+ where
+ F: FnOnce(WebviewBuilderParts<'a>) -> Result>,
+ {
+ Self {
+ inner: self.inner.and_then(func),
+ }
+ }
+
+ /// Set an id that will be passed when this webview makes requests in certain callbacks.
+ pub fn with_id(self, id: WebViewId<'a>) -> Self {
+ self.and_then(|mut b| {
+ b.attrs.id = Some(id);
+ Ok(b)
+ })
+ }
+
+ /// Indicates whether horizontal swipe gestures trigger backward and forward page navigation.
+ ///
+ /// ## Platform-specific:
+ ///
+ /// - **Android / iOS:** Unsupported.
+ pub fn with_back_forward_navigation_gestures(self, gesture: bool) -> Self {
+ self.and_then(|mut b| {
+ b.attrs.back_forward_navigation_gestures = gesture;
+ Ok(b)
+ })
+ }
+
+ /// Sets whether the WebView should be transparent.
+ ///
+ /// ## Platform-specific:
+ ///
+ /// **Windows 7**: Not supported.
+ pub fn with_transparent(self, transparent: bool) -> Self {
+ self.and_then(|mut b| {
+ b.attrs.transparent = transparent;
+ Ok(b)
+ })
+ }
+
+ /// Specify the webview background color. This will be ignored if `transparent` is set to `true`.
+ ///
+ /// The color uses the RGBA format.
+ ///
+ /// ## Platfrom-specific:
+ ///
+ /// - **macOS / iOS**: Not implemented.
+ /// - **Windows**:
+ /// - on Windows 7, transparency is not supported and the alpha value will be ignored.
+ /// - on Windows higher than 7: translucent colors are not supported so any alpha value other than `0` will be replaced by `255`
+ pub fn with_background_color(self, background_color: RGBA) -> Self {
+ self.and_then(|mut b| {
+ b.attrs.background_color = Some(background_color);
+ Ok(b)
+ })
+ }
+
+ /// Sets whether the WebView should be visible or not.
+ pub fn with_visible(self, visible: bool) -> Self {
+ self.and_then(|mut b| {
+ b.attrs.visible = visible;
+ Ok(b)
+ })
+ }
+
+ /// Sets whether all media can be played without user interaction.
+ pub fn with_autoplay(self, autoplay: bool) -> Self {
+ self.and_then(|mut b| {
+ b.attrs.autoplay = autoplay;
+ Ok(b)
+ })
+ }
+
+ /// Initialize javascript code when loading new pages. When webview load a new page, this
+ /// initialization code will be executed. It is guaranteed that code is executed before
+ /// `window.onload`.
+ ///
+ /// ## Example
+ /// ```no_run
+ /// # use wry::{WebViewBuilder, raw_window_handle, Rect, dpi::*};
+ /// # use winit::{window::WindowBuilder, event_loop::EventLoop};
+ /// let event_loop = EventLoop::new().unwrap();
+ /// let window = WindowBuilder::new().build(&event_loop).unwrap();
+ ///
+ /// let webview = WebViewBuilder::new()
+ /// .with_initialization_script("console.log('Running inside main frame only')")
+ /// .with_url("https://tauri.app")
+ /// .build(&window)
+ /// .unwrap();
+ /// ```
+ ///
+ /// ## Platform-specific
+ ///
+ /// - **Android:** When [addDocumentStartJavaScript] is not supported,
+ /// we prepend them to each HTML head (implementation only supported on custom protocol URLs).
+ /// For remote URLs, we use [onPageStarted] which is not guaranteed to run before other scripts.
+ ///
+ /// [addDocumentStartJavaScript]: https://developer.android.com/reference/androidx/webkit/WebViewCompat#addDocumentStartJavaScript(android.webkit.WebView,java.lang.String,java.util.Set%3Cjava.lang.String%3E)
+ /// [onPageStarted]: https://developer.android.com/reference/android/webkit/WebViewClient#onPageStarted(android.webkit.WebView,%20java.lang.String,%20android.graphics.Bitmap)
+ pub fn with_initialization_script(self, js: &str) -> Self {
+ self.with_initialization_script_for_main_only(js, true)
+ }
+
+ /// Same as [`with_initialization_script`](Self::with_initialization_script) but with option to inject into main frame only or sub frames.
+ ///
+ /// ## Example
+ /// ```no_run
+ /// # use wry::{WebViewBuilder, raw_window_handle, Rect, dpi::*};
+ /// # use winit::{window::WindowBuilder, event_loop::EventLoop};
+ /// let event_loop = EventLoop::new().unwrap();
+ /// let window = WindowBuilder::new().build(&event_loop).unwrap();
+ ///
+ /// let webview = WebViewBuilder::new()
+ /// .with_initialization_script_for_main_only("console.log('Running inside main frame only')", true)
+ /// .with_initialization_script_for_main_only("console.log('Running main frame and sub frames')", false)
+ /// .with_url("https://tauri.app")
+ /// .build(&window)
+ /// .unwrap();
+ /// ```
+ pub fn with_initialization_script_for_main_only(self, js: &str, main_only: bool) -> Self {
+ self.and_then(|mut b| {
+ if !js.is_empty() {
+ b.attrs
+ .initialization_scripts
+ .push((js.to_string(), main_only));
+ }
+ Ok(b)
+ })
+ }
+
+ /// Register custom loading protocols with pairs of scheme uri string and a handling
+ /// closure.
+ ///
+ /// The closure takes a [Request] and returns a [Response]
+ ///
+ /// When registering a custom protocol with the same name, only the last regisered one will be used.
+ ///
+ /// # Warning
+ ///
+ /// Pages loaded from custom protocol will have different Origin on different platforms. And
+ /// servers which enforce CORS will need to add exact same Origin header in `Access-Control-Allow-Origin`
+ /// if you wish to send requests with native `fetch` and `XmlHttpRequest` APIs. Here are the
+ /// different Origin headers across platforms:
+ ///
+ /// - macOS, iOS and Linux: `://` (so it will be `wry://path/to/page).
+ /// - Windows and Android: `http://.` by default (so it will be `http://wry.path/to/page`). To use `https` instead of `http`, use [`WebViewBuilderExtWindows::with_https_scheme`] and [`WebViewBuilderExtAndroid::with_https_scheme`].
+ ///
+ /// # Reading assets on mobile
+ ///
+ /// - Android: For loading content from the `assets` folder (which is copied to the Andorid apk) please
+ /// use the function [`with_asset_loader`] from [`WebViewBuilderExtAndroid`] instead.
+ /// This function on Android can only be used to serve assets you can embed in the binary or are
+ /// elsewhere in Android (provided the app has appropriate access), but not from the `assets`
+ /// folder which lives within the apk. For the cases where this can be used, it works the same as in macOS and Linux.
+ /// - iOS: To get the path of your assets, you can call [`CFBundle::resources_path`](https://docs.rs/core-foundation/latest/core_foundation/bundle/struct.CFBundle.html#method.resources_path). So url like `wry://assets/index.html` could get the html file in assets directory.
+ #[cfg(feature = "protocol")]
+ pub fn with_custom_protocol(self, name: String, handler: F) -> Self
+ where
+ F: Fn(WebViewId, Request>) -> Response> + 'static,
+ {
+ self.and_then(|mut b| {
+ #[cfg(any(
+ target_os = "linux",
+ target_os = "dragonfly",
+ target_os = "freebsd",
+ target_os = "netbsd",
+ target_os = "openbsd",
+ ))]
+ if let Some(context) = &mut b.attrs.context {
+ context.register_custom_protocol(name.clone())?;
+ }
+
+ if b.attrs.custom_protocols.iter().any(|(n, _)| n == &name) {
+ return Err(Error::DuplicateCustomProtocol(name));
+ }
+
+ b.attrs.custom_protocols.insert(
+ name,
+ Box::new(move |id, request, responder| {
+ let http_response = handler(id, request);
+ responder.respond(http_response);
+ }),
+ );
+
+ Ok(b)
+ })
+ }
+
+ /// Same as [`Self::with_custom_protocol`] but with an asynchronous responder.
+ ///
+ /// When registering a custom protocol with the same name, only the last regisered one will be used.
+ ///
+ /// # Examples
+ ///
+ /// ```no_run
+ /// use wry::{WebViewBuilder, raw_window_handle};
+ /// WebViewBuilder::new()
+ /// .with_asynchronous_custom_protocol("wry".into(), |_webview_id, request, responder| {
+ /// // here you can use a tokio task, thread pool or anything
+ /// // to do heavy computation to resolve your request
+ /// // e.g. downloading files, opening the camera...
+ /// std::thread::spawn(move || {
+ /// std::thread::sleep(std::time::Duration::from_secs(2));
+ /// responder.respond(http::Response::builder().body(Vec::new()).unwrap());
+ /// });
+ /// });
+ /// ```
+ #[cfg(feature = "protocol")]
+ pub fn with_asynchronous_custom_protocol(self, name: String, handler: F) -> Self
+ where
+ F: Fn(WebViewId, Request>, RequestAsyncResponder) + 'static,
+ {
+ self.and_then(|mut b| {
+ #[cfg(any(
+ target_os = "linux",
+ target_os = "dragonfly",
+ target_os = "freebsd",
+ target_os = "netbsd",
+ target_os = "openbsd",
+ ))]
+ if let Some(context) = &mut b.attrs.context {
+ context.register_custom_protocol(name.clone())?;
+ }
+
+ if b.attrs.custom_protocols.iter().any(|(n, _)| n == &name) {
+ return Err(Error::DuplicateCustomProtocol(name));
+ }
+
+ b.attrs.custom_protocols.insert(name, Box::new(handler));
+
+ Ok(b)
+ })
+ }
+
+ /// Set the IPC handler to receive the message from Javascript on webview
+ /// using `window.ipc.postMessage("insert_message_here")` to host Rust code.
+ ///
+ /// ## Platform-specific
+ ///
+ /// - **Linux / Android**: The request URL is not supported on iframes and the main frame URL is used instead.
+ pub fn with_ipc_handler(self, handler: F) -> Self
+ where
+ F: Fn(Request) + 'static,
+ {
+ self.and_then(|mut b| {
+ b.attrs.ipc_handler = Some(Box::new(handler));
+ Ok(b)
+ })
+ }
+
+ /// Set a handler closure to process incoming [`DragDropEvent`] of the webview.
+ ///
+ /// # Blocking OS Default Behavior
+ /// Return `true` in the callback to block the OS' default behavior.
+ ///
+ /// Note, that if you do block this behavior, it won't be possible to drop files on ` ` forms.
+ /// Also note, that it's not possible to manually set the value of a ` ` via JavaScript for security reasons.
+ #[cfg(feature = "drag-drop")]
+ #[cfg_attr(docsrs, doc(cfg(feature = "drag-drop")))]
+ pub fn with_drag_drop_handler(self, handler: F) -> Self
+ where
+ F: Fn(DragDropEvent) -> bool + 'static,
+ {
+ self.and_then(|mut b| {
+ b.attrs.drag_drop_handler = Some(Box::new(handler));
+ Ok(b)
+ })
+ }
+
+ /// Load the provided URL with given headers when the builder calling [`WebViewBuilder::build`] to create the [`WebView`].
+ /// The provided URL must be valid.
+ ///
+ /// ## Note
+ ///
+ /// Data URLs are not supported, use [`html`](Self::with_html) option instead.
+ pub fn with_url_and_headers(self, url: impl Into, headers: http::HeaderMap) -> Self {
+ self.and_then(|mut b| {
+ b.attrs.url = Some(url.into());
+ b.attrs.headers = Some(headers);
+ Ok(b)
+ })
+ }
+
+ /// Load the provided URL when the builder calling [`WebViewBuilder::build`] to create the [`WebView`].
+ /// The provided URL must be valid.
+ ///
+ /// ## Note
+ ///
+ /// Data URLs are not supported, use [`html`](Self::with_html) option instead.
+ pub fn with_url(self, url: impl Into) -> Self {
+ self.and_then(|mut b| {
+ b.attrs.url = Some(url.into());
+ b.attrs.headers = None;
+ Ok(b)
+ })
+ }
+
+ /// Set headers used when loading the requested [`url`](Self::with_url).
+ pub fn with_headers(self, headers: http::HeaderMap) -> Self {
+ self.and_then(|mut b| {
+ b.attrs.headers = Some(headers);
+ Ok(b)
+ })
+ }
+
+ /// Load the provided HTML string when the builder calling [`WebViewBuilder::build`] to create the [`WebView`].
+ /// This will be ignored if `url` is provided.
+ ///
+ /// # Warning
+ ///
+ /// The Page loaded from html string will have `null` origin.
+ ///
+ /// ## PLatform-specific:
+ ///
+ /// - **Windows:** the string can not be larger than 2 MB (2 * 1024 * 1024 bytes) in total size
+ pub fn with_html(self, html: impl Into) -> Self {
+ self.and_then(|mut b| {
+ b.attrs.html = Some(html.into());
+ Ok(b)
+ })
+ }
+
+ /// Set a custom [user-agent](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent) for the WebView.
+ ///
+ /// ## Platform-specific
+ ///
+ /// - Windows: Requires WebView2 Runtime version 86.0.616.0 or higher, does nothing on older versions,
+ /// see https://learn.microsoft.com/en-us/microsoft-edge/webview2/release-notes/archive?tabs=dotnetcsharp#10790-prerelease
+ pub fn with_user_agent(self, user_agent: impl Into) -> Self {
+ self.and_then(|mut b| {
+ b.attrs.user_agent = Some(user_agent.into());
+ Ok(b)
+ })
+ }
+
+ /// Enable or disable web inspector which is usually called devtools.
+ ///
+ /// Note this only enables devtools to the webview. To open it, you can call
+ /// [`WebView::open_devtools`], or right click the page and open it from the context menu.
+ ///
+ /// ## Platform-specific
+ ///
+ /// - macOS: This will call private functions on **macOS**. It is enabled in **debug** builds,
+ /// but requires `devtools` feature flag to actually enable it in **release** builds.
+ /// - Android: Open `chrome://inspect/#devices` in Chrome to get the devtools window. Wry's `WebView` devtools API isn't supported on Android.
+ /// - iOS: Open Safari > Develop > [Your Device Name] > [Your WebView] to get the devtools window.
+ pub fn with_devtools(self, devtools: bool) -> Self {
+ self.and_then(|mut b| {
+ b.attrs.devtools = devtools;
+ Ok(b)
+ })
+ }
+
+ /// Whether page zooming by hotkeys or gestures is enabled
+ ///
+ /// ## Platform-specific
+ ///
+ /// - Windows: Setting to `false` can't disable pinch zoom on WebView2 Runtime version before 91.0.865.0,
+ /// see https://learn.microsoft.com/en-us/microsoft-edge/webview2/release-notes/archive?tabs=dotnetcsharp#10865-prerelease
+ ///
+ /// - **macOS / Linux / Android / iOS**: Unsupported
+ pub fn with_hotkeys_zoom(self, zoom: bool) -> Self {
+ self.and_then(|mut b| {
+ b.attrs.zoom_hotkeys_enabled = zoom;
+ Ok(b)
+ })
+ }
+
+ /// Set a navigation handler to decide if incoming url is allowed to navigate.
+ ///
+ /// The closure take a `String` parameter as url and returns a `bool` to determine whether the navigation should happen.
+ /// `true` allows to navigate and `false` does not.
+ pub fn with_navigation_handler(self, callback: impl Fn(String) -> bool + 'static) -> Self {
+ self.and_then(|mut b| {
+ b.attrs.navigation_handler = Some(Box::new(callback));
+ Ok(b)
+ })
+ }
+
+ /// Set a download started handler to manage incoming downloads.
+ ///
+ //// The closure takes two parameters, the first is a `String` representing the url being downloaded from and and the
+ /// second is a mutable `PathBuf` reference that (possibly) represents where the file will be downloaded to. The latter
+ /// parameter can be used to set the download location by assigning a new path to it, the assigned path _must_ be
+ /// absolute. The closure returns a `bool` to allow or deny the download.
+ pub fn with_download_started_handler(
+ self,
+ download_started_handler: impl FnMut(String, &mut PathBuf) -> bool + 'static,
+ ) -> Self {
+ self.and_then(|mut b| {
+ b.attrs.download_started_handler = Some(Box::new(download_started_handler));
+ Ok(b)
+ })
+ }
+
+ /// Sets a download completion handler to manage downloads that have finished.
+ ///
+ /// The closure is fired when the download completes, whether it was successful or not.
+ /// The closure takes a `String` representing the URL of the original download request, an `Option`
+ /// potentially representing the filesystem path the file was downloaded to, and a `bool` indicating if the download
+ /// succeeded. A value of `None` being passed instead of a `PathBuf` does not necessarily indicate that the download
+ /// did not succeed, and may instead indicate some other failure, always check the third parameter if you need to
+ /// know if the download succeeded.
+ ///
+ /// ## Platform-specific:
+ ///
+ /// - **macOS**: The second parameter indicating the path the file was saved to, is always empty,
+ /// due to API limitations.
+ pub fn with_download_completed_handler(
+ self,
+ download_completed_handler: impl Fn(String, Option, bool) + 'static,
+ ) -> Self {
+ self.and_then(|mut b| {
+ b.attrs.download_completed_handler = Some(Rc::new(download_completed_handler));
+ Ok(b)
+ })
+ }
+
+ /// Enables clipboard access for the page rendered on **Linux** and **Windows**.
+ ///
+ /// macOS doesn't provide such method and is always enabled by default. But your app will still need to add menu
+ /// item accelerators to use the clipboard shortcuts.
+ pub fn with_clipboard(self, clipboard: bool) -> Self {
+ self.and_then(|mut b| {
+ b.attrs.clipboard = clipboard;
+ Ok(b)
+ })
+ }
+
+ /// Set a new window request handler to decide if incoming url is allowed to be opened.
+ ///
+ /// The closure take a `String` parameter as url and return `bool` to determine whether the window should open.
+ /// `true` allows to open and `false` does not.
+ pub fn with_new_window_req_handler(self, callback: impl Fn(String) -> bool + 'static) -> Self {
+ self.and_then(|mut b| {
+ b.attrs.new_window_req_handler = Some(Box::new(callback));
+ Ok(b)
+ })
+ }
+
+ /// Sets whether clicking an inactive window also clicks through to the webview. Default is `false`.
+ ///
+ /// ## Platform-specific
+ ///
+ /// This configuration only impacts macOS.
+ pub fn with_accept_first_mouse(self, accept_first_mouse: bool) -> Self {
+ self.and_then(|mut b| {
+ b.attrs.accept_first_mouse = accept_first_mouse;
+ Ok(b)
+ })
+ }
+
+ /// Set a handler closure to process the change of the webview's document title.
+ pub fn with_document_title_changed_handler(self, callback: impl Fn(String) + 'static) -> Self {
+ self.and_then(|mut b| {
+ b.attrs.document_title_changed_handler = Some(Box::new(callback));
+ Ok(b)
+ })
+ }
+
+ /// Run the WebView with incognito mode. Note that WebContext will be ingored if incognito is
+ /// enabled.
+ ///
+ /// ## Platform-specific:
+ ///
+ /// - Windows: Requires WebView2 Runtime version 101.0.1210.39 or higher, does nothing on older versions,
+ /// see https://learn.microsoft.com/en-us/microsoft-edge/webview2/release-notes/archive?tabs=dotnetcsharp#10121039
+ /// - **Android:** Unsupported yet.
+ pub fn with_incognito(self, incognito: bool) -> Self {
+ self.and_then(|mut b| {
+ b.attrs.incognito = incognito;
+ Ok(b)
+ })
+ }
+
+ /// Set a handler to process page loading events.
+ pub fn with_on_page_load_handler(
+ self,
+ handler: impl Fn(PageLoadEvent, String) + 'static,
+ ) -> Self {
+ self.and_then(|mut b| {
+ b.attrs.on_page_load_handler = Some(Box::new(handler));
+ Ok(b)
+ })
+ }
+
+ /// Set a proxy configuration for the webview.
+ ///
+ /// - **macOS**: Requires macOS 14.0+ and the `mac-proxy` feature flag to be enabled. Supports HTTP CONNECT and SOCKSv5 proxies.
+ /// - **Windows / Linux**: Supports HTTP CONNECT and SOCKSv5 proxies.
+ /// - **Android / iOS:** Not supported.
+ pub fn with_proxy_config(self, configuration: ProxyConfig) -> Self {
+ self.and_then(|mut b| {
+ b.attrs.proxy_config = Some(configuration);
+ Ok(b)
+ })
+ }
+
+ /// Set whether the webview should be focused when created.
+ ///
+ /// ## Platform-specific:
+ ///
+ /// - **macOS / Android / iOS:** Unsupported.
+ pub fn with_focused(self, focused: bool) -> Self {
+ self.and_then(|mut b| {
+ b.attrs.focused = focused;
+ Ok(b)
+ })
+ }
+
+ /// Specify the webview position relative to its parent if it will be created as a child
+ /// or if created using [`WebViewBuilderExtUnix::new_gtk`] with [`gtk::Fixed`].
+ ///
+ /// Defaults to `x: 0, y: 0, width: 200, height: 200`.
+ pub fn with_bounds(self, bounds: Rect) -> Self {
+ self.and_then(|mut b| {
+ b.attrs.bounds = Some(bounds);
+ Ok(b)
+ })
+ }
+
+ /// Consume the builder and create the [`WebView`] from a type that implements [`HasWindowHandle`].
+ ///
+ /// # Platform-specific:
+ ///
+ /// - **Linux**: Only X11 is supported, if you want to support Wayland too, use [`WebViewBuilderExtUnix::new_gtk`].
+ ///
+ /// Although this methods only needs an X11 window handle, we use webkit2gtk, so you still need to initialize gtk
+ /// by callling [`gtk::init`] and advance its loop alongside your event loop using [`gtk::main_iteration_do`].
+ /// Checkout the [Platform Considerations](https://docs.rs/wry/latest/wry/#platform-considerations) section in the crate root documentation.
+ /// - **Windows**: The webview will auto-resize when the passed handle is resized.
+ /// - **Linux (X11)**: Unlike macOS and Windows, the webview will not auto-resize and you'll need to call [`WebView::set_bounds`] manually.
+ ///
+ /// # Panics:
+ ///
+ /// - Panics if the provided handle was not supported or invalid.
+ /// - Panics on Linux, if [`gtk::init`] was not called in this thread.
+ pub fn build(self, window: &'a W) -> Result {
+ let parts = self.inner?;
+
+ InnerWebView::new(window, parts.attrs, parts.platform_specific)
+ .map(|webview| WebView { webview })
+ }
+
+ /// Consume the builder and create the [`WebView`] as a child window inside the provided [`HasWindowHandle`].
+ ///
+ /// ## Platform-specific
+ ///
+ /// - **Windows**: This will create the webview as a child window of the `parent` window.
+ /// - **macOS**: This will create the webview as a `NSView` subview of the `parent` window's
+ /// content view.
+ /// - **Linux**: This will create the webview as a child window of the `parent` window. Only X11
+ /// is supported. This method won't work on Wayland.
+ ///
+ /// Although this methods only needs an X11 window handle, you use webkit2gtk, so you still need to initialize gtk
+ /// by callling [`gtk::init`] and advance its loop alongside your event loop using [`gtk::main_iteration_do`].
+ /// Checkout the [Platform Considerations](https://docs.rs/wry/latest/wry/#platform-considerations) section in the crate root documentation.
+ ///
+ /// If you want to support child webviews on X11 and Wayland at the same time,
+ /// we recommend using [`WebViewBuilderExtUnix::new_gtk`] with [`gtk::Fixed`].
+ /// - **Android/iOS:** Unsupported.
+ ///
+ /// # Panics:
+ ///
+ /// - Panics if the provided handle was not support or invalid.
+ /// - Panics on Linux, if [`gtk::init`] was not called in this thread.
+ pub fn build_as_child(self, window: &'a W) -> Result {
+ let parts = self.inner?;
+
+ InnerWebView::new_as_child(window, parts.attrs, parts.platform_specific)
+ .map(|webview| WebView { webview })
+ }
+}
+
+#[cfg(any(target_os = "macos", target_os = "ios",))]
+#[derive(Clone, Default)]
+pub(crate) struct PlatformSpecificWebViewAttributes {
+ data_store_identifier: Option<[u8; 16]>,
+}
+
+#[cfg(any(target_os = "macos", target_os = "ios",))]
+pub trait WebViewBuilderExtDarwin {
+ /// Initialize the WebView with a custom data store identifier.
+ /// Can be used as a replacement for data_directory not being available in WKWebView.
+ ///
+ /// - **macOS / iOS**: Available on macOS >= 14 and iOS >= 17
+ fn with_data_store_identifier(self, identifier: [u8; 16]) -> Self;
+}
+
+#[cfg(any(target_os = "macos", target_os = "ios",))]
+impl WebViewBuilderExtDarwin for WebViewBuilder<'_> {
+ fn with_data_store_identifier(self, identifier: [u8; 16]) -> Self {
+ self.and_then(|mut b| {
+ b.platform_specific.data_store_identifier = Some(identifier);
+ Ok(b)
+ })
+ }
+}
+
+#[cfg(windows)]
+#[derive(Clone)]
+pub(crate) struct PlatformSpecificWebViewAttributes {
+ additional_browser_args: Option,
+ browser_accelerator_keys: bool,
+ theme: Option,
+ use_https: bool,
+ scroll_bar_style: ScrollBarStyle,
+ browser_extensions_enabled: bool,
+ extension_path: Option,
+}
+
+#[cfg(windows)]
+impl Default for PlatformSpecificWebViewAttributes {
+ fn default() -> Self {
+ Self {
+ additional_browser_args: None,
+ browser_accelerator_keys: true, // This is WebView2's default behavior
+ theme: None,
+ use_https: false, // To match macOS & Linux behavior in the context of mixed content.
+ scroll_bar_style: ScrollBarStyle::default(),
+ browser_extensions_enabled: false,
+ extension_path: None,
+ }
+ }
+}
+
+#[cfg(windows)]
+pub trait WebViewBuilderExtWindows {
+ /// Pass additional args to WebView2 upon creating the webview.
+ ///
+ /// ## Warning
+ ///
+ /// - Webview instances with different browser arguments must also have different [data directories](struct.WebContext.html#method.new).
+ /// - By default wry passes `--disable-features=msWebOOUI,msPdfOOUI,msSmartScreenProtection`
+ /// `--autoplay-policy=no-user-gesture-required` if autoplay is enabled
+ /// and `--proxy-server=://:` if a proxy is set.
+ /// so if you use this method, you have to add these arguments yourself if you want to keep the same behavior.
+ fn with_additional_browser_args>(self, additional_args: S) -> Self;
+
+ /// Determines whether browser-specific accelerator keys are enabled. When this setting is set to
+ /// `false`, it disables all accelerator keys that access features specific to a web browser.
+ /// The default value is `true`. See the following link to know more details.
+ ///
+ /// Setting to `false` does nothing on WebView2 Runtime version before 92.0.902.0,
+ /// see https://learn.microsoft.com/en-us/microsoft-edge/webview2/release-notes/archive?tabs=dotnetcsharp#10824-prerelease
+ ///
+ ///
+ fn with_browser_accelerator_keys(self, enabled: bool) -> Self;
+
+ /// Specifies the theme of webview2. This affects things like `prefers-color-scheme`.
+ ///
+ /// Defaults to [`Theme::Auto`] which will follow the OS defaults.
+ ///
+ /// Requires WebView2 Runtime version 101.0.1210.39 or higher, does nothing on older versions,
+ /// see https://learn.microsoft.com/en-us/microsoft-edge/webview2/release-notes/archive?tabs=dotnetcsharp#10121039
+ fn with_theme(self, theme: Theme) -> Self;
+
+ /// Determines whether the custom protocols should use `https://.path/to/page` instead of the default `http://.path/to/page`.
+ ///
+ /// Using a `http` scheme will allow mixed content when trying to fetch `http` endpoints
+ /// and is therefore less secure but will match the behavior of the `://path/to/page` protocols used on macOS and Linux.
+ ///
+ /// The default value is `false`.
+ fn with_https_scheme(self, enabled: bool) -> Self;
+
+ /// Specifies the native scrollbar style to use with webview2.
+ /// CSS styles that modify the scrollbar are applied on top of the native appearance configured here.
+ ///
+ /// Defaults to [`ScrollbarStyle::Default`] which is the browser default used by Microsoft Edge.
+ ///
+ /// Requires WebView2 Runtime version 125.0.2535.41 or higher, does nothing on older versions,
+ /// see https://learn.microsoft.com/en-us/microsoft-edge/webview2/release-notes/?tabs=dotnetcsharp#10253541
+ fn with_scroll_bar_style(self, style: ScrollBarStyle) -> Self;
+
+ /// Determines whether the ability to install and enable extensions is enabled.
+ ///
+ /// By default, extensions are disabled.
+ ///
+ /// Requires WebView2 Runtime version 1.0.2210.55 or higher, does nothing on older versions,
+ /// see https://learn.microsoft.com/en-us/microsoft-edge/webview2/release-notes/archive?tabs=dotnetcsharp#10221055
+ fn with_browser_extensions_enabled(self, enabled: bool) -> Self;
+
+ /// Set the path from which to load extensions from. Extensions stored in this path should be unpacked.
+ ///
+ /// Does nothing if browser extensions are disabled. See [`with_browser_extensions_enabled`](Self::with_browser_extensions_enabled)
+ fn with_extension_path(self, path: impl Into) -> Self;
+}
+
+#[cfg(windows)]
+impl WebViewBuilderExtWindows for WebViewBuilder<'_> {
+ fn with_additional_browser_args>(self, additional_args: S) -> Self {
+ self.and_then(|mut b| {
+ b.platform_specific.additional_browser_args = Some(additional_args.into());
+ Ok(b)
+ })
+ }
+
+ fn with_browser_accelerator_keys(self, enabled: bool) -> Self {
+ self.and_then(|mut b| {
+ b.platform_specific.browser_accelerator_keys = enabled;
+ Ok(b)
+ })
+ }
+
+ fn with_theme(self, theme: Theme) -> Self {
+ self.and_then(|mut b| {
+ b.platform_specific.theme = Some(theme);
+ Ok(b)
+ })
+ }
+
+ fn with_https_scheme(self, enabled: bool) -> Self {
+ self.and_then(|mut b| {
+ b.platform_specific.use_https = enabled;
+ Ok(b)
+ })
+ }
+
+ fn with_scroll_bar_style(self, style: ScrollBarStyle) -> Self {
+ self.and_then(|mut b| {
+ b.platform_specific.scroll_bar_style = style;
+ Ok(b)
+ })
+ }
+
+ fn with_browser_extensions_enabled(self, enabled: bool) -> Self {
+ self.and_then(|mut b| {
+ b.platform_specific.browser_extensions_enabled = enabled;
+ Ok(b)
+ })
+ }
+
+ fn with_extension_path(self, path: impl Into) -> Self {
+ self.and_then(|mut b| {
+ b.platform_specific.extension_path = Some(path.into());
+ Ok(b)
+ })
+ }
+}
+
+#[cfg(target_os = "android")]
+#[derive(Default)]
+pub(crate) struct PlatformSpecificWebViewAttributes {
+ on_webview_created:
+ Option std::result::Result<(), jni::errors::Error> + Send>>,
+ with_asset_loader: bool,
+ asset_loader_domain: Option,
+ https_scheme: bool,
+}
+
+#[cfg(target_os = "android")]
+pub trait WebViewBuilderExtAndroid {
+ fn on_webview_created<
+ F: Fn(prelude::Context<'_, '_>) -> std::result::Result<(), jni::errors::Error> + Send + 'static,
+ >(
+ self,
+ f: F,
+ ) -> Self;
+
+ /// Use [WebViewAssetLoader](https://developer.android.com/reference/kotlin/androidx/webkit/WebViewAssetLoader)
+ /// to load assets from Android's `asset` folder when using `with_url` as `://assets/` (e.g.:
+ /// `wry://assets/index.html`). Note that this registers a custom protocol with the provided
+ /// String, similar to [`with_custom_protocol`], but also sets the WebViewAssetLoader with the
+ /// necessary domain (which is fixed as `.assets`). This cannot be used in conjunction
+ /// to `with_custom_protocol` for Android, as it changes the way in which requests are handled.
+ #[cfg(feature = "protocol")]
+ fn with_asset_loader(self, protocol: String) -> Self;
+
+ /// Determines whether the custom protocols should use `https://.localhost` instead of the default `http://.localhost`.
+ ///
+ /// Using a `http` scheme will allow mixed content when trying to fetch `http` endpoints
+ /// and is therefore less secure but will match the behavior of the `://localhost` protocols used on macOS and Linux.
+ ///
+ /// The default value is `false`.
+ fn with_https_scheme(self, enabled: bool) -> Self;
+}
+
+#[cfg(target_os = "android")]
+impl WebViewBuilderExtAndroid for WebViewBuilder<'_> {
+ fn on_webview_created<
+ F: Fn(prelude::Context<'_, '_>) -> std::result::Result<(), jni::errors::Error> + Send + 'static,
+ >(
+ self,
+ f: F,
+ ) -> Self {
+ self.and_then(|mut b| {
+ b.platform_specific.on_webview_created = Some(Box::new(f));
+ Ok(b)
+ })
+ }
+
+ #[cfg(feature = "protocol")]
+ fn with_asset_loader(self, protocol: String) -> Self {
+ // register custom protocol with empty Response return,
+ // this is necessary due to the need of fixing a domain
+ // in WebViewAssetLoader.
+ self.and_then(|mut b| {
+ b.attrs.custom_protocols.insert(
+ protocol.clone(),
+ Box::new(|_, _, api| {
+ api.respond(Response::builder().body(Vec::new()).unwrap());
+ }),
+ );
+ b.platform_specific.with_asset_loader = true;
+ b.platform_specific.asset_loader_domain = Some(format!("{}.assets", protocol));
+ Ok(b)
+ })
+ }
+
+ fn with_https_scheme(self, enabled: bool) -> Self {
+ self.and_then(|mut b| {
+ b.platform_specific.https_scheme = enabled;
+ Ok(b)
+ })
+ }
+}
+
+#[cfg(any(
+ target_os = "linux",
+ target_os = "dragonfly",
+ target_os = "freebsd",
+ target_os = "netbsd",
+ target_os = "openbsd",
+))]
+#[derive(Default)]
+pub(crate) struct PlatformSpecificWebViewAttributes {
+ extension_path: Option,
+}
+
+#[cfg(any(
+ target_os = "linux",
+ target_os = "dragonfly",
+ target_os = "freebsd",
+ target_os = "netbsd",
+ target_os = "openbsd",
+))]
+pub trait WebViewBuilderExtUnix<'a> {
+ /// Consume the builder and create the webview inside a GTK container widget, such as GTK window.
+ ///
+ /// - If the container is [`gtk::Box`], it is added using [`Box::pack_start(webview, true, true, 0)`](gtk::prelude::BoxExt::pack_start).
+ /// - If the container is [`gtk::Fixed`], its [size request](gtk::prelude::WidgetExt::set_size_request) will be set using the (width, height) bounds passed in
+ /// and will be added to the container using [`Fixed::put`](gtk::prelude::FixedExt::put) using the (x, y) bounds passed in.
+ /// - For all other containers, it will be added using [`gtk::prelude::ContainerExt::add`]
+ ///
+ /// # Panics:
+ ///
+ /// - Panics if [`gtk::init`] was not called in this thread.
+ fn build_gtk(self, widget: &'a W) -> Result
+ where
+ W: gtk::prelude::IsA;
+
+ /// Set the path from which to load extensions from.
+ fn with_extension_path(self, path: impl Into) -> Self;
+}
+
+#[cfg(any(
+ target_os = "linux",
+ target_os = "dragonfly",
+ target_os = "freebsd",
+ target_os = "netbsd",
+ target_os = "openbsd",
+))]
+impl<'a> WebViewBuilderExtUnix<'a> for WebViewBuilder<'a> {
+ fn build_gtk(self, widget: &'a W) -> Result
+ where
+ W: gtk::prelude::IsA,
+ {
+ let parts = self.inner?;
+
+ InnerWebView::new_gtk(widget, parts.attrs, parts.platform_specific)
+ .map(|webview| WebView { webview })
+ }
+
+ fn with_extension_path(self, path: impl Into) -> Self {
+ self.and_then(|mut b| {
+ b.platform_specific.extension_path = Some(path.into());
+ Ok(b)
+ })
+ }
+}
+
+/// The fundamental type to present a [`WebView`].
+///
+/// [`WebViewBuilder`] / [`WebView`] are the basic building blocks to construct WebView contents and
+/// scripts for those who prefer to control fine grained window creation and event handling.
+/// [`WebView`] presents the actual WebView window and let you still able to perform actions on it.
+pub struct WebView {
+ webview: InnerWebView,
+}
+
+impl WebView {
+ /// Create a [`WebView`] from from a type that implements [`HasWindowHandle`].
+ /// Note that calling this directly loses
+ /// abilities to initialize scripts, add ipc handler, and many more before starting WebView. To
+ /// benefit from above features, create a [`WebViewBuilder`] instead.
+ ///
+ /// # Platform-specific:
+ ///
+ /// - **Linux**: Only X11 is supported, if you want to support Wayland too, use [`WebViewExtUnix::new_gtk`].
+ ///
+ /// Although this methods only needs an X11 window handle, you use webkit2gtk, so you still need to initialize gtk
+ /// by callling [`gtk::init`] and advance its loop alongside your event loop using [`gtk::main_iteration_do`].
+ /// Checkout the [Platform Considerations](https://docs.rs/wry/latest/wry/#platform-considerations) section in the crate root documentation.
+ /// - **macOS / Windows**: The webview will auto-resize when the passed handle is resized.
+ /// - **Linux (X11)**: Unlike macOS and Windows, the webview will not auto-resize and you'll need to call [`WebView::set_bounds`] manually.
+ ///
+ /// # Panics:
+ ///
+ /// - Panics if the provided handle was not supported or invalid.
+ /// - Panics on Linux, if [`gtk::init`] was not called in this thread.
+ pub fn new(window: &impl HasWindowHandle, attrs: WebViewAttributes) -> Result {
+ WebViewBuilder::with_attributes(attrs).build(window)
+ }
+
+ /// Create [`WebViewBuilder`] as a child window inside the provided [`HasWindowHandle`].
+ ///
+ /// ## Platform-specific
+ ///
+ /// - **Windows**: This will create the webview as a child window of the `parent` window.
+ /// - **macOS**: This will create the webview as a `NSView` subview of the `parent` window's
+ /// content view.
+ /// - **Linux**: This will create the webview as a child window of the `parent` window. Only X11
+ /// is supported. This method won't work on Wayland.
+ ///
+ /// Although this methods only needs an X11 window handle, you use webkit2gtk, so you still need to initialize gtk
+ /// by callling [`gtk::init`] and advance its loop alongside your event loop using [`gtk::main_iteration_do`].
+ /// Checkout the [Platform Considerations](https://docs.rs/wry/latest/wry/#platform-considerations) section in the crate root documentation.
+ ///
+ /// If you want to support child webviews on X11 and Wayland at the same time,
+ /// we recommend using [`WebViewBuilderExtUnix::new_gtk`] with [`gtk::Fixed`].
+ /// - **Android/iOS:** Unsupported.
+ ///
+ /// # Panics:
+ ///
+ /// - Panics if the provided handle was not support or invalid.
+ /// - Panics on Linux, if [`gtk::init`] was not called in this thread.
+ pub fn new_as_child(parent: &impl HasWindowHandle, attrs: WebViewAttributes) -> Result {
+ WebViewBuilder::with_attributes(attrs).build_as_child(parent)
+ }
+
+ /// Returns the id of this webview.
+ pub fn id(&self) -> WebViewId {
+ self.webview.id()
+ }
+
+ /// Get the current url of the webview
+ pub fn url(&self) -> Result {
+ self.webview.url()
+ }
+
+ /// Evaluate and run javascript code.
+ pub fn evaluate_script(&self, js: &str) -> Result<()> {
+ self
+ .webview
+ .eval(js, None::>)
+ }
+
+ /// Evaluate and run javascript code with callback function. The evaluation result will be
+ /// serialized into a JSON string and passed to the callback function.
+ ///
+ /// Exception is ignored because of the limitation on windows. You can catch it yourself and return as string as a workaround.
+ ///
+ /// - ** Android:** Not implemented yet.
+ pub fn evaluate_script_with_callback(
+ &self,
+ js: &str,
+ callback: impl Fn(String) + Send + 'static,
+ ) -> Result<()> {
+ self.webview.eval(js, Some(callback))
+ }
+
+ /// Launch print modal for the webview content.
+ pub fn print(&self) -> Result<()> {
+ self.webview.print()
+ }
+
+ /// Get a list of cookies for specific url.
+ pub fn cookies_for_url(&self, url: &str) -> Result>> {
+ self.webview.cookies_for_url(url)
+ }
+
+ /// Get the list of cookies.
+ ///
+ /// ## Platform-specific
+ ///
+ /// - **Android**: Unsupported, always returns an empty [`Vec`].
+ pub fn cookies(&self) -> Result>> {
+ self.webview.cookies()
+ }
+
+ /// Open the web inspector which is usually called dev tool.
+ ///
+ /// ## Platform-specific
+ ///
+ /// - **Android / iOS:** Not supported.
+ #[cfg(any(debug_assertions, feature = "devtools"))]
+ pub fn open_devtools(&self) {
+ self.webview.open_devtools()
+ }
+
+ /// Close the web inspector which is usually called dev tool.
+ ///
+ /// ## Platform-specific
+ ///
+ /// - **Windows / Android / iOS:** Not supported.
+ #[cfg(any(debug_assertions, feature = "devtools"))]
+ pub fn close_devtools(&self) {
+ self.webview.close_devtools()
+ }
+
+ /// Gets the devtool window's current visibility state.
+ ///
+ /// ## Platform-specific
+ ///
+ /// - **Windows / Android / iOS:** Not supported.
+ #[cfg(any(debug_assertions, feature = "devtools"))]
+ pub fn is_devtools_open(&self) -> bool {
+ self.webview.is_devtools_open()
+ }
+
+ /// Set the webview zoom level
+ ///
+ /// ## Platform-specific:
+ ///
+ /// - **Android**: Not supported.
+ /// - **macOS**: available on macOS 11+ only.
+ /// - **iOS**: available on iOS 14+ only.
+ pub fn zoom(&self, scale_factor: f64) -> Result<()> {
+ self.webview.zoom(scale_factor)
+ }
+
+ /// Specify the webview background color.
+ ///
+ /// The color uses the RGBA format.
+ ///
+ /// ## Platfrom-specific:
+ ///
+ /// - **macOS / iOS**: Not implemented.
+ /// - **Windows**:
+ /// - On Windows 7, transparency is not supported and the alpha value will be ignored.
+ /// - On Windows higher than 7: translucent colors are not supported so any alpha value other than `0` will be replaced by `255`
+ pub fn set_background_color(&self, background_color: RGBA) -> Result<()> {
+ self.webview.set_background_color(background_color)
+ }
+
+ /// Navigate to the specified url
+ pub fn load_url(&self, url: &str) -> Result<()> {
+ self.webview.load_url(url)
+ }
+
+ /// Navigate to the specified url using the specified headers
+ pub fn load_url_with_headers(&self, url: &str, headers: http::HeaderMap) -> Result<()> {
+ self.webview.load_url_with_headers(url, headers)
+ }
+
+ /// Load html content into the webview
+ pub fn load_html(&self, html: &str) -> Result<()> {
+ self.webview.load_html(html)
+ }
+
+ /// Clear all browsing data
+ pub fn clear_all_browsing_data(&self) -> Result<()> {
+ self.webview.clear_all_browsing_data()
+ }
+
+ pub fn bounds(&self) -> Result {
+ self.webview.bounds()
+ }
+
+ /// Set the webview bounds.
+ ///
+ /// This is only effective if the webview was created as a child
+ /// or created using [`WebViewBuilderExtUnix::new_gtk`] with [`gtk::Fixed`].
+ pub fn set_bounds(&self, bounds: Rect) -> Result<()> {
+ self.webview.set_bounds(bounds)
+ }
+
+ /// Shows or hides the webview.
+ pub fn set_visible(&self, visible: bool) -> Result<()> {
+ self.webview.set_visible(visible)
+ }
+
+ /// Try moving focus to the webview.
+ pub fn focus(&self) -> Result<()> {
+ self.webview.focus()
+ }
+
+ /// Try moving focus away from the webview back to the parent window.
+ ///
+ /// ## Platform-specific:
+ ///
+ /// - **Android**: Not implemented.
+ pub fn focus_parent(&self) -> Result<()> {
+ self.webview.focus_parent()
+ }
+}
+
+/// An event describing drag and drop operations on the webview.
+#[non_exhaustive]
+#[derive(Debug, Clone)]
+pub enum DragDropEvent {
+ /// A drag operation has entered the webview.
+ Enter {
+ /// List of paths that are being dragged onto the webview.
+ paths: Vec,
+ /// Position of the drag operation, relative to the webview top-left corner.
+ position: (i32, i32),
+ },
+ /// A drag operation is moving over the window.
+ Over {
+ /// Position of the drag operation, relative to the webview top-left corner.
+ position: (i32, i32),
+ },
+ /// The file(s) have been dropped onto the window.
+ Drop {
+ /// List of paths that are being dropped onto the window.
+ paths: Vec,
+ /// Position of the drag operation, relative to the webview top-left corner.
+ position: (i32, i32),
+ },
+ /// The drag operation has been cancelled or left the window.
+ Leave,
+}
+
+/// Get WebView/Webkit version on current platform.
+pub fn webview_version() -> Result {
+ platform_webview_version()
+}
+
+/// The [memory usage target level][1]. There are two levels 'Low' and 'Normal' and the default
+/// level is 'Normal'. When the application is going inactive, setting the level to 'Low' can
+/// significantly reduce the application's memory consumption.
+///
+/// [1]: https://learn.microsoft.com/en-us/dotnet/api/microsoft.web.webview2.core.corewebview2memoryusagetargetlevel
+#[cfg(target_os = "windows")]
+#[non_exhaustive]
+#[derive(Default, Debug, Clone, Copy, PartialEq, Eq, Hash)]
+pub enum MemoryUsageLevel {
+ /// The 'Normal' memory usage. Applications should set this level when they are becoming active.
+ #[default]
+ Normal,
+ /// The 'Low' memory usage. Applications can reduce memory comsumption by setting this level when
+ /// they are becoming inactive.
+ Low,
+}
+
+/// Additional methods on `WebView` that are specific to Windows.
+#[cfg(target_os = "windows")]
+pub trait WebViewExtWindows {
+ /// Returns WebView2 Controller
+ fn controller(&self) -> ICoreWebView2Controller;
+
+ /// Changes the webview2 theme.
+ ///
+ /// Requires WebView2 Runtime version 101.0.1210.39 or higher, returns error on older versions,
+ /// see https://learn.microsoft.com/en-us/microsoft-edge/webview2/release-notes/archive?tabs=dotnetcsharp#10121039
+ fn set_theme(&self, theme: Theme) -> Result<()>;
+
+ /// Sets the [memory usage target level][1].
+ ///
+ /// When to best use this mode depends on the app in question. Most commonly it's called when
+ /// the app's visiblity state changes.
+ ///
+ /// Please read the [guide for WebView2][2] for more details.
+ ///
+ /// This method uses a WebView2 API added in Runtime version 114.0.1823.32. When it is used in
+ /// an older Runtime version, it does nothing.
+ ///
+ /// [1]: https://learn.microsoft.com/en-us/dotnet/api/microsoft.web.webview2.core.corewebview2memoryusagetargetlevel
+ /// [2]: https://learn.microsoft.com/en-us/dotnet/api/microsoft.web.webview2.core.corewebview2.memoryusagetargetlevel?view=webview2-dotnet-1.0.2088.41#remarks
+ fn set_memory_usage_level(&self, level: MemoryUsageLevel) -> Result<()>;
+
+ /// Attaches this webview to the given HWND and removes it from the current one.
+ fn reparent(&self, hwnd: isize) -> Result<()>;
+}
+
+#[cfg(target_os = "windows")]
+impl WebViewExtWindows for WebView {
+ fn controller(&self) -> ICoreWebView2Controller {
+ self.webview.controller.clone()
+ }
+
+ fn set_theme(&self, theme: Theme) -> Result<()> {
+ self.webview.set_theme(theme)
+ }
+
+ fn set_memory_usage_level(&self, level: MemoryUsageLevel) -> Result<()> {
+ self.webview.set_memory_usage_level(level)
+ }
+
+ fn reparent(&self, hwnd: isize) -> Result<()> {
+ self.webview.reparent(hwnd)
+ }
+}
+
+/// Additional methods on `WebView` that are specific to Linux.
+#[cfg(gtk)]
+pub trait WebViewExtUnix: Sized {
+ /// Create the webview inside a GTK container widget, such as GTK window.
+ ///
+ /// - If the container is [`gtk::Box`], it is added using [`Box::pack_start(webview, true, true, 0)`](gtk::prelude::BoxExt::pack_start).
+ /// - If the container is [`gtk::Fixed`], its [size request](gtk::prelude::WidgetExt::set_size_request) will be set using the (width, height) bounds passed in
+ /// and will be added to the container using [`Fixed::put`](gtk::prelude::FixedExt::put) using the (x, y) bounds passed in.
+ /// - For all other containers, it will be added using [`gtk::prelude::ContainerExt::add`]
+ ///
+ /// # Panics:
+ ///
+ /// - Panics if [`gtk::init`] was not called in this thread.
+ fn new_gtk(widget: &W) -> Result
+ where
+ W: gtk::prelude::IsA;
+
+ /// Returns Webkit2gtk Webview handle
+ fn webview(&self) -> webkit2gtk::WebView;
+
+ /// Attaches this webview to the given Widget and removes it from the current one.
+ fn reparent(&self, widget: &W) -> Result<()>
+ where
+ W: gtk::prelude::IsA;
+}
+
+#[cfg(gtk)]
+impl WebViewExtUnix for WebView {
+ fn new_gtk(widget: &W) -> Result
+ where
+ W: gtk::prelude::IsA,
+ {
+ WebViewBuilder::new().build_gtk(widget)
+ }
+
+ fn webview(&self) -> webkit2gtk::WebView {
+ self.webview.webview.clone()
+ }
+
+ fn reparent(&self, widget: &W) -> Result<()>
+ where
+ W: gtk::prelude::IsA,
+ {
+ self.webview.reparent(widget)
+ }
+}
+
+/// Additional methods on `WebView` that are specific to macOS.
+#[cfg(target_os = "macos")]
+pub trait WebViewExtMacOS {
+ /// Returns WKWebView handle
+ fn webview(&self) -> Retained;
+ /// Returns WKWebView manager [(userContentController)](https://developer.apple.com/documentation/webkit/wkscriptmessagehandler/1396222-usercontentcontroller) handle
+ fn manager(&self) -> Retained;
+ /// Returns NSWindow associated with the WKWebView webview
+ fn ns_window(&self) -> Retained;
+ /// Attaches this webview to the given NSWindow and removes it from the current one.
+ fn reparent(&self, window: *mut NSWindow) -> Result<()>;
+ // Prints with extra options
+ fn print_with_options(&self, options: &PrintOptions) -> Result<()>;
+}
+
+#[cfg(target_os = "macos")]
+impl WebViewExtMacOS for WebView {
+ fn webview(&self) -> Retained {
+ self.webview.webview.clone()
+ }
+
+ fn manager(&self) -> Retained {
+ self.webview.manager.clone()
+ }
+
+ fn ns_window(&self) -> Retained {
+ self.webview.webview.window().unwrap().clone()
+ }
+
+ fn reparent(&self, window: *mut NSWindow) -> Result<()> {
+ self.webview.reparent(window)
+ }
+
+ fn print_with_options(&self, options: &PrintOptions) -> Result<()> {
+ self.webview.print_with_options(options)
+ }
+}
+
+/// Additional methods on `WebView` that are specific to iOS.
+#[cfg(target_os = "ios")]
+pub trait WebViewExtIOS {
+ /// Returns WKWebView handle
+ fn webview(&self) -> Retained;
+ /// Returns WKWebView manager [(userContentController)](https://developer.apple.com/documentation/webkit/wkscriptmessagehandler/1396222-usercontentcontroller) handle
+ fn manager(&self) -> Retained;
+}
+
+#[cfg(target_os = "ios")]
+impl WebViewExtIOS for WebView {
+ fn webview(&self) -> Retained {
+ self.webview.webview.clone()
+ }
+
+ fn manager(&self) -> Retained {
+ self.webview.manager.clone()
+ }
+}
+
+#[cfg(target_os = "android")]
+/// Additional methods on `WebView` that are specific to Android
+pub trait WebViewExtAndroid {
+ fn handle(&self) -> JniHandle;
+}
+
+#[cfg(target_os = "android")]
+impl WebViewExtAndroid for WebView {
+ fn handle(&self) -> JniHandle {
+ JniHandle
+ }
+}
+
+/// WebView theme.
+#[derive(Debug, Clone, Copy)]
+pub enum Theme {
+ /// Dark
+ Dark,
+ /// Light
+ Light,
+ /// System preference
+ Auto,
+}
+
+/// Type alias for a color in the RGBA format.
+///
+/// Each value can be 0..255 inclusive.
+pub type RGBA = (u8, u8, u8, u8);
+
+/// Type of of page loading event
+pub enum PageLoadEvent {
+ /// Indicates that the content of the page has started loading
+ Started,
+ /// Indicates that the page content has finished loading
+ Finished,
+}
+
+#[cfg(test)]
+mod tests {
+ use super::*;
+
+ #[test]
+ #[cfg_attr(miri, ignore)]
+ fn should_get_webview_version() {
+ if let Err(error) = webview_version() {
+ panic!("{}", error);
+ }
+ }
+}
diff --git a/vendor/wry/src/proxy.rs b/vendor/wry/src/proxy.rs
new file mode 100644
index 0000000..c7a4260
--- /dev/null
+++ b/vendor/wry/src/proxy.rs
@@ -0,0 +1,15 @@
+#[derive(Debug, Clone)]
+pub struct ProxyEndpoint {
+ /// Proxy server host (e.g. 192.168.0.100, localhost, example.com, etc.)
+ pub host: String,
+ /// Proxy server port (e.g. 1080, 3128, etc.)
+ pub port: String,
+}
+
+#[derive(Debug, Clone)]
+pub enum ProxyConfig {
+ /// Connect to proxy server via HTTP CONNECT
+ Http(ProxyEndpoint),
+ /// Connect to proxy server via SOCKSv5
+ Socks5(ProxyEndpoint),
+}
diff --git a/vendor/wry/src/util.rs b/vendor/wry/src/util.rs
new file mode 100644
index 0000000..62036d6
--- /dev/null
+++ b/vendor/wry/src/util.rs
@@ -0,0 +1,13 @@
+use std::sync::atomic::{AtomicU32, Ordering};
+
+pub struct Counter(AtomicU32);
+
+impl Counter {
+ pub const fn new() -> Self {
+ Self(AtomicU32::new(1))
+ }
+
+ pub fn next(&self) -> u32 {
+ self.0.fetch_add(1, Ordering::Relaxed)
+ }
+}
diff --git a/vendor/wry/src/web_context.rs b/vendor/wry/src/web_context.rs
new file mode 100644
index 0000000..55735cb
--- /dev/null
+++ b/vendor/wry/src/web_context.rs
@@ -0,0 +1,101 @@
+// Copyright 2020-2023 Tauri Programme within The Commons Conservancy
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-License-Identifier: MIT
+
+#[cfg(gtk)]
+use crate::webkitgtk::WebContextImpl;
+
+use std::{
+ collections::HashSet,
+ path::{Path, PathBuf},
+};
+
+/// A context that is shared between multiple [`WebView`]s.
+///
+/// A browser would have a context for all the normal tabs and a different context for all the
+/// private/incognito tabs.
+///
+/// # Warning
+/// If [`WebView`] is created by a WebContext. Dropping `WebContext` will cause [`WebView`] lose
+/// some actions like custom protocol on Mac. Please keep both instances when you still wish to
+/// interact with them.
+///
+/// [`WebView`]: crate::WebView
+#[derive(Debug)]
+pub struct WebContext {
+ data_directory: Option,
+ #[allow(dead_code)] // It's not needed on Windows and macOS.
+ pub(crate) os: WebContextImpl,
+ #[allow(dead_code)] // It's not needed on Windows and macOS.
+ pub(crate) custom_protocols: HashSet,
+}
+
+impl WebContext {
+ /// Create a new [`WebContext`].
+ ///
+ /// `data_directory`:
+ /// * Whether the WebView window should have a custom user data path. This is useful in Windows
+ /// when a bundled application can't have the webview data inside `Program Files`.
+ pub fn new(data_directory: Option) -> Self {
+ Self {
+ os: WebContextImpl::new(data_directory.as_deref()),
+ data_directory,
+ custom_protocols: Default::default(),
+ }
+ }
+
+ #[cfg(gtk)]
+ pub(crate) fn new_ephemeral() -> Self {
+ Self {
+ os: WebContextImpl::new_ephemeral(),
+ data_directory: None,
+ custom_protocols: Default::default(),
+ }
+ }
+
+ /// A reference to the data directory the context was created with.
+ pub fn data_directory(&self) -> Option<&Path> {
+ self.data_directory.as_deref()
+ }
+
+ #[allow(dead_code)]
+ pub(crate) fn register_custom_protocol(&mut self, name: String) -> Result<(), crate::Error> {
+ if self.custom_protocols.contains(&name) {
+ return Err(crate::Error::ContextDuplicateCustomProtocol(name));
+ }
+
+ Ok(())
+ }
+
+ /// Check if a custom protocol has been registered on this context.
+ pub fn is_custom_protocol_registered(&self, name: String) -> bool {
+ self.custom_protocols.contains(&name)
+ }
+
+ /// Set if this context allows automation.
+ ///
+ /// **Note:** This is currently only enforced on Linux, and has the stipulation that
+ /// only 1 context allows automation at a time.
+ pub fn set_allows_automation(&mut self, flag: bool) {
+ self.os.set_allows_automation(flag);
+ }
+}
+
+impl Default for WebContext {
+ fn default() -> Self {
+ Self::new(None)
+ }
+}
+
+#[cfg(not(gtk))]
+#[derive(Debug)]
+pub(crate) struct WebContextImpl;
+
+#[cfg(not(gtk))]
+impl WebContextImpl {
+ fn new(_: Option<&Path>) -> Self {
+ Self
+ }
+
+ fn set_allows_automation(&mut self, _flag: bool) {}
+}
diff --git a/vendor/wry/src/webkitgtk/drag_drop.rs b/vendor/wry/src/webkitgtk/drag_drop.rs
new file mode 100644
index 0000000..5133713
--- /dev/null
+++ b/vendor/wry/src/webkitgtk/drag_drop.rs
@@ -0,0 +1,143 @@
+// Copyright 2020-2023 Tauri Programme within The Commons Conservancy
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-License-Identifier: MIT
+
+use std::{
+ cell::{Cell, UnsafeCell},
+ path::PathBuf,
+ rc::Rc,
+};
+
+use gtk::{glib::GString, prelude::*};
+use webkit2gtk::WebView;
+
+use crate::DragDropEvent;
+
+#[derive(PartialEq, Eq, PartialOrd, Ord, Clone, Copy, Debug)]
+enum DragControllerState {
+ Entered,
+ Leaving,
+ Left,
+}
+
+struct DragDropController {
+ paths: UnsafeCell