Skip to content

ARC-based systems programming with native compilation, classes, modules, overloads, and optional unsafe code.

Install

Install the latest Zap release

Click the command to copy it, then paste it into your terminal to fetch the latest Linux x86_64 release and run the bundled installer.

ARC and weak refs

Heap-owned classes use ARC, support deinit(), and can break cycles with weak, alive(), and lock().

Classes and inheritance

Zap supports heap-only classes, instance methods, visibility modifiers, single inheritance, and dynamic dispatch.

Modules and stdlib

Import local modules or std/… modules for IO, strings, process, filesystem, paths, math, memory, and conversions.

Structured low-level access

Raw pointers, casts, manual allocation, and pointer arithmetic are available behind explicit unsafe.

Practical syntax

Structs, enums, aliases, arrays, references with ref, ternary expressions, overloads, named args, and varargs.

Native pipeline

The compiler uses an LLVM backend and can emit executables, object files, textual LLVM IR, or ZIR.

Zap aims for systems-level control without forcing you into a garbage collector or making everything manual from day one. The language already focuses on a few concrete strengths:

  • deterministic ARC for object lifetimes
  • expressive data modeling with structs, enums, and classes
  • a small but useful standard library
  • optional unsafe when you need raw pointers or manual allocation
  • native compilation through zapc
  • Start with syntax and core language in the Basics and Data model sections.
  • Move to Object model for classes, ARC, and weak references.
  • Use the Standard library section for module-by-module docs with examples.