Prerequisites

Before installing dir2, make sure your Windows system meets the following requirements:

System Requirements: dir2 is specifically designed for Windows and requires Windows 10 or later.
  • 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

  1. Download and run rustup-init.exe
  2. Follow the installation prompts
  3. Choose the default installation when prompted
  4. 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:

  1. Download Visual Studio Installer
  2. Install "C++ build tools" workload
  3. 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
Success! You should see version numbers for both rustc and cargo if the installation was successful.

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
Note: Make sure you navigate to the 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:

  1. Go to https://github.com/itcodehery/Project_Directory_2
  2. Click the green "Code" button
  3. Select "Download ZIP"
  4. Extract the ZIP file to your desired location
  5. Open PowerShell/Command Prompt and navigate to the extracted folder
  6. 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
Build Time: The first build may take several minutes as Cargo downloads and compiles dependencies. Subsequent builds will be much faster.
Success! If the build completes without errors and dir2 starts up, you're ready to go!

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!

Installation Complete! You can now use dir2 by running 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.

Tip: Check the Usage Guide to learn about dir2's commands and features.

Troubleshooting

Common issues and their solutions:

Rust Compilation Errors

Error: "Microsoft C++ build tools not found"

Solution: Install Microsoft C++ Build Tools or Visual Studio with C++ development tools.

Git Not Found

Error: "'git' is not recognized as an internal or external command"

Solution: Install Git for Windows from git-scm.com or download the repository as ZIP.

Permission Errors

Error: Access denied or permission errors during build

Solution: Run PowerShell or Command Prompt as Administrator, or ensure you have write permissions to the directory.

Wrong Directory

Error: "could not find `Cargo.toml`"

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:

1

Learn Basic Usage

Get familiar with dir2's SQL-like command syntax

Usage Guide →
2

Explore Commands

Discover all available commands and their options

Commands Reference →
3

Windows-Specific Setup

Optimize dir2 for your Windows environment

Windows Setup →
Need Help? If you encounter any issues, check the GitHub Issues page or create a new issue for support.