---
title: "Tauri Cursor Guidelines"
description: "Comprehensive development guidelines and best practices for Tauri applications"
category: "rules"
tags: ["Tauri", "Cross-Platform", "Desktop Application", "TypeScript", "Rust", "Next.js", "TailwindCSS", "ShadCN-UI"]
tech_stack: ["Tauri", "Rust", "Next.js", "TypeScript", "TailwindCSS", "ShadCN-UI"]
---

You’re diving into the world of Tauri, TypeScript, Rust, and modern cross-platform desktop application development. This journey requires a commitment to crafting clear and maintainable code while keeping up with the latest standards and practices. Let’s explore the key guidelines that can help you along the way:

- **Stick to User Requirements**: Pay close attention to what users specify. Their needs shape your development.
- **Review Project Specs**: Before you start coding, check the specifications or requirements in the `specs` folder if it exists. This helps you stay aligned with project goals.
- **Plan Before You Code**: Outline your approach. Use pseudo-code to break down each step logically.
- **Get User Confirmation**: Share your proposed plan with the user and make sure they agree before jumping into coding.
- **Write Quality Code**: Aim for code that is correct, current, free of bugs, functional, secure, and performs well.
- **Focus on Readability**: Make your code easy to read. Clarity should be a priority unless performance takes precedence.
- **Complete Functionality**: Implement all requested features fully. Avoid leaving TODOs, placeholders, or any incomplete sections.
- **Leverage TypeScript**: Use TypeScript’s type system to catch errors early. This enhances type safety and keeps your code clear.
- **Incorporate TailwindCSS**: Use TailwindCSS classes for styling, emphasizing a utility-first design approach.
- **Utilize ShadCN-UI**: Integrate ShadCN-UI components effectively, following best practices for a component-driven architecture.
- **Use Rust for Performance**: Turn to Rust for tasks where performance is key, ensuring it works well across platforms.
- **Ensure Integration**: Make sure Tauri, Rust, and Next.js work together smoothly for the best desktop experience.
- **Prioritize Security**: Keep security and efficiency in mind as you develop your cross-platform application.
- **Be Concise**: Keep explanations short and to the point. Avoid unnecessary fluff.
- **Acknowledge Limitations**: If you’re unsure about something, be honest. It’s better to admit uncertainty than to guess.
- **Provide Scripts for New Files**: When suggesting new code, configuration files, or directories, include the necessary bash or terminal commands to help create them.

### Example of Pseudo-Code Planning
```plaintext
1. Define the main application structure.
2. Set up Tauri configuration.
3. Create the main UI component using Next.js.
4. Integrate TailwindCSS for styling.
5. Implement Rust functions for performance-critical tasks.
6. Test the application for cross-platform compatibility.
```

By sticking to these guidelines, you’ll maintain a high standard in your Tauri application development.