Cargo workspace for six client-side Dioxus WebAssembly applications in chemistry
and mass spectrometry, backed by shared domain and UI crates under crates/ and
pinned to Rust 1.100.0 via rust-toolchain.toml.
- index: accessible landing page linking all applications in the suite.
- json-count-rs: streaming non-null field counter for uploaded JSON files.
- mgf-precursor-erro-rs: MGF precursor m/z recalibration, mass-error analysis in Da and ppm, and SVG histogram plotting.
- lipid-selecto-rs: browser-side MGF/SMILES lipid classification and
filtering using 86 compiled-in LIPID MAPS SMARTS rules
(
crates/lipid-core/src/chemical_class/lmsd.rs). - cxsmiles-yoga: CX-SMILES generator and coordinate depiction tool
collapsing positional isomers (
m:) and variable-length repeats (Sg:n:). - smellfish-rs: natural-product likeness scoring combining Ertl fragment-contribution NP-likeness scores, RDKit.js descriptors, and QLever/LOTUS literature/SPARQL enrichment.
Install the pinned toolchain, cargo-make, cargo-nextest, cargo-readme,
panache, and all verification tools:
./mk setupTo install optional app development tools such as dx (dioxus-cli, pinned to
match Cargo.lock) for serving and bundling WASM apps locally:
./mk setup-extradioxus/
├── Cargo.toml workspace root
├── rust-toolchain.toml pinned compiler, components, and wasm32 target
├── prek.toml git hooks calling ./mk gates
├── .github/ CI workflows, governance, and templates
├── apps/
│ ├── index/ landing page (WASM + host tests)
│ ├── json-count-rs/ streaming JSON field counter (WASM + host tests)
│ ├── lipid-selecto-rs/ lipid classification & filtering (WASM + host tests;
│ │ offline SMARTS generator under lipidmaps/smarts-evoliposuction)
│ ├── mgf-precursor-erro-rs/ MGF precursor mass-error analysis (WASM + rlib)
│ ├── smellfish-rs/ NP-likeness scoring and LOTUS/QLever lookup (WASM + host tests)
│ └── cxsmiles-yoga/ CX-SMILES generation from related structures (WASM + host tests)
└── crates/
├── stream-io/ async byte and line streaming (BlobCursor, BlobLines, ChunkSource)
├── upload/ browser BlobSource, Dioxus FileData extraction, DOM downloads
├── ui/ Dioxus components, StyleBuilder, theme tokens, signal macros
├── mgf/ streaming MGF block parser and header/peak model
├── chem-depict/ panic-guarded SMILES parsing and 2D SVG depiction
├── cxsmiles-core/ CX-SMILES positional and repeating series synthesis
├── json-count-core/ streaming JSON non-null counter and column unescaping
├── lipid-core/ LIPID MAPS classification, LMSD SMARTS rules, filtered exports
├── mgf-analysis-core/ adduct grammar, precursor statistics, MS2 recalibration
├── smellfish-core/ natural-product evidence, verdicts, CSV, SPARQL queries
└── workspace-gates/ repository-wide structure, surface, and ratchet checks
Task runner configuration lives in:
├── Makefile.toml shared cargo-make configuration
├── mk / mk.local / mk.versions standard gate runner and workspace overrides
├── make/ cargo-make tasks split by concern
├── .config/nextest.toml nextest profiles
└── .cargo/ cargo and cargo-mutants configuration
Serve any of the six apps with the Dioxus CLI:
./mk web-dev APP=cxsmiles-yogaValid APP values are cxsmiles-yoga, index, json-count-rs,
lipid-selecto-rs, mgf-precursor-erro-rs, and smellfish-rs.
To pass arbitrary arguments directly to dx:
./mk cli ARGS="--help"Production builds pass --profile wasm-release (panic = "unwind",
opt-level = "s") so third-party SMILES parser panics caught via catch_unwind
recover cleanly instead of aborting in the browser:
./mk web-build APP=cxsmiles-yoga # one app (optional BASE_PATH=/subpath)
./mk web-build-all # all six apps
./mk web-size # report shipped *_bg-*.wasm byte sizesOutputs are written to target/dx/<package>/release/web/public/.
Install the verification tools and configure the git hooks once:
./mk setup
cargo install prek --locked && prek installRun the fast inner check while editing, or the full CI gate before pushing:
./mk check # format check, TOML check, typos check, and host clippy
./mk ci-fast # pre-push subset (skips audit and mutants-diff)
./mk ci # full CI gateRun ./mk --list to list the standard ./mk gates and local:* tasks, or
cargo make --no-workspace --list-all-steps for every task in make/*.toml.
Pure domain crates and UI/upload adapters run unit, integration, and doc tests on
the host (./mk test). Because host builds skip #[cfg(target_arch = "wasm32")]
code, always run ./mk wasm (mapped to lint-wasm) before pushing WASM changes.
The offline SMARTS generator CLI at
apps/lipid-selecto-rs/lipidmaps/smarts-evoliposuction is intentionally
excluded from the workspace so native-only bioinformatics dependencies never
enter WASM builds. Run ./mk local:test-evoliposuction (or invoke --locked
directly):
cargo clippy --manifest-path apps/lipid-selecto-rs/lipidmaps/smarts-evoliposuction/Cargo.toml --all-targets --locked -- -D warnings
cargo test --manifest-path apps/lipid-selecto-rs/lipidmaps/smarts-evoliposuction/Cargo.toml --lockedRun ./mk local:bench-smoke to run the release benchmark smoke harnesses across
both the workspace crates and smarts-evoliposuction.
- Start from an existing app directory such as
apps/index. - Set the package
nameinCargo.tomlandtitleinDioxus.toml. - Add
"apps/<new-app>"to[workspace].membersin the rootCargo.toml. - Wire the package into
make/lint.toml(lint-wasm),make/web.toml(web-build-all,web-dev,web-build), and.github/workflows/deploy.yml. - Ensure the app defines
DocumentHead,skip_link,id: "main-content",crates/uicomponents, and EDAM annotations, which are checked bycrates/workspace-gates/tests/gate_consistency/. - Run
./mk web-dev APP=<new-app>and./mk ci.
Workflows under .github/workflows/ run through ./mk:
- CI (
ci.yml): runs./mk ci-core(formatting, TOML check/lint, spelling, SPDX headers, shellcheck, commit format, ratchet check, host check/clippy/tests/doctests/doc, dependency audit/deny/machete,msrv,echoes,refquiem,semver, unifiedwasm(lint-wasm),local:readme-check,local:feature-powerset),mutants-diffshards, links all six WASM bundles via./mk web-build-all+./mk web-size, and checks the standalone CLI via./mk local:test-evoliposuction. - Nightly (
nightly.yml): scheduled daily./mk ci-nightly(mutants,coverage,powerset,miri,outdated). - Deploy (
deploy.yml): builds all six apps withBASE_PATHand deploys to GitHub Pages on pushes tomain. - Release (
release.yml): runs./mk ci-releaseonv*tags (skips crates.io publishing while every crate setspublish = false).
- WASM UI runtime tests: host tests exercise pure domain logic (
cxsmiles-core,mgf,lipid-selecto-rs,json-count-rs,smellfish-rsSPARQL/CSV/model,uploadstreaming,uiVirtualDom rendering), whereas browser DOM interactions (web-sysBlob, drag/drop events, live QLever/LIPID MAPS HTTP requests, and RDKit.js JS interop) are checked forwasm32compilation and linting but require browser testing at runtime. - Excluded CLI lockfile:
smarts-evoliposuctiondepends onsmarts-evolution(smiles-rs0.1.5) whilesmarts-rsmainhas moved tosmiles-rs0.2.1; always pass--lockedrather than regenerating itsCargo.lock.
- Contributing:
.github/CONTRIBUTING.md - Security:
.github/SECURITY.md - Release process:
.github/RELEASE_CHECKLIST.md - Architecture:
docs/ARCHITECTURE.md - Technical debt & ratchets:
docs/DEBT.md - Change history:
CHANGELOG.md - License: GNU AGPL v3.0 (
AGPL-3.0-only)