Repository navigation
Expand file tree
/
Copy pathCargo.toml
More file actions
101 lines (95 loc) · 4.58 KB
/
Copy pathCargo.toml
File metadata and controls
101 lines (95 loc) · 4.58 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
100
101
# Wickra Proof — workspace.
# Proof-of-Backtest: a (spec, data) pair is folded into a deterministic
# wickra-backtest report and a canonical blake3 hash that anyone recomputes
# byte-for-byte in ten languages. The core (`wickra-proof-core`) is exposed as a
# JSON-over-C-ABI data API in ten languages, mirroring the Wickra tiering:
# Rust core -> native Python/Node/WASM + a C ABI hub for C/C++/C#/Go/Java/R.
#
# The `members` list grows as crates are added, phase by phase; the final set is:
# crates/wickra-proof-core, crates/wickra-proof-cli, crates/proof-bench,
# bindings/c, bindings/python, bindings/node, bindings/wasm, examples/rust
[workspace]
resolver = "2"
members = ["crates/wickra-proof-core", "crates/wickra-proof-cli", "crates/proof-bench", "bindings/c", "bindings/python", "bindings/node", "bindings/wasm", "examples/rust"]
# The fuzz crate is its own (detached) workspace — cargo-fuzz builds it on a
# nightly toolchain with sanitizer flags.
exclude = ["fuzz"]
[workspace.package]
version = "0.2.0"
edition = "2021"
rust-version = "1.86"
license = "MIT OR Apache-2.0"
authors = ["wickra-lib"]
repository = "https://github.com/wickra-lib/wickra-proof"
homepage = "https://wickra.org"
readme = "README.md"
keywords = ["trading", "backtest", "proof", "determinism", "finance"]
categories = ["finance", "command-line-utilities"]
[workspace.dependencies]
# The backtest engine is the runtime dependency: proof runs it and hashes its
# report canonically. Its version() is the engine_version pin.
# Pinned to the published release, exactly. A git rev looked safer while the
# engine was unreleased, but cargo treats "this git URL, default branch" and
# "this git URL at rev X" as two different sources, so a consumer that pins
# the engine differently ends up with two copies of wickra-backtest-core in
# one graph -- and two copies do not share a BacktestReport or a Candle.
# wickra-zk hit exactly that against this crate, and wickra-verify's own fuzz
# manifest against itself. One registry version cannot split that way, and
# `cargo publish` needs it anyway. Move the version and the consumers together.
#
# wickra-data is deliberately absent. It was declared here and used by
# nothing: the CLI reads its own CSV, and `Candle` comes from the engine, so
# adding the dependency back would mean two crates defining the same row --
# and two definitions of one type is the failure this repository exists to
# rule out. wickra-strategy-ci reached the same conclusion and records it in
# its own manifest.
wickra-backtest-core = "=0.2.0"
# Workspace-internal crate, referenced by the CLI, bench and bindings.
wickra-proof-core = { version = "0.2.0", path = "crates/wickra-proof-core" }
# Serialization — the data-driven boundary (spec/proof/report/command as JSON).
serde = { version = "1", features = ["derive"] }
# `float_roundtrip` makes serde_json's float parser correctly rounded: a float
# re-parses to the exact same f64 it was written from. Without it the parser can
# land on an adjacent f64 for large magnitudes, which breaks canonicalization
# idempotence (canonicalize -> parse -> canonicalize must be a fixed point) — the
# moat's load-bearing invariant, checked by the `canonicalize` fuzz target.
serde_json = { version = "1", features = ["float_roundtrip"] }
toml = "1.1"
# Exact decimal arithmetic where price/qty precision matters.
rust_decimal = { version = "1", features = ["serde"] }
thiserror = "2"
# The canonical report/inputs hash.
blake3 = "1"
clap = { version = "4", features = ["derive"] }
# C ABI header generation.
cbindgen = "0.27"
# Test/dev.
# codspeed-criterion-compat is a drop-in for criterion: the benches keep
# their criterion API and run as criterion locally, but under
# `cargo codspeed` they report measurements instead of merely executing.
# Without the alias the CodSpeed job runs the benchmarks and uploads
# nothing, which reads as a pass.
criterion = { package = "codspeed-criterion-compat", version = "5.0.1" }
proptest = "1"
[workspace.lints.rust]
# The core and all bindings are safe Rust; the C ABI hub re-allows unsafe
# locally (it must call across the FFI boundary).
unsafe_code = "forbid"
[workspace.lints.clippy]
all = { level = "warn", priority = -1 }
pedantic = { level = "warn", priority = -1 }
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"
too_many_lines = "allow"
similar_names = "allow"
[profile.release]
# Panics must never unwind across the C ABI boundary: abort instead.
lto = true
codegen-units = 1
panic = "abort"
strip = true