Toolchain Management
July 6, 2025 · View on GitHub
The TON Language Server supports managing multiple Tolk compiler installations (toolchains) and easily switching between them. This feature is particularly useful when working with different versions of Tolk or when developing the compiler itself.
What is a Toolchain?
A toolchain is a specific installation of the Tolk compiler. You might have:
- Auto-detected toolchain: Automatically found in your project's
node_modulesor system PATH - System installation: Tolk installed globally on your system
- Local development build: A custom build of the compiler for development
- Specific versions: Different versions for different projects
VS Code Setup
Quick Start
- Open Command Palette: Press
Ctrl+Shift+P(Windows/Linux) orCmd+Shift+P(macOS) - Type:
Tolk: Show Toolchain Information - Click: The Tolk version in the status bar (bottom-left corner)
The extension will automatically detect your Tolk installation in most cases, so you might not need any additional setup.
Adding a New Toolchain
If you want to add a specific Tolk installation:
- Open Command Palette:
Ctrl+Shift+P/Cmd+Shift+P - Run:
Tolk: Add Toolchain - Follow the wizard:
- Enter a unique ID (e.g.,
tolk-0.99.0,local-dev) - Provide a display name (e.g.,
Tolk 0.99.0,Local Development) - Choose how to specify the path:
- Browse: Use file picker to select the executable
- Manual: Type the path directly
- Add an optional description
- Choose whether to activate immediately
- Enter a unique ID (e.g.,
Switching Between Toolchains
Method 1: Status Bar
- Click the Tolk version in the status bar
- Select "Switch Toolchain"
- Choose from the list
Method 2: Command Palette
- Press
Ctrl+Shift+P/Cmd+Shift+P - Run
Tolk: Select Toolchain - Pick your desired toolchain
Managing Toolchains
View All Toolchains:
- Command Palette →
Tolk: Manage Toolchains - Select "List All Toolchains"
Remove a Toolchain:
- Command Palette →
Tolk: Manage Toolchains - Select "Remove Toolchain"
- Choose which one to remove
- Confirm the action
Manual Configuration
You can also edit your VS Code settings directly:
- Open Settings:
Ctrl+,/Cmd+, - Search: "tolk toolchain"
- Edit: Click "Edit in settings.json"
{
"ton.tolk.toolchain.activeToolchain": "local-dev",
"ton.tolk.toolchain.toolchains": {
"auto": {
"name": "Auto-detected",
"path": "",
"description": "Automatically detect Tolk compiler"
},
"local-dev": {
"name": "Local Development",
"path": "./build/tolk",
"description": "My local build"
}
}
}