This is just a fun project providing a single html file. It is nowhere complete nor tested. Use for education purposes only.
An io_uring implementation of an asynchronous tcp/http server. The only dependency of this server is the linux kernel (5.19+) and liburing.
A release build should only be around 23kb.
Runs only on Linux. If you are on windows, use WSL2. Be sure you have liburing-dev
installed.
cmake -DCMAKE_BUILD_TYPE=Release . && cmake --build . && ./iouring_server
Browse to localhost:3333
.
Because the server allocates almost all memory it requires on startup a large enough locked_memory must be supplied.
See server.c
defines to control the required allocation size.
limit=8413752832 && sudo prlimit --memlock=$limit:$limit --pid $$
can be used to increase the memlock limit. Adjust the value you need depending on your configuration.