Skip to content

SafeCSafe, Deterministic Systems Programming

A region-aware evolution of C with compile-time memory safety, zero hidden costs, and full C ABI compatibility.

Hello, SafeC

c
extern int printf(const char* fmt, ...);

region AudioPool { capacity: 65536 }

struct Sample {
    float left;
    float right;
};

int main() {
    // Arena allocation — deterministic, no malloc
    &arena<AudioPool> Sample s = new<AudioPool> Sample;
    s.left = 0.5;
    s.right = -0.3;

    printf("L=%.2f R=%.2f\n", s.left, s.right);
    arena_reset<AudioPool>();
    return 0;
}

Released under the MIT License.