-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathCargo.toml
More file actions
139 lines (123 loc) · 4.09 KB
/
Cargo.toml
File metadata and controls
139 lines (123 loc) · 4.09 KB
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
################################################################################
# Copyright (c) 2023 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0
#
# SPDX-License-Identifier: Apache-2.0
################################################################################
[package]
categories = ["api-bindings"]
description = "The Eclipse uProtocol Rust Language Library"
edition = "2021"
include = [
"/build.rs",
"/Cargo.toml",
"/examples/*",
"/proto/*",
"/README.md",
"/src/*",
"/up-spec/up-core-api/uprotocol/*",
]
keywords = ["uProtocol", "SDK", "communication"]
license = "Apache-2.0"
name = "up-rust"
readme = "README.md"
repository = "https://github.com/eclipse-uprotocol/up-rust"
rust-version = "1.88"
version = "0.10.0-SNAPSHOT"
[features]
default = ["communication"]
cloudevents = []
communication = ["usubscription", "dep:thiserror", "tokio/sync", "tokio/time"]
udiscovery = []
usubscription = []
utwin = []
util = ["tokio/sync"]
test-util = ["mockall"]
symphony = ["communication", "dep:serde", "dep:serde_json", "dep:symphony"]
[dependencies]
async-trait = { version = "0.1" }
bytes = { version = "1.11.1" }
mediatype = "0.20"
mockall = { version = "0.14", optional = true }
protobuf = { version = "3.7.2", features = ["with-bytes"] }
# https://rustsec.org/advisories/RUSTSEC-2026-0097
rand = { version = "0.9.3" }
regex = { version = "1.11" }
serde = { version = "1.0.228", optional = true }
serde_json = { version = "1.0.145", optional = true }
symphony = { version = "0.1", optional = true }
thiserror = { version = "1.0.69", optional = true }
tokio = { version = "1.45.1", default-features = false, optional = true }
tracing = { version = "0.1", default-features = false, features = ["log", "std"] }
uriparse = { version = "0.6" }
uuid-simd = { version = "0.8", default-features = false, features = ["std", "detect"] }
[build-dependencies]
protobuf-codegen = { version = "3.7.2" }
protoc-bin-vendored = { version = "3.2" }
[dev-dependencies]
clap = { version = "4.6.1" }
cucumber = { version = "0.23.0", features = ["output-junit"] }
hex = { version = "0.4.3" }
mockall = { version = "0.14.0" }
test-case = { version = "3.3.1" }
time = { version = "0.3.47" }
tokio = { version = "1.45.1", default-features = false, features = [
"macros",
"rt",
"rt-multi-thread",
"sync",
"time",
] }
[profile.release]
opt-level = 3
lto = "fat"
codegen-units = 1
[package.metadata.docs.rs]
all-features = true
[package.metadata.cargo-all-features]
# we currently do not have implementations for these features
# so there is no need to test compatibility with other features
denylist = ["udiscovery", "utwin"]
skip_feature_sets = [
# communication includes usubscription
["communication", "usubscription"],
]
# optional dependencies are activated by means of features only
skip_optional_dependencies = true
max_combination_size = 3
[[example]]
name = "simple_notify"
required-features = ["communication", "util"]
[[example]]
name = "simple_publish"
required-features = ["communication", "util"]
[[example]]
name = "simple_rpc"
required-features = ["communication", "util"]
[[example]]
name = "symphony_target"
required-features = ["symphony", "util"]
[[test]]
name = "tck_uuri"
harness = false # allows Cucumber to print output instead of libtest
[[test]]
name = "tck_uuid"
harness = false # allows Cucumber to print output instead of libtest
[lints.rust]
# this prevents cargo from complaining about code blocks
# excluded from tarpaulin coverage checks
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(tarpaulin_include)'] }
[lints.clippy]
# see https://corrode.dev/blog/defensive-programming/#clippy-lints-for-defensive-programming
indexing_slicing = "deny"
fallible_impl_from = "deny"
wildcard_enum_match_arm = "deny"
unneeded_field_pattern = "deny"
fn_params_excessive_bools = "deny"
must_use_candidate = "allow"