Skip to content

Publish dada2-rs to crates.io: gate WFA behind a developer build #63

Description

@cjfields

Goal

Publish dada2-rs to crates.io. The crate is currently unpublishable as-is because it has a git dependency (wfa2lib-rs), which crates.io categorically rejects (every dependency must resolve to a registry semver version).

Blocker

Cargo.toml:

wfa2lib-rs = { git = "https://github.com/HPCBio/wfa2lib-rs", rev = "4cfeda86a3e1", default-features = false }

WFA is also not feature-gatedwfa2lib_rs is imported unconditionally in src/nwalign.rs (and the MSRV was bumped 1.87→1.91 solely for it).

Plan: gate WFA behind a developer build

WFA is still experimental; we believe it's a feasible alternative to standard NW if we sort out the upstream filtering steps (k-mer prefilter, band size) to make it tenable. So for now keep it in the repo but out of the published crate.

  • Add an off-by-default Cargo feature (e.g. wfa) and make wfa2lib_rs an optional dependency.
  • Put all wfa2lib_rs use in src/nwalign.rs (and any other modules) behind #[cfg(feature = "wfa")]; provide a clear runtime/compile error if the WFA backend is selected without the feature.
  • Note: a Cargo feature still cannot carry a git source. For the published crate the optional dep line cannot point at git. Approach: keep the dependency commented out / patched in for developer builds, documented as "uncomment the [patch] override + enable --features wfa". The published Cargo.toml ships NW-only.
  • Decide whether enabling wfa should also be what bumps MSRV to 1.91; default (NW-only) build should target the lower MSRV if feasible.
  • Document the developer WFA build in CONTRIBUTING.md / README.

crates.io release checklist (once unblocked)

  • version bump + CHANGELOG entry (currently 0.1.1).
  • Verify Cargo.toml metadata: description, repository, readme, license (LGPL-3.0-only), keywords, categories, authors. (Looks complete.)
  • Confirm exclude/include keeps the package small — exclude data/, testdata/, notes/, tmp/, dev/, large fixtures from the published tarball.
  • cargo publish --dry-run (after cargo package --list review) passes with NW-only default.
  • Confirm default build compiles and tests pass with WFA feature off.
  • Confirm cargo build --no-default-features and --all-features (locally, with patch) both behave.
  • Tag the release in git + create a GitHub release.
  • cargo publish.

Future direction (why keep WFA)

WFA may be a viable NW alternative pending upstream filtering work (k-mer screen, band size). Tracked separately; this issue is just about making a clean first crates.io release while preserving the WFA dev path.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions