Frank Denis
f01833e03e
crypto.ecdsa: add the ability to sign/verify prehashed messages ( #23607 )
2025-04-20 04:27:10 +02:00
Vadzim Dambrouski
86d3546184
Fix compile error in Fuzzer web-ui ( #23605 )
...
* Fix compile error in Fuzzer web-ui
The error was:
```
error: expected type '?mem.Alignment', found 'comptime_int'
```
* Apply suggestions from code review
`.of` call is shorter and clearer
Co-authored-by: Alex Rønne Petersen <alex@alexrp.com>
---------
Co-authored-by: Alex Rønne Petersen <alex@alexrp.com>
2025-04-19 23:10:51 +02:00
Alex Rønne Petersen
8f8f37fb0f
test: Add powerpc-linux-gnueabi(hf) to the module test matrix.
...
Skips std tests for now: https://github.com/ziglang/zig/issues/2256
2025-04-17 17:32:33 +02:00
Alex Rønne Petersen
3be6809e27
Merge pull request #23217 from selfisekai/cmake-release-safe
...
* cmake: Add ZIG_RELEASE_SAFE option to build as ReleaseSafe
* cmake: Map MinSizeRel to ReleaseSmall.
2025-04-17 04:18:23 +02:00
Pavel Otchertsov
dc090e99cf
cmake: support static linking against libxml2
2025-04-16 22:56:27 +02:00
Tobias Simetsreiter
5be3c7874c
std.tar: pass entry kind to rootDir to avoid setting root_dir to file ( #23456 )
2025-04-16 19:17:25 +00:00
Alex Rønne Petersen
f2363623e1
cmake: Map MinSizeRel to ReleaseSmall.
2025-04-16 20:46:41 +02:00
Alex Rønne Petersen
1a2ceb36c8
Merge pull request #23573 from samy-00007/bigint-shift-fix
...
std.math.big.int: fix a bug in `llshl` and update test syntax
2025-04-16 18:28:25 +02:00
samy007
8ae9ac6df4
improve test syntax for better stack trace in case of failure
2025-04-16 11:10:22 +02:00
Andrew Kelley
3746b3d93c
Merge pull request #21741 from kj4tmp/langref-packed-structs
...
langref: improve packed struct memory layout description
2025-04-16 04:56:22 -04:00
Andrew Kelley
bd38c417fc
langref: reword some packed struct text and example
2025-04-15 19:19:23 -07:00
kj4tmp@gmail.com
a8621731ec
langref: packed struct documentation
2025-04-15 19:17:07 -07:00
phatchman
ae38fc6a50
Return FileNotFound when CreateProcessW is called with a missing path ( #23567 )
2025-04-15 21:39:44 +00:00
Андрей Краевский
530228d953
Deprecate std.enums.nameCast.
2025-04-15 23:36:43 +02:00
Ryan King
6c598e8341
std: add os.linux.sysinfo(), use it for process.totalSystemMemory()
...
Co-authored-by: Alex Rønne Petersen <alex@alexrp.com>
2025-04-15 20:08:59 +02:00
Frank Denis
933beb4cbd
crypto.ecdsa: stricter DER decoding of signatures ( #23554 )
...
Reject DER-encoded signatures with the top bit set but no leading
0x00
Also add test vectors from Project Wycheproof with ECDSA-P384
2025-04-15 18:12:12 +02:00
Alex Rønne Petersen
76da028239
ci: Bump aarch64-linux timeout to 9 hours.
...
These seem to be timing out under load lately.
2025-04-14 21:34:19 -04:00
Alex Rønne Petersen
85b3d02f76
ci: Bump x86_64-linux timeout to 8 hours.
...
We were really close to the timeout previously, and we recently added
hexagon-linux and loongarch64-linux to the test matrix.
2025-04-14 21:34:19 -04:00
samy007
c813b6a900
std.math.big: add and update tests
2025-04-14 22:54:10 +02:00
Chris Boesch
206bd1ced8
Merge pull request #23268 from chrboesch/i19875
...
std.posix: Added 'error.ProcessNotFound' where necessary
2025-04-14 22:20:44 +02:00
samy007
b08924e938
std.math.big.int: changed llshr and llshl implementation
2025-04-14 20:46:06 +02:00
Alex Rønne Petersen
667035fc78
std.Build.Step: Don't capture a stack trace if !std.debug.sys_can_stack_trace.
2025-04-14 06:06:07 +02:00
Andrew Kelley
2cb69e53b4
Merge pull request #23541 from alexrp/linux-5.10
...
`std.Target`: Bump minimum Linux kernel and glibc versions according to Debian LTS
2025-04-13 17:25:34 -04:00
samy007
b635b37249
std.math.big.int: remove setRuntimeSafety
2025-04-13 21:07:11 +02:00
Alex Rønne Petersen
e24e9ff7bd
Merge pull request #23555 from alexrp/gitattributes
...
Some `.gitattributes` updates
2025-04-13 09:24:33 +02:00
Andrew Kelley
f32a5d349d
std: eradicate u29 and embrace std.mem.Alignment
2025-04-13 02:20:32 -04:00
Bingwu Zhang
ec28888581
doc: Bump LLVM version in README
...
Reported-by: Ricky8955555 <rkmiao@duck.com>
Signed-off-by: Bingwu Zhang <xtex@aosc.io>
2025-04-13 08:11:40 +02:00
Alex Rønne Petersen
6eabdc8972
link: Improve handling of --build-id when using LLD.
2025-04-13 01:46:15 +02:00
Luis Cáceres
d5ac3be608
src/libunwind.zig: Fix symbol visibility macro define
...
The define was changed in commit 729899f7b6bf6aff65988d895d7a639391a67608
in upstream llvm.
2025-04-12 22:27:28 +02:00
Alex Rønne Petersen
01aeb2f296
.gitattributes: Fix lib/libtsan path after ee0ff134e9.
2025-04-12 20:30:38 +02:00
Alex Rønne Petersen
c3a408e245
.gitattributes: Add more testdata directories.
2025-04-12 20:30:11 +02:00
Frank Denis
a7122b7323
std.crypto: add constant-time codecs ( #23420 )
...
std.crypto: add constant-time codecs
Add constant-time hex/base64 codecs designed to process cryptographic
secrets, adapted from libsodium's implementations.
Introduce a `crypto.codecs` namespace for crypto-related encoders and
decoders. Move ASN.1 codecs to this namespace.
This will also naturally accommodate the proposed PEM codecs.
2025-04-12 20:13:45 +02:00
Alex Rønne Petersen
9352f379e8
Merge pull request #23529 from alexrp/2879-groundwork
...
Introduce libzigc for libc function implementations in Zig
2025-04-12 18:14:17 +02:00
Andrew Kelley
4e700fdf8e
Merge pull request #22516 from Jan200101/PR/build_id_option
...
std.Build: add build-id option
2025-04-11 16:37:46 -04:00
Andrew Kelley
65bd8d52c8
Merge pull request #23061 from pavelverigo/stage2-wasm-misc
...
stage2-wasm: multiple fixes
2025-04-11 15:56:35 -04:00
Andrew Kelley
08a6c4ca9b
Merge pull request #23272 from squeek502/getenvw-optim
...
Windows: Faster `getenvW` and a standalone environment variable test
2025-04-11 15:46:34 -04:00
g-logunov
326f254972
std.posix.getenv: early-return comparison ( #23265 )
...
Fixes std.posix.getenv() being slower than musl getenv() even when linking libc
2025-04-11 12:44:18 -07:00
kcbanner
fa59153896
Value: ensure that extern structs have their layout resolved in ptrField
2025-04-11 15:30:20 -04:00
Alex Rønne Petersen
2527c82482
std.os.linux: Use faccessat2 syscall in faccessat().
...
Only the former has a flags parameter. It's only available in Linux 5.8+.
Closes #16606 .
2025-04-11 21:17:35 +02:00
Alex Rønne Petersen
46d03c5afa
std.Target: Bump minimum glibc version to 2.31.
...
This is the version in Debian LTS (bullseye).
2025-04-11 21:11:20 +02:00
Alex Rønne Petersen
731d6531bf
std.Target: Bump minimum Linux kernel version to 5.10.
...
This is the kernel in Debian LTS (bullseye).
2025-04-11 21:10:55 +02:00
Alex Rønne Petersen
90084f4ae3
Merge pull request #23483 from alexrp/target-int-functions
...
compiler: Move int size/alignment functions to `std.Target` and `std.zig.target`
2025-04-11 17:40:47 +02:00
Alex Rønne Petersen
1f896c1bf8
Introduce libzigc for libc function implementations in Zig.
...
This lays the groundwork for #2879 . This library will be built and linked when a
static libc is going to be linked into the compilation. Currently, that means
musl, wasi-libc, and MinGW-w64. As a demonstration, this commit removes the musl
C code for a few string functions and implements them in libzigc. This means
that those libzigc functions are now load-bearing for musl and wasi-libc.
Note that if a function has an implementation in compiler-rt already, libzigc
should not implement it. Instead, as we recently did for memcpy/memmove, we
should delete the libc copy and rely on the compiler-rt implementation.
I repurposed the existing "universal libc" code to do this. That code hadn't
seen development beyond basic string functions in years, and was only usable-ish
on freestanding. I think that if we want to seriously pursue the idea of Zig
providing a freestanding libc, we should do so only after defining clear goals
(and non-goals) for it. See also #22240 for a similar case.
2025-04-11 17:12:31 +02:00
Jacob Young
27cfff8f44
x86_64: pass exact integer bit sizes to compiler-rt routines
...
This was a hack around compiler-rt not computing the correct size.
2025-04-11 07:06:01 -04:00
Jacob Young
b31a91bbef
compiler-rt: compute correct integer sizes from bits at runtime
...
Also, accepting `align(1)` pointers ensures that the alignment is safety
checked rather than assumed.
2025-04-11 07:06:01 -04:00
Alex Rønne Petersen
ed9aa8f259
compiler: Move int size/alignment functions to std.Target and std.zig.target.
...
This allows using them in e.g. compiler-rt.
2025-04-11 05:22:00 -04:00
Alex Rønne Petersen
0132be7bf3
std.Target: Rename charSignedness() to cCharSignedness().
...
To be consistent with the other functions that answer C ABI questions.
2025-04-11 05:22:00 -04:00
Jacob Young
c82e1fe880
Merge pull request #23355 from jacobly0/x86_64-rewrite
...
x86_64: start rewriting overflow operations
2025-04-11 05:21:44 -04:00
Alex Rønne Petersen
9e21ba12d5
libcxx: Backport llvm/llvm-project#134874 .
...
https://github.com/llvm/llvm-project/pull/134874
2025-04-11 09:05:44 +02:00
Alex Rønne Petersen
8f03217f3e
Merge pull request #23497 from alexrp/hexagon
...
Some `hexagon-linux` porting work
2025-04-11 08:42:53 +02:00