-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCargo.toml
More file actions
270 lines (247 loc) · 10.5 KB
/
Copy pathCargo.toml
File metadata and controls
270 lines (247 loc) · 10.5 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
[package]
name = "astrodyn"
description = "Gateway to the astrodyn orbital-dynamics framework — a pure-Rust, engine-agnostic port of NASA JEOD (spherical-harmonics gravity, RNP Earth rotation, atmosphere, drag/SRP, multi-body dynamics) composing the astrodyn_* physics crates into one pipeline API any host can drive"
keywords = ["orbital-mechanics", "simulation", "aerospace", "propagator", "physics"]
categories = ["science", "aerospace", "simulation"]
readme = "README.md"
version.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
rust-version.workspace = true
# Workspace-only artifacts that don't belong in the published crate:
# Trick / Docker reference-CSV regen tooling, the JEOD-invariant catalog
# (lives next to the source it tags), workspace-level invariant tests,
# CI workflows, and the xtask binary.
exclude = [
"trick/**",
"docs/**",
"scripts/**",
"tests/**",
"xtask/**",
".github/**",
"CHANGELOG.md",
]
# Build docs with every feature so the optional `frame-doc` surface
# (`astrodyn::frame_doc` + `astrodyn::frame_doc_io`) and the `serde`
# forwarding both render on docs.rs. Matches the per-crate convention
# (`all-features = true` on every published `astrodyn_*` member).
[package.metadata.docs.rs]
all-features = true
[dependencies]
astrodyn_quantities = { path = "crates/astrodyn_quantities", version = "0.2.0" }
astrodyn_math = { path = "crates/astrodyn_math", version = "0.2.0" }
astrodyn_dynamics = { path = "crates/astrodyn_dynamics", version = "0.2.0" }
astrodyn_gravity = { path = "crates/astrodyn_gravity", version = "0.2.0" }
astrodyn_time = { path = "crates/astrodyn_time", version = "0.2.0" }
astrodyn_frames = { path = "crates/astrodyn_frames", version = "0.2.0" }
astrodyn_frame_doc = { path = "crates/astrodyn_frame_doc", version = "0.2.0", optional = true }
astrodyn_atmosphere = { path = "crates/astrodyn_atmosphere", version = "0.2.0" }
astrodyn_interactions = { path = "crates/astrodyn_interactions", version = "0.2.0" }
astrodyn_ephemeris = { path = "crates/astrodyn_ephemeris", version = "0.2.0" }
astrodyn_planet = { path = "crates/astrodyn_planet", version = "0.2.0" }
glam = { workspace = true }
log = { workspace = true }
uom = { workspace = true }
# Only for the `frame-doc` feature's `LoadError` (the document loader).
thiserror = { workspace = true, optional = true }
[dev-dependencies]
# Workspace-root integration tests under `tests/` (e.g.
# `fixture_metadata.rs`, which asserts every committed `test_data/`
# fixture has a recorded SHA-256 sidecar matching its bytes).
sha2 = { workspace = true }
[features]
# Forward serialization to the typed surface so consumers that read physics
# through `astrodyn` can `(de)serialize` `CartesianState` without depending on
# `astrodyn_quantities` directly. OFF by default — the production build stays
# serde-free.
serde = ["astrodyn_quantities/serde"]
# Frame-document exchange layer (issue #663): the `astrodyn::frame_doc`
# re-export plus `astrodyn::frame_doc_io` (FrameTree ⇄ document). OFF by
# default — same serde-free-production rationale as the `serde` feature;
# hosts that persist/replay frame state opt in.
frame-doc = ["dep:astrodyn_frame_doc", "dep:thiserror"]
[workspace]
resolver = "2"
members = [
"crates/astrodyn_quantities",
"crates/astrodyn_math",
"crates/astrodyn_dynamics",
"crates/astrodyn_gravity",
"crates/astrodyn_frames",
"crates/astrodyn_frame_doc",
"crates/astrodyn_planet",
"crates/astrodyn_time",
"crates/astrodyn_ephemeris",
"crates/astrodyn_atmosphere",
"crates/astrodyn_interactions",
"crates/astrodyn_bevy",
"crates/astrodyn_runner",
"crates/astrodyn_verif_jeod",
"crates/astrodyn_verif_jeod_fixtures",
"crates/astrodyn_verif_nesc",
"crates/astrodyn_verif_parity",
"xtask",
]
[workspace.package]
# 0.1.1 → 0.2.0: PR #568 added a `pub` field (`SourceFrameIds.central`)
# to a struct-literal-constructible `pub struct` after 0.1.1 was
# published. Under cargo-semver-checks's rules (and pre-1.0 semver, where
# the middle digit is the major axis) that's a breaking change requiring
# a minor-axis bump. The version propagates to all 17 workspace members
# via `version.workspace = true`; path-dep version constraints across the
# crate Cargo.tomls are updated from `0.1.0` to `0.2.0` in the same
# commit so resolution still picks the in-tree copies.
version = "0.2.0"
edition = "2021"
license = "MIT OR Apache-2.0"
repository = "https://github.com/simnaut/astrodyn"
# Declared MSRV. The binding constraint is bevy 0.19, which declares
# `rust-version = "1.95"` in its own metadata — MSRV-aware resolution
# in cargo 1.85+ refuses to build with anything older. Our own direct
# usage (`u{32,usize}::is_multiple_of`, stabilized in 1.87) sits well
# below this floor. Cargo surfaces a clean `error: package requires
# Rust 1.95` for older toolchains instead of the cryptic transitive
# compile errors users would otherwise see. The
# `clippy::incompatible_msrv` lint also fires against any stdlib item
# stabilized after this floor, preventing silent MSRV drift. See
# `README.md` § "Minimum supported Rust version" for the bump policy.
rust-version = "1.95"
# Workspace-wide attribution metadata. `notice` points at the repo-root
# NOTICE.md that documents the verbatim NASA JEOD source mirror under
# `crates/astrodyn_verif_jeod/test_data/jeod_inputs/` and its NOSA terms.
# Cargo does not consume this key directly; it is published in workspace
# metadata so downstream tooling (license scanners, supply-chain auditors)
# can discover the attribution file alongside the SPDX license expression.
[workspace.metadata]
notice = "NOTICE.md"
[workspace.dependencies]
glam = { version = "0.32", features = ["std"] }
bevy = { version = "0.19", default-features = false, features = [
"bevy_log",
"bevy_state",
"std",
"multi_threaded",
] }
log = "0.4"
thiserror = "2"
uom = { version = "0.38", default-features = false, features = ["f64", "si", "std"] }
typenum = "1.20"
sha2 = "0.11"
# Optional serialization. Opted into per-crate behind a non-default `serde`
# feature (currently only `astrodyn_quantities`, for the `CartesianState`
# interchange record). `default-features = false` keeps it `no_std`-clean;
# the `derive` feature is requested at the crate that needs it. `serde_json`
# is a test-only dev-dependency for round-trip coverage.
serde = { version = "1", default-features = false }
serde_json = "1"
# Benchmarking — dev-only deps, opted into per-crate via
# `[dev-dependencies]` on the crates that own `benches/`. `pprof`
# emits criterion-integrated flamegraph SVGs under
# `target/criterion/<group>/<bench>/profile/`.
criterion = "0.5"
pprof = { version = "0.15", features = ["flamegraph", "criterion"] }
# Workspace-wide lint policy. Inherited by every member that adds
# `[lints] workspace = true` to its Cargo.toml. Single point of truth
# for doc and safety hygiene.
#
# `priority = -1` on `missing_docs` lets test files / examples override
# with `#![allow(missing_docs)]` when a macro emits an undocumented item
# in a non-library target. The workspace policy still denies missing
# docs by default for `lib` targets.
[workspace.lints.rust]
unsafe_code = "forbid"
missing_docs = { level = "deny", priority = -1 }
[workspace.lints.rustdoc]
broken_intra_doc_links = "deny"
invalid_html_tags = "deny"
# Numerics hygiene (#529 / #517 task 3). Silent `f64 → f32` casts and
# `==` on floats are the floating-point analogue of Bun's ignored
# `noalias`: they compile, look right, and produce wrong physics. Every
# call site that genuinely needs one of these patterns carries an
# `#[allow(... reason = "...")]` so the bypass is auditable at review
# time.
[workspace.lints.clippy]
float_cmp = "deny"
cast_precision_loss = "deny"
lossy_float_literal = "deny"
cast_possible_truncation = "deny"
as_underscore = "deny"
[lints]
workspace = true
# Per-package opt-levels: hot numerical crates need optimization (spherical
# harmonics is ~20× slower at opt-level=0), but orchestration crates can
# compile faster at opt-level=1. Dependencies compile once at opt-level=3
# and are cached by sccache, so we pay that cost once.
[profile.dev]
opt-level = 1
debug = "line-tables-only"
[profile.dev.package."*"]
opt-level = 3
[profile.dev.package.astrodyn_math]
opt-level = 3
[profile.dev.package.astrodyn_gravity]
opt-level = 3
[profile.dev.package.astrodyn_dynamics]
opt-level = 3
[profile.dev.package.astrodyn_ephemeris]
opt-level = 3
[profile.dev.package.astrodyn_atmosphere]
opt-level = 3
[profile.dev.package.astrodyn_interactions]
opt-level = 3
[profile.test]
opt-level = 1
debug = "line-tables-only"
[profile.test.package."*"]
opt-level = 3
[profile.test.package.astrodyn_math]
opt-level = 3
[profile.test.package.astrodyn_gravity]
opt-level = 3
[profile.test.package.astrodyn_dynamics]
opt-level = 3
[profile.test.package.astrodyn_ephemeris]
opt-level = 3
[profile.test.package.astrodyn_atmosphere]
opt-level = 3
[profile.test.package.astrodyn_interactions]
opt-level = 3
# Tuned release profile. The hot path is the per-step JEOD pipeline,
# which crosses crate boundaries ~10× per step (runner → dynamics →
# gravity → math) and runs 4× per step under RK4. Cross-crate inlining
# of `accumulate_gravity` into the integration closure is the biggest
# win, so `lto = "fat"` + `codegen-units = 1` rather than the stock
# release defaults (`lto = false`, `codegen-units = 16`).
#
# `panic = "abort"` lets LLVM elide landing pads in tight loops.
# `incremental = false` is required for cross-translation-unit opts
# (incremental forces a per-CGU compilation barrier).
#
# Bit-identity with the `bevy_parity_*` suite (which asserts the
# `astrodyn_runner` and `astrodyn_bevy` paths agree bit-for-bit per
# step) is preserved because none of these flags re-order f64 ops.
# `target-cpu=native` (FMA contraction) and Rayon-based parallelism
# are intentionally NOT enabled here — they would change the order of
# floating-point operations and break the bit-identity invariant.
[profile.release]
opt-level = 3
lto = "fat"
codegen-units = 1
debug = false
panic = "abort"
incremental = false
overflow-checks = false
strip = "debuginfo"
# Profile for symbolicated profiling (samply, perf, addr2line).
# Inherits all release optimizations, keeps line tables for symbol
# resolution. Use with: `cargo build --profile release-with-debug ...`.
[profile.release-with-debug]
inherits = "release"
debug = "line-tables-only"
strip = "none"
split-debuginfo = "packed"
# Bench profile. Inherits release so criterion/divan benches run with
# the same optimizations as production.
[profile.bench]
inherits = "release"