{"id":50501522,"url":"https://github.com/floscodes/futurez","last_synced_at":"2026-06-02T12:01:12.259Z","repository":{"id":297945172,"uuid":"998373680","full_name":"floscodes/futurez","owner":"floscodes","description":"A small runtime for running futures in zig.","archived":false,"fork":false,"pushed_at":"2026-05-28T10:19:48.000Z","size":70,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-28T12:13:03.844Z","etag":null,"topics":["zig-package"],"latest_commit_sha":null,"homepage":"","language":"Zig","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/floscodes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-06-08T13:29:00.000Z","updated_at":"2026-05-28T10:22:44.000Z","dependencies_parsed_at":"2025-06-23T18:41:25.396Z","dependency_job_id":"86735dab-2cd2-4e86-84d0-9403e077c678","html_url":"https://github.com/floscodes/futurez","commit_stats":null,"previous_names":["floscodes/azync","floscodes/coroutinez","floscodes/futurez"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/floscodes/futurez","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floscodes%2Ffuturez","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floscodes%2Ffuturez/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floscodes%2Ffuturez/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floscodes%2Ffuturez/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/floscodes","download_url":"https://codeload.github.com/floscodes/futurez/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floscodes%2Ffuturez/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33820643,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-02T02:00:07.132Z","response_time":109,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["zig-package"],"created_at":"2026-06-02T12:01:11.543Z","updated_at":"2026-06-02T12:01:12.253Z","avatar_url":"https://github.com/floscodes.png","language":"Zig","funding_links":[],"categories":[],"sub_categories":[],"readme":"# futurez\n\n[![CI](https://github.com/floscodes/futurez/actions/workflows/ci.yml/badge.svg)](https://github.com/floscodes/futurez/actions/workflows/ci.yml)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n\nfuturez is a small runtime for running asynchronous tasks using futures in Zig.\n\n\n## Minimal Example\n\n```zig\nconst std = @import(\"std\");\nconst futurez = @import(\"futurez\");\nconst Runtime = futurez.Runtime;\n\nfn main() !void {\n    const allocator = std.heap.page_allocator;\n    var rt = try Runtime.init(allocator);\n    defer rt.deinit();\n\n    const task = try rt.spawn(myTaskFunction, .{});\n    const result = task.join(i32);\n    std.debug.print(\"Result: {d}\\n\", .{result});\n}\n\nfn myTaskFunction() i32 {\n    return 42;\n}\n```\n\nFor a complete example showcasing advanced usage with dynamic allocations and multiple parameters, see [examples/basic.zig](./examples/basic.zig).\n\n## Overview\n\nfuturez spawns as many worker threads as logical CPU cores available on your machine. These threads continuously pick up and run asynchronous tasks you spawn via `Runtime.spawn`. Finished tasks remain in the task queue until you call the `join()` method on the associated `*Task` to retrieve the result.\n\nYou can also control the number of worker threads by initializing the runtime with a specific core count using `initWithCores()`:\n\n```zig\nconst allocator = std.heap.page_allocator;\nvar rt = try Runtime.initWithCores(allocator, 4);\ndefer rt.deinit();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffloscodes%2Ffuturez","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffloscodes%2Ffuturez","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffloscodes%2Ffuturez/lists"}