Files
wayscriber/Cargo.toml
T
devmobasa 66e9259f6f refactor: finish moving kernel calls off raw libc
Detach from the terminal with rustix and std, and drop the remaining
unsafe process, poll, and shutdown calls from the tests through small
shared helpers. Prune the rustix features nothing ended up using, and
record which call sites stay on libc and why in the agent guidance.
2026-10-30 20:13:25 +01:00

150 lines
4.9 KiB
TOML

[package]
name = "wayscriber"
version = "0.9.28"
edition = "2024"
rust-version = "1.99.1"
license = "MIT"
description = "Screen annotation tool for Wayland compositors"
homepage = "https://wayscriber.com"
repository = "https://github.com/devmobasa/wayscriber"
default-run = "wayscriber"
[workspace]
members = ["configurator"]
default-members = ["."]
[workspace.lints.clippy]
cognitive_complexity = "warn"
# Rules from the Google Rust style guide that Clippy can check. CI promotes
# these warnings to errors; clippy.toml holds their settings.
absolute_paths = "warn"
enum_glob_use = "warn"
fn_params_excessive_bools = "warn"
missing_assert_message = "warn"
missing_panics_doc = "warn"
must_use_candidate = "warn"
needless_for_each = "warn"
needless_pass_by_value = "warn"
redundant_clone = "warn"
ref_option = "warn"
return_self_not_must_use = "warn"
string_add = "warn"
undocumented_unsafe_blocks = "warn"
unnecessary_safety_comment = "warn"
unwrap_used = "warn"
wildcard_imports = "warn"
# Pedantic lints, adopted one at a time. Most of them have machine-applicable
# fixes, so `cargo clippy --fix` can apply them.
borrow_as_ptr = "warn"
cast_lossless = "warn"
comparison_chain = "warn"
doc_markdown = "warn"
duration_suboptimal_units = "warn"
elidable_lifetime_names = "warn"
explicit_iter_loop = "warn"
if_not_else = "warn"
ignore_without_reason = "warn"
ignored_unit_patterns = "warn"
implicit_clone = "warn"
manual_is_variant_and = "warn"
manual_let_else = "warn"
manual_midpoint = "warn"
manual_string_new = "warn"
map_unwrap_or = "warn"
needless_raw_string_hashes = "warn"
option_as_ref_cloned = "warn"
ptr_cast_constness = "warn"
redundant_else = "warn"
semicolon_if_nothing_returned = "warn"
single_match_else = "warn"
uninlined_format_args = "warn"
unnecessary_debug_formatting = "warn"
unnested_or_patterns = "warn"
[workspace.lints.rust]
# Write the anonymous lifetime in paths: `Formatter<'_>`, not `Formatter`.
elided_lifetimes_in_paths = "warn"
[lints]
workspace = true
[dependencies]
# Wayland
wayland-client = "0.31"
wayland-protocols = { version = "0.32", features = ["client", "staging", "unstable"] }
wayland-protocols-wlr = { version = "0.3", features = ["client"] }
smithay-client-toolkit = { version = "0.20", default-features = false, features = ["calloop", "xkbcommon"] }
# Cairo for drawing
cairo-rs = { version = "0.22", features = ["png", "pdf"] }
# Already required by Cairo/Pango; protocol v2 also uses its SHA-256 checksum API.
glib = { version = "0.22", default-features = false }
# Pango for advanced text rendering and font support
pango = "0.22"
pangocairo = "0.22"
# Utils
log = { version = "0.4", features = ["std"] }
anyhow = "1.0"
toml = "1.1"
toml_edit = "0.25"
serde = { version = "1.0", features = ["derive"] }
serde_ignored = "0.1"
schemars = { version = "1.2", features = ["derive"], optional = true }
libc = "0.2"
# Safe wrappers for the kernel interfaces that the std library does not cover.
rustix = { version = "1", features = ["event", "fs", "net", "pipe", "process", "thread", "time"] }
# Kernel random bytes for portal handle tokens and daemon protocol identifiers.
getrandom = { version = "0.4", features = ["std"] }
# Securely created, self-deleting temporary files for the OCR engine handoff.
tempfile = "3"
flate2 = "1.0"
zune-jpeg = "0.5"
# Command-line tokenizing without a parser framework.
lexopt = "0.3"
# Grapheme/word segmentation for the text-editor caret and selection.
unicode-segmentation = "1"
# Daemon mode
ksni = { version = "0.3", optional = true }
tokio = { version = "1.0", features = ["rt-multi-thread", "macros", "time", "sync"] }
# Screenshot capture
zbus = { version = "5.0", optional = true, default-features = false, features = ["tokio"] }
serde_json = "1.0"
png = "0.18"
# GTK4 toolbar frontend (layer-shell compositors)
gtk4 = { version = "0.11", optional = true, features = ["v4_12"] }
gtk4-layer-shell = { version = "0.8", optional = true }
# System-wide input capture for the input HUD (opt-in `input-monitor`)
input = { version = "0.10", optional = true }
udev = { version = "0.9", optional = true }
xkbcommon = { version = "0.8", optional = true }
[build-dependencies]
[features]
# Optional Wayland tablet/stylus input support (zwp_tablet_v2)
tablet-input = []
# D-Bus dependent functionality (portal capture, notifications, tray)
dbus = ["zbus"]
portal = ["dbus"]
tray = ["dbus", "ksni"]
config-schema = ["dep:schemars"]
# GTK4-rendered toolbars on layer-shell compositors; the built-in Cairo
# toolbars remain compiled in as the fallback for everything else.
toolbar-gtk = ["dep:gtk4", "dep:gtk4-layer-shell"]
# System-wide keystroke/click capture for the input HUD. Opt-in: it links
# libinput/libudev and needs read access to /dev/input (usually `input` group
# membership), so it stays out of the default set.
input-monitor = ["dep:input", "dep:udev", "dep:xkbcommon"]
default = ["tablet-input", "portal", "tray", "toolbar-gtk"]
[[bin]]
name = "dump_config_schema"
path = "src/bin/dump_config_schema.rs"
required-features = ["config-schema"]