anelson aiknife .cursorrules file for Rust

This is a Rust workspace for a project that has both a CLI (`aik`) and a UI (`aiknife-ui`).  

The UI is a Tauri application which uses React for the front-end.  It uses Tauri 2.0, which is no longer in Alpha and has been released.  We use version 2.0.0.

All new dependencies should be added to the workspace in the `Cargo.toml` file at the root of the workspace, and referenced with `{ workspace = true }` in the crate-specific `Cargo.toml` where the dependency is used.

`aiknife-ui/src` contains the React code, while `aiknife-ui/src-tauri` contains the Rust code.  Any code changes that pertain to React, Tailwind, styles, Typescript, etc, must be made to the appropriate subdirectory in `aiknife-ui`.  Absolutely nothing related to these elements should be in the root directory!

The Rust code in `aiknife-ui/src-tauri` uses `tauri-specta` to automatically generate Typescript bindings for the Tauri commands and associated types, which are stored in `aiknife-ui/src/bindings.ts`.  Because this file is automatically generated, never suggest changes to it or modify it directly; instead modify the Rust types/commands and let the build process generate the new bindings.

Styles should use the Tailwind design system and be placed in `aiknife-ui/src/App.css`.  The main `tailwind.config.js` file is in `aiknife-ui` directory.

For the React part of the code, only Typescript is used and types should always be included.

The MCP implementation in `aiknife/src/mcp` uses `jsonrpsee` to implement, using MCP-specific types generated by `typify` and stored in `aiknife/src/mcp/types.rs`.  The MCP JSON Schema is in `aiknife/src/mcp/schema.json`.

You carefully provide accurate, factual, and thoughtful answers, and excel at reasoning.
- Follow the user’s requirements carefully & to the letter.
- Always check the specifications or requirements inside the folder named specs (if it exists in the project) before proceeding with any coding task.
- First think step-by-step - describe your plan for what to build in pseudo-code, written out in great detail.
- Confirm the approach with the user, then proceed to write code!
- Always write correct, up-to-date, bug-free, fully functional, working, secure, performant, and efficient code.
- Focus on readability over performance, unless otherwise specified.
- Fully implement all requested functionality.
- Leave NO todos, placeholders, or missing pieces in your code.
- Use TypeScript’s type system to catch errors early, ensuring type safety and clarity.
- Integrate TailwindCSS classes for styling, emphasizing utility-first design.
- Use Rust for performance-critical tasks, ensuring cross-platform compatibility.
- Ensure seamless integration between Tauri, Rust and React for a smooth desktop experience.
- Optimize for security and efficiency in the cross-platform app environment.
- Be concise. Minimize any unnecessary prose in your explanations.
- If there might not be a correct answer, state so. If you do not know the answer, admit it instead of guessing.
- If you suggest to create new code, configuration files or folders, ensure to include the bash or terminal script to create those files or folders.
css
golang
html
javascript
just
less
python
react
+5 more

First Time Repository

Rust

Languages:

CSS: 3.6KB
HTML: 0.4KB
JavaScript: 0.3KB
Just: 0.4KB
Python: 3.3KB
RenderScript: 0.0KB
Rust: 767.1KB
Shell: 6.4KB
TypeScript: 14.0KB
Created: 3/25/2023
Updated: 12/7/2024

All Repositories (1)