Introducing Hare: A New System Programming Language for Low‑Level High‑Performance Development
Hare is a newly announced system programming language by Drew DeVault that combines a static type system, manual memory management, and a minimal runtime to target operating systems, system tools, compilers, and other high‑performance low‑level tasks, with C‑like syntax but greater simplicity.
Developer Drew DeVault announced Hare, a new system programming language designed for operating systems, system tools, compilers, and other low‑level high‑performance tasks. Hare has been under development for about two and a half years and features a static type system, manual memory management, and a minimal runtime.
According to DeVault, Hare is syntactically close to C, allowing most C programs to be rewritten in Hare, but it aims to be simpler than C.
Hare Hello World example:
use fmt;
export fn main() void = {
const greetings = [
"Hello, world!",
"¡Hola Mundo!",
"Γειά σου Κόσμε!",
"Привет, мир!",
"こんにちは世界!",
];
for (let i = 0z; i < len(greetings); i += 1) {
fmt::println(greetings[i])!;
};
};Hare can also compute its own SHA‑256 hash:
use crypto::sha256;
use encoding::hex;
use fmt;
use hash;
use io;
use os;
export fn main() void = {
const hash = sha256::sha256();
const file = os::open("main.ha")!;
defer io::close(file);
io::copy(&hash, file)!;
let sum: [sha256::SIZE]u8 = [0...];
hash::sum(&hash, sum);
hex::encode(os::stdout, sum)!;
fmt::println()!;
};Hare is built on the qbe compiler backend, offering good performance while keeping its footprint small.
Current projects using Hare
Himitsu – a key management and password storage tool.
Helios – an x86_64 microkernel.
box – a simple CLI encryption utility.
btqd – a BitTorrent daemon.
hare‑libui – libui bindings for simple GUIs.
OpenGL bindings are in progress, already powering small games such as a Tetris clone, and a simple ray‑tracer demo has been created with Hare.
Standard library
The Hare standard library provides components without external dependencies, including cryptography suites, networking, comprehensive date/time handling, I/O and filesystem abstractions, Unix primitives (poll, fnmatch, glob), POSIX extended regular expressions, and a parser and type checker.
This library allows Hare programs to run without linking against libc, avoiding POSIX and libc legacy issues.
Future roadmap
Development is currently conservative. The biggest priority for the standard library is completing cryptographic implementations, especially TLS 1.2 and TLS 1.3 support. Once version 1.0 is released, the language specification will be frozen and only backward‑compatible changes to the standard library will be made.
At present Hare supports three architectures – x86_64, aarch64, and riscv64 – with plans to add 32‑bit platforms and other architectures later. It currently runs on Linux and FreeBSD, with more OS ports planned.
More details can be found on the Hare roadmap: https://harelang.org/roadmap .
IT Services Circle
Delivering cutting-edge internet insights and practical learning resources. We're a passionate and principled IT media platform.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.