Cargo Features

[dependencies]
web-rwkv = { version = "0.8.19", default-features = false, features = ["native", "web", "runtime", "subgroup-ops", "tokio-multi-thread", "trace", "vanilla"] }
default = runtime, subgroup-ops, tokio-multi-thread, vanilla

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

native = runtime, subgroup-ops, tokio-multi-thread
web = vanilla
runtime default native?

Enables runtime API, which essentially doubles the inference speed comparing to the old API.

Affects web-rwkv::runtime

subgroup-ops default native?

Enables subgroup operations in the kernels. Accelerates the inference on some device.

tokio-multi-thread default native?

Enables tokio's multi-threaded runtime. Doesn't work on web platforms.

Enables rt-multi-thread of tokio

trace = tracing, tracing-subscriber, tracing-tracy

Enables performance tracing.

vanilla default web?

Enables vanilla API.

Affects web-rwkv::model

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.

tracing trace?
tracing-subscriber trace?
tracing-tracy trace?