{"id":15304226,"url":"https://github.com/colbyhall/objective-zig-gen","last_synced_at":"2025-06-27T10:06:55.446Z","repository":{"id":256446641,"uuid":"852526403","full_name":"colbyhall/objective-zig-gen","owner":"colbyhall","description":"Obejctive-C to Zig bindgen.","archived":false,"fork":false,"pushed_at":"2024-10-16T03:04:02.000Z","size":184,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-27T10:05:23.318Z","etag":null,"topics":["bindgen","macos","objective-c","zig"],"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/colbyhall.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}},"created_at":"2024-09-05T00:45:18.000Z","updated_at":"2025-06-26T11:03:49.000Z","dependencies_parsed_at":"2025-06-27T10:05:24.935Z","dependency_job_id":null,"html_url":"https://github.com/colbyhall/objective-zig-gen","commit_stats":{"total_commits":18,"total_committers":1,"mean_commits":18.0,"dds":0.0,"last_synced_commit":"b10ecddc7876325886257f7e34e345ad05899d5e"},"previous_names":["colbyhall/zigobjcgen","colbyhall/objective-zig-gen"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/colbyhall/objective-zig-gen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colbyhall%2Fobjective-zig-gen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colbyhall%2Fobjective-zig-gen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colbyhall%2Fobjective-zig-gen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colbyhall%2Fobjective-zig-gen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/colbyhall","download_url":"https://codeload.github.com/colbyhall/objective-zig-gen/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colbyhall%2Fobjective-zig-gen/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262235780,"owners_count":23279566,"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":["bindgen","macos","objective-c","zig"],"created_at":"2024-10-01T07:03:51.997Z","updated_at":"2025-06-27T10:06:55.405Z","avatar_url":"https://github.com/colbyhall.png","language":"Zig","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Zig Objective-C Generator (objective-zig-gen)\n\n![License](https://img.shields.io/badge/license-MIT-blue.svg)\n\n`objective-zig-gen` is a work-in-progress tool for generating Objective-C bindings from Zig. This project aims to streamline the process of integrating Objective-C code with Zig, providing developers with a seamless way to interact with Objective-C APIs from Zig projects. You can find generated bindings in [objective-zig](https://github.com/colbyhall/objective-zig).\n\n## Goals\n\n- **Objective-C Bindings Generation**: Automatically generate Zig bindings for Objective-C code, enabling smooth integration between Zig and Objective-C.\n- **Type Mapping**: Handles basic type conversions between Zig and Objective-C.\n- **Command Line Interface**: Easy-to-use CLI for generating bindings directly from Objective-C header files.\n- **Comptime Zig to Objective C ABI**: Allow users to write Objective-C compatible Zig so there is no need to write any Objective-C.\n\n## Getting Started\n\n### Prerequisites\n\n- [Zig](https://ziglang.org/) (0.13.0)\n- llvm installed through homebrew for libclang (We currently have a naive way to find libclang which is why homebrew is required)\n- A working Objective-C toolchain (Xcode on macOS)\n\n### Installation\n\nSince this project is under active development, it's recommended to clone the repository and build from source:\n\n```bash\ngit clone https://github.com/colbyhall/zigobjcgen.git\ncd zigobjcgen\nzig build\n```\n\n### Usage\n\nThe program works off of a manifest file that list out xtool sdk frameworks, their dependencies, and other information for formatting the types.\n\n```bash\nobjective-zig-gen \u003cpath/to/manifest.json\u003e\n```\nHere is an example manifest file\n\n```json\n[\n    {\n        \"name\": \"Security\",\n        \"output_file\": \"security\"\n    },\n    {\n        \"name\": \"CoreFoundation\",\n        \"output_file\": \"cf\",\n\n        \"remove_prefix\": \"CF\"\n    },\n    {\n        \"name\": \"CoreServices\",\n        \"output_file\": \"cs\",\n\n        \"dependencies\": [\n            \"CoreFoundation\"\n        ]\n    },\n    {\n        \"name\": \"Foundation\",\n        \"output_file\": \"ns\",\n\n        \"remove_prefix\": \"NS\",\n        \"dependencies\": [\n            \"CoreServices\",\n            \"CoreFoundation\",\n            \"Security\"\n        ]\n    }\n]\n```\n\n## Roadmap\n- [ ] **In Progress** | Complete type mapping for all Objective-C types. (Protocols, Interfaces, Blocks)\n- [ ] Zig interface for writing Objective-C ABI compatible Zig.\n- [ ] Comprehensive test and benchmarking.\n\n## Contributing\nContributions are welcome! Feel free to open issues or submit pull requests if you want to help improve the project.\n\n## License\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Acknowledgements\n- Thanks to the Zig community for their ongoing support and inspiration\n- Inspiration for this project comes from the ened to bridge the gap between Zig and the Objective-C ecosystem.\n- Mach and [mach-objc](https://github.com/hexops/mach-objc) for giving me the initial inspiration, resources, and some runtime code bindings.\n\n---\n\n**Note**: This project is actively being developed and is not ready for production use. Expect frequent changes and updates.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcolbyhall%2Fobjective-zig-gen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcolbyhall%2Fobjective-zig-gen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcolbyhall%2Fobjective-zig-gen/lists"}