Official editor support for the Mach programming language.
Mach is a statically typed, compiled systems language with explicit control over data layout and resource management. The language emphasizes:
- Explicit control - No implicit heap allocation, lifetime management, or type coercion
- Predictable semantics - Well-defined types and compile-time error checking
- C interoperability - Data layout and calling conventions align with the platform C ABI
- Minimal core - Small, orthogonal feature set that composes well
For the complete language specification, see the doc/language/ directory in the mach repository (grammar.md is the authoritative syntax reference).
- Syntax highlighting kept in sync with the current compiler keywords, intrinsics, and operators
- Support for current Mach syntax including:
- Records (
rec), unions (uni) and tags (tag Name: u8 { case; case: Payload; }) - Tag construction
Type.case{payload}and thesel place.casetest - Generic types and functions with
[T]bracket syntax - Method definitions using
Type.methodsyntax - Comptime directives
$if/$or/$each/$error,$-intrinsics ($size_of,$cases,$is_tag,$discriminant_of, ...), and$mach.*reads - Value (
::), bit-reinterpret (:~) and public-result (:>) casts, address-of (?) / dereference (@) operators - Decorators
#[inline],#[deprecated("msg")],#[oblivious],#[packed], ... - Inline assembly blocks (
asm <isa> { ... }) - Variadic functions (
...)
- Records (
- Line comments with
#including toggle/comment actions - Bracket, brace, and quote auto-closing/surrounding pairs aligned with the Mach parser
- Install the extension from the Marketplace or install a packaged
.vsixin VS Code - Open a
.machsource file - syntax highlighting and comment toggling work out-of-the-box - Pair with the
machcompiler from the mach repository
- Report syntax gaps or highlighting bugs in the mach-vscode repository
- For language design issues, see the main mach repository
- When publishing, remember to bump the version in
package.jsonand run:
npx @vscode/vsce publishThe Mach language is under active development; changes may occur as the language evolves toward self-hosting.