KEEL 1.0.0
Minimal C11 HTTP client/server library built on epoll/kqueue/io_uring/poll
Loading...
Searching...
No Matches
keel.h
Go to the documentation of this file.
1
12#ifndef KEEL_H
13#define KEEL_H
14
15/* ── W^X / no-runtime-codegen invariant ────────────────────────────────
16 *
17 * Keel is structurally W^X: it contains no JIT, no `dlopen`, no
18 * `mmap PROT_EXEC`, no `memfd_create`, no `MAP_JIT`. The HTTP/2,
19 * WebSocket, multipart, and URL parsers all operate on heap + stack
20 * memory only; libFuzzer targets in `fuzz/` exercise these paths.
21 *
22 * Keel does not own a process boundary — W^X enforcement at the
23 * kernel-sandbox layer (seccomp / Seatbelt / Hardened Runtime) is the
24 * host application's responsibility. See SECURITY.md for the host
25 * policy Keel composes under.
26 *
27 * The macros below are reserved opt-in flags. We do not define them;
28 * any future configuration that turns one on must clear this guard
29 * and intentionally weaken Keel's posture. The build fails until
30 * that happens, so the policy violation cannot land silently. */
31#if defined(KEEL_ENABLE_JIT)
32#error "Keel's W^X policy forbids runtime JIT (KEEL_ENABLE_JIT)."
33#endif
34#if defined(KEEL_ENABLE_DYNAMIC_CODE)
35#error "Keel's W^X policy forbids runtime dynamic code (KEEL_ENABLE_DYNAMIC_CODE)."
36#endif
37#if defined(KEEL_ENABLE_DLOPEN)
38#error "Keel's W^X policy forbids dlopen (KEEL_ENABLE_DLOPEN)."
39#endif
40
42#define KL_VERSION_MAJOR 1
44#define KL_VERSION_MINOR 2
46#define KL_VERSION_PATCH 0
48#define KL_VERSION_STRING "1.2.0"
49
52#include <keel/error.h>
53#include <keel/allocator.h>
54#include <keel/event.h>
55#include <keel/event_ctx.h>
56#include <keel/request.h>
57#include <keel/body_reader.h>
59#include <keel/chunked.h>
60#include <keel/parser.h>
61#include <keel/response.h>
62#include <keel/router.h>
63#include <keel/tls.h>
64#include <keel/h2.h>
65#include <keel/h2_server.h>
66#include <keel/h2_client.h>
67#include <keel/file_io.h>
68#include <keel/connection.h>
69#include <keel/server.h>
70#include <keel/cors.h>
71#include <keel/websocket.h>
74#include <keel/async.h>
75#include <keel/thread_pool.h>
76#include <keel/url.h>
77#include <keel/resolver.h>
78#include <keel/resolver_cache.h>
79#include <keel/client.h>
80#include <keel/client_pool.h>
81#include <keel/redirect.h>
82#include <keel/compress.h>
83#include <keel/decompress.h>
84#include <keel/drain.h>
85#include <keel/sse.h>
86#include <keel/timer.h>
87
88#endif
HTTP/1.1 client (sync + async).
HTTP client connection pool.
Built-in CORS middleware.
Shared HTTP/2 protocol constants.
HTTP/2 client API.
Server-side HTTP/2 API.
HTTP redirect following (sync + async).
Shared WebSocket protocol constants and frame parser.
WebSocket client API.
Server-side WebSocket API.