Cargo Features

cross-locks has no features set by default.

[dependencies]
cross-locks = { version = "0.1.2", features = ["native", "browser", "wasm", "gloo-timers"] }
default

force the user to pick exactly ONE of the following

native = futures, once_cell, tokio

Enables rt-multi-thread of tokio

Affects main::DefaultLock, cross-locks::DefaultLock

browser = wasm

Affects main::DefaultLock

wasm browser? = futures, js-sys, tokio, wasm-bindgen, wasm-bindgen-futures, web-sys

Enables rt of tokio

tokio:

Includes basic task execution capabilities

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.

once_cell native?

Enables once_cell

––––– feature-gated deps –––––

futures native? wasm?
tokio native? wasm?
wasm-bindgen wasm?

Enables wasm-bindgen

browser-only deps

wasm-bindgen-futures wasm?
web-sys wasm?
js-sys wasm?
gloo-timers implicit feature

Enables gloo-timers

(only used in the doctests / examples, not in the crate itself)