{"id":16699314,"url":"https://github.com/ousttrue/zig_uv","last_synced_at":"2025-10-07T02:55:14.379Z","repository":{"id":136461982,"uuid":"536111424","full_name":"ousttrue/zig_uv","owner":"ousttrue","description":"libuv zig build and uvbook","archived":false,"fork":false,"pushed_at":"2025-03-07T01:28:57.000Z","size":819,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-07T02:28:22.633Z","etag":null,"topics":["libuv","zig"],"latest_commit_sha":null,"homepage":"","language":"Zig","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ousttrue.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-13T12:18:08.000Z","updated_at":"2025-03-07T01:29:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"75edff5b-0ba3-43df-9c8b-85c7fbdf2d06","html_url":"https://github.com/ousttrue/zig_uv","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ousttrue%2Fzig_uv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ousttrue%2Fzig_uv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ousttrue%2Fzig_uv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ousttrue%2Fzig_uv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ousttrue","download_url":"https://codeload.github.com/ousttrue/zig_uv/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243526885,"owners_count":20305109,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["libuv","zig"],"created_at":"2024-10-12T18:06:36.022Z","updated_at":"2025-10-07T02:55:09.331Z","avatar_url":"https://github.com/ousttrue.png","language":"Zig","readme":"# libuv from zig\n\n`zig-0.13.0`\n\n## zig-0.14.0\n\n```\nerror: lld-link: undefined symbol: __declspec(dllimport) _CrtSetReportHook\n\n#if debug\n  add link to ucrtbased\n```\n\n## dependencies\n\n`master required` `v1.48.0` has CONTAINING_RECORD issue.\n\n```sh\n\u003e zig fetch --save=libuv git+https://github.com/libuv/libuv.git\n```\n\n## trobule\n\n### CONTAINING_RECORD cause runtime INVALID INSTRUCTION\n\npatch for src/win/req-inl.h\n\n```c\nINLINE static uv_req_t* uv__overlapped_to_req(OVERLAPPED* overlapped) {\n  // cause illegal instruction\n  // return CONTAINING_RECORD(overlapped, uv_req_t, u.io.overlapped);\n  return (uv_req_t*)((char*)overlapped - offsetof(uv_req_t, u.io.overlapped));\n}\n```\n\nsame https://github.com/libuv/libuv/pull/4254\n\nmerged 2024/08/06\n\n### error: dependency loop detected\n\n- https://github.com/ziglang/zig/issues/18247\n\n```zig\npub const struct_uv_stream_s = extern struct {\n    read_cb: uv_read_cb = @import(\"std\").mem.zeroes(uv_read_cb),\n};\n\n// 👆👇\n\npub const uv_read_cb = ?*const fn ([*c]uv_stream_t, isize, [*c]const uv_buf_t) callconv(.C) void;\n\n// workaround\n\npub const uv_read_cb = ?*const fn (*anyopaque, isize, [*c]const uv_buf_t) callconv(.C) void;\n```\n\n## uvbook\n\n- https://docs.libuv.org/en/v1.x/guide/introduction.html\n\n```sh\n\u003e zig build -l\n  install (default)            Copy build artifacts to prefix path\n  uninstall                    Remove build artifacts from prefix path\n  c_helloworld                 Build \u0026 run c_helloworld\n  zig_helloworld               Build \u0026 run zig_helloworld\n\n\u003e zig build c-helloworld\n```\n\n### [Basics of libuv]https://docs.libuv.org/en/v1.x/guide/basics.html\n\n| name                                                                               | c-win32 | zig |\n| ---------------------------------------------------------------------------------- | ------- | --- |\n| [helloworld](https://github.com/libuv/libuv/blob/v1.x/docs/code/helloworld/main.c) | o       | o   |\n| [idle-basic](https://github.com/libuv/libuv/blob/v1.x/docs/code/idle-basic/main.c) | o       | o   |\n\n### [Filesystem](https://docs.libuv.org/en/v1.x/guide/filesystem.html)\n\n| name                                                                           | c-win32 | zig          |\n| ------------------------------------------------------------------------------ | ------- | ------------ |\n| [uvcat](https://github.com/libuv/libuv/blob/v1.x/docs/code/uvcat/main.c)       | o       | o translated |\n| [uvtee](https://github.com/libuv/libuv/blob/v1.x/docs/code/uvtee/main.c)       | o       | o translated |\n| [onchange](https://github.com/libuv/libuv/blob/v1.x/docs/code/onchange/main.c) | o       | o            |\n\n### [Networking](https://docs.libuv.org/en/v1.x/guide/networking.html)\n\n| name                                                                                         | c-win32 | zig                        |\n| -------------------------------------------------------------------------------------------- | ------- | -------------------------- |\n| [tcp-echo-server](https://github.com/libuv/libuv/blob/v1.x/docs/code/tcp-echo-server/main.c) | o       | o translated, TODO: client |\n| [udp-dhcp](https://github.com/libuv/libuv/blob/v1.x/docs/code/udp-dhcp/main.c)               | o       | o translated               |\n| [dns](https://github.com/libuv/libuv/blob/v1.x/docs/code/dns/main.c)                         | o       | o TODO: not work           |\n| [interfaces](https://github.com/libuv/libuv/blob/v1.x/docs/code/interfaces/main.c)           | o       | x @cimport error           |\n\n### [Threads](https://docs.libuv.org/en/v1.x/guide/threads.html)\n\n| name                                                                                     | c-win32         | zig |\n| ---------------------------------------------------------------------------------------- | --------------- | --- |\n| [thread-create](https://github.com/libuv/libuv/blob/v1.x/docs/code/thread-create/main.c) | c               | o   |\n| [locks](https://github.com/libuv/libuv/blob/v1.x/docs/code/locks/main.c)                 | uv_barrier_wait |     |\n| [queue-work](https://github.com/libuv/libuv/blob/v1.x/docs/code/queue-work/main.c)       | `\u003cunistd.h\u003e`    |     |\n| [queue-cancel](https://github.com/libuv/libuv/blob/v1.x/docs/code/queue-cancel/main.c)   | `\u003cunistd.h\u003e`    |     |\n| [progress](https://github.com/libuv/libuv/blob/v1.x/docs/code/progress/main.c)           | `\u003cunistd.h\u003e`    |     |\n\n### [Process](https://docs.libuv.org/en/v1.x/guide/process.html)\n\n| name                                                                                             | c-win32      | zig          |\n| ------------------------------------------------------------------------------------------------ | ------------ | ------------ |\n| [spawn](https://github.com/libuv/libuv/blob/v1.x/docs/code/spawn/main.c)                         | o            | o translated |\n| [detach](https://github.com/libuv/libuv/blob/v1.x/docs/code/detach/main.c)                       | o            |              |\n| [signal](https://github.com/libuv/libuv/blob/v1.x/docs/code/signal/main.c)                       | `\u003cunistd.h\u003e` |              |\n| [proc-streams](https://github.com/libuv/libuv/blob/v1.x/docs/proc-streams/locks/main.c)          | o            |              |\n| [cgi](https://github.com/libuv/libuv/blob/v1.x/docs/code/cgi/main.c)                             | o            | and cgi/tick |\n| [pipe-echo-server](https://github.com/libuv/libuv/blob/v1.x/docs/code/pipe-echo-server/main.c)   | o            |              |\n| [multi-echo-server](https://github.com/libuv/libuv/blob/v1.x/docs/code/multi-echo-server/main.c) | o            |              |\n\n### [Advanced event loops](https://docs.libuv.org/en/v1.x/guide/eventloops.html)\n\n| name                                                                       | c-win32 | zig |\n| -------------------------------------------------------------------------- | ------- | --- |\n| [uvstop](https://github.com/libuv/libuv/blob/v1.x/docs/code/uvstop/main.c) | o       | x   |\n\n### [Utilities](https://docs.libuv.org/en/v1.x/guide/utilities.html)\n\n| name                                                                                     | c-win32    | zig                |\n| ---------------------------------------------------------------------------------------- | ---------- | ------------------ |\n| [ ref-timer ](https://github.com/libuv/libuv/blob/v1.x/docs/code/ref-timer/main.c)       | o          |                    |\n| [ idle-compute ](https://github.com/libuv/libuv/blob/v1.x/docs/code/idle-compute/main.c) | o          |                    |\n| [ uvwget ](https://github.com/libuv/libuv/blob/v1.x/docs/code/uvwget/main.c)             | `\u003ccurl.h\u003e` |                    |\n| [ plugin ](https://github.com/libuv/libuv/blob/v1.x/docs/code/plugin/main.c)             | o          | and plugin/hello.c |\n| [ tty ](https://github.com/libuv/libuv/blob/v1.x/docs/code/tty/main.c)                   | o          |                    |\n| [ tty-gravity ](https://github.com/libuv/libuv/blob/v1.x/docs/code/tty-gravity/main.c)   | o          | o translated       |\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fousttrue%2Fzig_uv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fousttrue%2Fzig_uv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fousttrue%2Fzig_uv/lists"}