-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCargo.toml
More file actions
140 lines (117 loc) · 4.61 KB
/
Copy pathCargo.toml
File metadata and controls
140 lines (117 loc) · 4.61 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
[workspace]
members = [".", "crates/fugue-evo-wasm"]
# Cargo only honors [profile.*] settings declared in the workspace ROOT
# manifest, never in a member's Cargo.toml (see AUDIT-2026-07.md EV-31). These
# settings apply to `wasm-pack build` for crates/fugue-evo-wasm, shrinking and
# optimizing the WASM binary (opt-level "s" + LTO); they were previously
# declared (and silently ignored) in crates/fugue-evo-wasm/Cargo.toml.
[profile.release]
opt-level = "s"
lto = true
[package]
name = "fugue-evo"
version = "0.3.0"
edition = "2021"
authors = ["Alex Nodeland"]
description = "An implementation of fugue for running evolutionary algorithms as Bayesian inference: priors and likelihoods as probabilistic programs, tempered SMC in trace space, annealed optimization, Pareto posteriors - plus a standalone classical EC toolkit"
license = "MIT"
repository = "https://github.com/alexnodeland/fugue-evo"
documentation = "https://docs.rs/fugue-evo"
homepage = "https://evo.fugue.run"
keywords = ["genetic-algorithm", "evolution", "optimization", "bayesian", "ppl"]
categories = ["algorithms", "science"]
[features]
default = ["std", "parallel", "checkpoint", "ppl", "classic"]
std = []
parallel = ["rayon"]
checkpoint = [] # File-based checkpointing (requires std)
# Classic EC layer: algorithms, operators, population machinery, checkpointing,
# hyperparameter tuning, interactive GA, diagnostics, termination. Off => only
# the core (error/fitness/genome) and, with `ppl`, the inference layer compile.
# `checkpoint` and `parallel` only affect classic code paths, so they are inert
# without `classic`.
classic = []
# Probabilistic-programming bridge: the TraceGenome extension trait and the
# fugue-native inference layer. Off => the classic EC layer compiles with no
# fugue-ppl dependency at all.
ppl = ["dep:fugue-ppl"]
[dependencies]
# Linear algebra for CMA-ES
nalgebra = "0.33"
# Randomness
rand = "0.8"
rand_distr = "0.4"
# Serializable, reproducible RNG for checkpoint round-tripping (EV-02)
rand_chacha = { version = "0.3", features = ["serde1"] }
# Parallelism (optional)
rayon = { version = "1.10", optional = true }
# Serialization
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
bincode = "1.3"
# Error handling
thiserror = "2.0"
# Observability
tracing = "0.1"
# Probabilistic-programming bridge (optional; enabled by the `ppl` feature)
fugue-ppl = { path = "../fugue", version = "0.2.1", optional = true }
# WASM support (enabled via getrandom js feature when targeting wasm32)
[target.'cfg(target_arch = "wasm32")'.dependencies]
getrandom = { version = "0.2", features = ["js"] }
[dev-dependencies]
# Testing utilities
#
# AUDIT EV-74: proptest migrated its internal RNG stack to rand 0.9 in the
# 1.7.0 release. proptest >= 1.7 therefore pulls in a *second* major of the
# RNG stack (rand 0.9 / rand_core 0.9 / rand_chacha 0.9 via rand_xorshift's
# TestRng) alongside our own direct rand 0.8 stack (rand 0.8.5 / rand_core
# 0.6.4 / rand_chacha 0.3.1, used by fugue-evo, fugue-ppl, and rand_distr),
# duplicating the RNG-stack compile units in dev/test builds.
#
# The 1.5.x / 1.6.x line still uses rand 0.8, so we pin below 1.7 to collapse
# the duplication. Verified empirically: `cargo update -p proptest --precise
# 1.6.0` removes rand 0.9.2 / rand_chacha 0.9.0 / rand_core 0.9.3 entirely,
# after which `cargo tree -d` reports a single rand major (0.8.5) and
# `cargo check --all-targets` + the full property-test suite still pass. The
# `Makefile`'s `deps-check` target runs `cargo tree -d` in CI to catch any
# future reintroduction of a duplicate rand major. Revisit (dropping the
# upper bound and migrating our own rand_distr/rand_chacha usage to 0.9) if we
# ever need a proptest >= 1.7 feature.
proptest = ">=1.5, <1.7"
criterion = "0.5"
approx = "0.5"
tempfile = "3.10"
# Examples gated on the features they exercise
[[example]]
name = "island_model"
required-features = ["parallel", "classic"]
[[example]]
name = "sphere_optimization"
required-features = ["classic"]
[[example]]
name = "rastrigin_benchmark"
required-features = ["classic"]
[[example]]
name = "cma_es_example"
required-features = ["classic"]
[[example]]
name = "hyperparameter_learning"
required-features = ["classic"]
[[example]]
name = "symbolic_regression"
required-features = ["classic"]
[[example]]
name = "checkpointing"
required-features = ["classic", "checkpoint"]
[[example]]
name = "interactive_evolution"
required-features = ["classic"]
[[example]]
name = "bayesian_evolution"
required-features = ["ppl"]
[[example]]
name = "symbolic_regression_inference"
required-features = ["ppl"]
[[example]]
name = "optimize_by_inference"
required-features = ["ppl", "classic"]