Skip to content

Commit

Permalink
apply version updates (#1054)
Browse files Browse the repository at this point in the history
Co-authored-by: amrbashir <[email protected]>
  • Loading branch information
github-actions[bot] and amrbashir authored Nov 21, 2023
1 parent e61e7f8 commit c241b48
Show file tree
Hide file tree
Showing 8 changed files with 69 additions and 82 deletions.
11 changes: 0 additions & 11 deletions .changes/Webview-to-WebView.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changes/add-api-to-set-memory-usage-for-windows.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changes/cfg_alias.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changes/enhance-init-scripts-android.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changes/fix-expect.md

This file was deleted.

22 changes: 0 additions & 22 deletions .changes/rwh.md

This file was deleted.

33 changes: 33 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,38 @@
# Changelog

## \[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`.
Expand Down
64 changes: 36 additions & 28 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,39 +1,47 @@
workspace = {}
workspace = { }

[package]
name = "wry"
version = "0.34.2"
authors = ["Tauri Programme within The Commons Conservancy"]
version = "0.35.0"
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"]
categories = [ "gui" ]

[package.metadata.docs.rs]
no-default-features = true
features = ["file-drop", "protocol"]
features = [ "file-drop", "protocol" ]
targets = [
"x86_64-unknown-linux-gnu",
"x86_64-pc-windows-msvc",
"x86_64-apple-darwin",
"x86_64-apple-darwin"
]
rustc-args = ["--cfg", "docsrs"]
rustdoc-args = ["--cfg", "docsrs"]
rustc-args = [ "--cfg", "docsrs" ]
rustdoc-args = [ "--cfg", "docsrs" ]

[features]
default = ["file-drop", "objc-exception", "protocol", "os-webview"]
objc-exception = ["objc/exception"]
file-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"]
default = [ "file-drop", "objc-exception", "protocol", "os-webview" ]
objc-exception = [ "objc/exception" ]
file-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"
]

[build-dependencies]
cfg_aliases = "0.1"
Expand All @@ -42,16 +50,16 @@ cfg_aliases = "0.1"
libc = "0.2"
log = "0.4"
once_cell = "1"
serde = { version = "1.0", features = ["derive"] }
serde = { version = "1.0", features = [ "derive" ] }
serde_json = "1.0"
thiserror = "1.0"
url = "2.4"
http = "0.2"
raw-window-handle = { version = "0.5", features = ["std"] }
raw-window-handle = { version = "0.5", features = [ "std" ] }

[target."cfg(any(target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies]
javascriptcore-rs = { version = "=1.1", features = ["v2_28"], optional = true }
webkit2gtk = { version = "=2.0", features = ["v2_38"], optional = true }
javascriptcore-rs = { version = "=1.1", features = [ "v2_28" ], optional = true }
webkit2gtk = { version = "=2.0", features = [ "v2_38" ], optional = true }
webkit2gtk-sys = { version = "=2.0", optional = true }
gtk = { version = "0.18", optional = true }
soup3 = { version = "0.5", optional = true }
Expand All @@ -64,9 +72,9 @@ windows-implement = "0.52"
windows-version = "0.1"
dunce = "1"

[target."cfg(target_os = \"windows\")".dependencies.windows]
version = "0.52"
features = [
[target."cfg(target_os = \"windows\")".dependencies.windows]
version = "0.52"
features = [
"implement",
"Win32_Foundation",
"Win32_Graphics_Gdi",
Expand All @@ -81,7 +89,7 @@ features = [
"Win32_Globalization",
"Win32_UI_HiDpi",
"Win32_UI_Input",
"Win32_UI_Input_KeyboardAndMouse",
"Win32_UI_Input_KeyboardAndMouse"
]

[target."cfg(any(target_os = \"ios\", target_os = \"macos\"))".dependencies]
Expand All @@ -106,6 +114,6 @@ tao-macros = { version = "0.1.0" }
[dev-dependencies]
http-range = "0.1.5"
pollster = "0.3.0"
tao = { version = "0.24", default-features = false, features = ["rwh_05"] }
tao = { version = "0.24", default-features = false, features = [ "rwh_05" ] }
wgpu = "0.18.0"
winit = { version = "0.29", features = ["rwh_05"] }
winit = { version = "0.29", features = [ "rwh_05" ] }

0 comments on commit c241b48

Please sign in to comment.