r/Compilers • u/KATO-Kanryu • 11h ago
Hike: A zero-overhead, Go-like systems language with dual LLVM/Wasm backends, deterministic memory, and full DWARF support
Hello r/Compilers,
I would like to share Hike, an open-source, zero-overhead systems programming language implemented in Go with a Go-inspired syntax, targeting both native machines (via LLVM) and WebAssembly.
It is backed by a test suite of over 1,000 compiler tests, proven stable, and is already running in production for commercial software in Japan.
Key Highlights & Motivation
While Go provides great developer productivity, its heavy runtime, garbage collector, and runtime calling conventions make it difficult to embed into ultra-constrained environments, bare-metal microcontrollers, or tiny WebAssembly modules.
Hike bridges this gap: it retains familiar Go-like ergonomics while stripping away the runtime completely.
- Zero-Runtime & Deterministic Footprint: Hike does not rely on a monolithic runtime or a tracing GC. It can emit WebAssembly binaries as small as 2KB. In our stress tests, executing API entry points over 10,000 times resulted in zero memory growth.
- Dual Backend Architecture:
- LLVM Backend: Produces optimized native code and native objects.
- Native Wasm/WABT Backend: Directly synthesizes structured WebAssembly (blocks, loops, branches) alongside full DWARF debug information. This enables source-level step debugging directly inside Google Chrome DevTools.
- Extreme Portability (MCU to GPGPU):
- Targets bare-metal microcontrollers like the Raspberry Pi Pico (RP2040).
- Architecture designed to support GPGPU compute environments including OpenCL and CUDA.
- High-Throughput / Large-Data Primitives:
To support memory-intensive, massive-traffic applications, Hike introduces first-class language constructs:
- Region/Area memory management for bulk allocations.
- Threadable & Concurrent variables for explicit, thread-safe data access.
- mmap-backed variables to operate directly on out-of-core data structures without manual syscall boilerplate.
Compiler Pipeline
The Hike compiler is structured around a High-Level Intermediate Representation (HIR) designed to preserve semantic intent before code generation:
- Frontend: Lexing, parsing, and type-checking Go-compatible syntax into HIR.
- Analysis: Escape analysis, ownership tracking, and lifetime inference for deterministic retain/release and region-based allocation.
- Emitter:
- Generates clean LLVM IR for heavy machine optimization.
- Generates clean, structured WebAssembly Text (WAT) preserving natural control flow (
block,loop,br) rather than flattening the control flow graph into state-machine dispatchers.
Status & Ecosystem
Hike is actively maintained, stable, and used in production environments. We are also experimenting with cgo-free interoperability (such as embedding Rust-based UI engines like Slint statically into Go using generated .syso objects and Plan 9 ABI bridges).
- Repository: https://github.com/kanryu/hike-lang
I would love to hear feedback, critique, and architectural insights from fellow compiler developers—especially regarding our structured Wasm emission, region memory abstractions, and non-GC systems language design.