{"id":19984079,"url":"https://github.com/revery-ui/reason-glfw","last_synced_at":"2026-03-02T21:01:55.680Z","repository":{"id":97576132,"uuid":"147034284","full_name":"revery-ui/reason-glfw","owner":"revery-ui","description":"Cross-platform GLFW / OpenGL ES / WebGL bindings for Reason","archived":false,"fork":false,"pushed_at":"2020-02-06T18:06:49.000Z","size":848,"stargazers_count":46,"open_issues_count":18,"forks_count":17,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-24T22:26:30.635Z","etag":null,"topics":["cross-platform","esy","ocaml","opengl","opengles","reason","reasonml","webgl"],"latest_commit_sha":null,"homepage":"","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/revery-ui.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}},"created_at":"2018-09-01T21:32:36.000Z","updated_at":"2022-09-24T02:27:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"9321dcc1-823d-400c-9d60-902ff25cca03","html_url":"https://github.com/revery-ui/reason-glfw","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/revery-ui%2Freason-glfw","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/revery-ui%2Freason-glfw/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/revery-ui%2Freason-glfw/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/revery-ui%2Freason-glfw/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/revery-ui","download_url":"https://codeload.github.com/revery-ui/reason-glfw/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252225575,"owners_count":21714626,"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":["cross-platform","esy","ocaml","opengl","opengles","reason","reasonml","webgl"],"created_at":"2024-11-13T04:17:27.943Z","updated_at":"2026-03-02T21:01:55.612Z","avatar_url":"https://github.com/revery-ui.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://bryphe.visualstudio.com/reason-glfw/_apis/build/status/bryphe.reason-glfw)](https://bryphe.visualstudio.com/reason-glfw/_build/latest?definitionId=9)\n[![Build Status](https://travis-ci.org/bryphe/reason-glfw.svg?branch=master)](https://travis-ci.org/bryphe/reason-glfw) \n[![npm version](https://badge.fury.io/js/reason-glfw.svg)](https://badge.fury.io/js/reason-glfw)\n\n# reason-glfw\n\n#### Cross-platform Reason / OCaml bindings for GLFW - supports Native (OpenGL) and Javascript (WebGL))\n\n## Building\n\n`esy` is used for building, so if you don't have `esy`, install it:\n\n```\nnpm install -g esy@0.4.9\n```\n\n- `esy install`\n- `esy build`\n\n\u003e __NOTE:__ If you've never built with `esy` before, the first compile could take some time - it builds the `ocaml` compiler as well as `cmake`. Incremental builds, though, are extremely fast!\n\n## Running\n\nA very simple example project is provided - you can test it out here:\n\n__NATIVE:__\n- `cd _build/install/default/bin`\n- `./test_glfw` (`./test_glfw.exe` on Windows)\n\n__WEB:__\n- Start an http-server at `_build/install/default/bin`. (I use `npm install -g http-server`).\n- Navigate to `index.html`\n\n## License\n\nThis project is licensed under the MIT License - see [LICENSE](LICENSE) for more details.\n\n## Design\n\nFor the most part, we strive to have API compatibility for [GLFW](https://glfw.org) and OpenGL. This library supports compilation to both native and JSOO targets. In the JSOO case, we emulate the GLFW APIs.\n\nWe do have some exceptions:\n\n#### `glfwGetNativeWindow`\n\nWe wrap the [native window access](https://www.glfw.org/docs/latest/group__native.html) functions in a function `glfwGetNativeWindow`. This returns a `NativeWindow.t`, where the underlying value is platform specific:\n\n- __Windows__ - `HWND` for the current window.\n- __OSX__ - `void *` pointer to the `NSWindow`.\n- __Linux__ - `void *` pointer to the X11 Window.\n- __JS__ - `HTMLCanvasElement` representing the window.\n\n## Acknowledgements\n\n- The test texture is provided by [LearnOpenGL](https://learnopengl.com) - an excellent resource for OpenGL!\n- This is built on several great libraries, like [GLFW](https://www.glfw.org), [glad](https://github.com/Dav1dde/glad), [stb_image](https://github.com/nothings/stb/blob/master/stb_image.h)\n- The test image is from @Arahnoid's [UVChecker-map](https://github.com/Arahnoid/UVChecker-map) repo.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frevery-ui%2Freason-glfw","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frevery-ui%2Freason-glfw","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frevery-ui%2Freason-glfw/lists"}