Rewrite the CLI in Rust with the shared youtubei crate and native FFmpeg - #8
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rewrite the CLI in Rust/Cargo while retaining browser authorization, shows/artwork, episodes, resumable uploads, membership, and RSS/YouTube imports. Oasmith generates the public API client and
CLIConfig; production defaults are compiled into the binary, and E2Es use validated YAML overrides.YouTube extraction uses the shared
listenbox/youtubeicrate pinned toa394160a92d3809bde4d4376d480373bc44ae82e. Rust owns playlist traversal, format selection, HTTP transport and cancellation. The crate downloads the published YouTube.js 18.1.0 CF-worker bundle from its npm archive, verifies both SHA-256 values, and embeds it through QuickJS. Generated JavaScript stays in Cargo's ignored output directory.The CLI repository has no TypeScript sources, JavaScript package manifests/lockfiles, Nub/Bun dependencies, or bundling tasks. Python's standard library prepares checksum-verified FFmpeg 9.0.2;
ffmpeg-the-thirdstatically links its libraries. Building or running the CLI requires no JavaScript toolchain or external FFmpeg/FFprobe executable.Benchmark rerun on 2026-09-24: Go
3d0f569versus Rust637e7c2, including the shared youtubei crate and published YouTube.js 18.1.0 CF-worker bundle.Each runtime figure is the median of 20 complete imports after four warmups per build, with balanced Go/Rust/Rust/Go order. Both are stripped release builds with static FFmpeg 9.0.2, on the same eight-vCPU Linux x86-64 host. The local fixture exercises 1080p AVC + Opus download, AAC transcoding, MP4/HLS packaging, upload and successful publication; all 48 imports passed publication and Opus-download checks. Wall time includes startup. CPU and peak RSS cover only the CLI process, excluding backend services; 100% CPU utilization means one occupied core. Deltas use unrounded medians; pp means percentage points. This short local fixture does not measure live YouTube latency, signature challenges or long-video memory use.
Methodology and reproduction · Raw samples and binary hashes · Host and build details.
Validation:
cli:check: formatting, Clippy, unit tests, debug smoke test, release build and package passed.cli:smokeandcli:testpassed with Node, Nub, Bun and esbuild blocked on PATH.Full workspace verification was not rerun; the previously reported RSS import deadlock is outside this change. Tests use local fixtures, without live YouTube or cross-platform release validation.
Related: workspace integration #88, Oasmith Rust generation #14, and Mazit shared dependency #2. The Go baseline from #7 is already merged.