Skip to content

Commit

Permalink
Expose ashpd's tokio support
Browse files Browse the repository at this point in the history
  • Loading branch information
Ralith committed Dec 9, 2023
1 parent 94e3941 commit 8badfb4
Show file tree
Hide file tree
Showing 3 changed files with 113 additions and 3 deletions.
108 changes: 107 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ default = ["gtk3"]
file-handle-inner = []
gtk3 = ["gtk-sys", "glib-sys", "gobject-sys"]
xdg-portal = ["ashpd", "urlencoding", "pollster"]
# Use async-std for xdg-portal
async-std = ["ashpd?/async-std"]
# Use tokio for xdg-portal
tokio = ["ashpd?/tokio"]
common-controls-v6 = ["windows-sys/Win32_UI_Controls"]

[dev-dependencies]
Expand Down Expand Up @@ -42,7 +46,7 @@ windows-sys = { version = "0.48", features = [

[target.'cfg(any(target_os = "linux", target_os = "freebsd", target_os = "dragonfly", target_os = "netbsd", target_os = "openbsd"))'.dependencies]
# XDG Desktop Portal
ashpd = { version = "0.6", optional = true }
ashpd = { version = "0.6", optional = true, default-features = false }
urlencoding = { version = "2.1.0", optional = true }
pollster = { version = "0.3", optional = true }
# GTK
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
//!
//! ## XDG Desktop Portal backend
//! The XDG Desktop Portal backend is used when the `gtk3` feature is disabled with
//! [`default-features = false`](https://doc.rust-lang.org/cargo/reference/features.html#dependency-features), and `xdg-portal` is enabled instead. This backend will use either the GTK or KDE file dialog depending on the desktop environment
//! [`default-features = false`](https://doc.rust-lang.org/cargo/reference/features.html#dependency-features), and `xdg-portal` is enabled instead. Either the `tokio` or `async-std` feature must be enabled. This backend will use either the GTK or KDE file dialog depending on the desktop environment
//! in use at runtime. It does not have any non-Rust
//! build dependencies, however it requires the user to have either the
//! [GTK](https://github.com/flatpak/xdg-desktop-portal-gtk),
Expand Down

0 comments on commit 8badfb4

Please sign in to comment.