> mkdir c:\llvm20
> cd c:\llvm20
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //! Minimal repro for three NTSTATUS codes that stdlib's AFD-based socket | |
| //! functions should map but currently fall through to `windows.unexpectedStatus`: | |
| //! | |
| //! netConnectIpWindows / AFD.CONNECT: CONNECTION_REFUSED (0xc0000236) | |
| //! netReadWindows / AFD.RECEIVE: CONNECTION_RESET (0xc000020d) | |
| //! netWriteWindows / AFD.SEND: CONNECTION_RESET (0xc000020d) | |
| //! | |
| //! On an unpatched stdlib each scenario prints the raw NTSTATUS via | |
| //! std.options.unexpected_error_tracing and surfaces `error.Unexpected`. | |
| //! On a patched stdlib each scenario surfaces a specific Zig error |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const std = @import("std"); | |
| const x11 = @import("x11"); | |
| const window_width = 400; | |
| const window_height = 400; | |
| const Ids = struct { | |
| range: x11.IdRange, | |
| pub fn window(self: Ids) x11.Window { | |
| return self.range.addAssumeCapacity(0).window(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/linux/src/Engine.cpp b/linux/src/Engine.cpp | |
| index 41481be07..9a413e412 100644 | |
| --- a/linux/src/Engine.cpp | |
| +++ b/linux/src/Engine.cpp | |
| @@ -117,6 +117,24 @@ namespace | |
| std::vector<std::string> slugs; | |
| } global_personal_call_url; | |
| + | |
| + // defines conversion functions between the "opaque types" used by zig |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const std = @import("std"); | |
| const win32 = @import("win32").everything; | |
| const root = @import("root"); | |
| const audio = @import("audio.zig"); | |
| fn u32FromHr(hr: i32) u32 { | |
| return @bitCast(hr); | |
| } | |
| pub fn processWarmup() !void { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #pragma once | |
| #include <cstdint> | |
| #include <optional> | |
| enum class ReleaseMouseButtons { No, Yes }; | |
| struct SendMousePos { int32_t x; int32_t y; }; | |
| void send_mouse_move(std::optional<SendMousePos> pos, ReleaseMouseButtons); | |
| void send_mouse_button(uint32_t button_flags); | |
| void send_mouse_scrolls(bool precise, float delta_x, float delta_y); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import argparse | |
| import datetime | |
| import hashlib | |
| import filecmp | |
| import glob | |
| import json | |
| import os | |
| import pathlib | |
| import re | |
| import shutil |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| static LRESULT CALLBACK LoggingWndProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) | |
| { | |
| MsgNode msg_node; | |
| WndProcEnter(&msg_node, hwnd, msg, wparam, lparam); | |
| if (false) { | |
| char buf[1000]; | |
| FormatMessages(buf, 0, sizeof(buf), &msg_node); | |
| TRACELOG(LOG_INFO, "WndProc: %s", buf); | |
| } | |
| LRESULT result = ActualWndProc(hwnd, msg, wparam, lparam); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const std = @import("std"); | |
| pub const Params = struct { | |
| Return: type, | |
| Args: type, | |
| }; | |
| pub fn with( | |
| comptime T: type, | |
| comptime params: Params, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // perftest.zig | |
| // | |
| // build with | zig build-exe -O ReleaseFast perftest.zig | |
| // linux test | poop "./perftest std" "./perftest custom" | |
| // | |
| const std = @import("std"); | |
| const tokens = @embedFile("tokens.zig"); | |
| pub fn main() void { |
NewerOlder