Cargo Features

rustube = { version = "0.6.0", default-features = false, features = ["std", "callback", "microformat", "download", "fetch", "descramble", "stream", "blocking", "default-tls", "native-tls", "rustls-tls", "reqwest", "serde_with", "tokio"] }
default = default-tls, download, std

By default, the minimal features for downloading a video are enabled. If you compile with default-features = false,
you get only the Id type as well as the Error type.

std default blocking? fetch? = regex, thiserror

Affects rustube::Result, rustube::error

callback = download, futures

Enables sync of tokio

Affects stream::callback

microformat = fetch

Enables serde of chrono

Affects player_response::microformat, player_response::PlayerResponse.microformat

download default callback? = fetch, tokio-stream

Enables fs, io-util and parking_lot of tokio

Affects blocking::download_best_quality, blocking::download_worst_quality, rustube::download_best_quality, rustube::download_worst_quality

fetch descramble? download microformat? = bytes, chrono, descramble, mime, serde_json, serde_qs, std

could be usefull if you don't want to download videos, but just want to get information like title, view-count, ...

Enables json, cookies, stream and gzip of reqwest, rc and default (std) of serde, json of serde_with ^1.10.0, macros of tokio, serde of url

Affects blocking::fetcher, rustube::video_info, rustube::fetcher

descramble fetch? stream? = fetch, stream

Affects blocking::descrambler, blocking::video, rustube::descrambler, rustube::video

stream descramble? = descramble

Enables serde of chrono

Affects rustube::stream

blocking = std

Enables rt and rt-multi-thread of tokio

Affects rustube::blocking

default-tls default

Enables default-tls of reqwest


Enables native-tls of reqwest


Enables rustls-tls of reqwest

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features.

todo: add features to opt in/out of deserialization of some data (title, view_count, ...)

bytes fetch?

With default (std)

chrono fetch?

With default features

futures callback?

With default features

mime fetch?
regex std

With default features

Affects id::ID_PATTERNS, id::WATCH_URL_PATTERN, id::SHORTS_URL_PATTERN, id::EMBED_URL_PATTERN, id::SHARE_URL_PATTERN, id::ID_PATTERN, blocking::download_best_quality, blocking::download_worst_quality, rustube::download_best_quality, rustube::download_worst_quality

reqwest implicit feature

With default (default-tls)

serde_qs fetch?

Enables serde_qs ^0.8.5

serde_json fetch?

With default (std)

serde_with implicit feature

Enables default (macros) of serde_with ^1.10.0

thiserror std
tokio implicit feature
tokio-stream download

With default (time)