Repository navigation
Expand file tree
/
Copy pathCargo.toml
More file actions
124 lines (117 loc) · 5.23 KB
/
Copy pathCargo.toml
File metadata and controls
124 lines (117 loc) · 5.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
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
[package]
name = "dada2-rs"
version = "0.5.0"
edition = "2024"
# Raised from 1.87 to 1.91 by the experimental WFA backend (wfa2lib-rs MSRV).
# Revisit if the WFA backend is dropped.
rust-version = "1.91"
license = "LGPL-3.0-only"
description = "An experimental Rust implementation of the DADA2 amplicon denoising algorithm"
repository = "https://github.com/HPCBio/dada2-rs"
readme = "README.md"
authors = ["Chris Fields <cjfields@illinois.edu>"]
keywords = ["bioinformatics", "amplicon", "dada2", "metagenomics", "asv"]
categories = ["science", "command-line-utilities"]
# Keep the published crate lean: development, benchmarking, concordance data
# (multi-MB PacBio FASTQs), examples, notes, the mkdocs site sources (published on
# Read the Docs), and CI/infra files are not needed by `cargo install` consumers.
# `data/`, `tmp/` are already gitignored.
exclude = [
"**/__pycache__/",
"*.pyc",
"/dev",
"/examples",
"/notes",
"/docs",
"/site",
"/mkdocs.yml",
"/data",
"/tmp",
"/.github",
"/.githooks",
"/.readthedocs.yaml",
"/AGENTS.md",
"/CLAUDE.md",
"/Cross.toml",
]
[dependencies]
noodles = { version = "0.91", features = ["fastq", "fasta", "bgzf"] }
flate2 = "1"
clap = { version = "4", features = ["derive"] }
rayon = "1"
serde = { version = "1", features = ["derive"] }
# float_roundtrip: parse every f64 to the exact bits written. Without it, 269 of
# 1,504 cells of a PacBio error model read back one ulp off (#277).
serde_json = { version = "1", features = ["float_roundtrip"] }
statrs = "0.18"
rand = { version = "0.8", features = ["small_rng"] }
md-5 = "0.10"
sha1 = "0.10"
libc = "0.2"
# Pure-Rust WFA aligner (experimental backend, feat/wfa-backend). default-features
# = false avoids its `mimalloc-alloc` default, which would install a global
# allocator into this crate. Pinned to a SHA on the public HPCBio fork so CI can
# fetch it; for local fork iteration uncomment the [patch] override below.
#
# `optional = true` + the `wfa` feature below keep this out of the default build.
# NOTE: crates.io rejects git dependencies even when optional, so this line must
# be removed/commented for a `cargo publish` of the NW-only crate; enabling WFA is
# a source-checkout developer build (`--features wfa`). See issue #63.
wfa2lib-rs = { git = "https://github.com/HPCBio/wfa2lib-rs", rev = "96c1f23", default-features = false, optional = true }
[features]
# Experimental wavefront-alignment (WFA) backend (issues #49/#51/#63). Off by
# default; enabling it pulls in the git `wfa2lib-rs` dependency and compiles the
# WFA code paths in `nwalign.rs`. Without it, `--align-backend wfa2` errors at
# runtime and the published crate is Needleman-Wunsch only.
wfa = ["dep:wfa2lib-rs"]
# DIAGNOSTIC ARM, never for release (#277): calc_pA calls R's own ppois from
# libR instead of statrs, so a run can be compared with R DADA2 on the same
# machine with the p-value numerics held identical. build.rs links libR (from
# R_HOME or `R RHOME`) and tags the version string `+rmath-ppois`.
rmath-ppois = []
[lints.rust]
# The publish script (dev/maintenance/publish-crate.sh) strips the `wfa` feature from the
# manifest for the crates.io release, since it depends on a git crate. Declaring
# `feature="wfa"` as a known cfg value keeps the `#[cfg(feature = "wfa")]` code in
# nwalign.rs from emitting `unexpected_cfgs` warnings when built without the
# feature defined (e.g. `cargo install dada2-rs`). Harmless when the feature is
# present in the manifest.
# The same holds for `rmath-ppois`, which the publish script also strips (#277).
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(feature, values("wfa", "rmath-ppois"))'] }
[dev-dependencies]
serde_json = "1"
# Profile for running the test suite (`just test`, CI). The integration tests
# spawn the real binary on real fixtures, so unoptimised code makes the suite
# ~15x slower (~170 s vs ~10 s). Debug assertions and overflow checks stay on:
# the shuffle and bud cross-checks in cluster.rs are `debug_assert`s and run
# only when they are enabled. Incremental keeps local rebuilds near debug speed;
# CI sets CARGO_INCREMENTAL=0.
#
# cargo test --profile test-opt
[profile.test-opt]
inherits = "release"
debug-assertions = true
overflow-checks = true
incremental = true
# Opt-in profile for cluster/in-house builds where you control the CPU.
# Adds LTO + codegen-units=1 on top of release, and is intended to be paired
# with `RUSTFLAGS="-C target-cpu=native"` so LLVM uses every ISA extension
# the build host supports (e.g. AVX2/AVX-512 on x86-64, additional features
# beyond aarch64 baseline on Apple Silicon).
#
# Build with:
# RUSTFLAGS="-C target-cpu=native" cargo build --profile release-native
#
# Output goes to target/release-native/ so it does not clobber `cargo build
# --release`. The portability tradeoff: the resulting binary will only run
# on CPUs at-or-above the build host's microarchitecture.
[profile.release-native]
inherits = "release"
lto = "thin"
codegen-units = 1
# Local WFA fork iteration (developer builds only; see CONTRIBUTING.md and issue
# #63). Uncomment and point `path` at a `wfa2lib-rs` checkout to build the `wfa`
# feature against local changes instead of the pinned git SHA above.
#
# [patch."https://github.com/HPCBio/wfa2lib-rs"]
# wfa2lib-rs = { path = "../wfa2lib-rs" }