Windows Setup
This guide covers Windows-specific configuration and troubleshooting for Crucible.
Configuration File Locations
Crucible uses a cross-platform configuration system that works consistently across Linux, macOS, and Windows.
Main Configuration File
The primary configuration file location follows platform conventions:
- Linux:
~/.config/crucible/config.toml(XDG Base Directory) - macOS:
~/Library/Application Support/crucible/config.toml - Windows:
%APPDATA%\crucible\config.toml(e.g.,C:\Users\YourName\AppData\Roaming\crucible\config.toml)
Note: On Windows, Crucible uses
%APPDATA%(Roaming AppData) which is the standard Windows location for user configuration files that should roam with the user profile.
Kiln-Specific Configuration
Each kiln (knowledge base) can have its own configuration:
- Kiln metadata:
KILN_ROOT\.crucible\kiln.toml - SQLite database:
KILN_ROOT\.crucible\crucible-sqlite.db(notes, links, text index, embeddings) - Agent cards:
KILN_ROOT\.crucible\agents\
Discovery Paths
Agent cards are collected from every directory below; a card found later shadows a card of the same name found earlier, so the workspace wins and the user-wide directory loses:
%APPDATA%\crucible\agents\KILN_ROOT\.crucible\agents\, thenKILN_ROOT\agents\, thenKILN_ROOT\Agents\WORKSPACE\.crucible\agents\(when the workspace is not the kiln)
Creating Your Configuration File
To create your configuration file on Windows:
# Create the config directoryNew-Item -ItemType Directory -Force -Path "$env:APPDATA\crucible"
# Create a basic config file@"default_kiln = "notes"
[kilns]notes = 'C:\Users\YourName\Documents\my-kiln'
[enrichment.provider]type = "fastembed"model = "BAAI/bge-small-en-v1.5"batch_size = 16"@ | Out-File -FilePath "$env:APPDATA\crucible\config.toml" -Encoding utf8Or manually create the file at: C:\Users\YourName\AppData\Roaming\crucible\config.toml
Environment Variables
The CRUCIBLE_* variables are the same on every platform — see
Configuration for the full list. Only the default paths are
spelled with backslashes: CRUCIBLE_HOME defaults to %USERPROFILE%\.crucible,
CRUCIBLE_LOG_FILE to %USERPROFILE%\.crucible\<command>.log, and CRUCIBLE_CONFIG_DIR
overrides %APPDATA%\crucible.
Building on Windows
Prerequisites
-
Rust toolchain: Install from rustup.rs
- Select “x86_64-pc-windows-msvc” (default)
- Or “x86_64-pc-windows-gnu” if you prefer MinGW
-
Visual Studio Build Tools (for MSVC toolchain):
- Install “Desktop development with C++” workload
- Or install Visual Studio Community with C++ support
-
Git: For cloning the repository
Build Commands
# Build all crates (debug)cargo build
# Build releasecargo build --release
# Run testscargo test
# Run specific testcargo test -p crucible-daemon --test llm_backend_comparisonC Runtime Library Configuration
On Windows, Rust uses the MSVC toolchain which requires consistent C runtime library linkage across all dependencies. You may encounter linker errors if dependencies are compiled with different runtime settings:
error LNK2038: mismatch detected for 'RuntimeLibrary':value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease'Solution
The project includes a .cargo/config.toml file that ensures consistent dynamic runtime linkage (the default on Windows). This matches most dependencies including:
- ONNX Runtime (
ort_sys) - used by FastEmbed - Most Rust crates on Windows
Troubleshooting Runtime Mismatch
If you see LNK2038 errors:
-
Clean and rebuild (most common fix):
Terminal window cargo cleancargo build -
Verify
.cargo/config.tomlexists and uses dynamic runtime (default) -
Rebuild dependencies from source if needed:
Terminal window cargo cleancargo build --verbose -
If the issue persists, consider:
- Using a different embedding provider (e.g., Ollama instead of FastEmbed)
- Checking for updated dependency versions
ONNX Runtime (FastEmbed) Issues
FastEmbed uses ONNX Runtime for local embedding generation. On Windows, this can cause C runtime library mismatches.
Diagnostic Steps
-
Run the diagnostic test:
Terminal window cargo test -p crucible-daemon --features fastembed --test llm_onnx_windows_diagnostics -- --nocapture -
Verify build configuration: Ensure
.cargo/config.tomlcontains:[target.'cfg(windows)']rustflags = ["-C", "target-feature=-crt-static"] -
Verify Visual C++ Redistributable: Check for
msvcp140.dllandvcruntime140.dllinC:\Windows\System32\If missing, install from: https://aka.ms/vs/17/release/vc_redist.x64.exe
Alternative Providers
If ONNX Runtime issues persist, use alternative embedding providers:
- Ollama: Local or remote, requires Ollama server
- llama.cpp: GGUF models, excellent Windows support
- OpenAI/Anthropic: Cloud-based APIs
All providers work on Windows and can be configured in config.toml.
Common Issues
Missing DLLs
If you get “missing DLL” errors at runtime:
- Install Visual C++ Redistributable
- Ensure all dependencies are in your PATH
- For ONNX Runtime, ensure
onnxruntime.dllis accessible
Long Path Issues
If you encounter path length errors:
- Enable long path support in Windows (requires admin):
Terminal window New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" `-Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force - Or use shorter paths for your kiln directory
Path Handling
Windows paths are handled automatically:
- Forward slashes (
/) are converted to backslashes (\) where needed - UNC paths (
\\server\share) are supported - Long paths (260+ characters) require Windows 10+ with long path support enabled
Testing on Windows
Tests are designed to work cross-platform:
- Path separators are normalized automatically
- Line endings (CRLF vs LF) are handled transparently
- File watching may have different timing on Windows
# All testscargo test
# Specific cratecargo test -p crucible-daemon
# With outputcargo test -- --nocapture
# ONNX Runtime diagnostic testcargo test -p crucible-daemon --features fastembed --test llm_onnx_windows_diagnostics -- --nocapturePerformance Considerations
- File watching: Windows file system events may have different latency than Linux
- Embedding models: ONNX Runtime performance is similar across platforms
- Database: SQLite performance is consistent on Windows
See Also
- Getting Started - General setup guide
- embedding - Embedding provider configuration
- storage - Database configuration