Zig 0.17.0-dev (Split by item)

Shortcut keys
?
Show these tips
S
Focus search field
Esc
Clear focus & close tips
U
Jump to source code
↑
Move up in search results
↓
Move down in search results
↵
Go to active search result
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 standard library. Public Struct

CreateOptions

Public Struct
std.Build.Module.CreateOptions
pub const CreateOptions = struct

Unspecified options here will be inherited from parent Module when inserted into an import table.

Fields

root_source_file: ?LazyPath = null

This could either be a generated file, in which case the module contains exactly one file, or it could be a path to the root source file of directory of files which constitute the module. If null, it means this module is made up of only link_objects.

imports: []const Import = &.{}

The table of other modules that this module can access via @import. Imports are allowed to be cyclical, so this table can be added to after the Module is created via addImport.

target: ?std.Build.ResolvedTarget = null
optimize: ?std.builtin.Optimize = null
link_libc: ?bool = null

true requires a compilation that includes this Module to link libc. false causes a build failure if a compilation that includes this Module would link libc. null neither requires nor prevents libc from being linked.

link_libcpp: ?bool = null

true requires a compilation that includes this Module to link libc++. false causes a build failure if a compilation that includes this Module would link libc++. null neither requires nor prevents libc++ from being linked.

single_threaded: ?bool = null
strip: ?bool = null
unwind_tables: ?std.builtin.UnwindTables = null
dwarf_format: ?std.dwarf.Format = null
code_model: std.builtin.CodeModel = .default
stack_protector: ?bool = null
stack_check: ?bool = null
sanitize_c: ?std.zig.SanitizeC = null
sanitize_thread: ?bool = null
fuzz: ?bool = null
valgrind: ?bool = null

Whether to emit machine code that integrates with Valgrind.

pic: ?bool = null

Position Independent Code

red_zone: ?bool = null
omit_frame_pointer: ?bool = null

Whether to omit the stack frame pointer. Frees up a register and makes it more difficult to obtain stack traces. Has target-dependent effects.

error_tracing: ?bool = null
no_builtin: ?bool = null

File

Build/Module.zig:190
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
pub const CreateOptions = struct {
    /// This could either be a generated file, in which case the module
    /// contains exactly one file, or it could be a path to the root source
    /// file of directory of files which constitute the module.
    /// If `null`, it means this module is made up of only `link_objects`.
    root_source_file: ?LazyPath = null,

    /// The table of other modules that this module can access via `@import`.
    /// Imports are allowed to be cyclical, so this table can be added to after
    /// the `Module` is created via `addImport`.
    imports: []const Import = &.{},

    target: ?std.Build.ResolvedTarget = null,
    optimize: ?std.builtin.Optimize = null,

    /// `true` requires a compilation that includes this Module to link libc.
    /// `false` causes a build failure if a compilation that includes this Module would link libc.
    /// `null` neither requires nor prevents libc from being linked.
    link_libc: ?bool = null,
    /// `true` requires a compilation that includes this Module to link libc++.
    /// `false` causes a build failure if a compilation that includes this Module would link libc++.
    /// `null` neither requires nor prevents libc++ from being linked.
    link_libcpp: ?bool = null,
    single_threaded: ?bool = null,
    strip: ?bool = null,
    unwind_tables: ?std.builtin.UnwindTables = null,
    dwarf_format: ?std.dwarf.Format = null,
    code_model: std.builtin.CodeModel = .default,
    stack_protector: ?bool = null,
    stack_check: ?bool = null,
    sanitize_c: ?std.zig.SanitizeC = null,
    sanitize_thread: ?bool = null,
    fuzz: ?bool = null,
    /// Whether to emit machine code that integrates with Valgrind.
    valgrind: ?bool = null,
    /// Position Independent Code
    pic: ?bool = null,
    red_zone: ?bool = null,
    /// Whether to omit the stack frame pointer. Frees up a register and makes it
    /// more difficult to obtain stack traces. Has target-dependent effects.
    omit_frame_pointer: ?bool = null,
    error_tracing: ?bool = null,
    no_builtin: ?bool = null,
}