Hare
A systems programming language designed to be simple, stable, and robust, using manual memory management, a static type system, and the QBE compiler backend.
Created by Drew DeVault
Hare is a systems programming language designed to be simple, stable, and robust. Created by Drew DeVault (also known as “sircmpwn”), Hare uses a static type system, manual memory management, and a minimal runtime. It targets operating systems, system tools, compilers, networking software, and other low-level tasks.
History & Origins
Hare’s development began on December 27, 2019, when Drew DeVault committed the first prototype code. The language was developed privately for approximately two and a half years before being publicly announced on April 25, 2022. The prototype phase, which concluded in September 2020, produced around 15,000 lines of compiler code and 3,000 lines of standard library before the codebase was discarded and rewritten from scratch.
The Philosophy Behind Hare
DeVault has described Hare’s design philosophy as distilling proven systems programming techniques rather than pursuing experimental innovations. The goal is a “100-year language” — software built with Hare should be maintainable for decades. Key principles include:
- Simplicity - A conservative language design that avoids unnecessary complexity
- Stability - Aiming for long-term reliability over cutting-edge features
- Robustness - Tagged union-based error handling and non-null pointers by default
- Small footprint - The entire Hare toolchain fits on a 3.5-inch floppy disk
Compiler Architecture
Unlike many modern languages that use LLVM, Hare uses the QBE compiler backend — a lightweight alternative consisting of approximately 15,000 lines of C99 code. According to the Hare FAQ, QBE-generated code achieves roughly 25% to 75% of LLVM’s runtime performance depending on the workload (QBE’s own project page targets approximately 70% of industrial optimizing compilers), trading peak optimization for a dramatically smaller and more understandable toolchain. The compiler (harec) and build driver (hare) are both part of the toolchain. Hare does not link with libc by default, giving developers full control over their system interfaces.
Licensing
Hare is open source with a dual-license structure. The standard library uses the Mozilla Public License (MPL), meaning programs that use the standard library can be distributed under any license. The compiler and build driver use GPL 3.0. Development is hosted on SourceHut, with contributions submitted via git patches to the hare-dev mailing list.
Design Philosophy
Hare takes a deliberately conservative approach compared to other modern systems languages like Rust and Zig.
Manual Memory Management
Like C, Hare uses manual memory management. There is no garbage collector and no borrow checker. Developers are responsible for allocating and freeing memory:
| |
Tagged Unions for Error Handling
Hare uses tagged unions (sum types) for error handling, making it impossible to ignore errors without an explicit decision:
| |
The ! operator is the error assertion operator — it tells the compiler that the operation should not fail. If it does, the program aborts with a trace.
Non-Null Pointers by Default
Pointers in Hare are non-null by default. Nullable pointers must be explicitly opted into, reducing null pointer errors at the type system level.
Key Features
Cross-Platform Systems Programming
Hare officially supports Linux, FreeBSD, OpenBSD, NetBSD, and DragonFlyBSD on x86_64, aarch64, and riscv64 architectures. The project does not plan to support proprietary platforms like macOS or Windows.
No Hidden Complexity
Hare avoids features that add implicit behavior:
- No operator overloading
- No implicit type conversions
- No hidden memory allocations
- No preprocessor or macros
Comprehensive Standard Library
The standard library includes modules for I/O, networking, cryptography, date/time handling, and more. Some modules are adapted from Go’s standard library, particularly in the crypto package.
Hare vs Other Languages
Compared to C
- Better error handling - Tagged unions instead of error codes
- Non-null pointers - Nullable types are opt-in
- Reduced undefined behavior - Aims to eliminate many categories of undefined behavior present in C, though manual memory management means some classes (e.g., use-after-free) remain possible
- Modern syntax - Cleaner declaration syntax and type inference
Compared to Rust
- Simpler - No borrow checker, lifetime annotations, or complex type system
- Smaller - The entire toolchain is dramatically smaller
- Manual control - Trusts the programmer more, with fewer compile-time restrictions
- Fewer safety guarantees - Does not prevent data races or use-after-free at compile time
Compared to Zig
- More conservative - Fewer language features, simpler design
- QBE backend - Does not use LLVM, resulting in a smaller toolchain
- No comptime - Does not have Zig’s compile-time execution system
- Different targets - Focused on Unix-like systems only
Current State and Future
As of early 2026, Hare remains pre-1.0 with quarterly releases following a 0.YY.Q versioning scheme (where YY is the two-digit year and Q is the quarter, zero-indexed). The latest release is 0.25.2 (June 2025). The project has approximately twelve maintainers and around one hundred contributors.
The language is already being used to build real software including the Hermes microkernel (successor to the earlier Helios project) and various system utilities. The planned 1.0 release will represent a language freeze milestone, though no timeline has been announced.
Why Hare Matters
Hare represents a counterpoint to the trend of increasingly complex systems programming languages. While Rust adds sophisticated type-system features for safety and Zig innovates with comptime and integrated build systems, Hare deliberately limits itself to well-understood, proven techniques. For developers who want a simple, predictable language for systems programming on Unix-like platforms, Hare offers a focused alternative to C without the complexity of its more ambitious peers.
Timeline
Notable Uses & Legacy
Helios / Hermes
Helios was a capability-based microkernel for x86_64 written in Hare by Drew DeVault, inspired by seL4. Development was discontinued and succeeded by the Hermes microkernel (January 2026), also written in Hare.
Himitsu
A secret storage system and password manager that stores secrets as key/value pairs with SSH agent integration.
hare-ssh
An SSH library for Hare, used with Himitsu for secure credential management.
Language Influence
Influenced By
Running Today
Run examples using the official Docker image:
docker pull alpine:edgeExample usage:
docker run --rm -v $(pwd):/code alpine:edge sh -c "apk add --no-cache hare > /dev/null 2>&1 && cd /code && hare run hello.ha"