# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2024"
name = "now-policy-api"
version = "0.1.0"
authors = ["Devolutions Inc. <infos@devolutions.net>"]
build = false
publish = true
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Implementation-agnostic Devolutions NOW policy package broker API model"
homepage = "https://github.com/Devolutions/now-libraries"
readme = "README.md"
license = "MIT/Apache-2.0"
repository = "https://github.com/Devolutions/now-libraries"
resolver = "2"

[features]
default = []
policy-compat = ["dep:now-policy"]

[lib]
name = "now_policy_api"
path = "src/lib.rs"

[dependencies.base64]
version = "0.22"

[dependencies.chrono]
version = "0.4"
features = ["serde"]

[dependencies.derive_more]
version = "2"
features = [
    "as_ref",
    "deref",
    "display",
    "from",
]

[dependencies.now-policy]
version = "0.1"
optional = true

[dependencies.schemars]
version = "0.8"
features = ["chrono"]

[dependencies.semver]
version = "1"

[dependencies.serde]
version = "1"
features = ["derive"]

[dependencies.serde_json]
version = "1"

[dependencies.strum]
version = "0.27"
features = ["derive"]

[dependencies.thiserror]
version = "2"

[lints.clippy]
alloc_instead_of_core = "warn"
as_ptr_cast_mut = "warn"
as_underscore = "warn"
cast_lossless = "warn"
cast_possible_truncation = "warn"
cast_possible_wrap = "warn"
cast_ptr_alignment = "warn"
cast_sign_loss = "warn"
checked_conversions = "warn"
clone_on_ref_ptr = "warn"
cloned_instead_of_copied = "warn"
collection_is_never_read = "warn"
copy_iterator = "warn"
dbg_macro = "warn"
empty_drop = "warn"
expl_impl_clone_on_copy = "warn"
float_cmp = "warn"
fn_to_numeric_cast_any = "warn"
get_unwrap = "warn"
implicit_clone = "warn"
inline_always = "warn"
large_stack_frames = "warn"
large_types_passed_by_value = "warn"
multiple_unsafe_ops_per_block = "warn"
or_fun_call = "warn"
partial_pub_fields = "warn"
print_stderr = "warn"
print_stdout = "warn"
ptr_cast_constness = "warn"
range_plus_one = "warn"
redundant_clone = "warn"
return_self_not_must_use = "warn"
self_named_module_files = "warn"
semicolon_outside_block = "warn"
separated_literal_suffix = "warn"
similar_names = "warn"
std_instead_of_core = "warn"
str_to_string = "warn"
string_add = "warn"
trait_duplication_in_bounds = "warn"
transmute_ptr_to_ptr = "warn"
type_repetition_in_bounds = "warn"
undocumented_unsafe_blocks = "warn"
unnecessary_box_returns = "warn"
unused_self = "warn"
unwrap_used = "warn"
useless_let_if_seq = "warn"
wildcard_dependencies = "warn"

[lints.rust]
absolute_paths_not_starting_with_crate = "warn"
elided_lifetimes_in_paths = "warn"
invalid_reference_casting = "warn"
keyword_idents = "warn"
noop_method_call = "warn"
single_use_lifetimes = "warn"
unreachable_pub = "warn"
unsafe_op_in_unsafe_fn = "warn"
unused_crate_dependencies = "warn"
unused_lifetimes = "warn"
unused_macro_rules = "warn"
unused_qualifications = "warn"
