-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCargo.toml
More file actions
99 lines (91 loc) · 3.23 KB
/
Copy pathCargo.toml
File metadata and controls
99 lines (91 loc) · 3.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# Wickra Backtest — workspace.
# Streaming-native, event-driven backtester built on the Wickra indicator core.
# The engine consumes the exact same `wickra_core` O(1) indicator kernels that
# power live Wickra, so backtest values are identical to live, across languages.
[workspace]
resolver = "2"
members = [
"crates/wickra-backtest-core",
"crates/wickra-backtest-data",
"crates/wickra-backtest",
"crates/wickra-backtest-cli",
"crates/wickra-backtest-bench",
"bindings/python",
"bindings/node",
"bindings/wasm",
"bindings/c",
"examples/rust",
]
# The fuzz crate is its own (detached) workspace — cargo-fuzz builds it on its
# own with sanitizer flags on a nightly toolchain.
exclude = ["fuzz"]
[workspace.package]
version = "0.1.2"
edition = "2021"
rust-version = "1.86"
license = "MIT OR Apache-2.0"
authors = ["kingchenc <support@wickra.org>"]
repository = "https://github.com/wickra-lib/wickra-backtest"
homepage = "https://github.com/wickra-lib/wickra-backtest"
readme = "README.md"
keywords = ["backtesting", "trading", "technical-analysis", "quant", "streaming"]
categories = ["finance", "simulation"]
[workspace.dependencies]
wickra-core = "1.0"
wickra-backtest-core = { version = "0.1.2", path = "crates/wickra-backtest-core" }
wickra-backtest-data = { version = "0.1.2", path = "crates/wickra-backtest-data" }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
schemars = "0.8"
thiserror = "2"
parquet = "59"
arrow-array = "59"
arrow-schema = "59"
proptest = "1"
ureq = "2"
clap = { version = "4", features = ["derive"] }
pyo3 = { version = "0.29", features = ["extension-module", "abi3-py39"] }
[workspace.lints.rust]
# `forbid` cannot be lifted by a crate-level allow, which is the point: the only
# crate here that needs `unsafe` is the C ABI, and it opts out of these workspace
# lints and restates them locally with `unsafe_code = "allow"`.
unsafe_code = "forbid"
missing_debug_implementations = "warn"
unreachable_pub = "warn"
unused_must_use = "deny"
[workspace.lints.clippy]
all = { level = "warn", priority = -1 }
pedantic = { level = "warn", priority = -1 }
# Allowed pedantic lints (same precedent as the wickra core).
cast_precision_loss = "allow"
cast_sign_loss = "allow"
cast_possible_truncation = "allow"
module_name_repetitions = "allow"
missing_errors_doc = "allow"
missing_panics_doc = "allow"
must_use_candidate = "allow"
similar_names = "allow"
float_cmp = "allow"
[profile.release]
opt-level = 3
lto = "fat"
codegen-units = 1
# Unwind, not abort. The bindings are workspace members, and Cargo refuses
# `panic` in a per-package profile override ("`panic` may not be specified in a
# `package` profile"), so whatever is set here is what the Python, Node, WASM and
# C ABI cdylibs are built with. The C ABI wraps every entry point in
# `catch_unwind`, and pyo3 and napi convert a caught panic into a language-level
# exception; with `abort` none of that machinery can run, so a panic reaching an
# FFI boundary would kill the host process instead of raising. Unwinding out of
# `extern "C"` is itself undefined, which is precisely why those crates catch it
# first.
panic = "unwind"
strip = true
[profile.bench]
opt-level = 3
lto = "fat"
codegen-units = 1
debug = false
[profile.dev]
opt-level = 0
debug = true