Thursday, November 5, 2026
HomeGolangIntroducing Hike: Another Go compiler carried out 100% in Go, for zero-runtime,...

Introducing Hike: Another Go compiler carried out 100% in Go, for zero-runtime, tiny Wasm, and Cgo-free native libraries – Releases


Hello everybody,

Hike is an alternate Go compiler carried out 100% in Go.

The truth is, a big quantity of normal Go supply code already compiles immediately with Hike right this moment.

Why construct one other Go compiler? Go is phenomenal for backends and community providers, however normal Go’s runtime assumptions (GC, M:N scheduler, and Cgo mechanics) make sure low-level, performance-critical domains structurally troublesome. Hike was constructed to not exchange Go or fork the group, however to resolve particular architectural bottlenecks that the official toolchain can not simply handle.

The Actual-World Friction Hike Solves

  1. Prompt, Zero-Overhead C-ABI Calls: Calling C through Cgo incurs substantial overhead (goroutine stack switching, sign dealing with, scheduler interplay) and severely impairs seamless cross-compilation.

  2. Tiny Wasm Payloads with Zero Heap Drift: Normal Go Wasm binaries bundle the runtime and GC, simply ballooning to a number of megabytes and producing regular heap allocation.

  3. Packaging Complicated Native Desktop/Graphics Libraries: Dynamic extraction tips (like dropping embedded .dll/.so recordsdata to /tmp at runtime) are more and more blocked by trendy enterprise AV/EDR software program or hardened noexec mounts.

Core Capabilities

1. Direct C-ABI Calling & Native Shared Library Era

In Hike, calling native C capabilities requires zero glue code, wrapper layers, or Cgo. You merely write normal Go-style perform declarations:

Go

// Direct C-ABI name lowered to a local machine instruction
func abs(n int32) int32

Hike additionally compiles immediately into native shared libraries (.so / .dll), mechanically producing full, fully-typed C++ header recordsdata prepared for exterior toolchains.

2. Extremely-Light-weight WebAssembly (From 1.4KB, Zero Heap Overhead)

When concentrating on WebAssembly, Hike emits clear, compact binaries:

  • Base binary sizes begin at ~1.4KB.

  • Executes 10,000+ steady perform calls with zero heap reminiscence development, making certain rock-solid predictability.

  • Contains a built-in DWARF emitter, offering step-through line debugging immediately inside Chrome DevTools with out counting on heavy exterior toolchains.

3. Cgo-Free Static Linking through .sxso

Hike leverages Go’s native static object specification (.sxso). By automating the bridge between prebuilt C++/Rust static archives and .sxso objects, Hike permits seamless, Cgo-free static compilation inside normal Go tasks.

We have now already used this system to ship absolutely working, Cgo-free Go bindings for main trendy GUI and system libraries:

  • Slint (Declarative UI framework)

  • wgpu (WebGPU native implementation)

  • winit (Cross-platform window creation)

  • SDL3

A Complementary Device for Gophers

Hike shouldn’t be an adversarial mission. It’s a complementary instrument designed to increase what Go builders can construct, permitting them to carry Go’s clear syntax and engineering effectivity into domains the place heavy runtimes can not survive: microcontrollers, edge nodes, real-time GUI functions, and bandwidth-constrained Wasm sandboxes.

The mission is totally open supply:
:backhand_index_pointing_right: GitHub:
GitHub – kanryu/hike-lang: A zero-overhead methods language uniting Go ergonomics with bare-metal efficiency: zero-GC, direct C-ABI, and ultra-lightweight, WASI-free WebAssembly (regular & concurrent). · GitHub

I welcome all suggestions, critique, and technical discussions from the group!

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments