Commit graph

34222 commits

Author SHA1 Message Date
Kendall Condon
ecd3ea9bd2 DeprecatedReader.Adapted: fix EndOfStream handling 2025-07-28 21:41:19 -07:00
Silver
147a852806 Update zig init help with new -m arg
This was forgotten in #24555
2025-07-28 21:46:44 +01:00
Jacob Young
c334956a54 aarch64: workaround some optional/union issues 2025-07-28 09:03:17 -07:00
Ivan
dea3ed7f59
build: fix error in standalone test when using --release
Co-authored-by: Carl Åstholm <carl@astholm.se>
2025-07-28 08:10:23 +01:00
Andrew Kelley
bb29846732 std.compress.xz: eliminate dependency on std.Io.bitReader 2025-07-27 22:08:52 -07:00
Andrew Kelley
89cd42ee80
Merge pull request #24600 from jacobly0/aarch64
aarch64: continued progress
2025-07-27 11:42:09 -07:00
Jacob Young
b26e732bd0 aarch64: fix error union constants 2025-07-27 08:01:07 -04:00
Jacob Young
771523c675 aarch64: implement var args 2025-07-27 06:59:38 -04:00
Andrew Kelley
da408bd6fc
Merge pull request #24585 from jacobly0/aarch64
aarch64: more progress
2025-07-27 00:17:19 -07:00
A cursed quail
e12dc4947c std.zig: fmtId returns a FormatId
Changes fmtId to return the FormatId type directly, and renames the
FormatId.render function to FormatId.format, so it can be used in a
format expression directly.

Why? Since `render` is private, you can't create functions that wrap
`fmtId` or `fmtIdFlags`, since you can't name the return type of those
functions outside of std itself.

The current setup _might_ be intentional? In which case I can live with
it, but I figured I'd make a small contrib to upstream zig :)
2025-07-26 21:53:23 -07:00
Andrew Kelley
04614d6ea1 std.Io.Reader: add rebase to the vtable
This eliminates a footgun and special case handling with fixed buffers,
as well as allowing decompression streams to keep a window in the output
buffer.
2025-07-26 20:00:25 -07:00
Andrew Kelley
de39c5f67f
Merge pull request #24587 from jacobly0/x86_64
x86_64: fix some bugs
2025-07-26 18:41:29 -07:00
Jacob Young
7894703ee7 aarch64: implement more optional/error union/union support 2025-07-26 21:39:50 -04:00
Jacob Young
69abc945e4 aarch64: implement some safety checks
Closes #24553
2025-07-26 17:31:04 -04:00
Jacob Young
1274254c48 aarch64: implement stack probing 2025-07-26 16:08:40 -04:00
Jacob Young
7c349da49c aarch64: implement complex switch prongs 2025-07-26 16:08:40 -04:00
Matthew Lugg
a51cdf3b24
Merge pull request #22587 from castholm/deprecate-compile-apis
std.Build: Deprecate `Step.Compile` APIs that mutate the root module
2025-07-26 18:03:33 +01:00
mlugg
c9ce1debe7 Sema: exclude sentinel from source array length in pointer cast to slice
Resolves: #24569
2025-07-26 14:54:04 +01:00
Jacob Young
3194a4d22b x86_64: fix dst create alloc reg clobbering src
Closes #24390
2025-07-26 07:44:12 -04:00
Jacob Young
68cfa736df x86_64: fix switch on mod result
Closes #24541
2025-07-26 06:24:03 -04:00
Carl Åstholm
154bd2fd05 Migrate from deprecated Step.Compile APIs 2025-07-26 12:06:43 +02:00
Carl Åstholm
413179ccfc std.Build: Deprecate Step.Compile APIs that mutate the root module
Not only are `Step.Compile` methods like `linkLibC()` redundant because
`Module` exposes the same APIs, it also might not be immediately obvious
to users that these methods modify the underlying root module, which can
be a footgun and lead to unintended results if the module is exported to
package consumers or shared by multiple compile steps.

Using `compile.root_module.link_libc = true` makes it more clear to
users which of the compile step and the module owns which options.
2025-07-26 12:06:42 +02:00
Andrew Kelley
fc4b7c968a
Merge pull request #24564 from ziglang/terminal-progress-bar
std.Progress: support progress bar escape codes
2025-07-25 21:49:25 -07:00
Andrew Kelley
66e49d93b7
Merge pull request #24559 from ziglang/zstd
std: rework zstd for new I/O API
2025-07-25 20:02:53 -07:00
Andrew Kelley
9e11727c7c
Merge pull request #23340 from castholm/pass-null-to-b-dependency
Add support for passing null, string literals, enum lists and more to `b.dependency()`
2025-07-25 18:00:46 -07:00
Andrew Kelley
b22b9ebfe0 std.Progress: introduce Status 2025-07-25 17:33:11 -07:00
Andrew Kelley
799206a3ad std.Progress: support progress bar escape codes 2025-07-25 16:00:19 -07:00
Andrew Kelley
733b208256 std.posix.ftruncate: handle NonResizable properly 2025-07-25 14:15:33 -07:00
Andrew Kelley
8752d80c84 std.compress.zstd.Decompress: fix bytes_written tracking 2025-07-25 14:15:33 -07:00
Andrew Kelley
da51e94d50 std.fs.File.end: account for streaming mode 2025-07-25 14:15:33 -07:00
Andrew Kelley
7f43f78b5b std.compress.zstd: keep frame state between blocks 2025-07-25 14:15:33 -07:00
Andrew Kelley
13e08ea6f0 std.compress.zstd: fix endianness issue
instead of manually bitcast, use the handy dandy takeStruct function.
2025-07-25 14:15:33 -07:00
Andrew Kelley
ee4f5b3f92 std.compress.zstd: respect the window length 2025-07-25 14:15:33 -07:00
Andrew Kelley
7f1c04423e std.Io: add "preserve" variants to Reader/Writer 2025-07-25 14:15:33 -07:00
Andrew Kelley
3687eada6a std: rework zstd for new I/O API
This passes tests but it doesn't provide as big a window size as is
required to decompress larger streams.

The next commit in this branch will work towards that, without
introducing an additional buffer.
2025-07-25 14:15:33 -07:00
Jacob Young
869ef00602 aarch64: more progress
- factor out `loadReg`
 - support all general system control registers in inline asm
 - fix asserts after iterating field offsets
 - fix typo in `slice_elem_val`
 - fix translation of argument locations
2025-07-25 14:20:23 -04:00
mlugg
bb71a18ede init: replace '--strip' with '--minimal'
This option never worked properly (it emitted wrongly-formatted code),
and it doesn't seem particularly *useful* -- someone who's proficient
enough with `std.Build` to not need explanations probably just wants to
write their own thing. Meanwhile, the use case of writing your own
`build.zig` was extremely poorly served, because `build.zig.zon` *needs*
to be generated programmatically for a correct `fingerprint`, but the
only ways to do that were to a) do it wrong and get an error, or b) get
the full init template and delete the vast majority of it. Both of these
were pretty clunky, and `-s` didn't really help.

So, replace this flag with a new one, `--minimal`/`-m`, which uses a
different template. This template is trivial enough that I opted to just
hardcode it into the compiler for simplicity. The main job of
`zig init -m` is to generate a correct `build.zig.zon` (if it is unable
to do this, it exits with a fatal error). In addition, it will *attempt*
to generate a tiny stub `build.zig`, with only an `std` import and an
empty `pub fn build`. However, if `build.zig` already exists, it will
avoid overwriting it, and doesn't even complain. This serves the use
case of writing `build.zig` manually and *then* running `zig init -m`
to generate an appropriate `build.zig.zon`.
2025-07-25 16:24:02 +01:00
BreadTom
d407c4e52b Update wasm2c.c 2025-07-25 02:10:09 -07:00
Ian Johnson
f0fec952d2 zig std: fix sources.tar generation
Analogous to #24576 for `-femit-docs`
2025-07-24 19:44:19 -07:00
Ian Johnson
6dbcc3bd54 Autodoc: fix sources.tar generation
Closes #24565
2025-07-24 19:24:10 -07:00
Andrew Kelley
a189335ea2 zig std: update std.Io.poll API usage
fixes FTBFS
2025-07-24 19:15:40 -07:00
Andrew Kelley
4236ca40cd
Merge pull request #24561 from linusg/serenity-fixes
Small fixes for SerenityOS
2025-07-23 23:04:52 -07:00
Alex Rønne Petersen
5fb36d2600
Merge pull request #24557 from pavelverigo/wasm-try-ptr 2025-07-24 07:44:08 +02:00
Andrew Kelley
b8955a2e0a std.Io.poll: update to new I/O API 2025-07-23 21:25:34 -07:00
Linus Groh
bf4fda4db6 target: Add libc link flags for serenity 2025-07-24 00:54:40 +01:00
Linus Groh
26bd74e87f std.posix: Fix ACCMODE values for serenity 2025-07-24 00:54:40 +01:00
Linus Groh
ea90ec4d88 std.c: Fix dirent.name size for serenity
The null terminator is added to the buffer size.
2025-07-24 00:24:55 +01:00
Pavel Verigo
4328f71d9f Revert "disable -fno-llvm -target wasm32-wasi testing"
This reverts commit 83960e0eb0.
2025-07-24 01:18:08 +02:00
Pavel Verigo
fcd9f521d2 stage2-wasm: implement try_ptr + is_(non_)err_ptr 2025-07-24 01:18:02 +02:00
Andrew Kelley
bc8e1a74c5
Merge pull request #24523 from ziglang/fifno
std.tar: update to new I/O API
2025-07-23 10:02:52 +02:00