Documentation
[package]
name = "rfd"
version = "0.8.4"
edition = "2021"

authors = ["Poly <marynczak.bartlomiej@gmail.com>"]
description = "Rusty File Dialog"
keywords = ["file", "ui", "dialog"]
license = "MIT"
repository = "https://github.com/PolyMeilex/rfd"
documentation = "https://docs.rs/rfd"

[features]
default = ["gtk3"]
file-handle-inner = []
gtk3 = ["gtk-sys", "glib-sys", "gobject-sys", "lazy_static"]
xdg-portal = ["ashpd", "urlencoding", "pollster"]

[dev-dependencies]
futures = "0.3.12"

[dependencies]
raw-window-handle = "0.4.1"
log = "0.4"

[target.'cfg(target_os = "macos")'.dependencies]
objc = "0.2.7"
objc_id = "0.1.1"
dispatch = "0.2.0"
block = "0.1.6"
objc-foundation = "0.1.1"

[target.'cfg(target_os = "windows")'.dependencies]
windows = { version = "0.37", features = [
  "Win32_Foundation",
  "Win32_System_Com",
  "Win32_UI_Shell_Common",
  "Win32_UI_Shell",
  "Win32_UI_WindowsAndMessaging",
] }

[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.3", optional = true }
urlencoding = { version = "2.1.0", optional = true }
pollster = { version = "0.2", optional = true }
# GTK
gtk-sys = { version = "0.15.1", features = ["v3_20"], optional = true }
glib-sys = { version = "0.15.1", optional = true }
gobject-sys = { version = "0.15.1", optional = true }
lazy_static = { version = "1.4.0", optional = true }

[target.'cfg(target_arch = "wasm32")'.dependencies]
wasm-bindgen = "0.2.69"
js-sys = "0.3.46"
web-sys = { version = "0.3.46", features = [
  'Document',
  'Element',
  'HtmlInputElement',
  'HtmlButtonElement',
  'Window',
  'File',
  'FileList',
  'FileReader',
] }
wasm-bindgen-futures = "0.4.19"

[[example]]
name = "simple"
[[example]]
name = "async"

[package.metadata.docs.rs]
features = ["file-handle-inner"]