Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
[package]
name = "scheduler"
version = "0.1.0"
edition.workspace = true
publish.workspace = true
license = "Apache-2.0"
[lints]
workspace = true
[lib]
path = "src/scheduler.rs"
doctest = false
[features]
test-support = []
# Allows `spawn_dedicated` to create real threads on wasm targets by spawning
# web workers. Off by default because it requires shared-memory threading
# (atomics + bulk-memory); wasm consumers without those build flags keep
# compiling, and `spawn_dedicated` panics at runtime instead.
#
# `flume/spin` replaces flume's internal `std::sync::Mutex` with a spinlock:
# a contended `std` lock parks with `Atomics.wait`, which the browser forbids
# on the main thread, and the main thread sends on flume channels every time
# it schedules work onto a dedicated thread.
wasm-threads = ["dep:wasm_thread", "flume/spin"]
[dependencies]
async-task.workspace = true
backtrace.workspace = true
chrono = { workspace = true, features = ["now", "wasmbind"] }
flume.workspace = true
futures.workspace = true
parking_lot.workspace = true
rand.workspace = true
web-time.workspace = true
[target.'cfg(target_family = "wasm")'.dependencies]
wasm_thread = { workspace = true, optional = true }