This guide covers building Cortex IDE on Windows, macOS, and Linux.
| Tool | Version | Purpose |
|---|---|---|
| Node.js | >= 24.x | Frontend build tooling |
| npm | >= 10.x | Package manager (comes with Node.js) |
| Rust | >= 1.90 | Backend compilation |
| Git | >= 2.x | Source code management |
| Tool | Purpose |
|---|---|
| Visual Studio Build Tools 2022 | C/C++ compiler (MSVC), required by native Rust crates |
| WebView2 | Ships with Windows 10/11 (1803+). Required by Tauri. |
Install Visual Studio Build Tools:
winget install Microsoft.VisualStudio.2022.BuildTools --override "--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended"| Tool | Purpose |
|---|---|
| Xcode Command Line Tools | C/C++ compiler, macOS SDK |
xcode-select --installsudo apt update
sudo apt install -y \
build-essential \
curl \
wget \
file \
libssl-dev \
libgtk-3-dev \
libwebkit2gtk-4.1-dev \
librsvg2-dev \
libayatana-appindicator3-dev \
patchelfsudo dnf groupinstall "Development Tools"
sudo dnf install \
openssl-devel \
gtk3-devel \
webkit2gtk4.1-devel \
librsvg2-devel \
libappindicator-gtk3-devel \
patchelfsudo pacman -S --needed \
base-devel \
openssl \
gtk3 \
webkit2gtk-4.1 \
librsvg \
libappindicator-gtk3 \
patchelfIf you don't have Rust installed:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shOn Windows, download and run rustup-init.exe.
After installation, verify:
rustc --version # Should be >= 1.90.0
cargo --versionWe recommend using nvm (or nvm-windows):
nvm install 24
nvm use 24Verify:
node --version # Should be >= 24.x
npm --version # Should be >= 10.xgit clone https://github.com/CortexLM/cortex-ide.git
cd cortex-idenpm installnpm run tauri:devThis will:
- Start the Vite dev server for the frontend (SolidJS + TypeScript)
- Compile and launch the Tauri Rust backend
- Open the application with hot-reload enabled
First build may take 5-15 minutes as Rust compiles all dependencies. Subsequent builds are incremental and much faster.
npm run tauri:buildThis produces platform-specific installers in src-tauri/target/release/bundle/:
| Platform | Output |
|---|---|
| Windows | nsis/Cortex Desktop_x.x.x_x64-setup.exe |
| macOS | dmg/Cortex Desktop_x.x.x_aarch64.dmg and macos/Cortex Desktop.app |
| Linux | deb/cortex-desktop_x.x.x_amd64.deb, rpm/cortex-desktop-x.x.x.x86_64.rpm, appimage/cortex-desktop_x.x.x_amd64.AppImage |
| Command | Description |
|---|---|
npm run dev |
Start Vite dev server only (frontend) |
npm run build |
Build frontend for production |
npm run tauri:dev |
Full development build (frontend + backend + launch app) |
npm run tauri:build |
Full production build with installers |
npm run typecheck |
Run TypeScript type checking |
npm run test |
Run frontend unit tests (Vitest) |
npm run test:watch |
Run tests in watch mode |
npm run test:coverage |
Run tests with coverage report |
npm run test:ui |
Open Vitest UI in browser |
| Layer | Technology |
|---|---|
| Frontend | SolidJS, TypeScript, Tailwind CSS v4, Monaco Editor, xterm.js v6 |
| Backend | Rust, Tauri v2 |
| Editor | Monaco Editor 0.55.1 |
| Terminal | xterm.js 6.x with WebGL rendering |
| Build | Vite 7.x (frontend), Cargo (backend) |
| Testing | Vitest (frontend), Cargo test (backend) |
| Desktop | Tauri v2 (WebView2 on Windows, WebKitGTK on Linux, WKWebView on macOS) |
cortex-ide/
├── src/ # Frontend (SolidJS + TypeScript)
│ ├── components/ # UI components
│ ├── context/ # SolidJS context providers
│ ├── pages/ # Application pages/views
│ ├── utils/ # Utility functions
│ ├── styles/ # CSS and design tokens
│ ├── i18n/ # Internationalization
│ └── workers/ # Web Workers
├── src-tauri/ # Backend (Rust + Tauri)
│ ├── src/
│ │ ├── ai/ # AI integration (completions, chat, agents)
│ │ ├── editor/ # Editor backend services
│ │ ├── extensions/ # Extension system (WASM, Node.js hosts)
│ │ ├── factory/ # Workflow engine
│ │ ├── fs/ # File system operations
│ │ ├── git/ # Git operations (via libgit2)
│ │ ├── lsp/ # Language Server Protocol client
│ │ ├── remote/ # SSH, tunnels, DevContainers
│ │ └── terminal/ # PTY management
│ ├── Cargo.toml # Rust dependencies
│ └── tauri.conf.json # Tauri configuration
├── mcp-server/ # MCP server (Model Context Protocol)
├── docs/ # Documentation
└── package.json # Frontend dependencies & scripts
Make sure all system dependencies are installed. The most common missing package is libwebkit2gtk-4.1-dev:
sudo apt install libwebkit2gtk-4.1-devFirst builds compile ~400 crates. This is normal. Enable sccache for faster rebuilds:
cargo install sccache
export RUSTC_WRAPPER=sccacheWebView2 ships with Windows 10 (1803+) and Windows 11. If missing, download the Evergreen Bootstrapper.
Ensure you're using Node.js >= 24:
node --versionIf using nvm: nvm use 24
chmod +x cortex-desktop_*.AppImage
./cortex-desktop_*.AppImageThis happens with unsigned builds. Remove the quarantine flag:
xattr -cr "/Applications/Cortex Desktop.app"npm run test # Run all tests
npm run test:watch # Watch mode
npm run test:coverage # With coverage reportcd src-tauri
cargo test- Fork the repository
- Create a feature branch:
git checkout -b feature/my-feature - Make your changes
- Run tests:
npm run test && cd src-tauri && cargo test - Run type checking:
npm run typecheck - Commit and push
- Open a Pull Request