Documentation Index
Fetch the complete documentation index at: https://mintlify.com/adileo/squirreldisk/llms.txt
Use this file to discover all available pages before exploring further.
Development Setup
This guide will help you set up your local development environment to start contributing to SquirrelDisk.Prerequisites
Before you begin, ensure you have the following installed:Node.js (v16 or higher)
Node.js (v16 or higher)
SquirrelDisk’s frontend is built with React and Vite, which require Node.js.Installation:
- Download from nodejs.org
- Or use a version manager like nvm or fnm
Rust (1.57 or higher)
Rust (1.57 or higher)
SquirrelDisk’s backend is built with Rust. You’ll need the Rust toolchain installed.Installation:Verify installation:Learn more at rust-lang.org
Tauri CLI
Tauri CLI
Tauri is the framework that bridges Rust and React in SquirrelDisk.Installation:
The Tauri CLI is included in the project’s dependencies and will be installed automatically with
npm install.Learn more at tauri.appPlatform-Specific Dependencies
Platform-Specific Dependencies
- Windows
- macOS
- Linux
- Microsoft Visual Studio C++ Build Tools: Required for Rust compilation
- Download from Visual Studio downloads
- Select “Desktop development with C++” during installation
Getting Started
1. Clone the Repository
First, fork the repository on GitHub, then clone your fork:2. Install Dependencies
Install the Node.js dependencies:- React and React DOM
- Vite (build tool)
- D3.js (visualization library)
- Tauri CLI
- TypeScript and type definitions
- Tailwind CSS
3. Run in Development Mode
Start the development server:- Start the Vite development server for the React frontend
- Compile the Rust backend
- Launch the SquirrelDisk application window
- Enable hot module replacement (HMR) for frontend changes
The first build may take several minutes as Cargo downloads and compiles all Rust dependencies.
4. Making Changes
- Frontend Changes
- Backend Changes
- Dependencies
Frontend code is located in
src/:src/components/- React components (DiskList, DiskDetail, TitleBar, etc.)src/d3chart.ts- D3.js sunburst chart implementationsrc/App.tsx- Main application componentsrc/main.tsx- Application entry point
5. Building for Production
Create a production build:- Build the React frontend for production (TypeScript compilation + Vite build)
- Compile the Rust backend with optimizations
- Create platform-specific installers in
src-tauri/target/release/:- Windows:
.exeand.msiinstallers - macOS:
.dmgand.appbundle - Linux:
.deb,.appimage, and other formats
- Windows:
Project Structure
Here’s an overview of the project structure:Common Development Tasks
Opening DevTools
Opening DevTools
To debug the frontend, uncomment this line in Then restart the app. The Chrome DevTools will open automatically.
src-tauri/src/main.rs:Viewing Rust Logs
Viewing Rust Logs
Rust logs are printed to the terminal where you ran
npm run tauri dev.Add logging with:Running Rust Tests
Running Rust Tests
Run Rust tests from the
src-tauri directory:Checking Code Style
Checking Code Style
TypeScript/React:This runs TypeScript type checking.Rust:
Updating Dependencies
Updating Dependencies
Frontend:Backend:
Troubleshooting
Build Fails on First Run
Build Fails on First Run
Solution:
- Ensure all prerequisites are installed correctly
- On Linux, double-check that all system libraries are installed
- Try
cargo cleanin thesrc-tauridirectory and rebuild - Check the Tauri prerequisites guide
Hot Reload Not Working
Hot Reload Not Working
Solution:
- Restart the development server
- Check for TypeScript errors in the terminal
- Clear Vite cache:
rm -rf node_modules/.vite
Rust Compilation Errors
Rust Compilation Errors
Solution:
- Update Rust:
rustup update - Clear Cargo cache:
cargo cleaninsrc-tauri/ - Ensure you’re using Rust 1.57 or higher
Missing Dependencies
Missing Dependencies
Solution:
- Delete
node_modulesand runnpm installagain - Delete
src-tauri/targetand rebuild - Check that your Node.js version is compatible (v16+)
Next Steps
Architecture
Learn about SquirrelDisk’s architecture and how components interact
Find Issues
Browse open issues and find something to work on

