-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathCargo.toml
64 lines (60 loc) · 2.49 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
[package]
authors = [
"Flavio Castelli <[email protected]>",
"Kubewarden developers <[email protected]>",
"Rafael Fernández López <[email protected]>",
"Víctor Cuadrado Juan <[email protected]>",
]
description = "Kubewarden Policy SDK for the Rust language"
documentation = "https://docs.rs/kubewarden-policy-sdk"
edition = "2021"
license = "Apache-2.0"
name = "kubewarden-policy-sdk"
repository = "https://github.com/kubewarden/policy-sdk-rust"
version = "0.13.2"
[features]
cluster-context = ["k8s-openapi"]
crd = ["k8s-openapi-derive", "k8s-openapi/schemars", "schemars"]
default = ["cluster-context"]
[package.metadata.docs.rs]
features = ["cluster-context", "crd", "k8s-openapi/v1_31"]
[dependencies]
anyhow = "1.0"
cfg-if = "1.0"
# Starting from k8s-openapi v0.14, it is NOT recommended to be explicit about
# the kubernetes features to be used when building a library. That's because
# the final version of the k8s API to be supported must be made by the consumer
# of the library.
#
# Otherwise it's possible to end up in situations like:
# * kubewarden-policy-sdk enables the `v1_22` feature of k8s-openapi
# * `consumer-foo` requires k8s-openapi too but enables the `v1_23` feature
# A build error is then raised by cargo because the same version must be picked
# by all the crates making use of k8s-openapi.
#
# Because of that, no feature is chosen inside of the `dependencies` section.
# This however can lead to issues when executing commands like
# cargo `build|check|doc`. That's because the `k8s-openapi` is specified again
# inside of the `dev-dependencies`, this time with a k8s feature enabled
chrono = { version = "0.4", default-features = false }
k8s-openapi = { version = "0.24.0", default-features = false, optional = true }
k8s-openapi-derive = { version = "0.24.0", optional = true }
num = "0.4"
num-derive = "0.4"
num-traits = "0.2"
oci-spec = "0.7.0"
schemars = { version = "0.8", features = ["impl_json_schema"], optional = true }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
serde_yaml = "0.9.34"
slog = "2.7.0"
url = { version = "2.5.0", features = ["serde"] }
wapc-guest = "1.1.0"
[dev-dependencies]
assert-json-diff = "2.0.2"
jsonpath_lib = "0.3.0"
k8s-openapi = { version = "0.24.0", default-features = false, features = [
"v1_31",
] }
mockall = "0.13.0"
serial_test = "3.1.1"