{"id":23162050,"url":"https://github.com/devnix/chipmunkphp","last_synced_at":"2025-08-01T15:03:52.408Z","repository":{"id":56966863,"uuid":"332911413","full_name":"devnix/chipmunkphp","owner":"devnix","description":"A PHP FFI binding for the Chipmunk 2D physics engine","archived":false,"fork":false,"pushed_at":"2021-01-26T00:09:13.000Z","size":25,"stargazers_count":1,"open_issues_count":5,"forks_count":0,"subscribers_count":2,"default_branch":"7.x","last_synced_at":"2025-04-04T20:17:06.389Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","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/devnix.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-01-25T23:17:31.000Z","updated_at":"2024-05-02T15:54:55.000Z","dependencies_parsed_at":"2022-08-21T09:50:36.336Z","dependency_job_id":null,"html_url":"https://github.com/devnix/chipmunkphp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/devnix/chipmunkphp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devnix%2Fchipmunkphp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devnix%2Fchipmunkphp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devnix%2Fchipmunkphp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devnix%2Fchipmunkphp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devnix","download_url":"https://codeload.github.com/devnix/chipmunkphp/tar.gz/refs/heads/7.x","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devnix%2Fchipmunkphp/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268248335,"owners_count":24219548,"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","status":"online","status_checked_at":"2025-08-01T02:00:08.611Z","response_time":67,"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":[],"created_at":"2024-12-17T23:23:58.484Z","updated_at":"2025-08-01T15:03:52.379Z","avatar_url":"https://github.com/devnix.png","language":"C","readme":"# devnix/chipmunkphp\n\n[![Latest Version on Packagist][ico-version]][link-packagist]\n[![Software License][ico-license]](LICENSE.md)\n[![Build Status][ico-travis]][link-travis]\n[![Coverage Status][ico-scrutinizer]][link-scrutinizer]\n[![Quality Score][ico-code-quality]][link-code-quality]\n[![Total Downloads][ico-downloads]][link-downloads]\n\nThis project aims to provide a full FFI wrapper around Chipmunk 2D physics engine for PHP. What a time to be alive!\n\n## Install\n\nVia Composer\n\n``` bash\n$ composer require devnix/chipmunkphp\n```\n\n### Dependencies\n\n#### Linux\n\nYou will need to compile and install Chipmunk 7\n\n```sh\ncd /tmp\ngit clone git@github.com:slembcke/Chipmunk2D.git\ncd Chipmunk2D\n```\n\nFind the latest 7.x tag and checkout it\n```sh\ngit tag\n```\n\n```\nChipmunk-6.0.0\nChipmunk-6.0.1\nChipmunk-6.0.2\nChipmunk-6.0.3\nChipmunk-6.1\nChipmunk-6.1.1\nChipmunk-6.1.2\nChipmunk-6.1.3\nChipmunk-6.1.4\nChipmunk-6.1.5\nChipmunk-6.2.0\nChipmunk-6.2.1\nChipmunk-6.2.2\nChipmunk-7.0.0\nChipmunk-7.0.1\nChipmunk-7.0.2\nChipmunk-7.0.3\nCocos2D-3.0\n```\n\n```sh\ngit checkout Chipmunk-7.0.3\n```\n\nThen compile, install and clear shared libraries cache.\n\n```sh\ncmake .\nmake\nsudo make install\nsudo ldconfig\n```\n\nAnd should be done. Please, give us feedback if you have problems opening an issue.\n\n## Change log\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.\n\n## Hacking\n\nThe header file for the FFI API must be already processed. You can do it with GCC (I'm just messing with the parameters...):\n\n```sh\ncpp -P -E -D \"__attribute__(ARGS)=\" ~/tmp/Chipmunk2D/include/chipmunk/chipmunk.h -o include/chipmunk.h  -save-temps\n```\n\nDon't forget to hange the `/tmp/Chipmunk2D` path to your needs.\n\nAfter that, manually remove code of inline functions and let there only the signature. You will also have to manually delete the stdio.h and math.h (I guess) signatures.\n\nI've been messing with [ircmaxell/FFIMe](https://github.com/ircmaxell/FFIMe) but it seems like there is some kind of problem when parsing with [ircmaxell/php-c-parser](https://github.com/ircmaxell/php-c-parser).\nI would love to find a way to automatically get the working header file automatically to ease the work.\n\n## Testing\n\n``` bash\n$ composer test\n```\n\n## Contributing\n\nPlease see [CONTRIBUTING](CONTRIBUTING.md) and [CODE_OF_CONDUCT](CODE_OF_CONDUCT.md) for details.\n\n## Security\n\nIf you discover any security related issues, please email devnix.code@gmail.com instead of using the issue tracker.\n\n## Credits\n\n- [Pablo Largo Mohedano][link-author], author of this package.\n- Victor Blomqvist, I have stolen documentation and ideas from [Pymunk][pymunk-github].\n- Scott Lembcke and Howling Moon Software, makers of [Chipmnunk][chipmunk-github], parts of C header files are in this project.\n- [All Contributors][link-contributors]\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n\n[ico-version]: https://img.shields.io/packagist/v/devnix/chipmunkphp.svg?style=flat-square\n[ico-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square\n[ico-travis]: https://img.shields.io/travis/devnix/chipmunkphp/master.svg?style=flat-square\n[ico-scrutinizer]: https://img.shields.io/scrutinizer/coverage/g/devnix/chipmunkphp.svg?style=flat-square\n[ico-code-quality]: https://img.shields.io/scrutinizer/g/devnix/chipmunkphp.svg?style=flat-square\n[ico-downloads]: https://img.shields.io/packagist/dt/devnix/chipmunkphp.svg?style=flat-square\n\n[link-packagist]: https://packagist.org/packages/devnix/chipmunkphp\n[link-travis]: https://travis-ci.org/devnix/chipmunkphp\n[link-scrutinizer]: https://scrutinizer-ci.com/g/devnix/chipmunkphp/code-structure\n[link-code-quality]: https://scrutinizer-ci.com/g/devnix/chipmunkphp\n[link-downloads]: https://packagist.org/packages/devnix/chipmunkphp\n[link-author]: https://github.com/devnix\n[link-contributors]: ../../contributors\n\n[pymunk-github]: https://github.com/viblo/pymunk\n[chipmunk-github]: https://github.com/slembcke/Chipmunk2D","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevnix%2Fchipmunkphp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevnix%2Fchipmunkphp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevnix%2Fchipmunkphp/lists"}