Zig 0.17.0-dev (Split by item)

This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig library itself.

runtime_safety

Deprecated in favor of std.lang.Optimize.runtimeSafety, to be removed after 0.18.0

Returns whether the standard library has safety checks enabled. Callsites likely would rather know whether their own module's optimization mode (found via @import("builtin").optimize) has safety checks enabled.

debug.runtime_safety
pub const runtime_safety = builtin.mode.runtimeSafety()

File

lib/std/debug.zig:245

Code

pub const runtime_safety = builtin.mode.runtimeSafety()