kubewarden-policy-sdk 0.10.1

Kubewarden Policy SDK for the Rust language
Documentation
[package]
name = "kubewarden-policy-sdk"
description = "Kubewarden Policy SDK for the Rust language"
repository = "https://github.com/kubewarden/policy-sdk-rust"
version = "0.10.1"
authors = [
  "Kubewarden developers <cncf-kubewarden-maintainers@lists.cncf.io>",
  "Flavio Castelli <fcastelli@suse.com>",
  "Rafael Fernández López <rfernandezlopez@suse.com>",
  "Víctor Cuadrado Juan <vcuadradojuan@suse.de>",
]
edition = "2021"
license = "Apache-2.0"

[features]
default = ["cluster-context"]
cluster-context = ["k8s-openapi"]

[package.metadata.docs.rs]
features = ["k8s-openapi/v1_27"]

[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
k8s-openapi = { version = "0.22.0", default-features = false, optional = true }
num = "0.4"
num-derive = "0.4"
num-traits = "0.2"
serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] }
serde_yaml = "0.9.34"
slog = "2.7.0"
url = { version = "2.5.0", features = ["serde"] }
wapc-guest = "1.1.0"
chrono = { version = "0.4", default-features = false }
oci-spec = "0.6.5"

[dev-dependencies]
assert-json-diff = "2.0.2"
mockall = "0.12.1"
serial_test = "3.1.1"
k8s-openapi = { version = "0.22.0", default-features = false, features = [
  "v1_27",
] }
jsonpath_lib = "0.3.0"