A lightweight, GPU-accelerated Swift compiler built for experimentation, speed, and research.
MiniSwift is not a replacement for the Apple Swift compiler.
It's a research platform designed to explore GPU-accelerated compilation techniques — pushing lexing, parsing, AST generation, and semantic analysis onto Metal compute shaders.
The goal is speed, determinism, and experimentation. We measure runtimes in microseconds, not milliseconds.
Metal compute shaders tokenize Swift source code in parallel across thousands of GPU threads.
Abstract Syntax Tree generation executed on the GPU with parallel node construction.
Real-time type checking, symbol resolution, and scope analysis with GPU acceleration.
Lexing 10K lines in ~120μs. Parsing in ~340μs. Full pipeline under 1ms for typical files.
Clean separation: Lexer → Parser → AST → Semantic passes. Each stage independently testable.
Syntax highlighting engine, debugger hooks, and a clean API for tool integrations.
struct Vector3D {
var x: Float
var y: Float
var z: Float
func magnitude() -> Float {
return (x*x + y*y + z*z).squareRoot()
}
}
let vec = Vector3D(x: 3.0, y: 4.0, z: 0.0)
print(vec.magnitude()) // 5.0
// GPU Lexer Output
[0] KEYWORD "struct" 0:0
[1] IDENTIFIER "Vector3D" 0:7
[2] LBRACE "{" 0:16
[3] KEYWORD "var" 1:4
[4] IDENTIFIER "x" 1:8
[5] COLON ":" 1:9
[6] IDENTIFIER "Float" 1:11
// ... 47 more tokens
Microsecond-level analysis for Swift files under 5MB.
⚡ Benchmarks measured on Apple M2 Pro with 16GB unified memory. Performance scales with GPU compute units. Optimized for Apple Silicon architecture.
MiniSwift is currently in private research and development. Public builds, documentation, and source code will be released when the project reaches a stable milestone.
Watch on GitHubMiniSwift is an independent research project created by TLabs and developed at TLabs in Türkiye.
The goal is to explore modern compiler design, GPU-accelerated parsing, and new execution models for Swift-like languages. This is pure research — no commercial agenda, no enterprise roadmap. Just engineering exploration.