Build Mode

    To add standard build options to a file:

    build.zig

    This causes these options to be available:

    -Drelease-safe=[bool]

    -Drelease-fast=[bool]

    Optimizations on and safety off

    -Drelease-small=[bool]

    Size optimizations on and safety off

    • Fast compilation speed
    • Slow runtime performance
    • Large binary size
    • No reproducible build requirement

    Shell

    • Fast runtime performance
    • Safety checks disabled
    • Slow compilation speed
    • Large binary size
    • Reproducible build

    Shell

    • Medium runtime performance
    • Slow compilation speed
    • Large binary size
    • Reproducible build

    Shell

    • Medium runtime performance
    • Safety checks disabled
    • Slow compilation speed
    • Small binary size
    • Reproducible build

    See also: