A Cargo workspace for reproducible Dioxus web apps, pinned by
rust-toolchain.toml.
- index is the accessible landing page. json-count-rs counts non-null fields in uploaded JSON files.
- lotus-explore-rs explores the LOTUS compounds knowledge graph from Wikidata via SPARQL.
- lotus-api provides a native HTTP API for advanced search and export.
- mgf-precursor-erro-rs analyzes uploaded MGF files and reports precursor mass errors in Da and ppm.
- lipid-selecto-rs classifies and filters lipid mass-spec data using LIPID MAPS-aligned SMARTS rules.
- smellfish-rs scores natural-product-like structures with literature-backed features and RDKit.js chemistry descriptors.
rustup toolchain install 1.97 --profile minimal
rustup target add wasm32-unknown-unknown
cargo install dioxus-cli --version 0.7.10 --lockedThe repo pins Rust 1.97, clippy, rustfmt, and wasm32-unknown-unknown in
rust-toolchain.toml.
dioxus-apps/
├── Cargo.toml ← workspace root
├── rust-toolchain.toml ← pinned compiler, components, target
├── prek.toml ← repo hooks and quality gate
├── .github/ ← CI, deploy, governance
├── apps/
│ ├── index/ ← accessible landing page (WASM)
│ ├── json-count-rs/ ← upload a JSON file and count non-null values (WASM)
│ ├── lipid-selecto-rs/ ← lipid classification and filtering via SMARTS (WASM)
│ ├── mgf-precursor-erro-rs/← MGF precursor mass-error analysis (WASM + lib)
│ ├── lotus-api/ ← OpenAPI service for LOTUS search and exports (native)
│ ├── lotus-explore-rs/ ← LOTUS Wikidata natural-product explorer (WASM)
│ └── smellfish-rs/ ← NP-likeness scoring, RDKit.js integration (WASM + lib)
└── crates/
├── lotus/ ← SPARQL client, LOTUS models, transport, export
├── upload/ ← shared file-upload, progress, and blob utilities
└── ui/ ← shared accessibility-focused UI helpers (DocumentHead, etc.)
Apps marked (WASM + lib) have a lib.rs alongside main.rs to enable
cargo test --lib. Apps without extensive unit tests use main.rs only.
dx serve --package lotus-explore-rs
cargo run --locked -p lotus-api
dx serve --package json-count-rs
dx serve --package index
dx serve --package lipid-selecto-rs
dx serve --package mgf-precursor-erro-rs
dx serve --package smellfish-rsdx build --release --package lotus-explore-rs
dx build --release --package json-count-rs
dx build --release --package index
dx build --release --package lipid-selecto-rs
dx build --release --package mgf-precursor-erro-rs
dx build --release --package smellfish-rsOutput lands under target/dx/<package>/release/web/public/.
Install the repo hooks once:
cargo install prek --locked
prek installRun the repo quality gate manually:
prek run cargo-qaThe cargo-qa hook chain runs the following checks (matching CI):
prek run cargo-fmt-check # rustfmt --all -- --check
prek run cargo-check # cargo check --workspace --all-targets --locked
prek run cargo-clippy # cargo clippy --workspace --all-targets --locked -- -D warnings
prek run cargo-test # cargo test --workspace --all-targets --locked --quiet
prek run cargo-check-wasm-all # cargo check for all 5 WASM apps
prek run cargo-doc # cargo doc --workspace --no-deps --locked
prek run cargo-machete # cargo machete check --workspace
prek run cargo-audit # cargo audit
prek run cargo-deny # cargo deny check advisories bans licenses sources
prek run cargo-readme-panache # cargo-readme sync + panache lint- Copy an existing app directory (e.g.
apps/index) as a starting point. - Edit
Cargo.tomlandDioxus.tomlto setnameandtitle. - Add
"apps/my-new-app"tomembersin the workspaceCargo.toml. - Add a
cargo checkline to the wasm job and adx buildline to the wasm-build job in.github/workflows/ci.yml. dx serve --package my-new-app
On every push to main:
cargo fmt --all -- --checkcargo check --workspace --all-targets --lockedcargo clippy --workspace --all-targets --locked -- -D warningscargo test --workspace --all-targets --lockedcargo checkfor all 5 WASM apps (json-count-rs,mgf-precursor-erro-rs,lipid-selecto-rs,lotus-explore-rs,smellfish-rs)cargo doc --workspace --no-deps --lockedcargo machete check --workspacecargo auditcargo deny check advisories bans licenses sources- WASM build and deploy artifact for all 5 WASM apps (with Ketcher fetch for
lotus-explore-rs)
- Contributing:
.github/CONTRIBUTING.md - AI contributions:
.github/CONTRIBUTING_AI.md - Security:
.github/SECURITY.md - Release process:
.github/RELEASE_CHECKLIST.md - Change history:
CHANGELOG.md - License:
LICENSE(GNU AGPL v3.0)