Cargo Features

[dependencies]
rust-bert = { version = "0.23.0", default-features = false, features = ["doc-only", "remote", "download-libtorch", "onnx", "rustls-tls", "default-tls", "hf-tokenizers", "all-tests"] }
default = default-tls, remote

These default features are set whenever rust-bert is added without default-features = false somewhere in the dependency tree.

doc-only

Enables doc-only of tch ^0.17.0

remote default = cached-path, dirs, lazy_static

Affects builder::Remote

download-libtorch

Enables tch ^0.17.0

onnx = ndarray, ort

Affects pipelines::onnx

rustls-tls

Enables rustls-tls of cached-path

default-tls default

Enables default-tls of cached-path

hf-tokenizers = tokenizers

Affects pipelines::hf_tokenizers

all-tests

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

cached-path default-tls remote rustls-tls?
dirs remote
lazy_static remote
ort onnx?
ndarray onnx?

Enables ndarray ^0.15

tokenizers hf-tokenizers?

Enables tokenizers ^0.20