# 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 = "bts-rs"
version = "0.9.2"
authors = ["tetuaoro <65575727+tetuaoro@users.noreply.github.com>"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Backtest your trading strategy."
documentation = "https://docs.rs/bts-rs"
readme = "README.md"
keywords = [
    "trading",
    "finance",
    "backtest",
    "indicators",
    "technical-analysis",
]
categories = [
    "finance",
    "science",
    "algorithms",
]
license = "MIT"
repository = "https://github.com/raonagos/bts-rs"

[package.metadata.docs.rs]
features = [
    "metrics",
    "draws",
    "optimizer",
]

[features]
draws = ["dep:plotters"]
metrics = []
optimizer = [
    "dep:rayon",
    "dep:num_cpus",
]
serde = [
    "chrono/serde",
    "dep:serde",
]
wasm = [
    "rayon/web_spin_lock",
    "getrandom/wasm_js",
]

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

[[example]]
name = "agg_trailing_stop"
path = "examples/agg_trailing_stop.rs"

[[example]]
name = "par_parameters_optimization"
path = "examples/par_parameters_optimization.rs"
required-features = ["optimizer"]

[[example]]
name = "parameter_optimization"
path = "examples/parameter_optimization.rs"

[[example]]
name = "take_profit_and_stop_loss"
path = "examples/take_profit_and_stop_loss.rs"

[[example]]
name = "trailing_stop"
path = "examples/trailing_stop.rs"

[[example]]
name = "utils"
path = "examples/utils.rs"

[dependencies.chrono]
version = "0.4.42"

[dependencies.num_cpus]
version = "1.17.0"
optional = true

[dependencies.plotters]
version = "0.3.7"
optional = true

[dependencies.rand]
version = "0.9.2"

[dependencies.rayon]
version = "1.11.0"
optional = true

[dependencies.serde]
version = "1.0.226"
features = [
    "derive",
    "rc",
]
optional = true

[dependencies.thiserror]
version = "2.0.17"

[dev-dependencies.ta]
version = "0.5.0"

[target.'cfg(target_arch = "wasm32")'.dependencies.getrandom]
version = "0.3.4"
