94 kernel reference modules · 14 extension libraries · 6,833 reference entries

Kernel modules (3,143 references / 94 modules)

Foundation (487 references / 21 modules)

core

5
core.h

Version, ABI, module queries

features

0
features.h

Module compile-switch mapping (generated, no API)

error

27
error.h

Structured error objects and cause chains

error_format

1
error_format.h

Error formatting output

memory

15
memory.h

Heap-allocation chokepoint and allocator replacement

memory_debug

11
memory_debug.h

Allocation fault injection and leak detection

memory_stats

4
memory_stats.h

Process-level memory statistics

temp

17
temp.h

Zero-allocation arena scratch memory

string

83
string.h

The full string toolkit

regex

54
regex.h

Regex (compile, match, replace, sets)

pattern

37
pattern.h

Structured pattern matching ({name} captures)

charset

69
charset.h

Charsets and Unicode conversion

number

15
number.h

Number parsing and formatting

html

3
html.h

HTML entity encode/decode

template

32
template.h

Typed templates

codec

20
codec.h

Hex / Base64 / Percent codecs

compress

18
compress.h

Deflate / Inflate compression

math

20
math.h

Math utilities

hash

9
hash.h

Hash functions

random

39
random.h

PCG32 and cryptographically secure randomness

xid

11
xid.h

Distributed unique identifiers

Containers (434 references / 10 modules)

array

50
array.h

Dynamic arrays and pointer arrays

list

28
list.h

Doubly linked lists

buffer

23
buffer.h

Segmented buffers

slot_map

16
slot_map.h

Stable-index slot maps

avl

43
avl.h

AVL balanced trees

map

62
map.h

Hash maps and integer maps

set

34
set.h

Hash sets and set operations

stack

74
stack.h

The five-piece stack family

queue

46
queue.h

SPSC/MPSC/MPMC lock-free queues

pool

58
pool.h

Object pools and variable-size memory pools

Data layer (233 references / 5 modules)

value

143
value.h

xvalue dynamic values and COW containers

json

30
json.h

JSON parsing and serialization

xlon

36
xlon.h

The XLang Object Notation

jsonl

12
jsonl.h

JSON Lines reading and writing

xlonl

12
xlonl.h

XLON Lines reading and writing

Concurrency (328 references / 13 modules)

atomic

29
atomic.h

Atomic operations

spin

7
spin.h

Spinlocks

sync

48
sync.h

Mutex/cond/semaphore/rwlock/events

thread

22
thread.h

Threads and TLS

wait

3
wait.h

Waiting primitives

cancel

9
cancel.h

Cooperative cancellation

coroutine

51
coroutine.h

Stackful coroutines and schedulers

channel

42
channel.h

Go-style channels and Select

future

44
future.h

Future / Promise and combinators

future_bridge

8
future_bridge.h

Future bridges

executor

10
executor.h

Executor abstraction

task

36
task.h

Task pools and task groups

signal

20
signal.h

Cross-platform signal handling

Files & system (442 references / 10 modules)

file

97
file.h

File read/write, mapping, locking, atomic writes

vfs

31
vfs.h

Virtual file system

file_async

34
file_async.h

Asynchronous file I/O

path

32
path.h

Path parsing and manipulation

io

42
io.h

Reader / Writer abstractions

console

4
console.h

Console output

environment

4
environment.h

Environment variables

process

37
process.h

Process creation and management

logger

76
logger.h

Logging system

time

58
time.h

Time and time zones

Security (245 references / 4 modules)

asn1

27
asn1.h

ASN.1 / DER encode/decode

crypto

122
crypto.h

AES-GCM, ChaCha20, SHA, Ed25519, RSA

pem

7
pem.h

PEM encode/decode

x509

89
x509.h

Certificate parsing, path validation, CRL

TLS (268 references / 8 modules)

tls

140
tls.h

In-house TLS 1.2/1.3 protocol stack

tls_client

10
tls_client.h

TLS client configuration

tls_server

9
tls_server.h

TLS server configuration

tls_session

29
tls_session.h

TLS session management

tls_stream

52
tls_stream.h

TLS stream layer

tls_resume

7
tls_resume.h

Session resumption

tls_identity

13
tls_identity.h

TLS identities

tls_verify

8
tls_verify.h

TLS verification

Networking (377 references / 9 modules)

net

172
net.h

Addresses, engine, workers, buffer pools, ports

tcp

63
tcp.h

TCP streams

tcp_server

15
tcp_server.h

TCP servers

udp

73
udp.h

UDP datagrams

net_file

4
net_file.h

Network file transfer

net_frame

9
net_frame.h

Framing layer

net_interface

12
net_interface.h

Network interface queries

proxy

23
proxy.h

Proxy configuration

task_net

6
task_net.h

Network tasks

Web protocols (253 references / 14 modules)

http

59
http.h

HTTP semantic primitives

http1

25
http1.h

HTTP/1.1 parsing and encoding

http1_net

2
http1_net.h

HTTP/1.1 network binding

http1_tls

2
http1_tls.h

HTTP/1.1 TLS binding

http_connection

5
http_connection.h

HTTP connection management

http_decode

10
http_decode.h

HTTP decoders

http_encoding

12
http_encoding.h

HTTP encoding

http_expect

8
http_expect.h

Expect header

http_te

10
http_te.h

Transfer-Encoding

http_trailer

6
http_trailer.h

HTTP trailers

http_upgrade

10
http_upgrade.h

HTTP upgrade

websocket

57
websocket.h

WebSocket frame protocol

websocket_stream

38
websocket_stream.h

WebSocket streams

websocket_upgrade

9
websocket_upgrade.h

WebSocket upgrade

Extension libraries (2,846 references / 14 libraries)

xhttp

1036
70 reference modules

HTTP clients and servers

xssh

586
65 reference modules

SSH2 protocol primitives and client runtime

xacme

61
14 个参考模块

ACME certificate issuance and management. Five cloud DNS providers, EAB, propagation confirmation, and one-call Obtain.

xjwt

28
xjwt.h

JWT/JWS signing and verification. HS/RS/ES families and JWKS key sets with kid-based selection.

xoauth2

32
xoauth2.h

OAuth2 client and OIDC application composition. Auth code, PKCE, token refresh and introspection.

xllm

100
xllm.h

Single model calls, streaming and provider adapters. OpenAI-compatible/Anthropic/Responses dialects, transport retry and usage stats.

xllm-session

77
xllm-session.h

Session ledger, budgets, compaction and persistence. Context budgets, turn windows and JSONL archival.

xwork

71
xwork.h

Agent loop, tool execution and approval. Bounded tool loop, sub-agent delegation and the unified task system.

xruntime

442
17 reference modules

Dynamic types and object system

xmail

280
33 reference modules

SMTP/IMAP/POP3 mail protocols

xws

133
5 reference modules

WebSocket runtime

Naming conventions and the error model

Library-wide conventions: functions are xrt + module prefix + PascalCase (e.g. xrtHttp1RequestParse); types are lowercase with an x prefix (xnetstream, xhttpcall); constants are all-caps. Headers are trimmed via XRT_MODULE_* / XHTTP_MODULE_* macros; dependency assertions are enforced with #error.

Error handling is a four-layer model: the parsing layer returns offset-carrying error structures (xhttp1errorinfo); the network layer uses the result code xnetresult to separate errors from control flow (AGAIN / CLOSED / TIMEOUT / CANCELLED); the runtime layer uses thread-level structured errors xrtGetError / xrtSetError (with domains, operation names, and the cause chain xrtErrorWrap); the async layer uses xwaitresult.

The most authoritative reference is always the headers themselves (commented, module-trimmed, with complete dependency assertions):

This reference targets XRT 2.0.0-dev. Interfaces are organized by module; reading them alongside header comments and repository examples builds the full calling picture fastest.