| Crates.io | ytdlp-ejs |
| lib.rs | ytdlp-ejs |
| version | 0.1.1 |
| created_at | 2026-01-14 14:11:16.34859+00 |
| updated_at | 2026-01-14 14:11:16.34859+00 |
| description | ejs |
| homepage | https://github.com/ahaoboy/ytdlp-ejs |
| repository | https://github.com/ahaoboy/ytdlp-ejs |
| max_upload_size | |
| id | 2042887 |
| size | 157,993 |
YouTube player signature solver implemented in Rust, using SWC for JavaScript parsing and multiple runtime options for execution.
A Rust port of yt-dlp/ejs.
📖 Improving yt-dlp-ejs with Rust: Smaller and Faster
sig) decryption functionsn) decryption functions# Default build (QuickJS + Boa + External runtimes)
cargo build --release
# QuickJS only (smallest binary)
cargo build --release --no-default-features --features qjs
# Boa only
cargo build --release --no-default-features --features boa
Binary output: target/release/ejs
[dependencies]
ejs = { git = "https://github.com/ahaoboy/ytdlp-ejs", features = ["qjs"] }
# Basic usage
ejs <player_file> [n:<challenge>] [sig:<challenge>]
# Specify runtime
ejs --runtime qjs player.js n:ZdZIqFPQK-Ty8wId
ejs --runtime boa player.js sig:gN7a-hudCuAuPH6f...
ejs --runtime node player.js n:ZdZIqFPQK-Ty8wId sig:gN7a-hudCuAuPH6f...
ejs --runtime deno player.js n:ZdZIqFPQK-Ty8wId
ejs --runtime bun player.js n:ZdZIqFPQK-Ty8wId
Output (JSON):
{
"type": "result",
"responses": [
{ "type": "result", "data": { "ZdZIqFPQK-Ty8wId": "qmtUsIz04xxiNW" } }
]
}
use ejs::{
process_input_with_runtime, JsChallengeInput, JsChallengeRequest,
JsChallengeType, RuntimeType,
};
let input = JsChallengeInput::Player {
player: player_code.to_string(),
requests: vec![
JsChallengeRequest {
challenge_type: JsChallengeType::N,
challenges: vec!["ZdZIqFPQK-Ty8wId".to_string()],
},
],
output_preprocessed: false,
};
let output = process_input_with_runtime(input, RuntimeType::QuickJS);
| Runtime | Feature | Binary Size | External Dependency |
|---|---|---|---|
| QuickJS | qjs |
~5MB | None (embedded) |
| Boa | boa |
~8MB | None (embedded) |
| Node | external |
- | Requires Node.js |
| Deno | external |
- | Requires Deno |
| Bun | external |
- | Requires Bun |
| Runtime | Pass | Fail | Total | Time |
|---|---|---|---|---|
| qjs | 316 | 0 | 316 | 80.101s |
| node | 316 | 0 | 316 | 87.947s |
| bun | 316 | 0 | 316 | 147.197s |
| boa | 316 | 0 | 316 | 178.557s |
| deno | 316 | 0 | 316 | 238.250s |
Latest results: bench.yml