forked from ucan-wg/rs-ucan
/
Cargo.toml
152 lines (130 loc) · 4.13 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
[package]
name = "ucan"
version = "0.2.0"
description = "Rust implementation of UCAN"
keywords = ["capabilities", "authorization", "ucan"]
categories = []
include = ["/src", "/examples", "/benches", "README.md", "LICENSE"]
license = "Apache-2.0"
readme = "README.md"
edition = "2021"
rust-version = "1.77"
documentation = "https://docs.rs/ucan"
repository = "https://github.com/ucan-wg/rs-ucan"
authors = [
"Quinn Wilton <quinn@quinnwilton.com>",
"Brooklyn Zelenka <hello@brooklynzelenka.com>"
]
[lib]
crate-type = ["cdylib", "rlib"]
path = "src/lib.rs"
bench = false
[[bench]]
name = "a_benchmark" # FIXME rename
harness = false
required-features = ["test_utils"]
[[example]]
name = "counterparts"
path = "examples/counterparts.rs"
[dependencies]
# Docs
aquamarine = { version = "0.5", optional = true }
# Encoding
multibase = "0.9"
base64 = "0.21"
nom = "7.1"
nom-unicode = "0.3"
# Crypto
blst = { version = "0.3.11", optional = true, default-features = false }
# Web Stack
did_url = "0.1"
ecdsa = { version = "0.16.8", features = ["alloc"], optional = true, default-features = false }
ed25519-dalek = { version = "2.0.0", features = ["rand_core"], optional = true }
# Code Convenience
derive_builder = "0.20"
enum-as-inner = "0.6"
getrandom = { version = "0.2", features = ["js", "rdrand"] }
k256 = { version = "0.13.1", features = ["ecdsa"], optional = true, default-features = false }
# Interplanetary Stack
libipld = { version = "0.16", optional = true }
libipld-cbor = "0.16"
libipld-core = { version = "0.16", features = ["serde-codec"] }
multihash = { version = "0.18" }
nonempty = { version = "0.9" }
p256 = { version = "0.13.2", features = ["alloc", "ecdsa"], optional = true, default-features = false }
p384 = { version = "0.13.0", features = ["alloc", "ecdsa"], optional = true, default-features = false }
p521 = { version = "0.13.3", features = ["alloc", "ecdsa", "getrandom"], optional = true, default-features = false }
proptest = { version = "1.1", optional = true }
proptest-derive = { version = "0.4", optional = true }
rsa = { version = "0.9.6", features = ["sha2", "std"], optional = true, default-features = false }
serde = { version = "1.0.188", features = ["derive"] }
serde_derive = "1.0"
signature = { version = "2.1.0", features = ["alloc"] }
thiserror = "1.0"
unsigned-varint = "0.7.2"
url = { version = "2.5", features = ["serde"] }
web-time = "0.2.3"
# FIXME actually use? async-signature = "0.4.0"
# FIXME also have a wasi target
[target.'cfg(target_arch = "wasm32")'.dependencies]
console_error_panic_hook = { version = "0.1" }
js-sys = { version = "0.3" }
serde-wasm-bindgen = "0.6"
wasm-bindgen = "0.2"
wasm-bindgen-derive = "0.2"
# wasm-bindgen-futures = { version = "0.4" }
web-sys = { version = "0.3", features = ["Crypto", "CryptoKey", "CryptoKeyPair", "SubtleCrypto"] }
[dev-dependencies]
assert_matches = "1.5"
libipld = "0.16"
pretty_assertions = "1.4"
rand = "0.8"
testresult = "0.3"
test-log = "0.2"
[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
criterion = "0.4"
proptest = { version = "*" }
[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
criterion = { version = "0.4", default-features = false }
proptest = { version = "*", default-features = false, features = ["std"] }
wasm-bindgen-test = "0.2"
[features]
default = [
"es256",
"es256k",
"es384",
"es512",
"rs256",
"rs512",
"eddsa",
"bls",
"ability-preset",
# FIXME temp while developing
# "test_utils",
]
test_utils = ["dep:proptest", "dep:proptest-derive", "dep:libipld"]
eddsa = ["dep:ed25519-dalek"]
es256 = ["dep:p256"]
es256k = ["dep:k256"]
es384 = ["dep:p384"]
es512 = ["dep:ecdsa", "dep:p521"]
ps256 = ["dep:rsa"]
rs256 = ["dep:rsa"]
rs512 = ["dep:rsa"]
bls = ["dep:blst"]
ability-preset = ["ability-crud", "ability-msg", "ability-wasm"]
ability-crud = []
ability-msg = []
ability-wasm = []
mermaid_docs = ["aquamarine"]
[package.metadata.docs.rs]
all-features = true
#
# defines the configuration attribute `docsrs`
rustdoc-args = ["--cfg", "docsrs"]
cargo-args = ["--features='mermaid_docs'"]
#
# Speedup build on macOS
# See https://blog.rust-lang.org/2021/03/25/Rust-1.51.0.html#splitting-debug-information
[profile.dev]
split-debuginfo = "unpacked"