Setup
This page covers end-to-end Mux setup, including runtime installs, compiler/tooling, and editor integration.
Language install
Runtime (prebuilt binaries)
Use the prebuilt installer to get the runtime without Rust or LLVM.
Linux and macOS:
curl -fsSL https://raw.githubusercontent.com/DerekCorniello/mux-lang/main/scripts/install.sh | shWindows (PowerShell):
iwr -useb https://raw.githubusercontent.com/DerekCorniello/mux-lang/main/scripts/install.ps1 | iexCustom install directories:
MUX_INSTALL_DIR=/usr/local/bin MUX_LIB_DIR=/usr/local/lib sh install.shCompiler and tooling (source builds)
For compiler development or source builds, you need LLVM 17 and clang. The bootstrap script installs the toolchain automatically.
git clone https://github.com/DerekCorniello/mux-lang
cd mux-lang
./scripts/bootstrap-dev.sh
./scripts/dev-cargo.sh buildVerify installation
mux --version
mux doctor
mux doctor --devSyntax highlighting
Mux ships TextMate and Tree-sitter grammars. Use the section that matches your editor.
TextMate family (VSCode, Sublime Text, JetBrains)
Generate grammar (required before packaging):
cd mux-syntax-highlighting
node scripts/generate-syntax.jsVSCode:
- Package the extension:
../scripts/release-syntax.sh - Install the
.vsix:code --install-extension language-mux-<version>.vsix - Reload VSCode.
Sublime Text:
- Copy
mux-syntax-highlighting/textmate-mux/source.mux.jsonintoPackages/User/Mux/. - Add to
Packages/User/Package.sublime-settings:{ "syntax": [ { "name": "Mux", "scope": "source.mux", "file_extensions": [".mux"], "path": "User/Mux/source.mux.json" } ] }
JetBrains (IntelliJ, WebStorm, etc.):
- Install the TextMate Bundles plugin.
- Import
mux-syntax-highlighting/textmate-mux/source.mux.json. - Associate
.muxfiles in Settings > Editor > File Types.
Tree-sitter family (Neovim, Helix)
Generate grammar (required before packaging):
cd mux-syntax-highlighting
node scripts/generate-syntax.jsNeovim:
- Install the parser and queries from
mux-syntax-highlighting/tree-sitter-mux/. - Add to
~/.config/nvim/init.lua:local parser_config = require "nvim-treesitter.parsers".get_parser_configs() parser_config.mux = { install_info = { url = "https://github.com/DerekCorniello/mux-lang", files = {"mux-syntax-highlighting/tree-sitter-mux/grammar.js"}, branch = "main" }, filetype = "mux", } - Run
:TSInstall muxand enable highlighting.
Helix:
- Build the parser:
mkdir -p ~/.config/helix/runtime/grammars cd mux-syntax-highlighting/tree-sitter-mux tree-sitter generate grammar.js cp mux.so ~/.config/helix/runtime/grammars/ - Add to
~/.config/helix/languages.toml:[[language]] name = "mux" scope = "source.mux" file-types = ["mux"] roots = [] grammar = true [language.highlight] paths = ["queries/highlights.scm"]
LSP
In development. There is no supported Mux LSP release yet.
Playground local development
To run the docs site and compiler API locally for playground testing:
- Start the API server from the repo root:
uv run python api/server.py- In a second terminal, start the website:
cd mux-website
npm startThe site runs on http://localhost:3000 and uses the production API (https://mux-lang-api.fly.dev) by default.
To use your local API server instead, set this before starting the docs site:
MUX_API_URL=http://localhost:8080 npm startProfiling
Profiling is done with external tools so it stays decoupled from the compiler and runtime.
Linux:
perf+ flamegraph
macOS:
- Instruments
Windows:
- Windows Performance Analyzer or Visual Studio Profiler