`cargo check --target x86_64-pc-windows-gnu` is now green (only the upstream egui f32:From<f64> warnings). The Linux-only desktop deps are target-gated so the rest of the stack — which already cross-compiles — can build off Linux: - Cargo.toml: ksni and rfd's xdg-portal backend move to [target.'cfg(target_os = "linux")'.dependencies]; non-Linux gets rfd with its native Win32/AppKit backend (default features). - tray.rs: cfg-split. The ksni/SNI implementation stays Linux-only; other OSes get a no-op `start() -> None`, i.e. windowed-only (identical to the Linux no-SNI-host path). TrayEvent/TrayHandle stay cross-platform. - plex.rs: add a Windows `symlink_file` arm to make_symlink (also fixes an unused-variable warning on non-unix). The rest was already portable (disk_space/statvfs, mpv IPC UnixStream, chmod/PermissionsExt guards all cfg(unix)). macOS is Unix so those apply there unchanged. Still not a *shipped* binary: needs a real per-OS tray backend and a linking CI matrix. ROADMAP 3.1 + CLAUDE.md updated. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
107 lines
5.5 KiB
TOML
107 lines
5.5 KiB
TOML
[package]
|
|
name = "yt-offline"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
description = "Self-hosted archive for YouTube, TikTok, Twitch, Vimeo, Bandcamp, SoundCloud, Odysee and more. Desktop GUI + web UI, bundled yt-dlp with curl_cffi impersonation, Plex export, SQLite-backed resume tracking. AGPL-3.0."
|
|
license = "AGPL-3.0-only"
|
|
repository = "https://codeberg.org/anassaeneroi/yt-offline"
|
|
homepage = "https://codeberg.org/anassaeneroi/yt-offline"
|
|
authors = ["InannaBeloved <anassaeneroi@pm.me>"]
|
|
readme = "README.md"
|
|
|
|
[dependencies]
|
|
# Default to the wgpu (Vulkan/Metal/DX) renderer instead of the default glow
|
|
# (OpenGL) one. NVIDIA + Wayland crashes the GL surface on window resize
|
|
# (Glutin EGL_BAD_ALLOC / OutOfMemory on maximize); wgpu's Vulkan path
|
|
# reconfigures the swapchain cleanly. Keep glow compiled in as an escape
|
|
# hatch for machines where wgpu/Vulkan creates a window but never presents
|
|
# a frame (`YT_OFFLINE_RENDERER=glow` or `--renderer glow`).
|
|
eframe = { version = "0.29", default-features = false, features = ["accesskit", "default_fonts", "wayland", "x11", "wgpu", "glow"] }
|
|
image = { version = "0.25", default-features = false, features = ["webp", "jpeg", "png"] }
|
|
toml = "0.8"
|
|
serde = { version = "1.0", features = ["derive"] }
|
|
serde_json = "1.0"
|
|
rusqlite = { version = "0.31", features = ["bundled"] }
|
|
r2d2 = "0.8"
|
|
r2d2_sqlite = "0.24"
|
|
notify-rust = { version = "4", default-features = false, features = ["z"] }
|
|
axum = { version = "0.7", features = ["macros", "ws"] }
|
|
tokio = { version = "1", features = ["full"] }
|
|
tokio-util = { version = "0.7", features = ["io"] }
|
|
tokio-stream = "0.1"
|
|
tower-http = { version = "0.5", features = ["cors", "fs", "compression-gzip"] }
|
|
argon2 = "0.5"
|
|
rand = "0.8"
|
|
libc = "0.2.186"
|
|
|
|
# Platform-specific desktop deps. On Linux the tray (ksni — StatusNotifierItem
|
|
# over zbus) and the rfd file picker (xdg-portal backend) stay pure-Rust with no
|
|
# GTK build dep, matching notify-rust. On Windows/macOS there's no SNI tray yet
|
|
# (tray::start is a compiled-out no-op) and rfd falls back to its native backend
|
|
# (Win32 / AppKit) via its default features.
|
|
[target.'cfg(target_os = "linux")'.dependencies]
|
|
ksni = { version = "0.3.4", features = ["tokio"] }
|
|
rfd = { version = "0.15", default-features = false, features = ["xdg-portal", "tokio"] }
|
|
|
|
[target.'cfg(not(target_os = "linux"))'.dependencies]
|
|
rfd = { version = "0.15", features = ["tokio"] }
|
|
|
|
[profile.release]
|
|
opt-level = 3
|
|
# Thin LTO does cross-crate inlining without the rust-lld + bundled-sqlite
|
|
# link breakage that full `lto = true` triggered (the previous !lto note
|
|
# was about full LTO; thin works with the current toolchain). Worth ~5-10%
|
|
# on hot paths.
|
|
lto = "thin"
|
|
# Codegen-units = 1 trades build time (~30s extra) for tighter inlining
|
|
# across the whole crate. Worth it for release binaries.
|
|
codegen-units = 1
|
|
# Strip debuginfo from release binaries — cuts binary size by ~30 MB
|
|
# without affecting runtime. The crash log still captures backtraces at
|
|
# runtime; those are less informative without symbols but usable with
|
|
# addr2line against the unstripped build artifact.
|
|
strip = "debuginfo"
|
|
|
|
# ── Debian / Ubuntu package (cargo-deb) ──────────────────────────────────────
|
|
# `cargo deb` reads this to build a .deb. Runtime deps mirror the PKGBUILD:
|
|
# yt-dlp + ffmpeg + mpv are invoked as subprocesses, xdg-utils provides
|
|
# xdg-open, and libxcb is needed by the eframe/winit windowing stack.
|
|
[package.metadata.deb]
|
|
maintainer = "InannaBeloved <anassaeneroi@pm.me>"
|
|
copyright = "2026, InannaBeloved <anassaeneroi@pm.me>"
|
|
license-file = ["LICENSE", "0"]
|
|
extended-description = """\
|
|
Self-hosted archive for YouTube, TikTok, Twitch, Vimeo, Bandcamp, \
|
|
SoundCloud, Odysee and more. Ships a desktop GUI and a mobile-friendly \
|
|
web UI, with a bundled yt-dlp (curl_cffi impersonation), Plex export, \
|
|
and SQLite-backed resume tracking."""
|
|
section = "video"
|
|
priority = "optional"
|
|
# yt-dlp / ffmpeg / mpv are runtime subprocess deps, not link-time, so
|
|
# cargo-deb's auto-detection won't find them — list explicitly. libxcb
|
|
# is the one shared library the GUI actually dlopens.
|
|
depends = "libc6, libxcb1, yt-dlp, ffmpeg, mpv, xdg-utils"
|
|
recommends = "libnotify4"
|
|
assets = [
|
|
["target/release/yt-offline", "usr/bin/", "755"],
|
|
["youtube-backup.desktop", "usr/share/applications/yt-offline.desktop", "644"],
|
|
["icon.png", "usr/share/pixmaps/yt-offline.png", "644"],
|
|
["README.md", "usr/share/doc/yt-offline/README.md", "644"],
|
|
]
|
|
|
|
# ── Fedora / RHEL / openSUSE package (cargo-generate-rpm) ─────────────────────
|
|
# `cargo generate-rpm` reads this. Run `cargo build --release` first; it
|
|
# packages the already-built binary rather than building itself.
|
|
[package.metadata.generate-rpm]
|
|
summary = "Self-hosted multi-platform video archiver with desktop + web UI"
|
|
license = "AGPLv3"
|
|
# RPM distro package names differ from Debian's. yt-dlp is `yt-dlp` on
|
|
# Fedora; ffmpeg lives in RPM Fusion but we still declare the dep.
|
|
requires = { yt-dlp = "*", ffmpeg = "*", mpv = "*", "xdg-utils" = "*" }
|
|
assets = [
|
|
{ source = "target/release/yt-offline", dest = "/usr/bin/yt-offline", mode = "755" },
|
|
{ source = "youtube-backup.desktop", dest = "/usr/share/applications/yt-offline.desktop", mode = "644" },
|
|
{ source = "icon.png", dest = "/usr/share/pixmaps/yt-offline.png", mode = "644" },
|
|
{ source = "README.md", dest = "/usr/share/doc/yt-offline/README.md", mode = "644" },
|
|
{ source = "LICENSE", dest = "/usr/share/licenses/yt-offline/LICENSE", mode = "644" },
|
|
]
|