VOID Libraries

Use the library.
Build your own.

The standard library is written in VOID, and project library output can now package your own VOID code as a native static archive with stable exported C entry points.

Standard library surface

Collections built on the language, not hidden compiler magic.

The standard library uses VOID generics, interfaces, hashing/equality, enumeration, GC-managed references, and ordinary method binding. Collection initializer syntax lowers through normal Add(...) calls rather than a separate runtime path.

Current

List<T>

Resizable generic sequence with indexing, enumeration, managed-element tracing, and collection initializer support.

Current

Queue<T>

FIFO storage built as normal generic library code.

Current

Stack<T>

LIFO storage using the same generic/runtime model.

Current

Dictionary<TKey,TValue>

Generic hash lookup with resizing, removal, enumeration, and multi-argument collection initializer entries through Add(key, value).

Current

HashSet<T>

Generic set semantics using the dictionary-compatible hashing/equality model and collection initializer syntax.

Current

IEnumerable<T> / IEnumerator<T>

The shared iteration contract used by collections, foreach, and compiler-generated iterator state machines.

VOID library export
public static class MathApi
{
    [Export("void_math_add")]
    public static int Add(int left, int right)
    {
        return left + right;
    }
}
VOID consumer binding
public static class MathNative
{
    [Native("void_math_add")]
    public static unsafe extern int Add(int left, int right);
}

Project libraries

VOID projects can ship as native archives.

Set a project to "output": "library" and voidc build produces bin/lib<ProjectName>.a; publish produces the matching archive under publish/. Public static methods marked with [Export("symbol")] seed normal reachability, keep their stable native symbol, and reuse the existing scalar/string/pointer/native-struct and ref/out/in ABI. Library static initialization and managed static GC roots persist across repeated exported calls.

Initialization & GC

Collections participate in the completed initialization model.

Arrays and collections can be populated inline, stored in initialized instance/static members, contain nullable or managed values, and remain reachable through managed static GC roots. The language-completion integration regression exercises these paths together rather than as isolated syntax tests.

Collection initializer
Dictionary<string, int> scores = new()
{
    { "Alpha", 10 },
    { "Beta", 20 }
};

List<Node> nodes = new()
{
    new Node(10),
    new Node(20) { Score = default }
};