Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changes/rust-194.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
wry: patch
---

Fixed a compile error about missing Ext traits when building wry 0.24 / tauri v1 apps with Rust 1.94.
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1.93 worked on my machine (it's what i used before noticing i wasn't on 1.94) - but i can update the changefile to mentioned 1.93 even if it may not be problematic for everyone.

4 changes: 2 additions & 2 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ on:

jobs:
audit-rust:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6
- name: rust audit
uses: actions-rs/audit-check@v1
with:
Expand Down
14 changes: 4 additions & 10 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

env:
RUST_BACKTRACE: 1
CARGO_PROFILE_DEV_DEBUG: 0 # This would add unnecessary bloat to the target folder, decreasing cache efficiency.
CARGO_PROFILE_DEV_DEBUG: 0
LC_ALL: en_US.UTF-8 # This prevents strace from changing it's number format to use commas.

concurrency:
Expand All @@ -22,12 +22,12 @@ jobs:
matrix:
rust: [nightly]
platform:
- { target: x86_64-unknown-linux-gnu, os: ubuntu-latest }
- { target: x86_64-unknown-linux-gnu, os: ubuntu-22.04 }

runs-on: ${{ matrix.platform.os }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6
- name: install ${{ matrix.rust }}
uses: actions-rs/toolchain@v1
with:
Expand All @@ -51,20 +51,14 @@ jobs:
sudo dpkg -i hyperfine_1.11.0_amd64.deb
pip install memory_profiler

- uses: Swatinem/rust-cache@v2
with:
workspaces: |
.
bench/tests

- name: run benchmarks
run: |
cargo +nightly build --release -Z build-std=std,panic_abort -Z build-std-features=panic_immediate_abort --target ${{ matrix.platform.target }} --manifest-path bench/tests/Cargo.toml
xvfb-run --auto-servernum cargo run --manifest-path ./bench/Cargo.toml --bin run_benchmark

- name: clone benchmarks_results
if: github.repository == 'tauri-apps/wry' && github.ref == 'refs/heads/dev'
uses: actions/checkout@v2
uses: actions/checkout@v6
with:
token: ${{ secrets.BENCH_PAT }}
path: gh-pages
Expand Down
39 changes: 3 additions & 36 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ jobs:
rust_version: [stable]
platform:
- { target: x86_64-pc-windows-msvc, os: windows-latest }
- { target: x86_64-unknown-linux-gnu, os: ubuntu-latest }
- { target: x86_64-unknown-linux-gnu, os: ubuntu-22.04 }
- { target: x86_64-apple-darwin, os: macos-latest }
- { target: aarch64-apple-ios, os: macos-latest }
- { target: aarch64-linux-android, os: ubuntu-latest }
- { target: aarch64-linux-android, os: ubuntu-22.04 }

runs-on: ${{ matrix.platform.os }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6
- name: install stable
uses: actions-rs/toolchain@v1
with:
Expand All @@ -41,39 +41,6 @@ jobs:
- name: Get current date
run: echo "CURRENT_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV

- name: Cache cargo registry
uses: actions/cache@v2.1.4
with:
path: ~/.cargo/registry
# Add date to the cache to keep it up to date
key: ${{ matrix.platform }}-stable-cargo-registry-${{ hashFiles('Cargo.toml') }}-${{ env.CURRENT_DATE }}
# Restore from outdated cache for speed
restore-keys: |
${{ matrix.platform }}-stable-cargo-registry-${{ hashFiles('Cargo.toml') }}
${{ matrix.platform }}-stable-cargo-registry-

- name: Cache cargo index
uses: actions/cache@v2.1.4
with:
path: ~/.cargo/git
# Add date to the cache to keep it up to date
key: ${{ matrix.platform }}-stable-cargo-index-${{ hashFiles('Cargo.toml') }}-${{ env.CURRENT_DATE }}
# Restore from outdated cache for speed
restore-keys: |
${{ matrix.platform }}-stable-cargo-index-${{ hashFiles('Cargo.toml') }}
${{ matrix.platform }}-stable-cargo-index-

- name: Cache cargo target
uses: actions/cache@v2
with:
path: target
# Add date to the cache to keep it up to date
key: ${{ matrix.platform }}-stable-cargo-core-${{ hashFiles('Cargo.toml') }}-${{ env.CURRENT_DATE }}
# Restore from outdated cache for speed
restore-keys: |
${{ matrix.platform }}-stable-cargo-core-${{ hashFiles('Cargo.toml') }}
${{ matrix.platform }}-stable-cargo-core-

- name: build wry
run: cargo build --features tray --target ${{ matrix.platform.target }}

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/covector-status.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ on: [pull_request]

jobs:
covector:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: covector status
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/covector-version-or-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ on:

jobs:
version-or-publish:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
timeout-minutes: 65
outputs:
change: ${{ steps.covector.outputs.change }}
commandRan: ${{ steps.covector.outputs.commandRan }}
successfulPublish: ${{ steps.covector.outputs.successfulPublish }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: cargo login
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fmt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: macos-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6
- uses: actions-rs/toolchain@v1
with:
profile: minimal
Expand Down
12 changes: 9 additions & 3 deletions src/webview/webkitgtk/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ use std::{
};
use url::Url;
use webkit2gtk::{
traits::*, LoadEvent, NavigationPolicyDecision, PolicyDecisionType, URIRequest,
UserContentInjectedFrames, UserContentManager, UserScript, UserScriptInjectionTime, WebView,
WebViewBuilder,
LoadEvent, NavigationPolicyDecision, NavigationPolicyDecisionExt, PolicyDecisionType,
SettingsExt, URIRequest, URIRequestExt, UserContentInjectedFrames, UserContentManager,
UserContentManagerExt, UserScript, UserScriptInjectionTime, WebView, WebViewBuilder, WebViewExt,
};
use webkit2gtk_sys::{
webkit_get_major_version, webkit_get_micro_version, webkit_get_minor_version,
Expand Down Expand Up @@ -323,6 +323,8 @@ impl InnerWebView {
let is_inspector_open = {
let is_inspector_open = Arc::new(AtomicBool::default());
if let Some(inspector) = WebViewExt::inspector(&*webview) {
use webkit2gtk::WebInspectorExt;

let is_inspector_open_ = is_inspector_open.clone();
inspector.connect_bring_to_front(move |_| {
is_inspector_open_.store(true, Ordering::Relaxed);
Expand Down Expand Up @@ -441,6 +443,8 @@ impl InnerWebView {
#[cfg(any(debug_assertions, feature = "devtools"))]
pub fn open_devtools(&self) {
if let Some(inspector) = WebViewExt::inspector(&*self.webview) {
use webkit2gtk::WebInspectorExt;

inspector.show();
// `bring-to-front` is not received in this case
self.is_inspector_open.store(true, Ordering::Relaxed);
Expand All @@ -450,6 +454,8 @@ impl InnerWebView {
#[cfg(any(debug_assertions, feature = "devtools"))]
pub fn close_devtools(&self) {
if let Some(inspector) = WebViewExt::inspector(&*self.webview) {
use webkit2gtk::WebInspectorExt;

inspector.close();
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/webview/webkitgtk/web_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ use std::{
};
use url::Url;
use webkit2gtk::{
traits::*, ApplicationInfo, CookiePersistentStorage, LoadEvent, URIRequest, WebContext,
WebContextBuilder, WebView, WebsiteDataManagerBuilder,
ApplicationInfo, CookiePersistentStorage, LoadEvent, URIRequest, URIRequestExt, WebContext,
WebContextBuilder, WebView, WebViewExt, WebsiteDataManagerBuilder,
};

#[derive(Debug)]
Expand Down
Loading