#first program binary size

1 messages · Page 1 of 1 (latest)

glass oxide
#

the default paramaters mean that it compiles in debug mode

boreal cosmos
#

^^ If you pass -OReleaseFast -fstrip (assuming you're using zig build-exe) you'll get a much smaller binary

#

(12K for me, using std.log.info for printing)

glass oxide
#

if you are gonna use a releasemode other than safe and ur going for size why not use -OReleaseSmall

boreal cosmos
#

good point!

#

(still 12k for me tho lol)

glass oxide
#

in general though, I reccomend using ReleaseSafe mode as ur release mode

#

unless you are really needing speed or size

#

that way any bug that happens will be much easier to debug

boreal cosmos
#

yeah, ReleaseSafe for release builds is a good place to start - if you find that's too slow or large in practice, that's when you should look at ReleaseSmall or ReleaseFast

glass oxide
#

std.fmt is currently rather large, so when you use a function that uses std.fmt.format such as std.log.info or writer().print u can expect a larger binary

#

again, not a huge deal in most cases

#

what's ur code

#

that ur compiling