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 Function

setPreopen

Public Function
std.Build.Step.Run.setPreopen
pub fn setPreopen(run: *Run, name: []const u8, resource: Build.LazyPath) void

Params

  • run: *Run
  • name: []const u8
  • resource: Build.LazyPath

File

Build/Step/Run.zig:680
680
681
682
683
684
685
686
687
688
689
690
pub fn setPreopen(run: *Run, name: []const u8, resource: Build.LazyPath) void {
    const graph = run.step.owner.graph;
    const wc = &graph.wip_configuration;
    const arena = graph.arena;
    resource.addStepDependencies(&run.step);
    run.preopens.put(
        arena,
        wc.addString(name) catch @panic("OOM"),
        resource.dupe(graph),
    ) catch @panic("OOM");
}