Prerequisites
Before installing dir2, make sure your Windows system meets the following requirements:
- Operating System: Windows 10 or Windows 11
- Architecture: 64-bit (x64) processor
- Memory: Minimum 4GB RAM recommended
- Storage: At least 500MB free space for Rust toolchain and dir2
- Internet Connection: Required for downloading Rust and dependencies
Required Software
- Git (for cloning the repository)
- Microsoft C++ Build Tools or Visual Studio (for Rust compilation)
- Windows PowerShell or Command Prompt
Install Rust
dir2 is built with Rust, so you'll need to install the Rust programming language and its package manager Cargo.
Step 1: Download Rust Installer
Visit the official Rust website and download the Windows installer:
https://rustup.rs/
Step 2: Run the Installer
- Download and run
rustup-init.exe
- Follow the installation prompts
- Choose the default installation when prompted
- The installer will download and install Rust, Cargo, and rustup
Step 3: Install Microsoft C++ Build Tools
Rust requires Microsoft C++ build tools for linking. If you don't have Visual Studio installed:
- Download Visual Studio Installer
- Install "C++ build tools" workload
- Or install the standalone "Microsoft C++ Build Tools"
Step 4: Verify Rust Installation
Open a new Command Prompt or PowerShell window and verify the installation:
rustc --version
cargo --version
Clone Repository
Now that Rust is installed, let's clone the dir2 repository from GitHub.
Clone the repository:
git clone https://github.com/itcodehery/Project_Directory_2.git
Navigate to the project folder:
cd Project_Directory_2
Enter the dir2 source directory:
cd directory_2
directory_2
folder inside the cloned repository, as this contains the actual dir2 source code.
Alternative: Download ZIP
If you don't have Git installed, you can download the repository as a ZIP file:
- Go to https://github.com/itcodehery/Project_Directory_2
- Click the green "Code" button
- Select "Download ZIP"
- Extract the ZIP file to your desired location
- Open PowerShell/Command Prompt and navigate to the extracted folder
- Navigate to the
directory_2
folder inside the extracted directory
Build Process
Now that you're in the directory_2
folder, you can build and run dir2.
Build the project:
cargo build
Run dir2:
cargo run
Optional: Build for Better Performance
For production use, you can build an optimized version:
cargo build --release
Then run the optimized version:
cargo run --release
Verify Installation
If the build completed successfully and cargo run
started dir2 without errors, your installation is complete!
cargo run
from the directory_2
folder.
Using dir2
To start dir2, make sure you're in the directory_2
folder and run:
cargo run
This will launch dir2 and you'll see the dir2 prompt where you can start entering commands.
Troubleshooting
Common issues and their solutions:
Rust Compilation Errors
Solution: Install Microsoft C++ Build Tools or Visual Studio with C++ development tools.
Git Not Found
Solution: Install Git for Windows from git-scm.com or download the repository as ZIP.
Permission Errors
Solution: Run PowerShell or Command Prompt as Administrator, or ensure you have write permissions to the directory.
Wrong Directory
Solution: Make sure you're in the directory_2
folder inside the cloned repository. Use cd directory_2
after cloning.
Antivirus Interference
Some antivirus software may interfere with Rust compilation:
- Add your project directory to antivirus exclusions
- Add
~\.cargo
directory to exclusions - Temporarily disable real-time protection during build
Next Steps
Congratulations! You've successfully installed dir2. Here's what to do next: