[package] name = "kubewarden-policy-sdk" description = "Kubewarden Policy SDK for the Rust language" repository = "https://github.com/kubewarden/policy-sdk-rust" version = "0.11.2" authors = [ "Kubewarden developers ", "Flavio Castelli ", "Rafael Fernández López ", "Víctor Cuadrado Juan ", ] edition = "2021" license = "Apache-2.0" [features] default = ["cluster-context"] cluster-context = ["k8s-openapi"] [package.metadata.docs.rs] features = ["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 k8s-openapi = { version = "0.23.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.7.0" [dev-dependencies] assert-json-diff = "2.0.2" mockall = "0.13.0" serial_test = "3.1.1" k8s-openapi = { version = "0.23.0", default-features = false, features = [ "v1_31", ] } jsonpath_lib = "0.3.0"