1---2name: veloxbase-veloxdb-rust-heavy-performance3description: Rust-Heavy Performance4---56# Rust-Heavy Performance78Use this skill when a feature can become slow or memory-heavy. Prefer implementing heavy paths in `src-tauri/` and keep the frontend thin.910## Core rule1112- If work is CPU-heavy, row-heavy, or repeatedly recomputed, do it in Rust.13- JavaScript/React should orchestrate UI state and rendering, not run bulk processing loops.1415## Rust-first implementation pattern16171. Add or extend an async command in `src-tauri/src/commands.rs`.182. Keep query execution and pooling logic in `src-tauri/src/db.rs` and related Rust modules.193. Return a compact DTO to the frontend (already shaped for display).204. Call it from `src/data/repositories/` using existing `invoke` patterns.215. Render in feature UI with virtualization for large result sets.2223## Memory efficiency guardrails2425- Use bounded reads (`LIMIT`, pagination, or chunked iteration), never unbounded materialization.26- Avoid cloning large vectors/strings when references or incremental building is enough.27- Prefer streaming/chunked processing over collecting everything at once.28- Keep structs narrow for IPC responses; do not ship unused fields.29- Reuse pooled database connections; avoid ad hoc new clients per action.3031## Speed guardrails3233- Push filtering, sorting, grouping, and aggregation down to SQL/Rust.34- Minimize Rust<->webview payload size; serialize only what UI needs now.35- Cache or memoize expensive Rust-side intermediate results only when reuse is likely and bounded.36- Use async command handlers; avoid blocking I/O in command paths.3738## Easy-to-implement defaults3940- Start from existing command and repository patterns instead of inventing new data paths.41- Keep each command focused: one clear job, typed input, typed output.42- Introduce feature flags/options only after proving a real need.43- Keep frontend changes small: trigger command, handle loading/error, display bounded data.4445## Anti-patterns to avoid4647- Doing large data transforms in React `useMemo` or `useEffect`.48- Returning huge raw row sets to the UI and shaping them in JavaScript.49- Recomputing heavy derived data on every render or keystroke.50- Mixing unrelated concerns into a single Rust command handler.5152## Review checklist5354- Is the heavy work in Rust instead of JavaScript?55- Are reads and payloads explicitly bounded?56- Is memory growth controlled for worst-case input size?57- Is command/repository wiring following existing VeloxDB patterns?58- Does the UI virtualize large lists/tables and avoid unnecessary recomputation?5960---61> Source: [veloxbase/veloxdb](https://github.com/veloxbase/veloxdb) — distributed by [TomeVault](https://tomevault.io).62<!-- tomevault:4.0:skill_md:2026-06-15 -->
Run npx skillmds@latest add tomevault-io/veloxbase-veloxdb-rust-heavy-performance in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Rust-Heavy Performance It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Independent scanners report: SkillSpector: PASS, Skill Scanner: PASS. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
tomevault-io (@tomevault-io) published this skill. Their other Agent Skills are listed on their SkillMD profile.