Cloth Logo

Design simple, secure, and scalable systems with precision and control

  • Open source programming language developed by the Community
  • Designed for building secure and scalable systems
  • Emphasizes precision and control over system behavior
  • Robust standard library and ecosystem of tools for developers
Hero Image

Features

Deterministic

Cloth does not hide behavior behind runtimes or implicit systems. Execution is predictable, and the cost of every operation is visible.

Explicit Memory

Memory ownership is defined and enforced. Allocation, lifetime, and destruction are controlled directly by the developer.

Performant

Compiled with low-level control in mind, Cloth delivers consistent performance without sacrificing readability or structure.

Systems First

Built for infrastructure, backend services, and performance-critical environments where correctness and control matter most.

Why Cloth?

Most modern languages trade control for convenience. Hidden runtimes, implicit behavior, and layered abstractions make systems harder to reason about.

Cloth takes a different approach. Behavior is explicit, memory is owned, and execution is predictable. There are no hidden costs or invisible systems working against you.

It is designed for developers who need to understand their systems completely — not just use them.

Cloth is not trying to be everything. It is built to be correct, predictable, and under your control.

Cloth in practice

Clear file structure. Explicit declarations. Predictable execution.

module cloth.examples;

import cloth.io::{ println };

public class Main() {

    #Trait Prototype
    public func main() :> void maybe NullPtrException;

    public Main {
        main() => (error) {
            println("An error occurred: " + error.message);
        };
    }

    #Trait Implementation
    public func main() :> void maybe NullPtrException {
        const string[] greetings = [
            "Hello", "Hola", "Bonjour",
            "Ciao", "こんにちは", "안녕하세요",
            "Cześć", "Olá", "Здравствуйте",
            "Chào bạn", "您好", "Hallo",
            "Hej", "Ahoj", "سلام", "สวัสดี"
        ];

        for (i32 i = 0; i < greetings::LENGTH; i++) {
            string? greeting = greetings[i] maybe null;
            println(greeting ?? continue);
        }
    }
}

Designed to stay readable

Explicit structure

A Cloth source file is organized with a module declaration, imports, and a single top-level type. The layout is rigid by design.

Selective imports

Imports are precise. Bring in only the symbols you need instead of pulling an entire namespace into scope.

Typed declarations

Values and return paths are declared directly in the source, making intent and behavior obvious at a glance.

Deterministic entry

A public Main class provides a clear and predictable program entry model for tooling, builds, and execution.