{"id":16370021,"url":"https://github.com/lukewilliamboswell/roc-ray","last_synced_at":"2025-04-06T10:32:12.931Z","repository":{"id":216924129,"uuid":"742655063","full_name":"lukewilliamboswell/roc-ray","owner":"lukewilliamboswell","description":"Roc graphics and GUI","archived":false,"fork":false,"pushed_at":"2025-01-29T08:22:37.000Z","size":9854,"stargazers_count":34,"open_issues_count":16,"forks_count":6,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-29T21:07:56.879Z","etag":null,"topics":["roc-lang"],"latest_commit_sha":null,"homepage":"https://lukewilliamboswell.github.io/roc-ray/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"upl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lukewilliamboswell.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":"2024-01-13T01:08:44.000Z","updated_at":"2025-03-19T03:57:27.000Z","dependencies_parsed_at":"2024-10-27T22:49:24.420Z","dependency_job_id":"5eba343a-d689-4fc1-a3f8-680871eaf766","html_url":"https://github.com/lukewilliamboswell/roc-ray","commit_stats":null,"previous_names":["lukewilliamboswell/roc-ray"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukewilliamboswell%2Froc-ray","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukewilliamboswell%2Froc-ray/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukewilliamboswell%2Froc-ray/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukewilliamboswell%2Froc-ray/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lukewilliamboswell","download_url":"https://codeload.github.com/lukewilliamboswell/roc-ray/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247470245,"owners_count":20944143,"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":["roc-lang"],"created_at":"2024-10-11T03:01:02.555Z","updated_at":"2025-04-06T10:32:12.915Z","avatar_url":"https://github.com/lukewilliamboswell.png","language":"Rust","funding_links":[],"categories":["Roc Platforms","Projects","Roc Platforms 🏢"],"sub_categories":[],"readme":"# Roc Ray Graphics Platform\n\n[Roc](https://www.roc-lang.org) platform for building graphics applications, like games and simulations, while using the [Raylib](https://www.raylib.com) graphics library.\n\nWe aim to provide a nice experience for the hobby developer or a small team who wants to build a game or graphical application in Roc.\n\n**Status** - Early development, not yet ready for production use. We are looking for contributors to help build out the platform and examples. If you find a bug or have a feature request, please open an issue or start a thread in the [roc zulip](https://roc.zulipchat.com/) where you can find us.\n\n## Features\n\n- Write games using Roc, the Fast, Friendly, and Functional programming language\n- Cross-platform support for Linux, macOS, Windows, and Web\n- Simple API for 2D graphics (3D coming soon)\n- Built on the awesome Raylib library\n- Designed for beginners, hobby developers and small teams\n\n## Documentation\n\nCheckout the docs site at [lukewilliamboswell.github.io/roc-ray](https://lukewilliamboswell.github.io/roc-ray/)\n\n## Example\n\n(requires cloning the repository locally)\n\n```roc\napp [Model, init!, render!] { rr: platform \"../platform/main.roc\" }\n\nimport rr.RocRay\nimport rr.Draw\n\nwidth = 800\nheight = 600\n\nModel : {}\n\ninit! : {} =\u003e Result Model []\ninit! = \\{} -\u003e\n\n    RocRay.initWindow! { title: \"Basic Shapes\", width, height }\n\n    Ok {}\n\nrender! : Model, RocRay.PlatformState =\u003e Result Model []\nrender! = \\_, {} -\u003e\n\n    Draw.draw! White \\{} -\u003e\n        Draw.text! { pos: { x: 10, y: 10 }, text: \"Hello World!\", size: 40, color: Navy }\n        Draw.rectangle! { rect: { x: 100, y: 150, width: 250, height: 100 }, color: Aqua }\n        Draw.rectangleGradientH! { rect: { x: 400, y: 150, width: 250, height: 100 }, left: Lime, right: Navy }\n        Draw.rectangleGradientV! { rect: { x: 300, y: 250, width: 250, height: 100 }, top: Maroon, bottom: Green }\n        Draw.circle! { center: { x: 200, y: 400 }, radius: 75, color: Fuchsia }\n        Draw.circleGradient! { center: { x: 600, y: 400 }, radius: 75, inner: Yellow, outer: Maroon }\n        Draw.line! { start: { x: 100, y: 500 }, end: { x: 500, y: 500 }, color: Red }\n\n    Ok {}\n```\n\n![basic shapes example](examples/demo-basic-shapes.png)\n\n## Getting Started\n\n### Clone the repository\n\nIn future we should be able to provide prebuilt-binaries that work with the Roc cli and writing apps is as simple as `roc run app.roc`, but for now to get started you will need to clone the repository.\n\n```\n$ git clone https://github.com/lukewilliamboswell/roc-ray.git\n```\n\n### Linux and MacOS\n\n*Required dependencies*\n1. Install [roc](https://www.roc-lang.org)\n2. Install [rust](https://www.rust-lang.org/tools/install)\n3. Install dev tools on linux `sudo apt install build-essential git` or on macOS `xcode-select --install`\n4. Install [just](https://github.com/casey/just) `cargo install just`\n5. Install [watchexec](https://github.com/watchexec/watchexec) `cargo install watchexec-cli`\n\nRun an example:\n\n```\n$ just dev examples/pong.roc\n```\n\n**OR**\n\n*Currently broken - Help Wanted*\n\nUse the [nix package manager](https://nixos.org/download/) to install the dependencies\n\n```\n$ nix develop\n$ just dev examples/pong.roc\n```\n\n### Windows\n\n1. Ensure you have [cargo](https://www.rust-lang.org/tools/install) in your path.\n2. Install [just](https://github.com/casey/just?tab=readme-ov-file#packages)\n3. Run `just setup` to download a windows build of Roc\n\nRun an example:\n\n```\nPS \u003e just dev .\\examples\\pong.roc\n```\n\nThe unofficial Windows release of roc can be manually downloaded at [lukewilliamboswell/roc/releases/tag/windows-20241011](https://github.com/lukewilliamboswell/roc/releases/tag/windows-20241011)\n\n```\nPS \u003e roc version\nroc built from commit b5e3c3e441 with additional changes, committed at 2024-10-09 11:34:35 UTC\n```\n\n### Web\n\n*Required dependencies*\n1. As above for native\n2. Install [zig](https://ziglang.org)\n3. Install [emscripten](https://emscripten.org)\n4. Install simple-http-server `cargo install simple-http-server`\n\n```\n$ just web examples/pong.roc\n```\n\n## Contributing\n\nTo run the tests locally:\n\n```\n$ ./ci/all_tests.sh\n```\n\nWe are exploring how we can make a nice API for Roc and experimenting with different ideas, not quite a 1-1 mapping of the raylib API. We hope to find a nice balance between Roc's functional and Raylib's imperative style.\n\nThis platform is young, and there is a lot of work to do. You are welcome to contribute ideas or PR's, please let us know if you have any questions or need help.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukewilliamboswell%2Froc-ray","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flukewilliamboswell%2Froc-ray","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukewilliamboswell%2Froc-ray/lists"}