{"id":13711647,"url":"https://github.com/e253/zig-ocl","last_synced_at":"2025-05-06T21:31:45.715Z","repository":{"id":244514713,"uuid":"815462287","full_name":"e253/zig-ocl","owner":"e253","description":"Zig package for the OpenCL ICD Loader","archived":false,"fork":false,"pushed_at":"2024-06-15T08:30:38.000Z","size":5,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-13T22:34:59.740Z","etag":null,"topics":[],"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/e253.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":"2024-06-15T08:24:12.000Z","updated_at":"2024-07-17T21:18:11.000Z","dependencies_parsed_at":"2024-06-15T09:52:41.150Z","dependency_job_id":null,"html_url":"https://github.com/e253/zig-ocl","commit_stats":null,"previous_names":["e253/zig-ocl"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/e253%2Fzig-ocl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/e253%2Fzig-ocl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/e253%2Fzig-ocl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/e253%2Fzig-ocl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/e253","download_url":"https://codeload.github.com/e253/zig-ocl/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252772049,"owners_count":21801838,"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":[],"created_at":"2024-08-02T23:01:10.284Z","updated_at":"2025-05-06T21:31:45.442Z","avatar_url":"https://github.com/e253.png","language":"Zig","readme":"### Zig Build for the OpenCL ICD Loader\n\nThis project builds the [OpenCL ICD](https://github.com/KhronosGroup/OpenCL-ICD-Loader) with the Zig Build System. The OpenCL ICD takes care of finding appropriate drivers across different hardware and operating systems.\n\nTraditionally, you install the ICD on your system with `sudo apt install ocl-icd-opencl-dev` and use `$(CC) ... -lOpenCL` to build your program.\n\nThis is not desirable becuase the linking is dynamic against `libOpenCL.so`.\n\nStatic linking with zig provides better portability and reliability.\n\n### Usage\nAdd the right release to your `build.zig.zon`\n```\nzig fetch --save https://github.com/e253/zig-ocl/archive/refs/tags/v3.0.16.tar.gz\n```\n\n\nand add the following to your `build.zig`\n```zig\npub fn build(b: *std.Build) void {\n    const ocl_icd = b.dependency(\"zig-ocl\", .{\n        .target = target,\n        .optimize = optimize\n    });\n    your_compilation.linkLibrary(ocl_icd.artifact(\"opencl\")); \n}\n```\n\nAlso, see how `test.c` is built in the `build.zig` of this repository.\n\n### Supported Platforms\n\nTested on\n- [x] Windows\n- [x] Linux (Ubuntu 22.04 WSL)\n- [ ] MacOS \n","funding_links":[],"categories":["Multimedia \u0026 Graphics"],"sub_categories":["GPU Computing"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fe253%2Fzig-ocl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fe253%2Fzig-ocl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fe253%2Fzig-ocl/lists"}