diff --git a/public/openssf-badge.svg b/public/openssf-badge.svg new file mode 100644 index 0000000..24f014b --- /dev/null +++ b/public/openssf-badge.svg @@ -0,0 +1,6 @@ + + + + OpenSSF + PASSING + \ No newline at end of file diff --git a/public/openssf-logo.png b/public/openssf-logo.png new file mode 100644 index 0000000..e2bd9c2 Binary files /dev/null and b/public/openssf-logo.png differ diff --git a/public/openssf-passing.svg b/public/openssf-passing.svg new file mode 100644 index 0000000..bc7433e --- /dev/null +++ b/public/openssf-passing.svg @@ -0,0 +1 @@ +passingpassing \ No newline at end of file diff --git a/public/search.js b/public/search.js new file mode 100644 index 0000000..f9b3528 --- /dev/null +++ b/public/search.js @@ -0,0 +1,136 @@ +const pages = [ + { title: 'Introduction', section: 'Overview', href: '/docs/camelot/overview' }, + { title: 'Architecture', section: 'Overview', href: '/docs/camelot/overview/architecture' }, + { title: 'Memory Allocator', section: 'Overview', href: '/docs/camelot/overview/memory' }, + { title: 'Merlin Build Engine', section: 'Core Systems', href: '/docs/camelot/core/merlin' }, + { title: 'I/O Utilities', section: 'Core Systems', href: '/docs/camelot/core/io' } +]; + +document.addEventListener('DOMContentLoaded', () => { + const overlay = document.getElementById('search-overlay'); + const searchInput = document.getElementById('search-input'); + const resultsList = document.getElementById('search-results'); + const emptyMsg = document.getElementById('search-empty'); + const trigger = document.getElementById('search-trigger'); + + let activeIdx = -1; + let isOpen = false; + + if (overlay && searchInput && resultsList && emptyMsg && trigger) { + const openSearch = () => { + isOpen = true; + overlay.style.display = 'flex'; + searchInput.value = ''; + activeIdx = -1; + emptyMsg.style.display = 'none'; + renderResults(pages); + setTimeout(() => { searchInput.focus(); }, 50); + }; + + const closeSearch = () => { + isOpen = false; + overlay.style.display = 'none'; + searchInput.blur(); + }; + + const renderResults = (items) => { + resultsList.innerHTML = ''; + if (items.length === 0) { + emptyMsg.style.display = 'block'; + return; + } + emptyMsg.style.display = 'none'; + items.forEach((item, idx) => { + const li = document.createElement('li'); + li.className = 'search-result-item'; + + const a = document.createElement('a'); + a.href = item.href; + + const titleSpan = document.createElement('span'); + titleSpan.className = 'sr-title'; + titleSpan.textContent = item.title; + + const sectionSpan = document.createElement('span'); + sectionSpan.className = 'sr-section'; + sectionSpan.textContent = item.section; + + a.appendChild(titleSpan); + a.appendChild(sectionSpan); + li.appendChild(a); + + li.addEventListener('mouseenter', () => { + activeIdx = idx; + highlightResult(); + }); + + resultsList.appendChild(li); + }); + }; + + const highlightResult = () => { + const items = resultsList.querySelectorAll('.search-result-item'); + items.forEach((item, idx) => { + if (idx === activeIdx) { + item.classList.add('focused'); + } else { + item.classList.remove('focused'); + } + }); + }; + + trigger.addEventListener('click', (e) => { + e.preventDefault(); + e.stopPropagation(); + openSearch(); + }); + + document.addEventListener('keydown', (e) => { + if ((e.ctrlKey || e.metaKey) && e.key === 'k') { + e.preventDefault(); + openSearch(); + return; + } + if (!isOpen) return; + if (e.key === 'Escape') { + closeSearch(); + return; + } + const items = resultsList.querySelectorAll('.search-result-item'); + if (e.key === 'ArrowDown') { + e.preventDefault(); + activeIdx = Math.min(activeIdx + 1, items.length - 1); + highlightResult(); + const activeEl = items[activeIdx]; + if (activeEl) activeEl.scrollIntoView({ block: 'nearest' }); + } + if (e.key === 'ArrowUp') { + e.preventDefault(); + activeIdx = Math.max(activeIdx - 1, 0); + highlightResult(); + const activeEl = items[activeIdx]; + if (activeEl) activeEl.scrollIntoView({ block: 'nearest' }); + } + if (e.key === 'Enter' && activeIdx >= 0 && items[activeIdx]) { + const link = items[activeIdx].querySelector('a'); + if (link) window.location.href = link.href; + } + }); + + overlay.addEventListener('click', (e) => { + if (e.target === overlay) closeSearch(); + }); + + searchInput.addEventListener('input', () => { + const q = searchInput.value.toLowerCase().trim(); + const filtered = pages.filter(page => + !q || + page.title.toLowerCase().includes(q) || + page.section.toLowerCase().includes(q) + ); + activeIdx = filtered.length > 0 ? 0 : -1; + renderResults(filtered); + highlightResult(); + }); + } +}); diff --git a/src/layouts/CamelotDocsLayout.astro b/src/layouts/CamelotDocsLayout.astro index 2209dfc..9af418b 100644 --- a/src/layouts/CamelotDocsLayout.astro +++ b/src/layouts/CamelotDocsLayout.astro @@ -20,19 +20,19 @@ const currentPath = Astro.url.pathname; {frontmatter.title} | Camelot Docs - -
-
+
-
- - - Back to Software +

Camelot

+
+ + OpenSSF Best Practices: Passing + OpenSSF certification verifies adherence to secure software development and supply chain practices. +
+ +
+
+

+ Camelot is a core component toolkit for C applications. It provides structural alternatives to libc subsystems that expose implicit allocation behavior, utilizing memory arenas and strict compiler flags orchestrated by the Merlin build engine. +

+
-
-
-
-

C23 executed with precision.

-

Zero latency. Strict memory safety.

-

- Camelot is a C framework engineered for absolute predictability. It utilizes zero-latency memory arenas, strict standard compliance, and is entirely orchestrated by Merlin—a custom build engine designed to replace traditional archaic build systems. -

-
-
-
-
-
-
-
-
-
#include <camelot.h>
-
-int main(void) {
-    // Initialize deterministic memory pool
-    Arena *arena = ArenaInit(NULL, MEGABYTES(128));
-
-    // O(1) allocation without fragmentation
-    void *block = ArenaAlloc(arena, 1024);
+            
+
+

+ + Getting Camelot +

+

+ Clone the repository directly. The framework requires no external package dependencies. +

+
git clone https://github.com/yutila-org/camelot
+cd camelot
+make
+
- ArenaFree(&arena); - return 0; -}
-
-
-
+
+

+ + Documentation +

+

+ Comprehensive manuals covering the memory allocator, I/O utilities, and the Merlin build engine. +

+ + Read the Manual + +
-
-
-
-
- -
-

Merlin Orchestrator

-

Driven by Merlin, a standalone D build engine that dynamically manages GCC compilation, sanitizers, and parallel workflows.

-
-
-
- -
-

Memory Arenas

-

Complete avoidance of unmanaged `malloc`. Features localized deterministic memory pools for high-performance zero-latency data structures.

-
-
-
- -
-

Hardened Security

-

Compiled automatically with PIE, stack-protectors, and ASAN/UBSAN sanitizers to systematically prevent classical C vulnerabilities.

-
-
+

Core Features

+ + + + + + + + + + + + + + + + +
+
+ + Merlin Orchestrator +
+
Driven by Merlin, a standalone D build engine that dynamically manages GCC compilation, sanitizers and parallel workflows.
+
+ + Memory Arenas +
+
Requires explicit allocator pointers instead of unmanaged `malloc`. Features localized memory arenas for predictable memory management without implicit allocations.
+
+ + Strict Defaults +
+
Compiled automatically with PIE, stack protection and ASAN/UBSAN sanitizers to systematically constrain undefined behavior.
+ +
+ Installation Instructions +

The framework can be cloned and built directly without external package dependencies.

+
git clone https://github.com/yutila-org/camelot
+make
-
-
-
Build and execute with zero external dependencies.
-
-
-
-
-
-
-
-
# Clone the repository
-git clone https://github.com/yutila-org/camelot
-
-# Build standard profile (compiles via Merlin)
-make
-
-( ๑•̀⩊•́๑ ) < "Bootstrapping standalone Merlin Build Engine..."
-> Compiler: Compiling src/main.c -> obj/debug/main.o...
-> Linker: Linking obj/debug/main.o -> bin/camelot
-( ๑>ᴗ<๑ ) < "Build finished."
-
-
-
-
-