Maximizing the window crashed the GUI immediately with:
Error: Glutin(Error { raw_code: Some(12291), kind: OutOfMemory })
12291 is EGL_BAD_ALLOC. The default eframe `glow` (OpenGL) renderer
fails to reallocate its surface when the window resizes to maximized
dimensions on NVIDIA + Wayland — a well-known fragility of NVIDIA's
GL-on-Wayland path. It surfaces as a clean Err from run_native (not a
panic), which is why nothing landed in yt-offline.crash.log.
Switch to the wgpu (Vulkan) renderer, which reconfigures the swapchain
cleanly on resize:
- Cargo.toml: drop eframe's default glow feature, enable wgpu, keep
accesskit / default_fonts / wayland / x11.
- main.rs: NativeOptions.renderer = Renderer::Wgpu.
Verified on the NVIDIA GTX 1650 SUPER + Wayland session that triggered
the crash: app launches and maximizes cleanly, no EGL error.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
98 lines
5 KiB
TOML
98 lines
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]
|
|
# Use 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. We drop the `glow` default feature
|
|
# and keep the rest (accesskit, fonts, wayland, x11).
|
|
eframe = { version = "0.29", default-features = false, features = ["accesskit", "default_fonts", "wayland", "x11", "wgpu"] }
|
|
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"
|
|
# File-picker dialog for the desktop GUI. xdg-portal backend keeps it pure-Rust
|
|
# (zbus, no GTK/libdbus build dep), consistent with notify-rust above.
|
|
rfd = { version = "0.15", default-features = false, features = ["xdg-portal", "tokio"] }
|
|
ksni = { version = "0.3.4", features = ["tokio"] }
|
|
libc = "0.2.186"
|
|
|
|
[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" },
|
|
]
|