-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCargo.toml
91 lines (81 loc) · 3.6 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
87
88
89
90
91
[package]
name = "irpc"
version = "0.2.2"
edition = "2021"
authors = ["Rüdiger Klaehn <[email protected]>", "n0 team"]
keywords = ["api", "protocol", "network", "rpc"]
categories = ["network-programming"]
license = "Apache-2.0/MIT"
repository = "https://github.com/n0-computer/irpc"
description = "A streaming rpc system based on quic"
# Sadly this also needs to be updated in .github/workflows/ci.yml
rust-version = "1.76"
[dependencies]
# we require serde even in non-rpc mode
serde = { workspace = true }
# just for the oneshot and mpsc queues
tokio = { workspace = true, features = ["sync"] }
# for PollSender (which for some reason is not available in the main tokio api)
tokio-util = { version = "0.7.14", default-features = false }
# errors
thiserror = "2.0.12"
# used in the endpoint handler code when using rpc
tracing = { workspace = true, optional = true }
# used to ser/de messages when using rpc
postcard = { workspace = true, features = ["alloc", "use-std"], optional = true }
# currently only transport when using rpc
quinn = { workspace = true, optional = true }
# used as a buffer for serialization when using rpc
smallvec = { version = "1.14.0", features = ["write"], optional = true }
# used in the test utils to generate quinn endpoints
rustls = { version = "0.23.5", default-features = false, features = ["std"], optional = true }
# used in the test utils to generate quinn endpoints
rcgen = { version = "0.13.2", optional = true }
# used in the test utils to generate quinn endpoints
anyhow = { workspace = true, optional = true }
# used in the benches
futures-buffered ={ version = "0.2.9", optional = true }
# for AbortOnDropHandle
n0-future = { workspace = true, optional = true }
futures-util = { workspace = true, optional = true }
[target.'cfg(not(all(target_family = "wasm", target_os = "unknown")))'.dependencies]
quinn = { workspace = true, optional = true, features = ["runtime-tokio"] }
[dev-dependencies]
tracing-subscriber = { workspace = true, features = ["fmt"] }
# used in the derive example. This must not be a main crate dep or else it will be circular!
irpc-derive = { version = "0.2.2", path = "./irpc-derive" }
# just convenient for the enum definitions, in the manual example
derive_more = { version = "2", features = ["from"] }
# we need full for example main etc.
tokio = { workspace = true, features = ["full"] }
# formatting
thousands = "0.2.0"
# macro tests
trybuild = "1.0.104"
[features]
# enable the remote transport
rpc = ["dep:quinn", "dep:postcard", "dep:anyhow", "dep:smallvec", "dep:tracing", "dep:n0-future", "tokio/io-util"]
# add test utilities
quinn_endpoint_setup = ["rpc", "dep:rustls", "dep:rcgen", "dep:anyhow", "dep:futures-buffered", "quinn/rustls-ring"]
# pick up parent span when creating channel messages
message_spans = []
stream = ["dep:futures-util"]
default = ["rpc", "quinn_endpoint_setup", "message_spans", "stream"]
[workspace]
members = ["irpc-derive", "irpc-iroh"]
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "quicrpc_docsrs"]
[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ["cfg(quicrpc_docsrs)"] }
[workspace.dependencies]
anyhow = { version = "1.0.66" }
tokio = { version = "1.44", default-features = false }
postcard = { version = "1.1.1", default-features = false }
serde = { version = "1", default-features = false }
tracing = { version = "0.1.41", default-features = false }
n0-future = { version = "0.1.2", default-features = false }
tracing-subscriber = { version = "0.3.19" }
iroh = { version = "0.34" }
quinn = { package = "iroh-quinn", version = "0.13.0", default-features = false }
futures-util = { version = "0.3", features = ["sink"] }