ashlar-native 0.1.0

Native OS features behind one API: dialogs, menus, clipboard, power, notifications, secrets
Documentation
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2024"
rust-version = "1.95"
name = "ashlar-native"
version = "0.1.0"
authors = ["The ashlar contributors"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Native OS features behind one API: dialogs, menus, clipboard, power, notifications, secrets"
homepage = "https://github.com/Himasnhu-AT/ashlar"
readme = "README.md"
keywords = [
    "native",
    "dialogs",
    "menu",
    "clipboard",
    "keychain",
]
categories = [
    "os",
    "gui",
]
license = "BSD-3-Clause"
repository = "https://github.com/Himasnhu-AT/ashlar"

[features]
cli-tool = []
clipboard = [
    "dep:arboard",
    "dep:objc2",
    "objc2-app-kit/NSPasteboard",
    "objc2-foundation/NSData",
    "objc2-foundation/NSArray",
]
default = [
    "dialogs",
    "menu",
    "clipboard",
    "power",
    "open-files",
    "single-instance",
    "system",
    "cli-tool",
]
dialogs = ["dep:rfd"]
full = [
    "default",
    "notify",
    "progress",
    "secrets",
]
menu = [
    "dep:muda",
    "dep:objc2",
    "dep:raw-window-handle",
]
notify = [
    "dep:objc2",
    "dep:block2",
    "dep:objc2-user-notifications",
    "objc2-foundation/NSBundle",
    "objc2-foundation/NSError",
    "dep:zbus",
]
open-files = [
    "dep:objc2",
    "dep:block2",
    "objc2-foundation/NSAppleEventManager",
    "objc2-foundation/NSAppleEventDescriptor",
    "objc2-foundation/NSNotification",
    "objc2-foundation/NSOperation",
    "objc2-foundation/NSData",
    "objc2-foundation/NSURL",
    "objc2-foundation/objc2-core-services",
    "objc2-foundation/block2",
    "objc2-app-kit/NSApplication",
    "objc2-app-kit/NSRunningApplication",
]
power = [
    "dep:objc2",
    "objc2-foundation/NSProcessInfo",
    "windows/Win32_System_Power",
    "dep:zbus",
]
progress = [
    "dep:objc2",
    "dep:raw-window-handle",
    "objc2-app-kit/NSApplication",
    "objc2-app-kit/NSResponder",
    "objc2-app-kit/NSDockTile",
    "objc2-app-kit/NSView",
    "objc2-app-kit/NSImageView",
    "objc2-app-kit/NSControl",
    "objc2-app-kit/NSImage",
    "objc2-app-kit/NSProgressIndicator",
    "objc2-foundation/NSGeometry",
    "windows/Win32_UI_Shell",
    "windows/Win32_System_Com",
]
secrets = [
    "dep:keyring-core",
    "dep:apple-native-keyring-store",
    "dep:windows-native-keyring-store",
    "dep:zbus-secret-service-keyring-store",
]
single-instance = []
system = [
    "dep:objc2",
    "objc2-app-kit/NSColor",
    "objc2-app-kit/NSColorSpace",
    "objc2-app-kit/NSWorkspace",
    "objc2-app-kit/NSAccessibility",
    "objc2-app-kit/objc2-core-foundation",
    "objc2-foundation/NSUserDefaults",
    "objc2-foundation/NSURL",
    "objc2-foundation/NSArray",
    "dep:windows-registry",
    "windows/Win32_UI_WindowsAndMessaging",
    "windows/Win32_UI_Shell",
    "dep:zbus",
    "dep:web-sys",
]

[lib]
name = "ashlar_native"
path = "src/lib.rs"

[[example]]
name = "native_demo"
path = "examples/native_demo.rs"
required-features = ["full"]

[[test]]
name = "main_thread"
path = "tests/main_thread.rs"
harness = false

[dependencies.ashlar-command]
version = "0.1.0"

[dependencies.log]
version = "0.4"

[dependencies.raw-window-handle]
version = "0.6"
optional = true

[dependencies.rfd]
version = "0.17"
features = ["xdg-portal"]
optional = true
default-features = false

[dependencies.serde]
version = "1"
features = [
    "derive",
    "rc",
]

[dependencies.serde_json]
version = "1"
features = ["float_roundtrip"]

[dependencies.thiserror]
version = "2"

[dev-dependencies.tempfile]
version = "3"

[target.'cfg(any(target_os = "macos", target_os = "windows"))'.dependencies.muda]
version = "0.21"
optional = true

[target.'cfg(not(target_arch = "wasm32"))'.dependencies.arboard]
version = "3.6"
optional = true

[target.'cfg(target_arch = "wasm32")'.dependencies.web-sys]
version = "0.3"
features = [
    "Window",
    "MediaQueryList",
]
optional = true

[target.'cfg(target_os = "linux")'.dependencies.keyring-core]
version = "1"
optional = true

[target.'cfg(target_os = "linux")'.dependencies.zbus]
version = "5"
features = [
    "blocking-api",
    "async-io",
]
optional = true
default-features = false

[target.'cfg(target_os = "linux")'.dependencies.zbus-secret-service-keyring-store]
version = "1"
features = ["rt-async-io-crypto-rust"]
optional = true

[target.'cfg(target_os = "macos")'.dependencies.apple-native-keyring-store]
version = "1"
features = ["keychain"]
optional = true
default-features = false

[target.'cfg(target_os = "macos")'.dependencies.block2]
version = "0.6"
optional = true

[target.'cfg(target_os = "macos")'.dependencies.keyring-core]
version = "1"
optional = true

[target.'cfg(target_os = "macos")'.dependencies.objc2]
version = "0.6"
optional = true

[target.'cfg(target_os = "macos")'.dependencies.objc2-app-kit]
version = "0.3"
features = ["std"]
optional = true
default-features = false

[target.'cfg(target_os = "macos")'.dependencies.objc2-foundation]
version = "0.3"
features = [
    "std",
    "NSString",
    "NSObject",
]
optional = true
default-features = false

[target.'cfg(target_os = "macos")'.dependencies.objc2-user-notifications]
version = "0.3"
features = [
    "std",
    "block2",
    "UNUserNotificationCenter",
    "UNNotificationRequest",
    "UNNotificationContent",
    "UNNotificationTrigger",
    "UNNotificationSettings",
]
optional = true
default-features = false

[target.'cfg(target_os = "windows")'.dependencies.keyring-core]
version = "1"
optional = true

[target.'cfg(target_os = "windows")'.dependencies.windows]
version = "0.62"
features = ["Win32_Foundation"]
optional = true

[target.'cfg(target_os = "windows")'.dependencies.windows-native-keyring-store]
version = "1"
optional = true
default-features = false

[target.'cfg(target_os = "windows")'.dependencies.windows-registry]
version = "0.6"
optional = true

[target."cfg(unix)".dependencies.libc]
version = "0.2"

[lints.clippy]
dbg_macro = "warn"
expect_used = "deny"
panic = "deny"
todo = "deny"
too_many_arguments = "allow"
type_complexity = "allow"
undocumented_unsafe_blocks = "deny"
unimplemented = "deny"
unreachable = "deny"
unwrap_used = "deny"

[lints.rust]
unsafe_code = "deny"