Compiling an app to a single binary - possible?

Jacob Carlborg doob at me.com
Sat Nov 16 02:50:20 PST 2013


On 2013-11-15 16:27, Jacek Furmankiewicz wrote:
> One of the nice features of Go is that when you compile an app, it pulls
> in ALL the dependencies (i.e. the full SDK + all libraries your app
> depends on) and generates a single binary (around 2 MB for a Hello World
> app).
>
> This is extremely useful for deployment purposes, since it is so
> straightforward to just copy the app to multiple servers without having
> to worry if every one of them has all the required dependencies
> installed / updated, etc.
>
> Does D offer something similar (maybe via some dmd switches)?
>
> For example, If I am creating a vibe.d app, would I need to deploy the
> vibe.d libraries separately with my app on all the servers in production?

Note, if you have any assets you can use the import expression to bundle 
your assets:

http://dlang.org/expression.html#ImportExpression

-- 
/Jacob Carlborg


More information about the Digitalmars-d-learn mailing list