Files
SecurityArc/docs/INSTALLATION.md
2025-12-11 12:31:09 +01:00

3.3 KiB

SecureArc Installation Guide

This guide provides installation instructions for SecureArc on all supported platforms. For user documentation, see User Guide.

Prerequisites: Installing Rust

SecureArc is written in Rust, so you need to install the Rust toolchain first.

Windows Installation

  1. Download rustup-init.exe

  2. Run the installer

    # Navigate to Downloads (or wherever you saved it)
    cd $env:USERPROFILE\Downloads
    
    # Run the installer
    .\rustup-init.exe
    
  3. Follow the installer prompts

    • Press Enter to proceed with default installation
    • The installer will:
      • Install Rust to %USERPROFILE%\.cargo
      • Add Rust to your PATH
      • Install rustc, cargo, and rustup
  4. Restart your terminal/PowerShell

    • Close and reopen PowerShell/VS Code terminal
    • This ensures PATH changes take effect
  5. Verify installation

    rustc --version
    cargo --version
    

Option 2: Using Chocolatey (if you have it)

choco install rust

Option 3: Using Scoop (if you have it)

scoop install rust

Troubleshooting PATH Issues

If cargo is still not recognized after installation:

  1. Check if Rust is installed but not in PATH

    # Check if cargo exists in user directory
    Test-Path "$env:USERPROFILE\.cargo\bin\cargo.exe"
    
  2. Add to PATH manually (if needed)

    # Add to user PATH permanently
    [Environment]::SetEnvironmentVariable(
        "Path",
        [Environment]::GetEnvironmentVariable("Path", "User") + ";$env:USERPROFILE\.cargo\bin",
        "User"
    )
    
    # Reload PATH in current session
    $env:Path += ";$env:USERPROFILE\.cargo\bin"
    
  3. Verify PATH was added

    $env:Path -split ';' | Select-String -Pattern 'cargo'
    

After Rust Installation

Once Rust is installed, you can build and test SecureArc:

# Navigate to project directory (replace with your actual path)
cd path\to\SecurityArc

# Build the project
cargo build

# Run tests
cargo test

# Build in release mode
cargo build --release

Alternative: Using WSL (Windows Subsystem for Linux)

If you prefer a Linux-like environment:

  1. Install WSL (if not already installed)

    wsl --install
    
  2. Install Rust in WSL

    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
    source $HOME/.cargo/env
    
  3. Use WSL terminal for development

    • Open WSL terminal
    • Navigate to your project directory (e.g., /mnt/c/path/to/SecurityArc)
    • Run cargo commands normally

System Requirements

  • Windows: Windows 7 or later (64-bit recommended)
  • RAM: 2GB minimum (4GB+ recommended for compilation)
  • Disk Space: ~1GB for Rust toolchain + dependencies
  • Internet: Required for downloading dependencies

Next Steps

After installing Rust:

  1. Verify installation: cargo --version
  2. Build the project: cargo build
  3. Run tests: cargo test
  4. See Testing Guide for detailed testing instructions