Skip to content

feat: add caching category to Rust ecosystem#144

Merged
Marve10s merged 1 commit intomainfrom
feat/rust-caching
Apr 10, 2026
Merged

feat: add caching category to Rust ecosystem#144
Marve10s merged 1 commit intomainfrom
feat/rust-caching

Conversation

@Marve10s
Copy link
Copy Markdown
Owner

@Marve10s Marve10s commented Apr 9, 2026

Summary

  • Add RustCachingSchema = z.enum(["moka", "redis", "none"]) as a new category in the Rust ecosystem
  • moka: High-performance concurrent in-memory cache (Java Caffeine-inspired, used by crates.io). Crate: moka = { version = "0.12", features = ["future"] }
  • redis-rs: Official Redis client for Rust with async support and connection pooling. Crate: redis = { version = "0.29", features = ["aio", "tokio-comp"] }
  • Full ~30-file new-category wiring following the checklist: schemas, types, option-metadata, CLI prompts, MCP server (6 spots), web builder (constant, preview-config, stack-defaults, stack-url-keys, stack-url-state, stack-utils), compatibility, bts-config, constants, command-handlers, generate-reproducible-command, config-processing, post-installation, readme-generator, smoke test wiring (options.ts, presets.ts), and tests

Files changed (33)

  • packages/types/src/schemas.ts - Schema + VALUES export + 3 config schemas
  • packages/types/src/types.ts - Type export
  • packages/types/src/option-metadata.ts - Labels + metadata
  • packages/types/src/compatibility.ts - CompatibilityInput + display name
  • apps/cli/src/index.ts - Import, router schema, config construction
  • apps/cli/src/prompts/config-prompts.ts - Prompt wiring
  • apps/cli/src/prompts/rust-ecosystem.ts - getRustCachingChoice() prompt function
  • apps/cli/src/mcp.ts - 6 spots (import, SCHEMA_MAP, ecosystem categories, buildProjectConfig, buildCompatibilityInput, tool parameters)
  • apps/cli/src/utils/bts-config.ts - Write + read paths
  • apps/cli/src/constants.ts - Default value
  • apps/cli/src/helpers/core/command-handlers.ts - Error fallback config
  • apps/cli/src/utils/generate-reproducible-command.ts - --rust-caching flag
  • apps/cli/src/utils/config-processing.ts - processFlags branch
  • apps/cli/src/helpers/core/post-installation.ts - Display output
  • packages/template-generator/src/processors/readme-generator.ts - README features
  • packages/template-generator/templates/rust-base/Cargo.toml.hbs - Workspace deps
  • packages/template-generator/templates/rust-base/crates/server/Cargo.toml.hbs - Server deps
  • packages/template-generator/templates/rust-base/crates/server/src/main.rs.hbs - mod cache; + init
  • packages/template-generator/templates/rust-base/crates/server/src/cache.rs.hbs - NEW cache helper module
  • apps/web/src/lib/constant.ts - TECH_OPTIONS + ECOSYSTEM_CATEGORIES
  • apps/web/src/lib/preview-config.ts - stackToConfig mapping
  • apps/web/src/lib/stack-defaults.ts - StackState type + DEFAULT_STACK
  • apps/web/src/lib/stack-url-keys.ts - URL key (rca)
  • apps/web/src/lib/stack-url-state.ts - 3 spots (load, serialize, search)
  • apps/web/src/lib/stack-utils.ts - Category order + generateStackCommand
  • apps/web/src/lib/tech-icons.ts - Icon for moka
  • apps/web/src/lib/tech-resource-links.ts - Docs/GitHub for moka
  • testing/lib/generate-combos/options.ts - Import + sampleScalar + base config
  • testing/lib/presets.ts - Base config
  • apps/cli/test/generate-reproducible-command.test.ts - makeConfig + expected output
  • apps/cli/test/rust-ecosystem.test.ts - 3 new tests (moka, redis, none)
  • apps/cli/test/template-snapshots.test.ts - New snapshot config

Test plan

  • bun test apps/cli/test/cli-builder-sync.test.ts -- 355 pass, 0 fail
  • bun test apps/cli/test/rust-ecosystem.test.ts -- 112 pass, 0 fail (includes 3 new caching tests)
  • bun test apps/cli/test/generate-reproducible-command.test.ts -- 5 pass, 0 fail
  • bun test apps/cli/test/template-snapshots.test.ts -u -- 66 pass, 0 fail
  • Scaffold axum+moka -- cargo check passes
  • Scaffold actix-web+redis -- cargo check passes
  • Scaffold axum+redis+tracing -- cargo check passes
  • Scaffold none+moka (no web framework) -- cargo check passes

Add RustCachingSchema with moka (in-memory) and redis options.
Full 30-file new-category wiring: schemas, types, CLI prompts,
MCP server, web builder, compatibility, smoke tests, and templates.
All 4 scaffold combos pass cargo check.
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 9, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
better-fullstack-web Ignored Ignored Apr 9, 2026 9:06pm

@github-actions github-actions bot added size:L 100-499 effective changed lines (test files excluded in mixed PRs). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels Apr 9, 2026
@Marve10s Marve10s merged commit 5002d87 into main Apr 10, 2026
13 checks passed
Marve10s added a commit that referenced this pull request Apr 11, 2026
## New Tools (18 additions across all ecosystems)

### TypeScript
- **Algolia** search engine (#125)
- **Vercel** deployment with compat rules (#137)
- **GraphQL Yoga + Pothos** API option (#139)
- **Tauri** desktop app addon (#142)
- **i18n** category: i18next + next-intl (#149)

### Rust
- **tracing + env-logger** logging category (#126)
- **anyhow + thiserror + eyre** error handling category (#135)
- **Diesel** ORM (#140)
- **Rocket** web framework (#143)
- **moka + redis** caching category (#144)

### Go
- **Fiber** web framework (#127)
- **Chi** web framework (#133)
- **zerolog + slog** logging (#138)
- **Ent** ORM (#145)

### Python
- **Flask** web framework (#128)
- **Litestar** web framework (#136)
- **authlib + jwt** auth category (#141)
- **Strawberry** GraphQL category (#148)

## Infrastructure
- Adding new tool options guideline (3,000+ lines, 7 files)
- PR-aware smoke tests (--force-option, --force-non-none, --partition)
- Strengthened CI: test:release expanded, smoke tests block PRs
- Compatibility rules guideline with template parity checks
- Meilisearch template fix for v0.57 API changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 effective changed lines (test files excluded in mixed PRs). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant