{"id":15683486,"url":"https://github.com/devigned/veil","last_synced_at":"2025-05-07T13:05:30.930Z","repository":{"id":50392341,"uuid":"93082202","full_name":"devigned/veil","owner":"devigned","description":"Veil is a code generator which exposes Golang packages via a generated C ABI that is consumed by host languages through FFI. Currently, Veil supports Python, but could be used with any FFI implementation. This is a work in progress.","archived":false,"fork":false,"pushed_at":"2017-09-29T16:47:11.000Z","size":145,"stargazers_count":10,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-07T13:05:24.612Z","etag":null,"topics":["ast","cffi","ffi-bindings","go","golang","python"],"latest_commit_sha":null,"homepage":"","language":"Go","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/devigned.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}},"created_at":"2017-06-01T17:23:57.000Z","updated_at":"2025-05-07T08:50:36.000Z","dependencies_parsed_at":"2022-09-26T18:10:39.025Z","dependency_job_id":null,"html_url":"https://github.com/devigned/veil","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/devigned%2Fveil","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devigned%2Fveil/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devigned%2Fveil/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devigned%2Fveil/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devigned","download_url":"https://codeload.github.com/devigned/veil/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252883212,"owners_count":21819160,"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":["ast","cffi","ffi-bindings","go","golang","python"],"created_at":"2024-10-03T17:06:11.849Z","updated_at":"2025-05-07T13:05:30.909Z","avatar_url":"https://github.com/devigned.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Veil\n[![Build Status](https://travis-ci.org/devigned/veil.svg?branch=feature%2Finterfaces)](https://travis-ci.org/devigned/veil)\n\nVeil is a code generator, which exposes Golang packages via a generated C ABI that is consumed by \nhost languages through FFI. Currently, Veil supports Python, but could be used with any FFI \nimplementation.\n\nVeil produces a C ABI from a Golang package by parsing the AST exposed by the Golang package \nand building a CGo wrapper AST for the exposed functionality in the package. The CGo\nwrapper AST is written to `main.go`, compiled, and used as the basis for FFI binding from the \nconsuming language.\n\nVeil has been built to comply with the Golang specification for Go code consumed via a C bridge \n(see: https://golang.org/cmd/cgo/#hdr-Passing_pointers). The Veil bridge provides a 16 byte UUID as an\nexposed pointer to the consuming language, which maps to the Golang pointer on the Go side of the\nC bridge. No Golang pointers are shared across the Go to C bridge.\n\n**This is a work in progress. Please don't use this if you expect stability.**\n\n## Other Languages\nAdding support for other languages is a future goal of the project. If you are interested, visit\n[./bind/python](./bind/python) and take a look at what the Python the binder does. \nPull requests are welcome.\n\n## Running Veil\n- `make`\n- `./bin/github.com/devigned/veil generate -p github.com/devigned/veil/_examples/helloworld`\n- `cd ./output`\n- run some python...\n```python\nimport generated\nprint(generated.get_magic_number())\n```\n\n## License\nMIT License\n\nCopyright (c) 2017 David Justice\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevigned%2Fveil","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevigned%2Fveil","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevigned%2Fveil/lists"}