# 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"
rust-version = "1.95.0"
name = "nautilus-serialization"
version = "0.57.0"
authors = ["Nautech Systems <info@nautechsystems.io>"]
build = "build.rs"
include = [
    "src/**/*",
    "schemas/**/*",
    "generated/**/*",
    "tests/**/*",
    "benches/**/*",
    "build.rs",
    "Cargo.toml",
    "README.md",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Serialization functionality for the Nautilus trading engine"
homepage = "https://nautilustrader.io"
documentation = "https://nautilustrader.io/docs"
readme = "README.md"
keywords = [
    "finance",
    "trading",
    "trading-platform",
    "algorithmic-trading",
    "quantitative-finance",
]
categories = [
    "finance",
    "simulation",
    "asynchronous",
]
license = "LGPL-3.0-or-later"
repository = "https://github.com/nautechsystems/nautilus_trader"
resolver = "2"

[package.metadata.docs.rs]
all-features = true
rustdoc-args = [
    "--cfg",
    "docsrs",
]

[features]
arrow = [
    "dep:arrow",
    "nautilus-model/arrow",
]
capnp = ["dep:capnp"]
default = []
display = ["arrow"]
extension-module = [
    "nautilus-core/extension-module",
    "nautilus-model/extension-module",
    "python",
    "pyo3/extension-module",
]
high-precision = ["nautilus-model/high-precision"]
python = [
    "nautilus-core/python",
    "nautilus-model/python",
    "pyo3",
    "pyo3-stub-gen",
]
sbe = []

[lib]
name = "nautilus_serialization"
crate-type = ["rlib"]
path = "src/lib.rs"

[[test]]
name = "test_enums_capnp"
path = "tests/test_enums_capnp.rs"

[[test]]
name = "test_identifiers_capnp"
path = "tests/test_identifiers_capnp.rs"

[[test]]
name = "test_market_data_capnp"
path = "tests/test_market_data_capnp.rs"

[[test]]
name = "test_market_data_sbe"
path = "tests/test_market_data_sbe.rs"

[[test]]
name = "test_types_capnp"
path = "tests/test_types_capnp.rs"

[[bench]]
name = "capnp_serialization"
path = "benches/capnp_serialization.rs"
harness = false
required-features = ["capnp"]

[[bench]]
name = "market_data_capnp_vs_sbe"
path = "benches/market_data_capnp_vs_sbe.rs"
harness = false
required-features = [
    "capnp",
    "sbe",
]

[[bench]]
name = "sbe_decoding"
path = "benches/sbe_decoding.rs"
harness = false
required-features = ["sbe"]

[[bench]]
name = "serialization_comparison"
path = "benches/serialization_comparison.rs"
harness = false

[dependencies.anyhow]
version = "1.0.102"

[dependencies.arrow]
version = "58.3.0"
features = [
    "csv",
    "json",
    "ipc",
    "ffi",
]
optional = true
default-features = false

[dependencies.capnp]
version = "0.25.4"
optional = true

[dependencies.indexmap]
version = "2.14.0"
features = ["serde"]

[dependencies.nautilus-core]
version = "0.57.0"

[dependencies.nautilus-model]
version = "0.57.0"
features = ["stubs"]

[dependencies.pyo3]
version = "0.28.3"
features = [
    "chrono",
    "hashbrown",
    "indexmap",
    "macros",
    "multiple-pymethods",
    "rust_decimal",
    "serde",
]
optional = true
default-features = false

[dependencies.pyo3-stub-gen]
version = "=0.20.0"
features = ["rust_decimal"]
optional = true
default-features = false

[dependencies.rust_decimal]
version = "1.42.0"
features = ["serde-with-float"]

[dependencies.rust_decimal_macros]
version = "1.40.0"

[dependencies.serde]
version = "1.0.228"
features = [
    "derive",
    "std",
    "rc",
]
default-features = false

[dependencies.serde_json]
version = "1.0.149"
features = ["std"]
default-features = false

[dependencies.thiserror]
version = "2.0.18"

[dependencies.ustr]
version = "1.1.0"
features = ["serde"]

[dependencies.uuid]
version = "1.23.1"
features = [
    "v4",
    "serde",
]

[dev-dependencies.criterion]
version = "0.8.2"
features = ["cargo_bench_support"]
default-features = false

[dev-dependencies.pretty_assertions]
version = "1.4.1"

[dev-dependencies.rstest]
version = "0.26.1"

[build-dependencies.capnpc]
version = "0.25.3"

[build-dependencies.walkdir]
version = "2.5.0"

[lints.clippy]
await_holding_lock = "warn"
await_holding_refcell_ref = "warn"
bool_to_int_with_if = "warn"
borrow_as_ptr = "warn"
bytes_count_to_len = "warn"
checked_conversions = "warn"
cloned_instead_of_copied = "warn"
collapsible_else_if = "warn"
collapsible_if = "warn"
copy_iterator = "warn"
dbg_macro = "warn"
debug_assert_with_mut_call = "warn"
equatable_if_let = "warn"
expl_impl_clone_on_copy = "warn"
explicit_into_iter_loop = "warn"
explicit_iter_loop = "warn"
filter_map_next = "warn"
flat_map_option = "warn"
float_cmp_const = "warn"
from_iter_instead_of_collect = "warn"
get_first = "warn"
identity_op = "warn"
if_let_mutex = "warn"
if_not_else = "warn"
if_same_then_else = "warn"
ignored_unit_patterns = "warn"
implicit_clone = "warn"
inconsistent_struct_constructor = "warn"
inefficient_to_string = "warn"
infallible_try_from = "warn"
invalid_upcast_comparisons = "warn"
items_after_statements = "warn"
iter_kv_map = "warn"
iter_not_returning_iterator = "warn"
iter_nth_zero = "warn"
large_futures = "warn"
large_stack_arrays = "warn"
let_underscore_future = "warn"
lossy_float_literal = "warn"
manual_assert = "warn"
manual_filter = "warn"
manual_find = "warn"
manual_flatten = "warn"
manual_instant_elapsed = "warn"
manual_is_ascii_check = "warn"
manual_is_variant_and = "warn"
manual_let_else = "allow"
manual_map = "warn"
manual_range_contains = "warn"
manual_split_once = "warn"
manual_string_new = "warn"
manual_strip = "warn"
manual_while_let_some = "warn"
map_flatten = "warn"
map_identity = "warn"
map_unwrap_or = "warn"
match_bool = "warn"
match_like_matches_macro = "warn"
mem_forget = "warn"
multiple_unsafe_ops_per_block = "warn"
mut_mut = "warn"
naive_bytecount = "warn"
needless_bool = "warn"
needless_borrow = "warn"
needless_borrows_for_generic_args = "warn"
needless_collect = "warn"
needless_continue = "warn"
needless_for_each = "warn"
needless_late_init = "warn"
needless_lifetimes = "warn"
needless_match = "warn"
needless_option_as_deref = "warn"
needless_pass_by_ref_mut = "warn"
needless_pass_by_value = "warn"
needless_range_loop = "warn"
needless_raw_string_hashes = "warn"
needless_raw_strings = "warn"
needless_return = "warn"
needless_update = "warn"
option_as_ref_deref = "warn"
option_if_let_else = "allow"
option_option = "warn"
or_fun_call = "allow"
panic_in_result_fn = "warn"
ptr_as_ptr = "warn"
range_plus_one = "warn"
rc_mutex = "warn"
redundant_clone = "warn"
redundant_closure = "warn"
redundant_else = "allow"
redundant_field_names = "warn"
ref_as_ptr = "warn"
return_self_not_must_use = "warn"
semicolon_if_nothing_returned = "warn"
similar_names = "allow"
single_char_pattern = "warn"
single_match_else = "allow"
stable_sort_primitive = "warn"
suspicious_doc_comments = "warn"
unchecked_time_subtraction = "warn"
uninlined_format_args = "warn"
unnecessary_box_returns = "warn"
unnecessary_debug_formatting = "warn"
unnecessary_filter_map = "warn"
unnecessary_join = "warn"
unnecessary_lazy_evaluations = "warn"
unnecessary_literal_bound = "warn"
unnecessary_safety_comment = "warn"
unnecessary_safety_doc = "warn"
unnecessary_self_imports = "warn"
unnecessary_semicolon = "warn"
unnecessary_sort_by = "warn"
unnecessary_struct_initialization = "warn"
unnecessary_to_owned = "warn"
unnecessary_wraps = "warn"
unnested_or_patterns = "warn"
use_self = "warn"
useless_conversion = "warn"
verbose_bit_mask = "warn"

[lints.rust.unexpected_cfgs]
level = "warn"
priority = 0
check-cfg = ["cfg(madsim)"]
