The Prelude module contains commonly used functions and types that are imported implicitly into every module. Types Str A string type that owns its contents. Strings in Ante are null terminated and contain a length field. type Str = cStr:(ref c8) len:usz Examples s1 = "Hello" s2 = Str("Hello".cStr, 5usz) s3 = Str(strdup "hi", 2usz) Maybe ‘t Represents either the presence of a value with Some, or the absence of a value with None.

Continue reading


The Vec module contains the vector type, a container for a dynamically-allocated contiguous region of memory with constant time access and the ability to resize. Types Vec ‘t The main vector type exported by the module. type Vec 't = data: ref 't len: usz cap: usz Examples Creating a mutable empty Vec and pushing to it: v = mut empty Vec v.push 2 v.push 4 Creating a Vec from an array:

Continue reading


The Build module defines several useful functions for compiling and linking applications. It defines a DSL for building programs centered around the creation of targets. Each target represents a single output file and contains a list of dependencies and a build action. If any of its dependencies are changed the build action is executed. Although this build system is defined in Ante it can also be used to build programs for abitrary languages and has built-in support (automatic dependency management) for Ante, C, and C++.

Continue reading