-
Notifications
You must be signed in to change notification settings - Fork 1
/
Cargo.toml
86 lines (69 loc) · 1.96 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
[package]
name = "messages"
version = "0.3.1"
authors = ["Igor Aleksanov <[email protected]>"]
edition = "2018"
repository = "https://github.com/popzxc/messages-rs"
documentation = "https://docs.rs/messages"
readme = "README.md"
license = "MIT"
keywords = ["async", "actor", "utils", "actors"]
categories = ["rust-patterns"]
description = "Runtime-agnostic actor library."
[dependencies]
futures = "0.3.5"
async-trait = "0.1"
async-channel = "1.6"
async-oneshot = "0.5"
# Runtime section.
tokio = { version = "1.6", features = ["rt"], optional = true }
async-std = { version = "1.9", optional = true }
once_cell = { version = "1.7", optional = true }
[dev-dependencies]
# Runtimes
tokio = { version = "1.6", features = ["full"] }
async-std = { version = "1.9", features = ["attributes"] }
smol = "1.2"
# Examples deps
tokio-stream = { version = "0.1", features = ["time"] } # Stream examples
tokio-tungstenite = "0.14" # WebSocket example
num_cpus = "1.13" # Fibonacci example
# Benches
criterion = { version = "0.3", features = ["async_tokio", "html_reports"] }
[[bench]]
name = "bench"
required-features = ["runtime-tokio"]
harness = false
[features]
default = ["runtime-tokio"]
runtime-tokio = ["tokio", "once_cell"]
runtime-async-std = ["async-std", "once_cell"]
[[example]]
name = "01_ping"
required-features = ["runtime-tokio"]
[[example]]
name = "02_notify"
required-features = ["runtime-tokio"]
[[example]]
name = "03_fibonacci"
required-features = ["runtime-tokio"]
[[example]]
name = "04_ring"
required-features = ["runtime-tokio"]
[[example]]
name = "05_timed_stream"
required-features = ["runtime-tokio"]
[[example]]
name = "06_async_std"
required-features = ["runtime-async-std"]
# `07_no_runtime` doesn't need runtime features.
[[example]]
name = "08_websocket"
required-features = ["runtime-tokio"]
[[test]]
name = "tokio"
path = "tests/tokio/mod.rs"
required-features = ["runtime-tokio"]
[package.metadata.docs.rs]
features = ["runtime-tokio"]
rustdoc-args = ["--cfg", "docsrs"]