ReviewOS

also looking at this

zig-utils/zig-tls

Track latest Zig 0.17-dev OptimizeMode API

#8
Merged chris wants to merge codex/zig-017-latest into main
11 files +51 -51

Review threads live on the whole diff, not on one commit, so none are shown here - a thread's line means something in the branch's final form, and painting it into an intermediate step would put it on code it is not about.

bench/crypto_bench.zigmodified+1-1
Changes to bench/crypto_bench.zig
@@ -5,7 +5,7 @@ const crypto = std.crypto;
55const tls = ;
66const ecdsa = tls.ecdsa_p256;
77
8const crypto_iterations: u32 = if (.mode == .Debug) 1_000 else 100_000;
8const crypto_iterations: u32 = if (.mode == .debug) 1_000 else 100_000;
99const handshake_record_len: usize = 2048;
1010
1111pub fn run(
bench/main.zigmodifiedrenamed throughout+3-3
Changes to bench/main.zig
@@ -6,12 +6,12 @@ const certs = ;
66const crypto_bench = ;
77
88pub const std_options: std.Options = .{
9 .log_level = if (builtin.mode == .Debug) .warn else .err,
9 .log_level = if (builtin.mode == .debug) .warn else .err,
1010};
1111
12const iterations: u32 = if (builtin.mode == .Debug) 100 else 10_000;
12const iterations: u32 = if (builtin.mode == .debug) 100 else 10_000;
1313const transfer_bytes: usize = 16 * 1024;
14const transfer_iterations: u32 = if (builtin.mode == .Debug) 50 else 5_000;
14const transfer_iterations: u32 = if (builtin.mode == .debug) 50 else 5_000;
1515
1616const bench_groups = &[_]tls.config.NamedGroup{.x25519};
1717