{"id":13568085,"url":"https://github.com/sol-vin/raylib-cr","last_synced_at":"2025-04-05T19:10:18.950Z","repository":{"id":38296675,"uuid":"434227715","full_name":"sol-vin/raylib-cr","owner":"sol-vin","description":"LibRaylib Bindings for Crystal.","archived":false,"fork":false,"pushed_at":"2025-01-12T11:00:40.000Z","size":22463,"stargazers_count":93,"open_issues_count":2,"forks_count":19,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-29T18:06:10.038Z","etag":null,"topics":["binding","crystal","framework","gamedev"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sol-vin.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}},"created_at":"2021-12-02T13:17:36.000Z","updated_at":"2025-03-10T20:30:35.000Z","dependencies_parsed_at":"2023-10-01T16:51:29.391Z","dependency_job_id":"b27691ae-0aea-433a-91c2-1f303705fc4a","html_url":"https://github.com/sol-vin/raylib-cr","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sol-vin%2Fraylib-cr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sol-vin%2Fraylib-cr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sol-vin%2Fraylib-cr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sol-vin%2Fraylib-cr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sol-vin","download_url":"https://codeload.github.com/sol-vin/raylib-cr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247386262,"owners_count":20930619,"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":["binding","crystal","framework","gamedev"],"created_at":"2024-08-01T14:00:19.799Z","updated_at":"2025-04-05T19:10:18.907Z","avatar_url":"https://github.com/sol-vin.png","language":"C","funding_links":[],"categories":["C","Game Development"],"sub_categories":[],"readme":"![logo](logo/raylib-cr_256x256.png)\n\n[![Windows - Build Examples](https://github.com/sol-vin/raylib-cr/actions/workflows/windows-build.yml/badge.svg)](https://github.com/sol-vin/raylib-cr/actions/workflows/windows-build.yml)\n[![Ubuntu - Build Examples](https://github.com/sol-vin/raylib-cr/actions/workflows/ubuntu-build.yml/badge.svg)](https://github.com/sol-vin/raylib-cr/actions/workflows/ubuntu-build.yml)\n\n# raylib-cr\n\nCrystal Bindings for `raylib`, a small and easy to use game development library.  \nAs for now the bindings only support the raw function calls from raylib itself.\n`raymath` functions are also supported, as are infix operators for vectors,\nmatricies, and quaternions.\n# Supported platforms\n\nThese platforms are supported out of the box and are linked statically\n1. 64-bit Linux\n2. 64-bit Windows\n\nWeak/Broken support\n1. MacOS\n\nHopefully soon  \n - Raspberry PI\n\n# Installation\n\n### Linux\n1. Run\n```sh\nsh rsrc/native/ubuntu/install.sh\n```\n2. Add `raylib-cr` to your `shard.yml`:\n```yml\ndependencies:\n  raylib-cr:\n    github: sol-vin/raylib-cr\n```\n3. Run `shards install`\n4. Get programming!\n\n### Windows\n\n1. Follow the instructions at https://github.com/neatorobito/scoop-crystal to add the crystal-preview bucket to scoop\n2. Install crystal with `scoop install crystal`\n3. `powershell ./rsrc/native/windows/install.ps1`\n4. Run in powershell\n```powershell\n$env:LIB=\"${env:LIB};C:\\raylib\"\n$env:PATH=\"${env:PATH};C:\\raylib\"\n```\n\nOR\n\nRun in cmd\n```cmd\nset PATH=%PATH%;C:\\raylib\nset LIB=%LIB%;C:\\raylib\n```\n5. Add `raylib-cr` to your `shard.yml`:\n```yml\ndependencies:\n  raylib-cr:\n    github: sol-vin/raylib-cr\n```\n6. Run `shards install`\n7. Get programming!\n\n### MacOS\n1. Run\n```\nsudo sh rsrc/native/mac/mac-raylib-install.sh\n```\n2. Add `raylib-cr` to your `shard.yml`:\n```yml\ndependencies:\n  raylib-cr:\n    github: sol-vin/raylib-cr\n```\n3. Run `shards install`\n4. Get programming!\n\n# Usage Example\n\n`main.cr`\n\n```crystal\nrequire \"raylib-cr\"\n\nRaylib.init_window(800, 450, \"Hello World\")\nRaylib.set_target_fps(60)\n\nuntil Raylib.close_window?\n  Raylib.begin_drawing\n  Raylib.clear_background(Raylib::RAYWHITE)\n  \n  Raylib.draw_text(\"Hello World!\", 190, 200, 20, Raylib::BLACK)\n  Raylib.end_drawing\nend\n\nRaylib.close_window\n```\n 1. Add `raylib-cr` to `shard.yml` dependencies.\n 2. `shards install`\n 3. Run in powershell (only needs to be run once per new console window opened)\n```powershell\n$env:LIB=\"${env:LIB};C:\\raylib\"\n$env:PATH=\"${env:PATH};C:\\raylib\"\n```\n 4. `shards run`\n\n# RayGUI, RLGL, Audio, and Lights\nIf you need to extra functionality, RLGL, RAudio and Lights can be included with the following.\n```crystal\nrequire \"raylib-cr/raygui\"\nrequire \"raylib-cr/rlgl\"\nrequire \"raylib-cr/audio\"\nrequire \"raylib-cr/lights\"\n```\n# Contributing\n\n1. Fork it (https://github.com/sol-vin/raylib-cr)\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n\n# Owner\n- [sol-vin](https://github.com/sol-vin)\n\n# Major Contributors\n- [rightbrace](https://github.com/b1tlet) - Raymath \u0026 Wrapper\n# Minor Contributors\n- [b1tlet](https://github.com/b1tlet) - Fog Shader\n\n# Inactive Contributors\n- [AregevDev](https://github.com/AregevDev) - creator\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsol-vin%2Fraylib-cr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsol-vin%2Fraylib-cr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsol-vin%2Fraylib-cr/lists"}