{"id":45464612,"url":"https://github.com/tonis2/Vulkan.c3","last_synced_at":"2026-03-07T11:00:40.146Z","repository":{"id":183525707,"uuid":"661792795","full_name":"tonis2/Vulkan.c3","owner":"tonis2","description":"Vulkan bindings for C3 language","archived":false,"fork":false,"pushed_at":"2026-03-03T09:50:06.000Z","size":59571,"stargazers_count":9,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-03T12:59:39.708Z","etag":null,"topics":["c3","c3c","vulkan"],"latest_commit_sha":null,"homepage":"","language":"C3","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/tonis2.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":"2023-07-03T16:54:59.000Z","updated_at":"2026-03-03T09:50:09.000Z","dependencies_parsed_at":"2023-07-24T20:29:39.149Z","dependency_job_id":"9d1a39dd-b9d1-47ed-8e01-ddd3f686155d","html_url":"https://github.com/tonis2/Vulkan.c3","commit_stats":null,"previous_names":["tonis2/vulkan.c3"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/tonis2/Vulkan.c3","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tonis2%2FVulkan.c3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tonis2%2FVulkan.c3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tonis2%2FVulkan.c3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tonis2%2FVulkan.c3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tonis2","download_url":"https://codeload.github.com/tonis2/Vulkan.c3/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tonis2%2FVulkan.c3/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30212103,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-07T09:02:10.694Z","status":"ssl_error","status_checked_at":"2026-03-07T09:02:08.429Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["c3","c3c","vulkan"],"created_at":"2026-02-22T09:00:30.510Z","updated_at":"2026-03-07T11:00:40.140Z","avatar_url":"https://github.com/tonis2.png","language":"C3","funding_links":[],"categories":["Game Development"],"sub_categories":[],"readme":"# Vulkan.c3\n\nVulkan bindings for the C3 programming language with idiomatic C3 error handling and builder patterns for easy Vulkan development.\n\n## Features\n\n- **Complete Vulkan API Coverage** - Bindings for Vulkan API versions 1.0 through 1.4\n- **Idiomatic C3 Error Handling** - Vulkan commands use C3's error handling mechanisms\n- **Builder Pattern** - Auto-generated builder pattern for easy Vulkan struct creation\n- **Cross-Platform** - Supports Windows, Linux (Wayland/X11), and macOS\n- **Working Example** - Includes a complete 3D cube example to get you started\n\n## Prerequisites\n\nBefore using this library, you need:\n\n1. **[C3 Compiler](https://c3-lang.org/)** - Install the latest version of the C3 compiler\n2. **[Vulkan SDK](https://vulkan.lunarg.com/sdk/home)** - Download and install the Vulkan SDK for your platform\n\n## Running the Example\n\n```bash\n# Linux\nc3c run cube\n\n# Windows\nc3c run cube-win\n\n# macOS (adjust path as needed)\nc3c run cube -z -rpath -z /Users/yourusername/VulkanSDK/macOS/lib\n```\n\n### Linux\n\n1. **Install Vulkan SDK**:\n   ```bash\n   # Ubuntu/Debian\n   sudo apt install vulkan-tools vulkan-validationlayers-dev spirv-tools\n   \n   # Or download from LunarG website and follow their instructions\n   ```\n\n2. **Choose Display Server** (Wayland or X11):\n   Edit `project.json` and set the appropriate feature:\n   ```json\n   \"features\": [\"WAYLAND\"]  // For Wayland\n   // or\n   \"features\": [\"X11\"]      // For X11\n   ```\n\n### Windows\n\n1. **Install Vulkan SDK**: Download from [LunarG Vulkan SDK](https://vulkan.lunarg.com/sdk/home)\n\n2. **Add Vulkan to PATH**: Ensure `VULKAN_SDK` environment variable is set\n\n3. **Cross-compilation from Linux**: If developing on Linux but targeting Windows, the `cube-win` target includes the necessary Windows SDK configuration.\n\n### macOS\n\n1. **Install C3**: Follow the [macOS installation guide](https://c3-lang.org/getting-started/installation/)\n\n2. **Install Vulkan SDK**: Download [Vulkan SDK for macOS](https://vulkan.lunarg.com/sdk/home#mac)\n\n3. **Run the example** with the Vulkan library path:\n   ```bash\n   # Replace /path/to/VulkanSDK with your actual SDK path\n   c3c run cube -z -rpath -z /Users/yourusername/VulkanSDK/macOS/lib\n   ```\n\n\n**Controls**:\n- **Mouse**: Click and drag to rotate the camera\n- **Scroll**: Zoom in/out\n\n## Using the Library in Your Project\n\n### Option 1: Using the Pre-built Library\n\n1. Build the library file:\n\n   Download the prebuilt library from [here](https://github.com/tonis2/Vulkan.c3/releases/download/latest/vulkan.c3l)\n\n   Or build manually.\n\n   ```bash\n   c3c build zip --trust=full\n   ```\n   This creates `vulkan.c3l` in the project root.\n\n2. Copy `vulkan.c3l` to your project's library directory (e.g., `./libs/`)\n\n3. Update your `project.json`:\n   ```json\n   {\n     \"dependency-search-paths\": [\"./libs\"],\n     \"dependencies\": [\"vulkan\"]\n   }\n   ```\n\n4. Use in your code:\n   ```c3\n   import vk;\n   \n   fn void main() {\n       // Create Vulkan instance\n       ApplicationInfo info = {\n         .pApplicationName = \"TEST\",\n         .pEngineName = \"Super engine\",\n         .applicationVersion = vk::@makeApiVersion(0,1,0,0),\n         .engineVersion = vk::@makeApiVersion(0,1,0,0),\n         .apiVersion = vk::@makeApiVersion(0,1,3,0)\n       };\n   \n       InstanceCreateInfo instanceInfo = vk::instanceCreateInfo()\n       .setApplicationInfo(\u0026info)\n       .setFlags(env::os_is_darwin() ? vk::INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR : 0)\n       .setEnabledExtensionNames(extensions.array_view());\n      }\n   }\n   ```\n\n## Building the Bindings\n\nIf you want to regenerate the Vulkan bindings from the official XML specification:\n\n1. **Run the build script**:\n   ```bash\n   sh build.sh\n   ```\n\n## License\n\nThis project is licensed under the terms found in the [LICENSE](LICENSE) file.\n\n## Contributing\n\nContributions are welcome! Feel free to open issues or submit pull requests.\n\n## Resources\n- [Window library](https://github.com/tonis2/Window.c3)\n- [Example game code](https://github.com/tonis2/game.c3)\n- [C3 Language Documentation](https://c3-lang.org/)\n- [Vulkan Tutorial](https://vulkan-tutorial.com/)\n- [Vulkan Specification](https://www.khronos.org/registry/vulkan/)\n- [LunarG Vulkan SDK](https://vulkan.lunarg.com/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftonis2%2FVulkan.c3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftonis2%2FVulkan.c3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftonis2%2FVulkan.c3/lists"}