zig/lib/std
Andrew Kelley cfcf9771c1 zig build: support dependencies
The `zig build` command now makes `@import("@dependencies")` available
to the build runner package. It contains all the dependencies in a
generated file that looks something like this:

```zig
pub const imports = struct {
    pub const foo = @import("foo");
    pub const @"bar.baz" = @import("bar.baz");
};
pub const build_root = struct {
    pub const foo = "<path>";
    pub const @"bar.baz" = "<path>";
};
```

The build runner exports this import so that `std.build.Builder` can
access it. `std.build.Builder` uses it to implement the new `dependency`
function which can be used like so:

```zig
const libz_dep = b.dependency("libz", .{});
const libmp3lame_dep = b.dependency("libmp3lame", .{});
// ...
lib.linkLibrary(libz_dep.artifact("z"));
lib.linkLibrary(libmp3lame_dep.artifact("mp3lame"));
```

The `dependency` function calls the build.zig file of the dependency as
a child Builder, and then can be ransacked for its build steps via the
`artifact` function.

This commit also renames `dependency.id` to `dependency.name` in the
`build.zig.ini` file.
2023-01-11 15:39:49 -08:00
..
atomic remove most conditional compilation based on stage1 2022-12-06 20:38:54 -07:00
build std.build.WriteFileStep: fix regression in this branch 2023-01-07 19:07:33 -07:00
c Merge pull request #13980 from ziglang/std.net 2023-01-03 02:43:50 -05:00
compress water cooler complaint about gzip stream namespace 2023-01-11 15:39:48 -08:00
crypto std.crypto.siphash: add finalResult() and peek() 2023-01-07 18:06:55 -07:00
dwarf
event std: collect all options under one namespace 2023-01-05 02:31:29 -07:00
fmt Revert "aarch64: reenable tests that are no longer regressed" 2022-12-27 20:54:27 -07:00
fs Fix cache-dir specified on the command line (#14076) 2023-01-05 01:37:00 -08:00
hash std.builtin: rename Type.UnionField and Type.StructField's field_type to type 2022-12-17 14:11:33 +01:00
heap Implements std.ArenaAllocator.reset() (#12590) 2023-01-03 15:15:20 -05:00
http std.http.Client: support the Reader interface 2023-01-11 15:39:48 -08:00
io expose std.io.bufferedReaderSize 2023-01-11 15:39:48 -08:00
json std.json: Fix parsing of large numbers 2022-07-23 13:52:16 +03:00
math cbe: all behaviour tests now pass on msvc 2023-01-01 16:44:29 -05:00
mem Allocator.zig: minor fixes 2022-12-13 15:04:03 -05:00
meta std.builtin: remove layout field from Type.Enum 2022-12-18 13:31:38 +01:00
net
os Merge pull request #14247 from kcbanner/windows_improve_module_lookup 2023-01-10 18:08:12 -05:00
rand rand: add pub to next/jump 2022-12-18 01:46:09 -05:00
target arm: move cpu model table into system/arm.zig 2022-11-28 17:07:35 +01:00
testing std.mem.Allocator: allow shrink to fail 2022-11-29 23:30:38 -07:00
Thread std.Thread.Futex.PosixImpl.Address.from: fix alignment type 2022-11-28 18:49:33 +02:00
time
tz
unicode update usages of @call 2022-12-13 13:14:20 +02:00
valgrind std.valgrind.callgrind: fix string type 2022-08-22 13:55:00 +03:00
zig std: add helper functions to std.zig.Ast for extracting data out of nodes 2023-01-09 16:59:19 +02:00
array_hash_map.zig std.builtin: rename Type.UnionField and Type.StructField's field_type to type 2022-12-17 14:11:33 +01:00
array_list.zig Add the two functions 'getLast' and 'getLastOrNull' to ArrayListAligned/ArrayListAlignedUnmanaged. 2023-01-03 12:48:20 +02:00
ascii.zig std.ascii: more tests 2022-12-09 21:57:17 +01:00
atomic.zig all: rename i386 to x86 2022-11-04 00:09:27 +03:30
base64.zig remove most conditional compilation based on stage1 2022-12-06 20:38:54 -07:00
bit_set.zig std: implement subsetOf and supersetOf for DynamicBitSet 2022-12-12 06:23:56 +02:00
bounded_array.zig AstGen: detect declarations shadowing locals 2022-08-16 20:35:03 +03:00
buf_map.zig
buf_set.zig
build.zig zig build: support dependencies 2023-01-11 15:39:49 -08:00
builtin.zig Sema: implement AVR address spaces 2023-01-04 01:26:50 +02:00
c.zig remove the experimental std.x namespace 2023-01-02 16:57:15 -07:00
child_process.zig ChildProcess: fix false positives in windowsCreateProcessSupportsExtension 2022-12-31 20:51:56 -05:00
coff.zig windows: rework DebugInfo to use less file operations and fix some memory management issues 2023-01-08 20:28:42 -05:00
compress.zig
comptime_string_map.zig Re-apply: "std.ComptimeStringMap: use tuple types" 2022-12-08 22:21:46 +02:00
crypto.zig remove std.crypto.der 2023-01-02 16:57:15 -07:00
cstr.zig
debug.zig debug: fixup memory management 2023-01-08 22:16:16 -05:00
dwarf.zig remove most conditional compilation based on stage1 2022-12-06 20:38:54 -07:00
dynamic_library.zig update usages of @call 2022-12-13 13:14:20 +02:00
elf.zig run zig fmt on everything checked by CI 2022-11-18 19:22:42 +00:00
enums.zig std.builtin: rename Type.UnionField and Type.StructField's field_type to type 2022-12-17 14:11:33 +01:00
event.zig
fifo.zig
fmt.zig add tests for fixed stage1 bugs 2022-12-31 20:49:02 -05:00
fs.zig std: collect all options under one namespace 2023-01-05 02:31:29 -07:00
hash.zig
hash_map.zig std.builtin: rename Type.Fn's args to params 2022-12-17 14:11:33 +01:00
heap.zig Merge pull request #12586 from MasterQ32/std_memory_pool 2023-01-03 14:53:54 -05:00
http.zig std.http.Client: support transfer-encoding: chunked 2023-01-05 19:57:00 -07:00
Ini.zig add std.Ini for basic .ini file parsing 2023-01-11 15:39:48 -08:00
io.zig expose std.io.bufferedReaderSize 2023-01-11 15:39:48 -08:00
json.zig std.builtin: rename Type.UnionField and Type.StructField's field_type to type 2022-12-17 14:11:33 +01:00
leb128.zig update uses of overflow arithmetic builtins 2022-12-27 15:13:14 +02:00
linked_list.zig chore: Remove unused constants 2022-09-11 23:18:43 -04:00
log.zig std: collect all options under one namespace 2023-01-05 02:31:29 -07:00
macho.zig macho: add Zig wrapper for compact unwind encoding on arm64 2022-12-27 15:36:28 +01:00
math.zig math: implement absInt for integer vectors 2023-01-03 13:30:24 +02:00
mem.zig cbe: add doNotOptimizeAwayC to handle not having __asm support in msvc 2023-01-01 16:44:28 -05:00
meta.zig std: add meta.FieldType 2023-01-03 12:47:48 +02:00
multi_array_list.zig std.builtin: rename Type.UnionField and Type.StructField's field_type to type 2022-12-17 14:11:33 +01:00
net.zig std.net: check for localhost names before asking DNS 2023-01-10 18:09:07 -05:00
once.zig
os.zig Merge pull request #13980 from ziglang/std.net 2023-01-03 02:43:50 -05:00
packed_int_array.zig std: Expose Int parameter in std.PackedInt[Array,Slice] 2022-12-29 19:11:05 +02:00
pdb.zig std.mem.Allocator: allow shrink to fail 2022-11-29 23:30:38 -07:00
priority_dequeue.zig std: Fix update() method in PriorityQueue and PriorityDequeue (#13908) 2022-12-13 14:55:41 -05:00
priority_queue.zig std: Fix update() method in PriorityQueue and PriorityDequeue (#13908) 2022-12-13 14:55:41 -05:00
process.zig Implement some more environment functions for WASI. 2023-01-06 18:40:16 +02:00
Progress.zig fix(terminal): handle some possible errors and resolve TODOs 2022-12-13 09:11:30 +01:00
rand.zig remove most conditional compilation based on stage1 2022-12-06 20:38:54 -07:00
segmented_list.zig behavior: add test coverage for slicing zero length array field of struct 2022-12-10 12:33:17 +01:00
SemanticVersion.zig api(std.ascii): remove deprecated decls 2022-12-09 21:57:17 +01:00
simd.zig std.simd.iota: make it always called at comptime 2023-01-04 18:37:53 -07:00
sort.zig
start.zig std: collect all options under one namespace 2023-01-05 02:31:29 -07:00
start_windows_tls.zig Merge pull request #13101 from alichraghi/o4 2022-11-05 02:34:24 -04:00
std.zig add std.tar for tar file unpacking 2023-01-11 15:39:48 -08:00
tar.zig std.tar: add strip_components option 2023-01-11 15:39:49 -08:00
target.zig Sema: implement AVR address spaces 2023-01-04 01:26:50 +02:00
testing.zig std.builtin: rename Type.UnionField and Type.StructField's field_type to type 2022-12-17 14:11:33 +01:00
Thread.zig update usages of @call 2022-12-13 13:14:20 +02:00
time.zig std.time: add microTimestamp() (#13327) 2022-11-02 23:20:19 +01:00
treap.zig
tz.zig
unicode.zig remove most conditional compilation based on stage1 2022-12-06 20:38:54 -07:00
Uri.zig std.Uri: make scheme non-optional 2023-01-06 18:52:39 -07:00
valgrind.zig LLVM: add valgrind integration for x86 and aarch64 2022-11-19 19:32:45 -07:00
wasm.zig wasm: refactor extended instructions 2022-12-21 17:02:53 +01:00
zig.zig std: add object format extension for dxcontainer 2022-12-13 15:06:55 -05:00