forked from Cosmian/kms
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCargo.toml
More file actions
176 lines (166 loc) · 5.66 KB
/
Cargo.toml
File metadata and controls
176 lines (166 loc) · 5.66 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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
[workspace]
default-members = ["crate/server"]
members = [
# Client crates
"crate/client_utils",
"crate/kms_client",
"crate/wasm",
"crate/cli",
# Server crates
"crate/access",
"crate/crypto",
"crate/hsm/proteccio",
"crate/hsm/crypt2pay",
"crate/hsm/softhsm2",
"crate/hsm/smartcardhsm",
"crate/hsm/utimaco",
"crate/hsm/base_hsm",
"crate/interfaces",
"crate/kmip",
"crate/server",
"crate/server_database",
# Test crates
"crate/test_kms_server",
]
# Do that if you don't want to enable `dev` feature by default due to the `dev-dependencies` of the cli.
# For more details, read: https://doc.rust-lang.org/cargo/reference/resolver.html#feature-resolver-version-2
# note: resolver defaults to 2 in 2021 edition crate, but defaults to 1 in virtual workspace
resolver = "2"
[workspace.lints.rust]
nonstandard_style = "deny"
refining_impl_trait = "deny"
future_incompatible = "deny"
keyword_idents = "deny"
let_underscore = "deny"
unreachable_pub = "deny"
unused = "deny"
unsafe_code = "deny"
[workspace.lints.clippy]
# Main clippy categories
pedantic = { level = "deny", priority = 90 }
all = { level = "deny", priority = 80 }
suspicious = { level = "deny", priority = 70 }
complexity = { level = "deny", priority = 60 }
perf = { level = "deny", priority = 50 }
style = { level = "deny", priority = 40 }
cargo = { level = "deny", priority = 30 }
nursery = { level = "deny", priority = 20 }
# Common allows (to be selectively enabled by crates as needed)
similar_names = { level = "allow", priority = 91 }
too_many_lines = { level = "allow", priority = 91 }
ref_option = { level = "allow", priority = 91 }
missing_errors_doc = { level = "allow", priority = 91 }
multiple_crate_versions = { level = "allow", priority = 31 }
redundant_pub_crate = { level = "allow", priority = 21 }
future_not_send = { level = "allow", priority = 21 }
cognitive_complexity = { level = "allow", priority = 21 }
significant_drop_tightening = { level = "allow", priority = 21 }
iter_with_drain = { level = "allow", priority = 21 }
too_long_first_doc_paragraph = { level = "allow", priority = 21 }
# Restriction lints (from server and other crates)
module_name_repetitions = "allow"
unwrap_used = "deny"
get_unwrap = "deny"
expect_used = "deny"
indexing_slicing = "deny"
missing_asserts_for_indexing = "deny"
unwrap_in_result = "deny"
assertions_on_result_states = "deny"
panic = "deny"
panic_in_result_fn = "deny"
renamed_function_params = "deny"
verbose_file_reads = "deny"
str_to_string = "deny"
implicit_clone = "deny"
unreachable = "deny"
as_conversions = "deny"
print_stdout = "deny"
empty_structs_with_brackets = "deny"
unseparated_literal_suffix = "deny"
map_err_ignore = "deny"
redundant_clone = "deny"
[workspace.package]
version = "5.14.0"
edition = "2024"
rust-version = "1.87.0"
authors = [
"Bruno Grieder <bruno.grieder@cosmian.com>",
"Emmanuel Coste <emmanuel.coste@cosmian.com>",
]
license = "BUSL-1.1" # "Business Source License 1.1"
license-file = "LICENSE"
repository = "https://github.com/Cosmian/kms"
homepage = "https://github.com/Cosmian/kms"
keywords = ["kms", "cosmian"]
categories = ["security"]
[profile.release]
# Deterministic build configuration for reproducible binaries
# These settings ensure the same source produces identical binaries across builds
lto = "fat" # Fat LTO: maximum cross-crate optimization for smallest binaries
strip = "symbols" # Strip symbol tables for smaller binaries
opt-level = "z" # Optimize for size while maintaining performance
codegen-units = 1 # Single codegen unit: best optimization and determinism
panic = "abort" # Smaller binaries, no unwinding tables
incremental = false # Disable incremental compilation for determinism
debug = 0 # No debug info (timestamps/paths)
[profile.dev]
strip = "debuginfo"
incremental = false
# proc-macros and build-scripts
[profile.dev.build-override]
strip = "debuginfo"
incremental = false
# external dependencies
[profile.dev.package."*"]
opt-level = 0
[workspace.dependencies]
actix-rt = "2.10"
actix-server = { version = "2.5", default-features = false }
actix-web = { version = "4.10", default-features = false }
async-trait = "0.1"
base64 = "0.22"
bitflags = "2.9"
chrono = "0.4"
clap = { version = "4.5", default-features = false }
cosmian_config_utils = "0.3.1"
cosmian_crypto_core = { version = "10.3", default-features = false, features = [
"ser",
] }
cosmian_logger = "0.5"
der = { version = "0.7", default-features = false }
futures = "0.3"
hex = { version = "0.4", default-features = false }
lazy_static = "1.5"
leb128 = "0.2"
libloading = "0.8"
lru = "0.12"
native-tls = { version = "0.2", default-features = false }
num_cpus = "1.16"
num-format = "0.4"
num-traits = "0.2"
num-bigint-dig = { version = "0.8", default-features = false }
openssl = { version = "0.10", default-features = false }
opentelemetry = "0.27"
opentelemetry-otlp = { version = "0.27", features = ["metrics", "grpc-tonic"] }
opentelemetry_sdk = { version = "0.27", features = ["metrics", "rt-tokio"] }
pem = "3.0"
pkcs11-sys = "0.2"
rand = "0.9"
reqwest = { version = "0.12", default-features = false }
serde = "1.0"
serde_json = "1.0"
sha2 = { version = "0.10", default-features = false }
sha3 = { version = "0.10", default-features = false }
strum = { version = "0.27", default-features = false }
strum_macros = { version = "0.27", default-features = false }
thiserror = "2.0"
time = "0.3"
tiny-keccak = "2.0"
tempfile = "3.19"
tokio = { version = "1.44", default-features = false }
tracing = "0.1"
url = "2.5"
uuid = "=1.11.1"
x509-cert = { version = "0.2", default-features = false }
x509-parser = "0.17"
zeroize = { version = "1.8", default-features = false }