From ba99ce9c8f32dcf0f8abf78b901d613804081b64 Mon Sep 17 00:00:00 2001 From: jinzhongjia Date: Sat, 7 Sep 2024 10:22:20 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E9=83=A8=E5=88=86=E7=BC=A9?= =?UTF-8?q?=E8=BF=9B=EF=BC=8C=E4=BD=BF=E5=BE=97=E8=A7=82=E7=9C=8B=E6=9B=B4?= =?UTF-8?q?=E5=8A=A0=E7=BE=8E=E8=A7=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- course/advanced/interact-with-c.md | 8 +++- course/advanced/package_management.md | 6 ++- course/basic/advanced_type/vector.md | 14 ++++++- course/basic/union.md | 6 ++- course/code/12/build_system/cli/build.zig | 4 +- .../code/12/build_system/embedfile/build.zig | 5 ++- course/code/12/build_system/test/build.zig | 3 +- course/code/12/echo_tcp_server.zig | 12 ++++-- course/code/12/memory_manager.zig | 5 ++- course/code/12/switch.zig | 4 +- course/code/12/type-cast.zig | 3 +- course/code/14/build_system/cli/build.zig | 4 +- .../code/14/build_system/embedfile/build.zig | 5 ++- course/code/14/build_system/test/build.zig | 3 +- course/code/14/echo_tcp_server.zig | 12 ++++-- course/code/14/memory_manager.zig | 5 ++- course/code/14/switch.zig | 4 +- course/code/14/type-cast.zig | 3 +- course/environment/install-environment.md | 6 ++- course/more/atomic.md | 39 ++++++++++++++++--- course/more/style_guide.md | 5 ++- course/update/upgrade-0.12.0.md | 37 +++++++++++------- 22 files changed, 146 insertions(+), 47 deletions(-) diff --git a/course/advanced/interact-with-c.md b/course/advanced/interact-with-c.md index 1b9fe048..74a2d18d 100644 --- a/course/advanced/interact-with-c.md +++ b/course/advanced/interact-with-c.md @@ -166,7 +166,8 @@ pub export fn foo() c_int { _ = &b; return a + b; } -pub const MAKELOCAL = @compileError("unable to translate C expr: unexpected token .Equal"); +pub const MAKELOCAL = + @compileError("unable to translate C expr: unexpected token .Equal"); ``` ::: @@ -245,7 +246,10 @@ CC='zig cc -target x86_64-linux-gnu' CXX='zig cc -target x86_64-linux-gnu' go bu 再进一步,我们还可以构建出 linux 的使用 cgo 的静态链接的二进制可执行文件: ```sh -CC='zig cc -target x86_64-linux-musl' CXX='zig cc -target x86_64-linux-musl' CGO_CFLAGS='-D_LARGEFILE64_SOURCE' go build -ldflags='-linkmode=external -extldflags -static' +CC='zig cc -target x86_64-linux-musl' \ +CXX='zig cc -target x86_64-linux-musl' \ +CGO_CFLAGS='-D_LARGEFILE64_SOURCE' \ +go build -ldflags='-linkmode=external -extldflags -static' ``` `CGO_CFLAGS` 是为了防止编译失败,`ldflags` 是为了指定静态链接! diff --git a/course/advanced/package_management.md b/course/advanced/package_management.md index 54b3917b..91b2eeb8 100644 --- a/course/advanced/package_management.md +++ b/course/advanced/package_management.md @@ -65,7 +65,11 @@ zig 支持在一个 `build.zig` 中对外暴露出多个模块,也就是说一 可以使用 `build` 函数传入的参数 `b: *std.Build`,它包含一个方法 [`addModule`](https://ziglang.org/documentation/master/std/#std.Build.addModule), 它的原型如下: ```zig -pub fn addModule(b: *Build, name: []const u8, options: Module.CreateOptions) *Module +pub fn addModule( + b: *Build, + name: []const u8, + options: Module.CreateOptions +) *Module ``` 使用起来也很简单,例如: diff --git a/course/basic/advanced_type/vector.md b/course/basic/advanced_type/vector.md index 360b5670..d90156e0 100644 --- a/course/basic/advanced_type/vector.md +++ b/course/basic/advanced_type/vector.md @@ -61,7 +61,12 @@ Zig 支持任何已知的最大 2^32-1 向量长度。请注意,过长的向 ## `@shuffle` ```zig -@shuffle(comptime E: type, a: @Vector(a_len, E), b: @Vector(b_len, E), comptime mask: @Vector(mask_len, i32)) @Vector(mask_len, E) +@shuffle( + comptime E: type, + a: @Vector(a_len, E), + b: @Vector(b_len, E), + comptime mask: @Vector(mask_len, i32) +) @Vector(mask_len, E) ``` 根据掩码`mask`(一个向量 Vector),返回向量 a 或者向量 b 的值,组成一个新的向量,mask 的长度决定返回的向量的长度,并且逐个根据 mask 中的值,来从 a 或 b选出值,正数是从 a 选出指定索引的值(从 0 开始,变大),负数是从 b 选出指定索引的值(从 -1 开始,变小)。 @@ -80,7 +85,12 @@ Zig 支持任何已知的最大 2^32-1 向量长度。请注意,过长的向 ## `@select` ```zig -@select(comptime T: type, pred: @Vector(len, bool), a: @Vector(len, T), b: @Vector(len, T)) @Vector(len, T) +@select( + comptime T: type, + pred: @Vector(len, bool), + a: @Vector(len, T), + b: @Vector(len, T) +) @Vector(len, T) ``` 根据 pred(一个元素全为布尔类型的向量)从 a 或 b 中按元素选择值。如果 `pred[i]` 为 `true`,则结果中的相应元素将为 `a[i]`,否则为 `b[i]`。 diff --git a/course/basic/union.md b/course/basic/union.md index 65f0f222..5129840b 100644 --- a/course/basic/union.md +++ b/course/basic/union.md @@ -27,7 +27,11 @@ outline: deep 如果要初始化一个在编译期已知的字段名的联合类型,可以使用 [`@unionInit`](https://ziglang.org/documentation/master/#unionInit): ```zig -@unionInit(comptime Union: type, comptime active_field_name: []const u8, init_expr) Union +@unionInit( + comptime Union: type, + comptime active_field_name: []const u8, + init_expr +) Union ``` <<<@/code/release/union.zig#union_init diff --git a/course/code/12/build_system/cli/build.zig b/course/code/12/build_system/cli/build.zig index 05f0502e..1b7d1493 100644 --- a/course/code/12/build_system/cli/build.zig +++ b/course/code/12/build_system/cli/build.zig @@ -8,7 +8,9 @@ pub fn build(b: *std.Build) void { const optimize = b.standardOptimizeOption(.{}); // 使用 option 来获取命令参数决定是否剥离调试信息 - const is_strip = b.option(bool, "is_strip", "whether strip executable") orelse false; + const is_strip = + b.option(bool, "is_strip", "whether strip executable") orelse + false; // 添加一个二进制可执行程序构建 const exe = b.addExecutable(.{ diff --git a/course/code/12/build_system/embedfile/build.zig b/course/code/12/build_system/embedfile/build.zig index b5edb865..a06cd033 100644 --- a/course/code/12/build_system/embedfile/build.zig +++ b/course/code/12/build_system/embedfile/build.zig @@ -15,7 +15,10 @@ pub fn build(b: *std.Build) void { .optimize = optimize, }); - exe.root_module.addAnonymousImport("hello", .{ .root_source_file = b.path("src/hello.txt") }); + exe.root_module.addAnonymousImport( + "hello", + .{ .root_source_file = b.path("src/hello.txt") }, + ); // 添加到顶级 install step 中作为依赖 b.installArtifact(exe); diff --git a/course/code/12/build_system/test/build.zig b/course/code/12/build_system/test/build.zig index 2e0e3ff2..4e86db97 100644 --- a/course/code/12/build_system/test/build.zig +++ b/course/code/12/build_system/test/build.zig @@ -30,7 +30,8 @@ pub fn build(b: *std.Build) void { // 执行单元测试 const run_exe_unit_tests = b.addRunArtifact(exe_unit_tests); - // 如果想要跳过外部来自于其他包的单元测试(例如依赖中的包),可以使用 skip_foreign_checks + // 如果想要跳过外部来自于其他包的单元测试(例如依赖中的包) + // 可以使用 skip_foreign_checks run_exe_unit_tests.skip_foreign_checks = true; // 构建一个 step,用于执行测试 diff --git a/course/code/12/echo_tcp_server.zig b/course/code/12/echo_tcp_server.zig index cf3b4529..d838a0ff 100644 --- a/course/code/12/echo_tcp_server.zig +++ b/course/code/12/echo_tcp_server.zig @@ -58,7 +58,10 @@ pub fn main() !void { // 存储 accept 拿到的 connections var connections: [max_sockets]?net.Server.Connection = undefined; // sockfds 用于存储 pollfd, 用于传递给 poll 函数 - var sockfds: [max_sockets]if (builtin.os.tag == .windows) windows.ws2_32.pollfd else std.posix.pollfd = undefined; + var sockfds: [max_sockets]if (builtin.os.tag == .windows) + windows.ws2_32.pollfd + else + std.posix.pollfd = undefined; // #endregion data for (0..max_sockets) |i| { sockfds[i].fd = context.INVALID_SOCKET; @@ -126,14 +129,17 @@ pub fn main() !void { // 但仅仅这样写一次并不安全 // 最优解应该是使用for循环检测写入的数据大小是否等于buf长度 // 如果不等于就继续写入 - // 这是因为 TCP 是一个面向流的协议,它并不保证一次 write 调用能够发送所有的数据 + // 这是因为 TCP 是一个面向流的协议 + // 它并不保证一次 write 调用能够发送所有的数据 // 作为示例,我们不检查是否全部写入 _ = try connection.stream.write(buf[0..len]); } } } // 检查是否是 POLLNVAL | POLLERR | POLLHUP 事件,即是否有错误发生,或者连接断开 - else if (sockfd.revents & (context.POLLNVAL | context.POLLERR | context.POLLHUP) != 0) { + else if ((sockfd.revents & + (context.POLLNVAL | context.POLLERR | context.POLLHUP)) != 0) + { // 将 pollfd 和 connection 置为无效 sockfds[i].fd = context.INVALID_SOCKET; connections[i] = null; diff --git a/course/code/12/memory_manager.zig b/course/code/12/memory_manager.zig index 7fe8a556..fa47d139 100644 --- a/course/code/12/memory_manager.zig +++ b/course/code/12/memory_manager.zig @@ -173,7 +173,10 @@ const StackFallbackAllocator = struct { pub fn main() !void { // 初始化一个优先使用栈区的分配器 // 栈区大小为256个字节,如果栈区不够用,就会使用page allocator - var stack_alloc = std.heap.stackFallback(256 * @sizeOf(u8), std.heap.page_allocator); + var stack_alloc = std.heap.stackFallback( + 256 * @sizeOf(u8), + std.heap.page_allocator, + ); // 获取分配器 const stack_allocator = stack_alloc.get(); // 申请内存 diff --git a/course/code/12/switch.zig b/course/code/12/switch.zig index 10a6e671..c4d8aa7a 100644 --- a/course/code/12/switch.zig +++ b/course/code/12/switch.zig @@ -148,7 +148,9 @@ fn isFieldOptional(comptime T: type, field_index: usize) !bool { const fields = @typeInfo(T).Struct.fields; return switch (field_index) { // 这里每次都是不同的值 - inline 0...fields.len - 1 => |idx| @typeInfo(fields[idx].type) == .Optional, + inline 0...fields.len - 1 => |idx| { + return @typeInfo(fields[idx].type) == .Optional; + }, else => return error.IndexOutOfBounds, }; } diff --git a/course/code/12/type-cast.zig b/course/code/12/type-cast.zig index fe241116..a400d10d 100644 --- a/course/code/12/type-cast.zig +++ b/course/code/12/type-cast.zig @@ -143,7 +143,8 @@ const tag_union_enum = struct { try expect(e == E.two); const three = E.three; - const u_2: U = three; // 将枚举转换为联合类型,注意这里 three 并没有对应的类型,故可以直接转换 + // 将枚举转换为联合类型,注意这里 three 并没有对应的类型,故可以直接转换 + const u_2: U = three; try expect(u_2 == E.three); const u_3: U = .three; // 字面量供 zig 编译器来自动推导 diff --git a/course/code/14/build_system/cli/build.zig b/course/code/14/build_system/cli/build.zig index 05f0502e..1b7d1493 100644 --- a/course/code/14/build_system/cli/build.zig +++ b/course/code/14/build_system/cli/build.zig @@ -8,7 +8,9 @@ pub fn build(b: *std.Build) void { const optimize = b.standardOptimizeOption(.{}); // 使用 option 来获取命令参数决定是否剥离调试信息 - const is_strip = b.option(bool, "is_strip", "whether strip executable") orelse false; + const is_strip = + b.option(bool, "is_strip", "whether strip executable") orelse + false; // 添加一个二进制可执行程序构建 const exe = b.addExecutable(.{ diff --git a/course/code/14/build_system/embedfile/build.zig b/course/code/14/build_system/embedfile/build.zig index b5edb865..a06cd033 100644 --- a/course/code/14/build_system/embedfile/build.zig +++ b/course/code/14/build_system/embedfile/build.zig @@ -15,7 +15,10 @@ pub fn build(b: *std.Build) void { .optimize = optimize, }); - exe.root_module.addAnonymousImport("hello", .{ .root_source_file = b.path("src/hello.txt") }); + exe.root_module.addAnonymousImport( + "hello", + .{ .root_source_file = b.path("src/hello.txt") }, + ); // 添加到顶级 install step 中作为依赖 b.installArtifact(exe); diff --git a/course/code/14/build_system/test/build.zig b/course/code/14/build_system/test/build.zig index 2e0e3ff2..4e86db97 100644 --- a/course/code/14/build_system/test/build.zig +++ b/course/code/14/build_system/test/build.zig @@ -30,7 +30,8 @@ pub fn build(b: *std.Build) void { // 执行单元测试 const run_exe_unit_tests = b.addRunArtifact(exe_unit_tests); - // 如果想要跳过外部来自于其他包的单元测试(例如依赖中的包),可以使用 skip_foreign_checks + // 如果想要跳过外部来自于其他包的单元测试(例如依赖中的包) + // 可以使用 skip_foreign_checks run_exe_unit_tests.skip_foreign_checks = true; // 构建一个 step,用于执行测试 diff --git a/course/code/14/echo_tcp_server.zig b/course/code/14/echo_tcp_server.zig index 22e59dfb..638c26c0 100644 --- a/course/code/14/echo_tcp_server.zig +++ b/course/code/14/echo_tcp_server.zig @@ -58,7 +58,10 @@ pub fn main() !void { // 存储 accept 拿到的 connections var connections: [max_sockets]?net.Server.Connection = undefined; // sockfds 用于存储 pollfd, 用于传递给 poll 函数 - var sockfds: [max_sockets]if (builtin.os.tag == .windows) windows.ws2_32.pollfd else std.posix.pollfd = undefined; + var sockfds: [max_sockets]if (builtin.os.tag == .windows) + windows.ws2_32.pollfd + else + std.posix.pollfd = undefined; // #endregion data for (0..max_sockets) |i| { sockfds[i].fd = context.INVALID_SOCKET; @@ -127,14 +130,17 @@ pub fn main() !void { // 但仅仅这样写一次并不安全 // 最优解应该是使用for循环检测写入的数据大小是否等于buf长度 // 如果不等于就继续写入 - // 这是因为 TCP 是一个面向流的协议,它并不保证一次 write 调用能够发送所有的数据 + // 这是因为 TCP 是一个面向流的协议 + // 它并不保证一次 write 调用能够发送所有的数据 // 作为示例,我们不检查是否全部写入 _ = try connection.stream.write(buf[0..len]); } } } // 检查是否是 POLLNVAL | POLLERR | POLLHUP 事件,即是否有错误发生,或者连接断开 - else if (sockfd.revents & (context.POLLNVAL | context.POLLERR | context.POLLHUP) != 0) { + else if ((sockfd.revents & + (context.POLLNVAL | context.POLLERR | context.POLLHUP)) != 0) + { // 将 pollfd 和 connection 置为无效 sockfds[i].fd = context.INVALID_SOCKET; connections[i] = null; diff --git a/course/code/14/memory_manager.zig b/course/code/14/memory_manager.zig index 7fe8a556..fa47d139 100644 --- a/course/code/14/memory_manager.zig +++ b/course/code/14/memory_manager.zig @@ -173,7 +173,10 @@ const StackFallbackAllocator = struct { pub fn main() !void { // 初始化一个优先使用栈区的分配器 // 栈区大小为256个字节,如果栈区不够用,就会使用page allocator - var stack_alloc = std.heap.stackFallback(256 * @sizeOf(u8), std.heap.page_allocator); + var stack_alloc = std.heap.stackFallback( + 256 * @sizeOf(u8), + std.heap.page_allocator, + ); // 获取分配器 const stack_allocator = stack_alloc.get(); // 申请内存 diff --git a/course/code/14/switch.zig b/course/code/14/switch.zig index 10a6e671..c4d8aa7a 100644 --- a/course/code/14/switch.zig +++ b/course/code/14/switch.zig @@ -148,7 +148,9 @@ fn isFieldOptional(comptime T: type, field_index: usize) !bool { const fields = @typeInfo(T).Struct.fields; return switch (field_index) { // 这里每次都是不同的值 - inline 0...fields.len - 1 => |idx| @typeInfo(fields[idx].type) == .Optional, + inline 0...fields.len - 1 => |idx| { + return @typeInfo(fields[idx].type) == .Optional; + }, else => return error.IndexOutOfBounds, }; } diff --git a/course/code/14/type-cast.zig b/course/code/14/type-cast.zig index fe241116..a400d10d 100644 --- a/course/code/14/type-cast.zig +++ b/course/code/14/type-cast.zig @@ -143,7 +143,8 @@ const tag_union_enum = struct { try expect(e == E.two); const three = E.three; - const u_2: U = three; // 将枚举转换为联合类型,注意这里 three 并没有对应的类型,故可以直接转换 + // 将枚举转换为联合类型,注意这里 three 并没有对应的类型,故可以直接转换 + const u_2: U = three; try expect(u_2 == E.three); const u_3: U = .three; // 字面量供 zig 编译器来自动推导 diff --git a/course/environment/install-environment.md b/course/environment/install-environment.md index b0992bb9..996e05df 100644 --- a/course/environment/install-environment.md +++ b/course/environment/install-environment.md @@ -77,7 +77,8 @@ choco install zig ```powershell [System] [Environment]::SetEnvironmentVariable( "Path", - [Environment]::GetEnvironmentVariable("Path", "Machine") + ";C:\your-path\zig-windows-x86_64-your-version", + [Environment]::GetEnvironmentVariable("Path", "Machine") + + ";C:\your-path\zig-windows-x86_64-your-version", "Machine" ) ``` @@ -85,7 +86,8 @@ choco install zig ```powershell [User] [Environment]::SetEnvironmentVariable( "Path", - [Environment]::GetEnvironmentVariable("Path", "User") + ";C:\your-path\zig-windows-x86_64-your-version", + [Environment]::GetEnvironmentVariable("Path", "User") + + ";C:\your-path\zig-windows-x86_64-your-version", "User" ) ``` diff --git a/course/more/atomic.md b/course/more/atomic.md index b38a4434..d1ceceab 100644 --- a/course/more/atomic.md +++ b/course/more/atomic.md @@ -33,7 +33,11 @@ outline: deep 函数原型: ```zig -@atomicLoad(comptime T: type, ptr: *const T, comptime ordering: AtomicOrder) T +@atomicLoad( + comptime T: type, + ptr: *const T, + comptime ordering: AtomicOrder +) T ``` 用于某个类型指针进行原子化的读取值。 @@ -43,7 +47,13 @@ outline: deep 函数原型: ```zig -@atomicRmw(comptime T: type, ptr: *T, comptime op: AtomicRmwOp, operand: T, comptime ordering: AtomicOrder) T +@atomicRmw( + comptime T: type, + ptr: *T, + comptime op: AtomicRmwOp, + operand: T, + comptime ordering: AtomicOrder +) T ``` 用于原子化的修改值并返回修改前的值。 @@ -55,7 +65,12 @@ outline: deep 函数原型: ```zig -@atomicStore(comptime T: type, ptr: *T, value: T, comptime ordering: AtomicOrder) void +@atomicStore( + comptime T: type, + ptr: *T, + value: T, + comptime ordering: AtomicOrder +) void ``` 用于对某个类型指针进行原子化的赋值。 @@ -65,7 +80,14 @@ outline: deep 函数原型: ```zig -@cmpxchgWeak(comptime T: type, ptr: *T, expected_value: T, new_value: T, success_order: AtomicOrder, fail_order: AtomicOrder) ?T +@cmpxchgWeak( + comptime T: type, + ptr: *T, + expected_value: T, + new_value: T, + success_order: AtomicOrder, + fail_order: AtomicOrder +) ?T ``` 弱原子的比较与交换操作,如果目标指针是给定值,那么赋值为参数的新值,并返回null,否则仅读取值返回。 @@ -75,7 +97,14 @@ outline: deep 函数原型: ```zig -@cmpxchgStrong(comptime T: type, ptr: *T, expected_value: T, new_value: T, success_order: AtomicOrder, fail_order: AtomicOrder) ?T +@cmpxchgStrong( + comptime T: type, + ptr: *T, + expected_value: T, + new_value: T, + success_order: AtomicOrder, + fail_order: AtomicOrder +) ?T ``` 强原子的比较与交换操作,如果目标指针是给定值,那么赋值为参数的新值,并返回null,否则仅读取值返回。 diff --git a/course/more/style_guide.md b/course/more/style_guide.md index d1a4ce1a..616a7eb2 100644 --- a/course/more/style_guide.md +++ b/course/more/style_guide.md @@ -68,7 +68,10 @@ fn functionName(param_name: TypeName) void { const functionAlias = functionName; // 可被调用,且返回类型,使用 TitleCase 命名法 -fn ListTemplateFunction(comptime ChildType: type, comptime fixed_size: usize) type { +fn ListTemplateFunction( + comptime ChildType: type, + comptime fixed_size: usize, +) type { return List(ChildType, fixed_size); } diff --git a/course/update/upgrade-0.12.0.md b/course/update/upgrade-0.12.0.md index f9517608..0c60c31c 100644 --- a/course/update/upgrade-0.12.0.md +++ b/course/update/upgrade-0.12.0.md @@ -551,7 +551,10 @@ var read_buffer: [8000]u8 = undefined; ``` ```zig -pub fn serve(context: *Context, request: *std.http.Server.Request) ServeError!void { +pub fn serve( + context: *Context, + request: *std.http.Server.Request, +) ServeError!void { // ... return request.respond(content, .{ .status = status, @@ -856,33 +859,37 @@ pub const Options = struct { fmt_max_depth: usize = fmt.default_max_depth, - cryptoRandomSeed: fn (buffer: []u8) void = @import("crypto/tlcsprng.zig").defaultRandomSeed, + cryptoRandomSeed: fn (buffer: []u8) void = + @import("crypto/tlcsprng.zig").defaultRandomSeed, crypto_always_getrandom: bool = false, crypto_fork_safety: bool = true, - /// By default Zig disables SIGPIPE by setting a "no-op" handler for it. Set this option - /// to `true` to prevent that. + /// By default Zig disables SIGPIPE by setting a "no-op" handler for it. + /// Set this option to `true` to prevent that. /// - /// Note that we use a "no-op" handler instead of SIG_IGN because it will not be inherited by - /// any child process. + /// Note that we use a "no-op" handler instead of SIG_IGN + /// because it will not be inherited by any child process. /// - /// SIGPIPE is triggered when a process attempts to write to a broken pipe. By default, SIGPIPE - /// will terminate the process instead of exiting. It doesn't trigger the panic handler so in many - /// cases it's unclear why the process was terminated. By capturing SIGPIPE instead, functions that - /// write to broken pipes will return the EPIPE error (error.BrokenPipe) and the program can handle + /// SIGPIPE is triggered when a process attempts to write to a broken pipe. + /// By default, SIGPIPE will terminate the process instead of exiting. + /// It doesn't trigger the panic handler + /// so in many cases it's unclear why the process was terminated. + /// By capturing SIGPIPE instead, functions that write to broken pipes + /// will return the EPIPE error (error.BrokenPipe) and the program can handle /// it like any other error. keep_sigpipe: bool = false, - /// By default, std.http.Client will support HTTPS connections. Set this option to `true` to - /// disable TLS support. + /// By default, std.http.Client will support HTTPS connections. + /// Set this option to `true` to disable TLS support. /// - /// This will likely reduce the size of the binary, but it will also make it impossible to - /// make a HTTPS connection. + /// This will likely reduce the size of the binary, + /// but it will also make it impossible to make a HTTPS connection. http_disable_tls: bool = false, - side_channels_mitigations: crypto.SideChannelsMitigations = crypto.default_side_channels_mitigations, + side_channels_mitigations: crypto.SideChannelsMitigations = + crypto.default_side_channels_mitigations, }; ```