0
Fork 0
mirror of https://codeberg.org/ziglang/zig synced 2026-11-18 07:05:05 +00:00
zig/lib/std
Andrew Kelley ba0e3be5cf
(breaking) rework stream abstractions
The main goal here is to make the function pointers comptime, so that we
don't have to do the crazy stuff with async function frames.

Since InStream, OutStream, and SeekableStream are already generic
across error sets, it's not really worse to make them generic across the
vtable as well.

See #764 for the open issue acknowledging that using generics for these
abstractions is a design flaw.

See #130 for the efforts to make these abstractions non-generic.

This commit also changes the OutStream API so that `write` returns
number of bytes written, and `writeAll` is the one that loops until the
whole buffer is written.
History 2020-03-10 15:32:32 -04:00
..
atomic solve recursion in std.atomic.Queue.dump 2020-02-08 16:22:53 -05:00
build fixups & make some API decisions 2020-03-06 18:49:13 -05:00
c std: fix sendfile on macOS and FreeBSD 2020-03-05 20:46:28 -05:00
crypto short std.builtin enum literals in std lib 2020-03-01 13:57:41 -05:00
debug remove uses of @ArgType and @IntType 2020-02-24 23:39:03 +02:00
event add std.event.Loop pread and faccessat 2020-03-07 19:13:21 -05:00
fmt update std lib to new Target API 2020-02-28 14:51:54 -05:00
fs (breaking) rework stream abstractions 2020-03-10 15:32:32 -04:00
hash short std.builtin enum literals in std lib 2020-03-01 13:57:41 -05:00
heap Convert a few more page_allocator 2020-01-30 00:27:44 -06:00
http Switch a bunch of FBA to use testing.allocator 2020-02-12 17:17:56 -06:00
io (breaking) rework stream abstractions 2020-03-10 15:32:32 -04:00
json (breaking) rework stream abstractions 2020-03-10 15:32:32 -04:00
math short std.builtin enum literals in std lib 2020-03-01 13:57:41 -05:00
meta remove usages of @typeId, @memberCount, @memberName and @memberType 2020-02-24 23:09:01 +02:00
net introduce operating system version ranges as part of the target 2020-02-28 14:51:53 -05:00
os std: Fix detection of Linux kernel version 2020-03-10 12:55:35 -04:00
rand update the codebase to use @as 2019-11-08 15:57:24 -05:00
special Generated documentation mobile support 2020-03-04 10:47:21 -05:00
target arm baseline CPU is v7a rather than v6m 2020-02-26 12:37:13 -05:00
testing Add explicit error message for too many frees 2020-01-30 01:12:21 -06:00
time mv std/ lib/ 2019-09-25 23:35:41 -04:00
unicode zig fmt and update extern fn to callconv(.C) 2020-01-06 15:34:50 -05:00
valgrind string literals are now null terminated 2019-11-21 20:43:41 -05:00
zig (breaking) rework stream abstractions 2020-03-10 15:32:32 -04:00
array_list.zig fixups & make some API decisions 2020-03-06 18:49:13 -05:00
ascii.zig Switch a bunch of FBA to use testing.allocator 2020-02-12 17:17:56 -06:00
atomic.zig mv std/ lib/ 2019-09-25 23:35:41 -04:00
base64.zig mv std/ lib/ 2019-09-25 23:35:41 -04:00
bloom_filter.zig remove type coercion from array values to references 2019-11-27 03:37:50 -05:00
buf_map.zig Fix BufMap value leak 2020-01-29 22:22:01 -06:00
buf_set.zig Convert a bunch of page_allocator to testing.allocator 2020-01-29 22:22:01 -06:00
buffer.zig (breaking) rework stream abstractions 2020-03-10 15:32:32 -04:00
build.zig Use in_stream.readAllAlloc where sensible 2020-03-06 18:49:12 -05:00
builtin.zig stage1: make get_optional_type more robust 2020-03-06 18:30:30 -05:00
c.zig std: add os.fstatat 2020-03-03 13:25:43 -05:00
child_process.zig (breaking) rework stream abstractions 2020-03-10 15:32:32 -04:00
coff.zig fix windows std lib regressions 2019-11-29 21:55:27 -05:00
crypto.zig hashing algorithms: fix logic and index out of bounds 2020-02-24 13:43:54 -05:00
cstr.zig breaking: std.mem.len no longer takes a type argument 2020-03-01 13:21:39 -05:00
debug.zig (breaking) rework stream abstractions 2020-03-10 15:32:32 -04:00
dwarf.zig (breaking) rework stream abstractions 2020-03-10 15:32:32 -04:00
dwarf_bits.zig debug: Split the DWARF stuff in its own file 2020-02-20 19:41:28 +01:00
dynamic_library.zig complete the native target detection based on /usr/bin/env 2020-02-28 14:51:56 -05:00
elf.zig (breaking) rework stream abstractions 2020-03-10 15:32:32 -04:00
event.zig self-hosted libc detection 2020-02-16 13:25:30 -05:00
fifo.zig remove @bytesToSlice, @sliceToBytes from std lib 2020-02-21 19:46:53 +01:00
fmt.zig std: use std.ArrayList instead of std.Buffer in std/fmt.zig tests 2020-03-06 18:49:13 -05:00
fs.zig (breaking) rework stream abstractions 2020-03-10 15:32:32 -04:00
hash.zig merge dumps tool: merging ast nodes 2019-10-11 18:13:24 -04:00
hash_map.zig short std.builtin enum literals in std lib 2020-03-01 13:57:41 -05:00
heap.zig introduce operating system version ranges as part of the target 2020-02-28 14:51:53 -05:00
http.zig mv std/ lib/ 2019-09-25 23:35:41 -04:00
io.zig (breaking) rework stream abstractions 2020-03-10 15:32:32 -04:00
json.zig std: tagged unions are broken on arm64 2020-02-19 23:17:04 +11:00
lazy_init.zig use enum with atomics in std lib 2019-11-12 17:55:54 +02:00
linked_list.zig more std lib async I/O integration 2020-02-06 18:05:50 -05:00
macho.zig delete extra code, more forgiveness 2020-02-22 12:44:21 +01:00
math.zig std: use testing.expectEqual in math.absCast tests 2020-03-05 16:02:26 +11:00
mem.zig add allocSentinel function 2020-03-10 15:03:59 -04:00
meta.zig std: format contents of sentinel terminated many pointers 2020-03-01 13:04:29 -05:00
mutex.zig introduce operating system version ranges as part of the target 2020-02-28 14:51:53 -05:00
net.zig breaking: std.mem.len no longer takes a type argument 2020-03-01 13:21:39 -05:00
os.zig (breaking) rework stream abstractions 2020-03-10 15:32:32 -04:00
packed_int_array.zig introduce operating system version ranges as part of the target 2020-02-28 14:51:53 -05:00
pdb.zig (breaking) rework stream abstractions 2020-03-10 15:32:32 -04:00
priority_queue.zig Promoted "leak_count_allocator" to the main testing.allocator 2020-01-29 22:22:00 -06:00
process.zig std: use ArrayList instead of Buffer from std/process.zig 2020-03-06 18:49:12 -05:00
progress.zig std.fmt.format: tuple parameter instead of var args 2019-12-08 22:53:51 -05:00
rand.zig remove uses of @ArgType and @IntType 2020-02-24 23:39:03 +02:00
rb.zig rb: fix rb.Node.getLast() that never worked 2020-01-30 12:05:57 -05:00
reset_event.zig introduce operating system version ranges as part of the target 2020-02-28 14:51:53 -05:00
segmented_list.zig Convert a bunch of page_allocator to testing.allocator 2020-01-29 22:22:01 -06:00
sort.zig Switch a bunch of FBA to use testing.allocator 2020-02-12 17:17:56 -06:00
spinlock.zig introduce operating system version ranges as part of the target 2020-02-28 14:51:53 -05:00
start.zig introduce operating system version ranges as part of the target 2020-02-28 14:51:53 -05:00
start_windows_tls.zig un-special-case startup code in the std lib 2019-12-12 18:33:44 -05:00
std.zig progress towards merging 2020-01-19 20:54:04 -05:00
target.zig cleanup CPU model & feature detection 2020-03-06 19:47:03 -05:00
testing.zig short std.builtin enum literals in std lib 2020-03-01 13:57:41 -05:00
thread.zig std.Thread.cpuCount on Windows uses the PEB 2020-02-29 22:13:09 -05:00
time.zig introduce operating system version ranges as part of the target 2020-02-28 14:51:53 -05:00
unicode.zig Implement UTF-8 to UTF-16LE literal conversion 2020-03-07 19:21:28 -05:00
valgrind.zig short std.builtin enum literals in std lib 2020-03-01 13:57:41 -05:00
zig.zig separate std.Target and std.zig.CrossTarget 2020-02-28 14:51:54 -05:00