Skip to content

Commit

Permalink
fix(linux): compilation with the linux-body feature (#1043)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog authored Oct 24, 2023
1 parent 7258fcd commit 3de68e7
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changes/fix-linux-body-feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"wry": patch
---

Fix compilation with the `linux-body` feature.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
if: (
!contains(matrix.platform.target, 'android') &&
!contains(matrix.platform.target, 'ios'))
run: cargo test --verbose --target ${{ matrix.platform.target }}
run: cargo test --verbose --target ${{ matrix.platform.target }} --features linux-body

- name: build wry with winit
if: (
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ categories = [ "gui" ]

[package.metadata.docs.rs]
no-default-features = true
features = [ "dox", "file-drop", "protocol" ]
features = [ "file-drop", "protocol" ]
targets = [
"x86_64-unknown-linux-gnu",
"x86_64-pc-windows-msvc",
Expand Down
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@
//! 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.
//! - `dox`: Enables this in `package.metadata.docs.rs` section to skip linking some **Linux**
//! libraries and prevent from building documentation on doc.rs fails.
//! - `linux-headers`: Enables headers support of custom protocol request on Linux. Requires
//! webkit2gtk v2.36 or above.
Expand Down
8 changes: 5 additions & 3 deletions src/webview/webkitgtk/web_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -328,9 +328,11 @@ where

#[cfg(feature = "linux-body")]
{
use gdk::prelude::{InputStreamExt, InputStreamExtManual};
use gio::Cancellable;
use glib::Bytes;
use gtk::{
gdk::prelude::{InputStreamExt, InputStreamExtManual},
gio::Cancellable,
glib::Bytes,
};

// Set request http body
let cancellable: Option<&Cancellable> = None;
Expand Down

0 comments on commit 3de68e7

Please sign in to comment.