-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCargo.toml
More file actions
60 lines (51 loc) · 2.29 KB
/
Copy pathCargo.toml
File metadata and controls
60 lines (51 loc) · 2.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
[package]
name = "nvpaper"
version = "0.1.0"
edition = "2024"
description = "Minimal pure-Rust video wallpaper for niri / wlr-layer-shell compositors, with dma-buf zerocopy"
license = "MIT"
[dependencies]
anyhow = "1"
log = "0.4"
env_logger = "0.11"
# Pure-Rust Wayland client + the protocol extensions nvpaper needs:
# - zwlr_layer_shell_v1 (background wallpaper surface)
# - zwp_linux_dmabuf_v1 (zero-copy wl_buffer import + format/modifier feedback)
# - wp_viewporter (scale the decoded video to each output)
# - wp_fractional_scale (HiDPI)
wayland-client = "0.31"
wayland-protocols = { version = "0.32", features = [
"client",
"unstable",
"staging",
] }
wayland-protocols-wlr = { version = "0.3", features = ["client"] }
# Raw Vulkan for DMA-BUF export (and, later, Vulkan-Video decode).
ash = "0.38"
# Pure-Rust container demuxing (H.264 elementary stream extraction).
mp4 = "0.14"
matroska-demuxer = "0.7"
# Hardware H.264 decode via Vulkan Video. This is a LOCAL FORK of the
# published gpu-video 0.4.0: it adds a zero-copy DMA-BUF export path that
# upstream lacks — new src/vulkan_decoder/dmabuf.rs plus wiring in
# adapter.rs / device.rs / vulkan_decoder.rs / vulkan_video.rs (~200 added
# lines). nvpaper uses the fork-only APIs DmabufDecoder / DmabufExportConfig
# / DmabufFrame / create_dmabuf_decoder_h264, so a plain crates.io build will
# NOT compile. The fork source lives in vendor/gpu-video and is substituted
# via [patch.crates-io] at the bottom of this file. default-features=false
# drops wgpu — we only use the raw Vulkan path.
gpu-video = { version = "0.4.0", default-features = false }
# poll(2) for the single-threaded event loop (interleave Wayland + paced decode).
rustix = { version = "1", features = ["event", "time"] }
# Clean SIGINT/SIGTERM shutdown (release GPU + surfaces on exit).
signal-hook = "0.3"
[profile.release]
opt-level = 3
lto = "thin"
# Substitute crates.io gpu-video 0.4.0 with our vendored fork (adds the
# DMA-BUF export path described above). Cargo [patch] is a whole-crate source
# swap, not a diff — the full forked source must stay in vendor/gpu-video.
# MIGRATION: once DMA-BUF export lands upstream, delete this block and bump
# the version requirement to switch to the pure crates.io crate.
[patch.crates-io]
gpu-video = { path = "vendor/gpu-video" }