Running a website using a 1.3MB self-contained executable
Andrea Fontana
nospam at example.com
Sun Jan 19 21:17:29 UTC 2025
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
More information about the Digitalmars-d
mailing list