# Home

<div align="center"><figure><img src="/files/3xKPHcd8UVRpi7q0w502" alt="" width="188"><figcaption></figcaption></figure></div>

<h2 align="center"><strong>C23</strong> WITHOUT THE FOOT-GUNS</h2>

<p align="center">The modern standard library for architectural rigor. No <code>malloc</code>. No <code>printf</code>. No undefined behavior. Just strict, deterministic systems engineering.</p>

<p align="center"><a href="/spaces/CPn7kaSBOUvXM1XpYxVi" class="button primary" data-icon="gitbook">Documentation</a> <a href="https://github.com/tarantula-org/camelot" class="button secondary" data-icon="github">GitHub</a></p>

{% columns %}
{% column %}
**❌ The Legacy Way**

```c
void legacy_main() {
    char *name = malloc(1024); // Heap allocation?
    printf("Name: ");
    scanf("%s", name);         // Buffer overflow risk
    
    // Forgot to free(name) -> Memory Leak
}
```

{% endcolumn %}

{% column %}
**✅ The Camelot Standard**

```c
#include <camelot.h>

void main() {
    // 1. RAII Workspace (Auto-free)
    Workspace ctx = arena.create(1024);

    // 2. Buffer-Safe Input (Slice)
    io.print("Name: ");
    String name = io.scan(&ctx, 0);

    // 3. Type-Safe Output
    io.print("Hello, %S\n", name);

} // Memory released automatically here.
```

{% endcolumn %}
{% endcolumns %}

<h3 align="center">Philosophy</h3>

<table data-view="cards"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Memory Sovereignty</strong></td><td>We replace manual <code>free()</code> with Linear Allocators (Arenas). All memory belongs to a scoped Workspace. When the scope ends, the memory vanishes. Mathematically leak-proof.</td></tr><tr><td><strong>String Theory</strong></td><td>Camelot Strings are Slices (<code>ptr</code> + <code>len</code>). They know their own size. Substring operations are O(1). Buffer overflows are structurally impossible.</td></tr><tr><td><strong>Ecosystem Interoperability</strong></td><td>Full <code>extern "C"</code> linkage guards allow Camelot to function as a static library within C++ engines.</td></tr></tbody></table>

<h3 align="center">Statistics</h3>

{% columns %}
{% column %}

<h4 align="center"><mark style="color:$warning;">0 Dependencies</mark></h4>

{% endcolumn %}

{% column %}

<h4 align="center"><mark style="color:$success;"><strong>&#x3C;1s Compile Time</strong></mark></h4>

{% endcolumn %}

{% column %}

<h4 align="center"><mark style="color:blue;">100% Static Analysis Pass</mark></h4>

{% endcolumn %}

{% column %}

<h4 align="center"><mark style="color:yellow;">ASC-1.3 Strict Contribution Standard</mark></h4>

{% endcolumn %}
{% endcolumns %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://camelot-1.gitbook.io/docs/home.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
