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.
Zig › compiler/ › Maker/ › WebServer.zig › init
init
WebServer.init
pub fn init (opts : Options ) WebServer
File
Code
pub fn init (opts : Options ) WebServer {
// instead of threads, so that the web server can function in single-threaded builds.
comptime assert (!builtin .single_threaded );
assert (opts .base_timestamp .clock == base_clock );
return .{
.graph = opts .graph ,
.listen_address = opts .listen_address ,
.root_prog_node = opts .root_prog_node ,
.tcp_server = null ,
.serve_task = null ,
.base_timestamp = opts .base_timestamp .raw ,
.fuzz = null ,
.build_status = .init (.idle ),
.update_id = .init (0 ),
.runner_request_mutex = .init ,
.runner_request_ready_cond = .init ,
.runner_request_empty_cond = .init ,
.runner_request = null ,
.configured = null ,
};
}