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.

addModule

Creates a module from the translated source and adds it to the package's module set making it available to other packages which depend on this one. createModule can be used instead to create a private module.

TranslateC.addModule
pub fn addModule(translate_c: *TranslateC, name: []const u8) *std.Build.Module

File

lib/std/Build/Step/TranslateC.zig:64

Code

pub fn addModule(translate_c: *TranslateC, name: []const u8) *std.Build.Module {
    return setUpModule(translate_c, translate_c.step.owner.addModule(name, .{
        .root_source_file = translate_c.getOutput(),
        .target = translate_c.target,
        .optimize = translate_c.optimize,
        .link_libc = translate_c.link_libc,
    }));
}