Rust port of NewPipeExtractor (YT-only). Plugs into Straw via UniFFI.
Find a file
Sulkta 5e0ec08928 perf(extract): borrow instead of clone + parallelize channel browse
Four allocation/latency wins in the hot extraction paths. Behavior
preserved — all 120 in-crate tests green, clippy clean.

- stream_extractor: borrow streamingData out of the owned android + ios
  player responses instead of deep-cloning the largest subtree of each
  response. A shared Value::Null static backs the absent case.
- stream_extractor: merge_formats returns borrowed &Value format objects
  rather than cloning each one (~20-40 per video) — they are only read
  (.get()) downstream.
- channel: fetch the Home and Videos tabs concurrently via thread::scope
  so a channel open costs one round-trip of latency, not two. Home stays
  mandatory; the Videos tab stays best-effort (now also resilient to a
  panicked worker thread).
- downloader: build the response body with String::from_utf8 (in-place on
  the valid-UTF-8 common case) instead of from_utf8_lossy, which always
  copies; the lossy fallback for invalid bytes is preserved.
2026-06-21 05:40:11 -07:00
.forgejo/workflows ci: add gitleaks workflow 2026-05-27 22:15:00 -07:00
src perf(extract): borrow instead of clone + parallelize channel browse 2026-06-21 05:40:11 -07:00
tests chore: scrub internal references and tighten README 2026-05-27 13:29:52 -07:00
.gitignore Initial commit 2026-05-24 16:26:57 -07:00
Cargo.lock Rename package to strawcore-core 2026-05-24 17:28:38 -07:00
Cargo.toml Drop cdylib + staticlib from strawcore-core crate-type 2026-05-24 17:40:37 -07:00
LICENSE Initial commit 2026-05-24 16:26:57 -07:00
README.md chore: scrub internal references and tighten README 2026-05-27 13:29:52 -07:00

strawcore

Rust port of NewPipeExtractor (v0.26.2), YouTube-only. Plugs into Straw via UniFFI.

rustypipe regex-parses YouTube's player.js and reimplements the signature deobfuscator in Rust — every YT player rotation breaks it. NPE embeds a JS engine and executes the function live, which survives rotations. strawcore mirrors that architecture on QuickJS via rquickjs.

Build + test

cargo build
cargo test --lib                          # offline unit tests
cargo test --features online-tests        # full smoke incl. live httpbin.org

License

GPL-3.0-or-later. NPE is GPL-3.0; this port inherits.