From def69317256b8cd61a093f3991871ebfe675dde8 Mon Sep 17 00:00:00 2001 From: Eugene Hauptmann Date: Wed, 29 May 2024 19:14:58 -0400 Subject: [PATCH 1/9] added visionos support --- Cargo.toml | 2 +- src/lib.rs | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 0ff6b2516..af26d162c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -90,7 +90,7 @@ dunce = "1" "Win32_UI_Input_KeyboardAndMouse" ] -[target."cfg(any(target_os = \"ios\", target_os = \"macos\"))".dependencies] +[target."cfg(any(target_os = \"ios\", target_os = \"visionos\", target_os = \"macos\"))".dependencies] block = "0.1" cocoa = "0.25" core-graphics = "0.23" diff --git a/src/lib.rs b/src/lib.rs index 244e514ec..9697377d0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -198,7 +198,7 @@ #![allow(clippy::type_complexity)] #![cfg_attr(docsrs, feature(doc_cfg))] -#[cfg(any(target_os = "macos", target_os = "ios"))] +#[cfg(any(target_os = "macos", target_os = "ios", target_os = "visionos"))] #[macro_use] extern crate objc; @@ -228,11 +228,11 @@ use raw_window_handle::HasWindowHandle; #[cfg(gtk)] use webkitgtk::*; -#[cfg(any(target_os = "macos", target_os = "ios"))] +#[cfg(any(target_os = "macos", target_os = "ios", target_os = "visionos"))] pub(crate) mod wkwebview; -#[cfg(any(target_os = "macos", target_os = "ios"))] +#[cfg(any(target_os = "macos", target_os = "ios", target_os = "visionos"))] use wkwebview::*; -#[cfg(any(target_os = "macos", target_os = "ios"))] +#[cfg(any(target_os = "macos", target_os = "ios", target_os = "visionos"))] pub use wkwebview::{PrintMargin, PrintOptions}; #[cfg(target_os = "windows")] @@ -1034,13 +1034,13 @@ impl<'a> WebViewBuilder<'a> { } } -#[cfg(any(target_os = "macos", target_os = "ios",))] +#[cfg(any(target_os = "macos", target_os = "ios", target_os = "visionos"))] #[derive(Clone)] pub(crate) struct PlatformSpecificWebViewAttributes { data_store_identifier: Option<[u8; 16]>, } -#[cfg(any(target_os = "macos", target_os = "ios",))] +#[cfg(any(target_os = "macos", target_os = "ios", target_os = "visionos"))] impl Default for PlatformSpecificWebViewAttributes { fn default() -> Self { Self { @@ -1049,7 +1049,7 @@ impl Default for PlatformSpecificWebViewAttributes { } } -#[cfg(any(target_os = "macos", target_os = "ios",))] +#[cfg(any(target_os = "macos", target_os = "ios", target_os = "visionos"))] 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. @@ -1058,7 +1058,7 @@ pub trait WebViewBuilderExtDarwin { fn with_data_store_identifier(self, identifier: [u8; 16]) -> Self; } -#[cfg(any(target_os = "macos", target_os = "ios",))] +#[cfg(any(target_os = "macos", target_os = "ios", target_os = "visionos"))] impl WebViewBuilderExtDarwin for WebViewBuilder<'_> { fn with_data_store_identifier(mut self, identifier: [u8; 16]) -> Self { self.platform_specific.data_store_identifier = Some(identifier); @@ -1631,7 +1631,7 @@ impl WebViewExtMacOS for WebView { } /// Additional methods on `WebView` that are specific to iOS. -#[cfg(target_os = "ios")] +#[cfg(any(target_os = "ios", target_os = "visionos"))] pub trait WebViewExtIOS { /// Returns WKWebView handle fn webview(&self) -> cocoa::base::id; @@ -1639,7 +1639,7 @@ pub trait WebViewExtIOS { fn manager(&self) -> cocoa::base::id; } -#[cfg(target_os = "ios")] +#[cfg(any(target_os = "ios", target_os = "visionos"))] impl WebViewExtIOS for WebView { fn webview(&self) -> cocoa::base::id { self.webview.webview From b6e93ebb83b206b9d7b0470af1731f7f76c5179c Mon Sep 17 00:00:00 2001 From: Eugene Hauptmann Date: Wed, 29 May 2024 19:34:43 -0400 Subject: [PATCH 2/9] added custom_data_store_available to visionos --- src/wkwebview/mod.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/wkwebview/mod.rs b/src/wkwebview/mod.rs index b61500de9..cc39e1cb4 100644 --- a/src/wkwebview/mod.rs +++ b/src/wkwebview/mod.rs @@ -358,6 +358,9 @@ impl InnerWebView { #[cfg(target_os = "ios")] let custom_data_store_available = os_version.0 >= 17; + + #[cfg(target_os = "visionos")] + let custom_data_store_available = os_version.0 >= 1; let data_store: id = match ( attributes.incognito, From a979127af84e849687937a3fce09ab6fa403b437 Mon Sep 17 00:00:00 2001 From: Eugene Hauptmann Date: Wed, 29 May 2024 19:37:45 -0400 Subject: [PATCH 3/9] more visionos configuration --- bench/tests/src/cpu_intensive.rs | 2 ++ bench/tests/src/custom_protocol.rs | 2 ++ bench/tests/src/hello_world.rs | 2 ++ build.rs | 2 +- examples/async_custom_protocol.rs | 2 ++ examples/custom_protocol.rs | 2 ++ examples/custom_titlebar.rs | 2 ++ examples/gtk_multiwebview.rs | 3 +++ examples/multiwindow.rs | 2 ++ examples/reparent.rs | 5 +++++ examples/simple.rs | 2 ++ examples/streaming.rs | 2 ++ examples/transparent.rs | 2 ++ src/wkwebview/mod.rs | 10 +++++----- 14 files changed, 34 insertions(+), 6 deletions(-) diff --git a/bench/tests/src/cpu_intensive.rs b/bench/tests/src/cpu_intensive.rs index 6ddc79d9b..23700e3cc 100644 --- a/bench/tests/src/cpu_intensive.rs +++ b/bench/tests/src/cpu_intensive.rs @@ -28,6 +28,7 @@ fn main() -> wry::Result<()> { target_os = "windows", target_os = "macos", target_os = "ios", + target_os = "visionos", target_os = "android" ))] let builder = WebViewBuilder::new(&window); @@ -36,6 +37,7 @@ fn main() -> wry::Result<()> { target_os = "windows", target_os = "macos", target_os = "ios", + target_os = "visionos", target_os = "android" )))] let builder = { diff --git a/bench/tests/src/custom_protocol.rs b/bench/tests/src/custom_protocol.rs index b7c96db28..cd0bac73f 100644 --- a/bench/tests/src/custom_protocol.rs +++ b/bench/tests/src/custom_protocol.rs @@ -52,6 +52,7 @@ fn main() -> wry::Result<()> { target_os = "windows", target_os = "macos", target_os = "ios", + target_os = "visionos", target_os = "android" ))] let builder = WebViewBuilder::new(&window); @@ -60,6 +61,7 @@ fn main() -> wry::Result<()> { target_os = "windows", target_os = "macos", target_os = "ios", + target_os = "visionos", target_os = "android" )))] let builder = { diff --git a/bench/tests/src/hello_world.rs b/bench/tests/src/hello_world.rs index 030faabf9..7b9cc2662 100644 --- a/bench/tests/src/hello_world.rs +++ b/bench/tests/src/hello_world.rs @@ -40,6 +40,7 @@ fn main() -> wry::Result<()> { target_os = "windows", target_os = "macos", target_os = "ios", + target_os = "visionos", target_os = "android" ))] let builder = WebViewBuilder::new(&window); @@ -48,6 +49,7 @@ fn main() -> wry::Result<()> { target_os = "windows", target_os = "macos", target_os = "ios", + target_os = "visionos", target_os = "android" )))] let builder = { diff --git a/build.rs b/build.rs index 712a9e7a9..236a5ce54 100644 --- a/build.rs +++ b/build.rs @@ -4,7 +4,7 @@ fn main() { let target_os = std::env::var("CARGO_CFG_TARGET_OS").unwrap_or_default(); - if target_os == "macos" || target_os == "ios" { + if target_os == "macos" || target_os == "ios" || target_os == "visionos" { println!("cargo:rustc-link-lib=framework=WebKit"); } diff --git a/examples/async_custom_protocol.rs b/examples/async_custom_protocol.rs index 757c5bbd9..fbd88b426 100644 --- a/examples/async_custom_protocol.rs +++ b/examples/async_custom_protocol.rs @@ -22,6 +22,7 @@ fn main() -> wry::Result<()> { target_os = "windows", target_os = "macos", target_os = "ios", + target_os = "visionos", target_os = "android" ))] let builder = WebViewBuilder::new(&window); @@ -30,6 +31,7 @@ fn main() -> wry::Result<()> { target_os = "windows", target_os = "macos", target_os = "ios", + target_os = "visionos", target_os = "android" )))] let builder = { diff --git a/examples/custom_protocol.rs b/examples/custom_protocol.rs index b24adc8a4..2364a6743 100644 --- a/examples/custom_protocol.rs +++ b/examples/custom_protocol.rs @@ -22,6 +22,7 @@ fn main() -> wry::Result<()> { target_os = "windows", target_os = "macos", target_os = "ios", + target_os = "visionos", target_os = "android" ))] let builder = WebViewBuilder::new(&window); @@ -30,6 +31,7 @@ fn main() -> wry::Result<()> { target_os = "windows", target_os = "macos", target_os = "ios", + target_os = "visionos", target_os = "android" )))] let builder = { diff --git a/examples/custom_titlebar.rs b/examples/custom_titlebar.rs index dd3ecbb95..7345659c1 100644 --- a/examples/custom_titlebar.rs +++ b/examples/custom_titlebar.rs @@ -245,6 +245,7 @@ fn main() -> wry::Result<()> { target_os = "windows", target_os = "macos", target_os = "ios", + target_os = "visionos", target_os = "android" ))] let builder = WebViewBuilder::new(&window); @@ -253,6 +254,7 @@ fn main() -> wry::Result<()> { target_os = "windows", target_os = "macos", target_os = "ios", + target_os = "visionos", target_os = "android" )))] let builder = { diff --git a/examples/gtk_multiwebview.rs b/examples/gtk_multiwebview.rs index 6e6533996..2d9cf40bf 100644 --- a/examples/gtk_multiwebview.rs +++ b/examples/gtk_multiwebview.rs @@ -20,6 +20,7 @@ fn main() -> wry::Result<()> { target_os = "windows", target_os = "macos", target_os = "ios", + target_os = "visionos", target_os = "android" )))] let fixed = { @@ -38,6 +39,7 @@ fn main() -> wry::Result<()> { target_os = "windows", target_os = "macos", target_os = "ios", + target_os = "visionos", target_os = "android" ))] return WebViewBuilder::new_as_child(&window); @@ -46,6 +48,7 @@ fn main() -> wry::Result<()> { target_os = "windows", target_os = "macos", target_os = "ios", + target_os = "visionos", target_os = "android" )))] { diff --git a/examples/multiwindow.rs b/examples/multiwindow.rs index 1a95c09a1..af4a06a0f 100644 --- a/examples/multiwindow.rs +++ b/examples/multiwindow.rs @@ -96,6 +96,7 @@ fn create_new_window( target_os = "windows", target_os = "macos", target_os = "ios", + target_os = "visionos", target_os = "android" ))] let builder = WebViewBuilder::new(&window); @@ -104,6 +105,7 @@ fn create_new_window( target_os = "windows", target_os = "macos", target_os = "ios", + target_os = "visionos", target_os = "android" )))] let builder = { diff --git a/examples/reparent.rs b/examples/reparent.rs index 3bb2649a9..f54127fc0 100644 --- a/examples/reparent.rs +++ b/examples/reparent.rs @@ -19,12 +19,14 @@ use {tao::platform::windows::WindowExtWindows, wry::WebViewExtWindows}; target_os = "windows", target_os = "macos", target_os = "ios", + target_os = "visionos", target_os = "android" )))] #[cfg(not(any( target_os = "windows", target_os = "macos", target_os = "ios", + target_os = "visionos", target_os = "android" )))] use { @@ -41,6 +43,7 @@ fn main() -> wry::Result<()> { target_os = "windows", target_os = "macos", target_os = "ios", + target_os = "visionos", target_os = "android" ))] let builder = WebViewBuilder::new(&window); @@ -49,6 +52,7 @@ fn main() -> wry::Result<()> { target_os = "windows", target_os = "macos", target_os = "ios", + target_os = "visionos", target_os = "android" )))] let builder = { @@ -97,6 +101,7 @@ fn main() -> wry::Result<()> { target_os = "windows", target_os = "macos", target_os = "ios", + target_os = "visionos", target_os = "android" )))] webview diff --git a/examples/simple.rs b/examples/simple.rs index 5528e41b9..791a8da91 100644 --- a/examples/simple.rs +++ b/examples/simple.rs @@ -17,6 +17,7 @@ fn main() -> wry::Result<()> { target_os = "windows", target_os = "macos", target_os = "ios", + target_os = "visionos", target_os = "android" ))] let builder = WebViewBuilder::new(&window); @@ -25,6 +26,7 @@ fn main() -> wry::Result<()> { target_os = "windows", target_os = "macos", target_os = "ios", + target_os = "visionos", target_os = "android" )))] let builder = { diff --git a/examples/streaming.rs b/examples/streaming.rs index 86a9a0dc2..0363a5029 100644 --- a/examples/streaming.rs +++ b/examples/streaming.rs @@ -27,6 +27,7 @@ fn main() -> wry::Result<()> { target_os = "windows", target_os = "macos", target_os = "ios", + target_os = "visionos", target_os = "android" ))] let builder = WebViewBuilder::new(&window); @@ -35,6 +36,7 @@ fn main() -> wry::Result<()> { target_os = "windows", target_os = "macos", target_os = "ios", + target_os = "visionos", target_os = "android" )))] let builder = { diff --git a/examples/transparent.rs b/examples/transparent.rs index 96b26ddcb..e1357ab7d 100644 --- a/examples/transparent.rs +++ b/examples/transparent.rs @@ -34,6 +34,7 @@ fn main() -> wry::Result<()> { target_os = "windows", target_os = "macos", target_os = "ios", + target_os = "visionos", target_os = "android" ))] let builder = WebViewBuilder::new(&window); @@ -42,6 +43,7 @@ fn main() -> wry::Result<()> { target_os = "windows", target_os = "macos", target_os = "ios", + target_os = "visionos", target_os = "android" )))] let builder = { diff --git a/src/wkwebview/mod.rs b/src/wkwebview/mod.rs index cc39e1cb4..44bf76d7a 100644 --- a/src/wkwebview/mod.rs +++ b/src/wkwebview/mod.rs @@ -124,7 +124,7 @@ impl InnerWebView { let ns_view = match window.window_handle()?.as_raw() { #[cfg(target_os = "macos")] RawWindowHandle::AppKit(w) => w.ns_view.as_ptr(), - #[cfg(target_os = "ios")] + #[cfg(any(target_os = "ios", target_os = "visionos"))] RawWindowHandle::UiKit(w) => w.ui_view.as_ptr(), _ => return Err(Error::UnsupportedWindowHandle), }; @@ -141,7 +141,7 @@ impl InnerWebView { let ns_view = match window.window_handle()?.as_raw() { #[cfg(target_os = "macos")] RawWindowHandle::AppKit(w) => w.ns_view.as_ptr(), - #[cfg(target_os = "ios")] + #[cfg(any(target_os = "ios", target_os = "visionos"))] RawWindowHandle::UiKit(w) => w.ui_view.as_ptr(), _ => return Err(Error::UnsupportedWindowHandle), }; @@ -478,7 +478,7 @@ impl InnerWebView { let _: id = msg_send![_preference, setValue:_yes forKey:NSString::new("allowsPictureInPictureMediaPlayback")]; - #[cfg(target_os = "ios")] + #[cfg(any(target_os = "ios", target_os = "visionos"))] let _: id = msg_send![config, setAllowsInlineMediaPlayback: YES]; if attributes.autoplay { @@ -544,7 +544,7 @@ impl InnerWebView { } } - #[cfg(target_os = "ios")] + #[cfg(any(target_os = "ios", target_os = "visionos"))] { let frame: CGRect = msg_send![ns_view, frame]; // set all autoresizingmasks @@ -1022,7 +1022,7 @@ r#"Object.defineProperty(window, 'ipc', { let _: () = msg_send![app, activateIgnoringOtherApps: YES]; } - #[cfg(target_os = "ios")] + #[cfg(any(target_os = "ios", target_os = "visionos"))] { let _: () = msg_send![ns_view, addSubview: webview]; } From 743396064b7a50c65acec1428e0699e712b400fb Mon Sep 17 00:00:00 2001 From: Eugene Hauptmann Date: Wed, 29 May 2024 20:04:56 -0400 Subject: [PATCH 4/9] added WebViewExtVisionOS and WebViewExtVisionOS --- Cargo.toml | 4 ++++ src/lib.rs | 24 ++++++++++++++++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index af26d162c..667e84024 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -118,3 +118,7 @@ winit = "0.29" getrandom = "0.2" http-range = "0.1" percent-encoding = "2.3" + +# TODO: comment this warning about linux and gtk on macos for visionos +[lints.rust] +unexpected_cfgs = { level = "warn", check-cfg = ['cfg(gtk)'] } \ No newline at end of file diff --git a/src/lib.rs b/src/lib.rs index 9697377d0..975726f0b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1631,7 +1631,7 @@ impl WebViewExtMacOS for WebView { } /// Additional methods on `WebView` that are specific to iOS. -#[cfg(any(target_os = "ios", target_os = "visionos"))] +#[cfg(target_os = "ios")] pub trait WebViewExtIOS { /// Returns WKWebView handle fn webview(&self) -> cocoa::base::id; @@ -1639,7 +1639,16 @@ pub trait WebViewExtIOS { fn manager(&self) -> cocoa::base::id; } -#[cfg(any(target_os = "ios", target_os = "visionos"))] +/// Additional methods on `WebView` that are specific to visionOS. +#[cfg(target_os = "visionos")] +pub trait WebViewExtVisionOS { + /// Returns WKWebView handle + fn webview(&self) -> cocoa::base::id; + /// Returns WKWebView manager [(userContentController)](https://developer.apple.com/documentation/webkit/wkscriptmessagehandler/1396222-usercontentcontroller) handle + fn manager(&self) -> cocoa::base::id; +} + +#[cfg(target_os = "ios")] impl WebViewExtIOS for WebView { fn webview(&self) -> cocoa::base::id { self.webview.webview @@ -1650,6 +1659,17 @@ impl WebViewExtIOS for WebView { } } +#[cfg(target_os = "visionos")] +impl WebViewExtVisionOS for WebView { + fn webview(&self) -> cocoa::base::id { + self.webview.webview + } + + fn manager(&self) -> cocoa::base::id { + self.webview.manager + } +} + #[cfg(target_os = "android")] /// Additional methods on `WebView` that are specific to Android pub trait WebViewExtAndroid { From 19f25304ab62d09caed1732e93c05c57d90e4f05 Mon Sep 17 00:00:00 2001 From: Eugene Hauptmann Date: Fri, 31 May 2024 20:40:43 -0400 Subject: [PATCH 5/9] added visionos to the missing lines --- .github/workflows/build.yml | 1 + src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2bb62cf5c..e08f40c58 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,6 +16,7 @@ jobs: - { target: x86_64-unknown-linux-gnu, os: ubuntu-latest } - { target: x86_64-apple-darwin, os: macos-latest } - { target: aarch64-apple-ios, os: macos-latest } + - { target: aarch64-apple-visionos, os: macos-latest } - { target: aarch64-apple-darwin, os: macos-14 } - { target: aarch64-linux-android, os: ubuntu-latest } diff --git a/src/lib.rs b/src/lib.rs index 975726f0b..356fdc41a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -10,7 +10,7 @@ //! //! ## Examples //! -//! This example leverages the [`HasWindowHandle`] and supports Windows, macOS, iOS, Android and Linux (X11 Only). +//! This example leverages the [`HasWindowHandle`] and supports Windows, macOS, iOS, visionOS, Android and Linux (X11 Only). //! See the following example using [`winit`]. //! //! ```no_run From 807771cc560cbbdae6d233dc7eb5c3bc4bba37aa Mon Sep 17 00:00:00 2001 From: Eugene Hauptmann Date: Tue, 4 Jun 2024 10:14:14 -0400 Subject: [PATCH 6/9] added changes file --- .changes/visionos.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changes/visionos.md diff --git a/.changes/visionos.md b/.changes/visionos.md new file mode 100644 index 000000000..b9427a2e8 --- /dev/null +++ b/.changes/visionos.md @@ -0,0 +1,5 @@ +--- +"wry": patch +--- + +Added visionOS support based on https://github.com/rust-lang/rust/pull/121419 From 56a718f71832687bd20fec02b3710f48fa042571 Mon Sep 17 00:00:00 2001 From: Eugene Hauptmann Date: Tue, 4 Jun 2024 13:02:43 -0400 Subject: [PATCH 7/9] cargo fmt --all --- src/wkwebview/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wkwebview/mod.rs b/src/wkwebview/mod.rs index 44bf76d7a..7aaf38726 100644 --- a/src/wkwebview/mod.rs +++ b/src/wkwebview/mod.rs @@ -358,7 +358,7 @@ impl InnerWebView { #[cfg(target_os = "ios")] let custom_data_store_available = os_version.0 >= 17; - + #[cfg(target_os = "visionos")] let custom_data_store_available = os_version.0 >= 1; From d9006dce7f826dc22b24500a1a191882b1f106ed Mon Sep 17 00:00:00 2001 From: Eugene Hauptmann Date: Tue, 4 Jun 2024 13:10:26 -0400 Subject: [PATCH 8/9] moved to rustup nightly toolchain --- .github/workflows/build.yml | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e08f40c58..7ffcd75ca 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,11 +23,17 @@ jobs: runs-on: ${{ matrix.platform.os }} steps: + # - uses: actions/checkout@v4 + # - name: install stable + # uses: dtolnay/rust-toolchain@stable + # with: + # targets: ${{ matrix.platform.target }} - uses: actions/checkout@v4 - - name: install stable - uses: dtolnay/rust-toolchain@stable + - name: install nightly + uses: dtolnay/rust-toolchain@nightly with: targets: ${{ matrix.platform.target }} + components: rust-src, miri - name: install webkit2gtk (ubuntu only) if: contains(matrix.platform.target, 'gnu') @@ -45,7 +51,7 @@ jobs: - uses: Swatinem/rust-cache@v2 - name: build wry - run: cargo build --target ${{ matrix.platform.target }} --all-features + run: cargo +nightly build -Z build-std=std,panic_abort --target ${{ matrix.platform.target }} --all-features - name: build tests and examples shell: bash @@ -56,15 +62,15 @@ jobs: if: (!contains(matrix.platform.target, 'android') && !contains(matrix.platform.target, 'ios')) run: cargo test --verbose --target ${{ matrix.platform.target }} --features linux-body - - name: install nightly - uses: dtolnay/rust-toolchain@nightly - with: - targets: ${{ matrix.platform.target }} - components: miri + # - name: install nightly + # uses: dtolnay/rust-toolchain@nightly + # with: + # targets: ${{ matrix.platform.target }} + # components: miri - name: Run tests with miri if: (!contains(matrix.platform.target, 'android') && !contains(matrix.platform.target, 'ios')) - run: cargo +nightly miri test --verbose --target ${{ matrix.platform.target }} --features linux-body + run: cargo +nightly -Z build-std=std,panic_abort miri test --verbose --target ${{ matrix.platform.target }} --features linux-body doc: runs-on: ubuntu-latest From b6e91745e1d7f3a0122946f32443957f2dea30f2 Mon Sep 17 00:00:00 2001 From: Eugene Hauptmann Date: Tue, 4 Jun 2024 13:20:30 -0400 Subject: [PATCH 9/9] moved to rustup toolchain to minimal profile --- .github/workflows/build.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7ffcd75ca..1a46fb603 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -32,8 +32,9 @@ jobs: - name: install nightly uses: dtolnay/rust-toolchain@nightly with: + profile: minimal targets: ${{ matrix.platform.target }} - components: rust-src, miri + # components: rust-src, miri - name: install webkit2gtk (ubuntu only) if: contains(matrix.platform.target, 'gnu') @@ -70,7 +71,9 @@ jobs: - name: Run tests with miri if: (!contains(matrix.platform.target, 'android') && !contains(matrix.platform.target, 'ios')) - run: cargo +nightly -Z build-std=std,panic_abort miri test --verbose --target ${{ matrix.platform.target }} --features linux-body + run: | + rustup +nightly component add miri + cargo +nightly -Z build-std=std,panic_abort miri test --verbose --target ${{ matrix.platform.target }} --features linux-body doc: runs-on: ubuntu-latest