Vibeleaderboard
Index / tool
Visit github.com
Category
Developer Tools
Rank
No. 1274Tools index
Type
TOOL
Use case
Coding
GitHub
100 stars
Date

About

Hike is a systems programming language with Go-like syntax that compiles to native code and WebAssembly without a garbage collector, targeting Windows, Linux, and WASM with a direct C-ABI and lightweight, WASI-free WebAssembly output for both normal and concurrent execution.

At a glance

Hike is a systems language with Go-like syntax that compiles to native code or WebAssembly. It is worth exploring if you want to try the same small library through a C interface and in a browser.

Good fit

Compiler and systems developers who can manage separate native and Wasm build paths.

Consider something else when

Choose a mature language if you need an established package ecosystem or broad production support.

Start here

Pick a small arithmetic function and compile it for both targets. Compare outputs and verify how the native caller handles types and memory.

Cost and requirements

MIT-licensed. The project documents a Go-based compiler and target toolchains involving LLVM or WebAssembly tooling.

Limits to know

Native and Wasm targets have different toolchain and interop requirements. The source’s GPU and AI examples use external APIs and a C wrapper.

Read the source review

What it does

Hike is a new language you write much like Go, but its compiler, itself written in Go, produces plain machine code or WebAssembly with no garbage collector behind it. One path hands the program to the LLVM toolchain for optimized builds. A second path writes WebAssembly text directly, which is what lets you set breakpoints on your own Hike lines inside Chrome's developer tools. It can also emit C-compatible libraries with matching headers, or object files that a Go program links in without cgo, Go's usual and slower bridge to C.

Why it's ranked here

This is a working compiler with unusual reach, not a syntax sketch. The repository ships a command-line driver with seven subcommands (build, run, get, tool, go bindings, IR output, JavaScript runtime output), a language server, a VS Code extension, a module system with dependency fetching, and source-level debugging for both native and browser targets. It is MIT licensed. The README is candid that it is under active development, that memory designs are still moving, and that running the self-hosted compiler as WebAssembly is unvalidated. Treat it as a serious experiment worth tracking, not yet a production dependency.

What's good

Browser debugging is the standout. Build with one debug flag and Chrome shows your original Hike source with breakpoints, locals and return values, with the JavaScript glue generated for you instead of an Emscripten or wasm-bindgen setup. The Go integration is documented down to register order: it explains which arguments land in which registers on Windows x64 and why the stack-probe call has to be disabled. Memory control is explicit and opt-in, with a region mode that frees groups of allocations in one step and scoped blocks that release everything at exit.

Tradeoffs

The setup is heavy: Go, Clang and LLVM 15 or newer, MinGW on Windows, WABT, Wasmtime, and Python 3.8 for the integration tests. The README asks for Go 1.21 or newer while the module file declares Go 1.22.0. Only Windows and Linux are listed as verified, although the compiler defaults to an Apple Silicon target on macOS. The IR command quietly skips flags it does not recognise, so a typo produces no error. Many source comments and the concurrency example's output are in Japanese. The fast Go call path runs on a goroutine stack of roughly 2 KB, and the docs warn that large locals there corrupt memory silently.

How to use it well

Reach for Hike when you want Go-shaped code that compiles to small WebAssembly you can actually debug in the browser, or a hot leaf function that a Go service calls without cgo overhead. Keep those functions small and allocation-free, because that path cannot call the C standard library and buffers must come from the Go side. It is a weaker fit for teams that need macOS as a supported platform, a stable language surface, or a large standard library; the examples cover HTTP, JSON and async tasks, which is a starting set rather than an ecosystem.

Technical notes+

cmd/hikec/main.go dispatches go, emit-ir, emit-js, build, run, tool and get, and any unrecognised first argument falls through to emit-ir. In runEmitIR, -cflags is consumed and discarded, and any other unknown dash-prefixed flag is skipped without a warning; -wasm-mode is validated to normal or concurrent. getDefaultTargetName maps darwin to arm64-apple-darwin and everything non-Windows to x86_64-unknown-linux-gnu. The wabt target routes through CompileToWAT and writes the generated JavaScript runtime beside the output. cmd/hike-lsp/main.go is a stdin/stdout language server wrapper. go.mod names the module hikec-go at go 1.22.0 with wasmtime-go v48 as its only, indirect, requirement. pkg/mod/mod.go parses hike.mod line by line (module, hike, require, tool, replace, nested package/target blocks with link:, assets: and hike-object:) and picks the longest matching replace prefix. docs/index.md specifies the cgo-free path: clang -O2 -mno-stack-arg-probe emits a .syso object, and passthrough cfunc stubs are marked NOSPLIT.

Observed

License
MIT (README badge)
Implementation language
Go; go.mod declares go 1.22.0, README lists Go 1.21+
Compiler backends
LLVM IR via Clang/LLVM 15+, and direct WAT via WABT wat2wasm
Output types
Native executables, C-ABI shared libraries with generated headers, WebAssembly modules, Go-linkable objects
Interfaces
hikec CLI with go, emit-ir, emit-js, build, run, tool and get subcommands; language server; VS Code extension
Verified platforms
Windows and Linux with Clang/LLVM, plus browser and Node.js WebAssembly (per README)
Debugging
DWARF for GDB, LLDB and VS Code; Wasm DWARF and source maps for Chrome DevTools
Memory model
No garbage collector; optional region allocation and scoped area blocks
Unknown CLI flags
Silently skipped by the emit-ir command (cmd/hikec/main.go)
Go integration constraint
Functions compiled for cgo-free linking cannot call libc (docs/index.md)

Read from README.md, go.mod, docs/index.md, cmd/hikec/main.go, cmd/hike-lsp/main.go, pkg/mod/mod.go, examples/http/main.hike, examples/concurrent/main.hike, examples/wasm/main.hike, examples/json/main.hike.

Tags

programming-languagewasmsystems-programminggozero-gcllvm

Tech Stack

Go

Comments (0)

No comments yet

Editorially curated, with community endorsements as a secondary signal. Corrections welcome.