Press Ctrl+C to stop the slow compilation.
# Stop current installation (Ctrl+C)
# Run fast installer (skips slow Rust build)
sudo ./install_all_dependencies_fast.sh --skip-rust-buildThis completes in ~2 minutes instead of 20+ minutes!
Your project is at: /mnt/c/Users/DaviCastroSamora/Documents/SamoraDC/RustAlgorithmTrading
This is the Windows filesystem mounted in WSL2, which causes:
- 10-20x slower file operations
- Rust compilation: 20+ minutes instead of 2-3 minutes
- Every file read/write goes through Windows → Linux translation layer
- 9P protocol overhead for cross-filesystem access
Move your entire project to the native Linux filesystem:
# 1. Create projects directory in Linux filesystem
mkdir -p ~/projects
# 2. Copy project (this takes ~2-5 minutes one time)
cp -r /mnt/c/Users/DaviCastroSamora/Documents/SamoraDC/RustAlgorithmTrading ~/projects/
# 3. Navigate to new location
cd ~/projects/RustAlgorithmTrading
# 4. Run installation (will be FAST now - 2-3 min total)
sudo ./install_all_dependencies_fast.sh
# 5. Build Rust (NOW it's fast - 2-3 minutes!)
cd rust
cargo build --release --jobs $(nproc)Result:
- Total time: ~5-8 minutes (one-time migration + fast build)
- Future builds: 2-3 minutes
- File operations: 10-20x faster
If you need files on Windows (for backup/sharing), use symlinks:
# 1. Move project to Linux filesystem
mv /mnt/c/Users/DaviCastroSamora/Documents/SamoraDC/RustAlgorithmTrading ~/projects/
# 2. Create symlink on Windows side
ln -s ~/projects/RustAlgorithmTrading /mnt/c/Users/DaviCastroSamora/Documents/SamoraDC/RustAlgorithmTrading
# 3. Work from Linux filesystem
cd ~/projects/RustAlgorithmTradingResult: Fast operations, but files still accessible from Windows.
# Install Python dependencies only (fast)
sudo ./install_all_dependencies_fast.sh --skip-rust-build
# Build Rust later when needed (or not at all for Python-only work)
cd rust
cargo build --release# Debug builds are faster but less optimized
cd rust
cargo build --jobs $(nproc) # No --release flagDebug vs Release:
- Debug: ~10-12 minutes on Windows filesystem
- Release: 20+ minutes on Windows filesystem
- Debug on Linux: ~1-2 minutes
- Release on Linux: ~2-3 minutes
# Build one crate at a time
cd rust
cargo build -p common --jobs $(nproc)
cargo build -p market-data --jobs $(nproc)
cargo build -p execution-engine --jobs $(nproc)
cargo build -p risk-manager --jobs $(nproc)| Operation | Time | Status |
|---|---|---|
| Rust Release Build | 20-30 min | ❌ Extremely slow |
| Rust Debug Build | 10-12 min | |
| Python Install (UV) | 2-3 min | ✅ Fast |
| File Operations | 10-20x slower | ❌ Very slow |
| Git Operations | 5-10x slower |
| Operation | Time | Status |
|---|---|---|
| Rust Release Build | 2-3 min | ✅ Fast |
| Rust Debug Build | 1-2 min | ✅ Very fast |
| Python Install (UV) | 1-2 min | ✅ Very fast |
| File Operations | Normal speed | ✅ Fast |
| Git Operations | Normal speed | ✅ Fast |
Speedup: 10-20x faster for Rust builds!
# Check current location
pwd
# Output: /mnt/c/Users/DaviCastroSamora/Documents/SamoraDC/RustAlgorithmTrading
# Check project size
du -sh .
# Output: ~1.5 GB (with old venv)# 1. Cancel any running builds
# Press Ctrl+C if installation is running
# 2. Create Linux projects directory
mkdir -p ~/projects
# 3. Copy project to Linux filesystem (takes 2-5 minutes)
echo "Copying project to Linux filesystem..."
cp -r /mnt/c/Users/DaviCastroSamora/Documents/SamoraDC/RustAlgorithmTrading ~/projects/
echo "✓ Copy complete!"
# 4. Navigate to new location
cd ~/projects/RustAlgorithmTrading
# 5. Verify location
pwd
# Output: /home/samoradc/projects/RustAlgorithmTrading
# 6. Run fast installation
sudo ./install_all_dependencies_fast.sh
# 7. Build Rust (NOW it's fast!)
cd rust
time cargo build --release --jobs $(nproc)
# Should take 2-3 minutes
# 8. Verify build
ls -lh target/release/market-data
# Should show executable# Your new workflow location
cd ~/projects/RustAlgorithmTrading
# Activate environment
source .venv/bin/activate
# Build Rust (fast now!)
cd rust && cargo build --release
# Start development
./scripts/start_trading.sh- 9P File System Protocol: WSL2 uses 9P protocol to access Windows files
- Translation Overhead: Every file operation translates between Linux and Windows
- Metadata Sync: File metadata (permissions, timestamps) synced constantly
- Large Dependency Trees: Rust projects have thousands of files
- Parallel Compilation: Cargo tries to compile in parallel, overwhelming 9P protocol
Cargo: "Read Cargo.toml from /mnt/c/..."
↓
WSL2: "Ask Windows for file"
↓
Windows: "Here's the file (slow)"
↓
WSL2: "Translate to Linux format"
↓
[REPEAT FOR EVERY FILE - thousands of times]
On Linux filesystem:
Cargo: "Read Cargo.toml from /home/..."
↓
Linux: "Here's the file (instant)"
Result: 10-20x speed difference!
- Store projects in
~/projects/(Linux filesystem) - Use WSL2 terminal for all operations
- Access Windows files only when needed
- Keep heavy I/O operations on Linux filesystem
- Store active projects in
/mnt/c/(Windows filesystem) - Compile Rust/C++ projects from Windows filesystem
- Use Windows filesystem for high I/O operations
- Mix Linux and Windows file operations
Need to keep working NOW?
→ Use sudo ./install_all_dependencies_fast.sh --skip-rust-build
Want moderate improvement (10-12 min vs 20+ min)?
→ Use debug build: cargo build (no --release)
Want BEST performance (2-3 min)?
→ Move to Linux filesystem: cp -r project ~/projects/
Have limited disk space? → Use symlink strategy (move + symlink back)
Just learning/testing? → Skip Rust build entirely, use Python components only
- Stop current slow build (Ctrl+C)
- Run fast installer:
sudo ./install_all_dependencies_fast.sh --skip-rust-build - Decide: Move to Linux filesystem or skip Rust?
- If moving:
cp -r /mnt/c/.../project ~/projects/ - Build Rust from new location: Fast!
- Update bookmarks/shortcuts to new location
- Optional: Remove old Windows copy
$ time cargo build --release
real 22m 34s ❌$ time cargo build --release
real 2m 47s ✅You just saved 20 minutes per build! 🚀
TL;DR: Your project is on Windows filesystem (/mnt/c/...) which is 10-20x slower for Rust compilation. Move it to Linux filesystem (~/projects/) for 2-3 minute builds instead of 20+ minutes.
Quick Fix:
sudo ./install_all_dependencies_fast.sh --skip-rust-buildBest Fix:
cp -r /mnt/c/Users/.../RustAlgorithmTrading ~/projects/
cd ~/projects/RustAlgorithmTrading
sudo ./install_all_dependencies_fast.sh