lib/monkey/README.md
Monkey is a lightweight HTTP server for Linux written in C. It keeps the core small, favors predictable resource usage, and exposes a plugin-oriented architecture that works both as a standalone web server and as a reusable runtime foundation for HTTP-facing components.
The repository ships the monkey executable, the shared runtime in
mk_core/, the HTTP server implementation in mk_server/, optional plugins,
test targets, fuzzing entrypoints, and the default configuration and site
assets used by local builds.
Requirements:
Build:
cmake -S . -B build
cmake --build build
Run from the source tree with the bundled configuration:
./build/bin/monkey -c conf
Serve a directory without editing config files:
./build/bin/monkey -o htdocs
The generated binary is:
build/bin/monkey
Useful CMake toggles from the current build system:
MK_TLS=On|Off enable or disable TLS supportMK_TLS_BACKEND=auto|openssl|mbedtls choose the TLS backendMK_PLUGIN_CGI=OnMK_PLUGIN_FASTCGI=OnMK_PLUGIN_LOGGER=OnMK_PLUGIN_CHEETAH=OnMK_TESTS=On build native test targetsMK_HTTP2=On enable in-development HTTP/2 code pathsMK_DEBUG=On build with debug symbolsExample:
cmake -S . -B build \
-DMK_TESTS=On \
-DMK_PLUGIN_LOGGER=On \
-DMK_TLS=On
cmake --build build
Common command-line options:
-c, --configdir set the configuration directory-s, --serverconf choose the main server config file-p, --port override the listen port-w, --workers override the worker count-D, --daemon run in the background--https enable HTTPS on configured listeners-b, --build print build information-h, --help show the full command referenceConfiguration templates live under conf/. The default static site content for
local runs lives under htdocs/.
mk_core/ core utilities, memory, events, files, strings, and threadingmk_server/ HTTP server, scheduler, request lifecycle, headers, streams,
virtual hosts, and plugin integrationmk_bin/ executable entrypoints and signal handlinginclude/monkey/ public and internal headersplugins/ optional runtime featurestest/ native tests used by CMakefuzz/ fuzzing entrypoints and helpersqa/ request fixtures and QA materialconf/ configuration templateshtdocs/ default site assetsBuild test targets:
cmake -S . -B build -DMK_TESTS=On
cmake --build build
Additional notes:
Send changes through GitHub pull requests. Before opening one, read CONTRIBUTING.md and follow the commit style already used in the repository history: narrow scope prefixes, short lowercase subjects, and a proper body for non-trivial changes.
Monkey source files are licensed under the Apache License, Version 2.0.