Compiling an app to a single binary - possible?

Dmitry Ponyatov dponyatov at gmail.com
Sun Nov 26 18:35:01 UTC 2023


> Theoretically possible but not really expected to and generally 
> does not give you much over simply distributing an archive. I'd 
> even discourage it because it makes impossible to delegate 
> handling of static assets to reverse proxy like nginx (which is 
> likely to do better job at it being specialized tool)

Is vibe-powered backend app really runs notably slower then 
`nginx` when serving static files?

I looked on D lang in web backend as a great alternative for 
mainstream servers such as `nginx` etc especially with its 
ability to serve files the the same rates or even more faster. 
Not for a large sites but mostly embedded application such as 
vending machines with local-only web&touch interface, or powerful 
SOHO routers and home automation controllers.

Putting all files into an executable also makes it available 
directly from RAM without any caching, so `sendfile` syscall can 
be just run for them with direct data pointer, almost without 
impacting on the app does anything else.



More information about the Digitalmars-d-learn mailing list