master
1pub const ArrayHashMap = array_hash_map.ArrayHashMap;
2pub const ArrayHashMapUnmanaged = array_hash_map.ArrayHashMapUnmanaged;
3pub const AutoArrayHashMap = array_hash_map.AutoArrayHashMap;
4pub const AutoArrayHashMapUnmanaged = array_hash_map.AutoArrayHashMapUnmanaged;
5pub const AutoHashMap = hash_map.AutoHashMap;
6pub const AutoHashMapUnmanaged = hash_map.AutoHashMapUnmanaged;
7pub const BitStack = @import("BitStack.zig");
8pub const Build = @import("Build.zig");
9pub const BufMap = @import("buf_map.zig").BufMap;
10pub const BufSet = @import("buf_set.zig").BufSet;
11pub const StaticStringMap = static_string_map.StaticStringMap;
12pub const StaticStringMapWithEql = static_string_map.StaticStringMapWithEql;
13pub const Deque = @import("deque.zig").Deque;
14pub const DoublyLinkedList = @import("DoublyLinkedList.zig");
15pub const DynLib = @import("dynamic_library.zig").DynLib;
16pub const DynamicBitSet = bit_set.DynamicBitSet;
17pub const DynamicBitSetUnmanaged = bit_set.DynamicBitSetUnmanaged;
18pub const EnumArray = enums.EnumArray;
19pub const EnumMap = enums.EnumMap;
20pub const EnumSet = enums.EnumSet;
21pub const HashMap = hash_map.HashMap;
22pub const HashMapUnmanaged = hash_map.HashMapUnmanaged;
23pub const Io = @import("Io.zig");
24pub const MultiArrayList = @import("multi_array_list.zig").MultiArrayList;
25pub const PriorityQueue = @import("priority_queue.zig").PriorityQueue;
26pub const PriorityDequeue = @import("priority_dequeue.zig").PriorityDequeue;
27pub const Progress = @import("Progress.zig");
28pub const Random = @import("Random.zig");
29pub const SemanticVersion = @import("SemanticVersion.zig");
30pub const SinglyLinkedList = @import("SinglyLinkedList.zig");
31pub const StaticBitSet = bit_set.StaticBitSet;
32pub const StringHashMap = hash_map.StringHashMap;
33pub const StringHashMapUnmanaged = hash_map.StringHashMapUnmanaged;
34pub const StringArrayHashMap = array_hash_map.StringArrayHashMap;
35pub const StringArrayHashMapUnmanaged = array_hash_map.StringArrayHashMapUnmanaged;
36pub const Target = @import("Target.zig");
37pub const Thread = @import("Thread.zig");
38pub const Treap = @import("treap.zig").Treap;
39pub const Tz = tz.Tz;
40pub const Uri = @import("Uri.zig");
41
42/// A contiguous, growable list of items in memory. This is a wrapper around a
43/// slice of `T` values.
44///
45/// The same allocator must be used throughout its entire lifetime. Initialize
46/// directly with `empty` or `initCapacity`, and deinitialize with `deinit` or
47/// `toOwnedSlice`.
48pub fn ArrayList(comptime T: type) type {
49 return array_list.Aligned(T, null);
50}
51pub const array_list = @import("array_list.zig");
52
53/// Deprecated; use `array_list.Aligned`.
54pub const ArrayListAligned = array_list.Aligned;
55/// Deprecated; use `array_list.Aligned`.
56pub const ArrayListAlignedUnmanaged = array_list.Aligned;
57/// Deprecated; use `ArrayList`.
58pub const ArrayListUnmanaged = ArrayList;
59
60pub const array_hash_map = @import("array_hash_map.zig");
61pub const atomic = @import("atomic.zig");
62pub const base64 = @import("base64.zig");
63pub const bit_set = @import("bit_set.zig");
64pub const builtin = @import("builtin.zig");
65pub const c = @import("c.zig");
66pub const coff = @import("coff.zig");
67pub const compress = @import("compress.zig");
68pub const static_string_map = @import("static_string_map.zig");
69pub const crypto = @import("crypto.zig");
70pub const debug = @import("debug.zig");
71pub const dwarf = @import("dwarf.zig");
72pub const elf = @import("elf.zig");
73pub const enums = @import("enums.zig");
74pub const fmt = @import("fmt.zig");
75pub const fs = @import("fs.zig");
76pub const gpu = @import("gpu.zig");
77pub const hash = @import("hash.zig");
78pub const hash_map = @import("hash_map.zig");
79pub const heap = @import("heap.zig");
80pub const http = @import("http.zig");
81pub const json = @import("json.zig");
82pub const leb = @import("leb128.zig");
83pub const log = @import("log.zig");
84pub const macho = @import("macho.zig");
85pub const math = @import("math.zig");
86pub const mem = @import("mem.zig");
87pub const meta = @import("meta.zig");
88pub const os = @import("os.zig");
89pub const once = @import("once.zig").once;
90pub const pdb = @import("pdb.zig");
91pub const pie = @import("pie.zig");
92pub const posix = @import("posix.zig");
93pub const process = @import("process.zig");
94pub const sort = @import("sort.zig");
95pub const simd = @import("simd.zig");
96pub const ascii = @import("ascii.zig");
97pub const tar = @import("tar.zig");
98pub const testing = @import("testing.zig");
99pub const time = @import("time.zig");
100pub const tz = @import("tz.zig");
101pub const unicode = @import("unicode.zig");
102pub const valgrind = @import("valgrind.zig");
103pub const wasm = @import("wasm.zig");
104pub const zig = @import("zig.zig");
105pub const zip = @import("zip.zig");
106pub const zon = @import("zon.zig");
107pub const start = @import("start.zig");
108
109const root = @import("root");
110
111/// Stdlib-wide options that can be overridden by the root file.
112pub const options: Options = if (@hasDecl(root, "std_options")) root.std_options else .{};
113
114pub const Options = struct {
115 enable_segfault_handler: bool = debug.default_enable_segfault_handler,
116
117 /// Function used to implement `std.fs.cwd` for WASI.
118 wasiCwd: fn () os.wasi.fd_t = fs.defaultWasiCwd,
119
120 /// The current log level.
121 log_level: log.Level = log.default_level,
122
123 log_scope_levels: []const log.ScopeLevel = &.{},
124
125 logFn: fn (
126 comptime message_level: log.Level,
127 comptime scope: @EnumLiteral(),
128 comptime format: []const u8,
129 args: anytype,
130 ) void = log.defaultLog,
131
132 /// Overrides `std.heap.page_size_min`.
133 page_size_min: ?usize = null,
134 /// Overrides `std.heap.page_size_max`.
135 page_size_max: ?usize = null,
136 /// Overrides default implementation for determining OS page size at runtime.
137 queryPageSize: fn () usize = heap.defaultQueryPageSize,
138
139 fmt_max_depth: usize = fmt.default_max_depth,
140
141 cryptoRandomSeed: fn (buffer: []u8) void = @import("crypto/tlcsprng.zig").defaultRandomSeed,
142
143 crypto_always_getrandom: bool = false,
144
145 crypto_fork_safety: bool = true,
146
147 /// By default, std.http.Client will support HTTPS connections. Set this option to `true` to
148 /// disable TLS support.
149 ///
150 /// This will likely reduce the size of the binary, but it will also make it impossible to
151 /// make a HTTPS connection.
152 http_disable_tls: bool = false,
153
154 /// This enables `std.http.Client` to log ssl secrets to the file specified by the SSLKEYLOGFILE
155 /// env var. Creating such a log file allows other programs with access to that file to decrypt
156 /// all `std.http.Client` traffic made by this program.
157 http_enable_ssl_key_log_file: bool = @import("builtin").mode == .Debug,
158
159 side_channels_mitigations: crypto.SideChannelsMitigations = crypto.default_side_channels_mitigations,
160
161 /// Whether to allow capturing and writing stack traces. This affects the following functions:
162 /// * `debug.captureCurrentStackTrace`
163 /// * `debug.writeCurrentStackTrace`
164 /// * `debug.dumpCurrentStackTrace`
165 /// * `debug.writeStackTrace`
166 /// * `debug.dumpStackTrace`
167 ///
168 /// Stack traces can generally be collected and printed when debug info is stripped, but are
169 /// often less useful since they usually cannot be mapped to source locations and/or have bad
170 /// source locations. The stack tracing logic can also be quite large, which may be undesirable,
171 /// particularly in ReleaseSmall.
172 ///
173 /// If this is `false`, then captured stack traces will always be empty, and attempts to write
174 /// stack traces will just print an error to the relevant `Io.Writer` and return.
175 allow_stack_tracing: bool = !@import("builtin").strip_debug_info,
176};
177
178// This forces the start.zig file to be imported, and the comptime logic inside that
179// file decides whether to export any appropriate start symbols, and call main.
180comptime {
181 _ = start;
182}
183
184test {
185 testing.refAllDecls(@This());
186}
187
188comptime {
189 debug.assert(@import("std") == @This()); // std lib tests require --zig-lib-dir
190}