I’ve published an example showcasing how to use serverino to serve a web server that generates QR codes, without any external dependencies (not even glibc) and without reading or writing any files to disk.
It’s a single file, 1.3MB in size, which you can try by downloading it from the project’s GitHub page: https://github.com/trikko/serverino-demo/ or by checking the result at https://test.andreafontana.it.
The file can run inside a Docker scratch container or completely isolated from the rest of the system with bwrap, and it works perfectly!
Using upx/gzexe size goes down to <500KB
If you want to try serverino:
█▀▀▀▀▀█ █▄▀ ███ ▄█▄ █▀▀▀▀▀█
█ ███ █ ▀█▄▄█▀█▄▄▄ █▄ █ ███ █
█ ▀▀▀ █ ▀▀▀▀ █▄▀ █▀ █ ▀▀▀ █
▀▀▀▀▀▀▀ ▀ ▀▄▀ █▄█ ▀ █ ▀▀▀▀▀▀▀
█▄▄█▀█▀▀██▄ ▄▀█▄▀█▄█▀█ ▄█ ██▀
▄▀▀ ▄▀ ▀▀ █ ██ ▄ █▄▄█▀▄▀ ▄
▄ ██ ▀██▄███▀▀▄█▄█▀ ██▄▄▄▄█
▄▀▄▄ ▄▀▄▄▀█▀▄▄█▀▄▀ █▀▀▀▄█ █ █
█▄▄ █▀▀▄ ▄ ▄▀ ▄ ▄ █▀▀ ▄▀▄▄
██ ▄▄ ▀▀▄▀▄███▀█▀ ▀█ ▄ ▀█▄ ▀
▀▀▀▀ ▀▀▀███▄▀█ █ ▀▄ █▀▀▀██▀▀
█▀▀▀▀▀█ █▀ ▄▄█ ▀▀█ ██ ▀ █▀ ▄
█ ███ █ █ ███▄██ ▀▀█▀▀▀▀ ▀█
█ ▀▀▀ █ ▄ ▀▀▀ █▀▀█ ▀▀▄█▀▄█▀█
▀▀▀▀▀▀▀ ▀ ▀▀▀▀ ▀▀ ▀ ▀
Andrea Fontana