[package]
name = "buffr-core"
description = "CEF integration and browser host for buffr."
version = "0.6.0"
edition = "2024"
rust-version = "1.95"
license = "MIT"
repository = "https://github.com/kryptic-sh/buffr-core"
homepage = "https://buffr.kryptic.sh"
authors = ["mxaddict <mxaddict@kryptic.sh>"]
readme = "README.md"
build = "build.rs"

[features]
# Off-screen rendering path (Linux default; always compiled in).
# The feature flag exists so `--features osr` is accepted by CI
# without cargo rejecting it as unknown.
osr = []

[dependencies]
cef = "147"
anyhow = "1"
thiserror = "2"
tracing = "0.1"
hjkl-config = "0.2"
raw-window-handle = "0.6"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
chrono = { version = "0.4", default-features = false, features = ["serde", "clock"] }
ureq = { version = "3", features = ["json"] }
semver = { version = "1", features = ["serde"] }
buffr-modal = "0.1"
buffr-history = "0.1"
buffr-downloads = "0.1"
buffr-config = "0.3"
buffr-zoom = "0.1"
buffr-permissions = "0.1"
buffr-view-source = "0.1"
hjkl-clipboard = "0.5"
winit = "0.30"
# Image decode / re-encode for context-menu "Copy Image" — fetched bytes
# get decoded then re-emitted as PNG for the clipboard. Web-format-only
# feature set; default features pull in heavy/unused codecs (TIFF, etc).
image = { version = "0.25", default-features = false, features = [
    "png",
    "jpeg",
    "webp",
    "gif",
] }
base64 = "0.22"

[target.'cfg(all(target_os = "linux", not(target_env = "ohos")))'.dependencies]
wayland-client = { version = "0.31", features = ["system"] }
wayland-protocols = { version = "0.32", features = ["client", "unstable"] }
wayland-backend = { version = "0.3", features = ["client_system"] }
wayland-sys = { version = "0.31", features = ["client"] }
zbus = { version = "5", default-features = false, features = ["blocking-api", "async-io"] }

[target.'cfg(target_os = "macos")'.dependencies]
core-foundation = "0.10"

[target.'cfg(target_os = "windows")'.dependencies]
windows-sys = { version = "0.59", features = ["Win32_System_Power"] }

[dev-dependencies]
tempfile = "3"
toml = "1.1"
