Feature Tiers (Cargo Features)
DioxusPress organizes each domain into an isolated workspace crate and wires them at the crates/app composition root via Cargo features. Disabled capabilities are not merely hidden in the UI — their backend API handlers, SeaORM entities, and database migrations are completely omitted from the compiled binary.
Tier Capabilities & Runtime Matrix
| Tier | Build Flags (crates/app) | Included Capabilities | Required Env Vars |
|---|---|---|---|
basic (Docs / Blog) | --no-default-features | Docs, Blog, Cases, Podcast, Topic Boards, Tantivy Search, About, Themes/Dark Mode/i18n, Sitemap/Atom Feed | Optional BASE_URL (No Database) |
accounts (Community) | --no-default-features --features accounts | basic + OAuth2 PKCE Sign-In, Forum Topics, Post Comments, Image Uploads, LLM Moderation, /admin Console | + DATABASE_URL, JWT_SECRET |
course (Courses & Pro) | --no-default-features --features course | accounts + Structured Courses, Free Previews / Server Paywall, Paragraph Annotations, Manual Entitlements | Same as accounts |
full (Default) | (default — no extra flags) | course + WeChat Pay / Alipay / Stripe Checkout, Signed Webhook Fulfillment, Orders & TipJar | Same + Payment Merchant Keys |
Two-Layer Control: Compile-Time Pruning × Runtime Switches
DioxusPress separates module control into two complementary layers:
- Compile-Time Physical Boundary (Cargo Features): At startup,
register_compiled_modulesrecords only the crates linked into the binary. Uncompiled routes degrade cleanly to a standard404viaabsent_pages!, leaving zero unused attack surface. - Per-Site Runtime Toggles (
site.json::modules): Even when running a full binary, any compiled module can be toggled off insite.json(for example keeping onlydocsandblog). Top navigation,ModuleGateroute guards,⌘Ksearch indexing,/sitemap.xml, and/feed.xmlupdate in lockstep:
{
"modules": {
"docs": { "enabled": true },
"blog": { "enabled": true },
"cases": { "enabled": true },
"podcast": { "enabled": false },
"embedded": { "enabled": false }
}
}
Pre-Merge 8-Way Tier Verification
If you customize framework components or routes, run the built-in matrix script before opening a PR to verify all 4 feature tiers × (server + web WASM) = 8 targets with zero warnings:
./scripts/check_tiers.sh

