{"id":21668428,"url":"https://github.com/node-3d/glfw-raub","last_synced_at":"2026-06-12T00:01:00.670Z","repository":{"id":42351413,"uuid":"79730638","full_name":"node-3d/glfw-raub","owner":"node-3d","description":"GLFW for Node.js","archived":false,"fork":false,"pushed_at":"2025-02-26T09:06:39.000Z","size":21622,"stargazers_count":59,"open_issues_count":0,"forks_count":14,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-28T15:52:27.085Z","etag":null,"topics":["addon","bindings","cpp","gl","glfw","graphics","javascript","native","node-3d","opengl","window"],"latest_commit_sha":null,"homepage":"https://github.com/node-3d/node-3d","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/node-3d.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-01-22T16:50:38.000Z","updated_at":"2025-07-30T16:34:04.000Z","dependencies_parsed_at":"2023-02-07T02:16:55.859Z","dependency_job_id":"cc2d3e05-fdfe-48be-8605-992cfdc04f44","html_url":"https://github.com/node-3d/glfw-raub","commit_stats":{"total_commits":438,"total_committers":24,"mean_commits":18.25,"dds":0.5684931506849316,"last_synced_commit":"52a82220fbcbeb8ed0882b4bd361420275544cd5"},"previous_names":["raub/node-glfw"],"tags_count":38,"template":false,"template_full_name":null,"purl":"pkg:github/node-3d/glfw-raub","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node-3d%2Fglfw-raub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node-3d%2Fglfw-raub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node-3d%2Fglfw-raub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node-3d%2Fglfw-raub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/node-3d","download_url":"https://codeload.github.com/node-3d/glfw-raub/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node-3d%2Fglfw-raub/sbom","scorecard":{"id":691780,"data":{"date":"2025-08-11","repo":{"name":"github.com/node-3d/glfw-raub","commit":"f43fd6a630f8f3c4f60344c8150c970337b15a70"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.8,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: SECURITY.md:1","Info: Found linked content: SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: SECURITY.md:1","Info: Found text in security policy: SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":0,"reason":"Found 1/29 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/build.yml:1","Warn: no topLevel permission defined: .github/workflows/cpplint.yml:1","Warn: no topLevel permission defined: .github/workflows/eslint.yml:1","Warn: no topLevel permission defined: .github/workflows/publish.yml:1","Warn: no topLevel permission defined: .github/workflows/test.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Pinned-Dependencies","score":4,"reason":"dependency not pinned by hash detected -- score normalized to 4","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/node-3d/glfw-raub/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/node-3d/glfw-raub/build.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/node-3d/glfw-raub/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:55: update your workflow using https://app.stepsecurity.io/secureworkflow/node-3d/glfw-raub/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:60: update your workflow using https://app.stepsecurity.io/secureworkflow/node-3d/glfw-raub/build.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:84: update your workflow using https://app.stepsecurity.io/secureworkflow/node-3d/glfw-raub/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/cpplint.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/node-3d/glfw-raub/cpplint.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/cpplint.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/node-3d/glfw-raub/cpplint.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/eslint.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/node-3d/glfw-raub/eslint.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/eslint.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/node-3d/glfw-raub/eslint.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/node-3d/glfw-raub/publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/node-3d/glfw-raub/publish.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish.yml:40: update your workflow using https://app.stepsecurity.io/secureworkflow/node-3d/glfw-raub/publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/node-3d/glfw-raub/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/node-3d/glfw-raub/test.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/cpplint.yml:37","Info:   0 out of  12 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   3 third-party GitHubAction dependencies pinned","Info:   4 out of   4 npmCommand dependencies pinned","Info:   0 out of   1 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact 6.4.0 not signed: https://api.github.com/repos/node-3d/glfw-raub/releases/202491505","Warn: release artifact 6.1.0 not signed: https://api.github.com/repos/node-3d/glfw-raub/releases/193228740","Warn: release artifact 6.0.0 not signed: https://api.github.com/repos/node-3d/glfw-raub/releases/183223209","Warn: release artifact 6.4.0 does not have provenance: https://api.github.com/repos/node-3d/glfw-raub/releases/202491505","Warn: release artifact 6.1.0 does not have provenance: https://api.github.com/repos/node-3d/glfw-raub/releases/193228740","Warn: release artifact 6.0.0 does not have provenance: https://api.github.com/repos/node-3d/glfw-raub/releases/183223209"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":8,"reason":"2 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-xffm-g5w8-qvg7","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-22T02:28:28.264Z","repository_id":42351413,"created_at":"2025-08-22T02:28:28.265Z","updated_at":"2025-08-22T02:28:28.265Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34222709,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-11T02:00:06.485Z","response_time":57,"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":["addon","bindings","cpp","gl","glfw","graphics","javascript","native","node-3d","opengl","window"],"created_at":"2024-11-25T12:15:50.315Z","updated_at":"2026-06-12T00:01:00.440Z","avatar_url":"https://github.com/node-3d.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GLFW for Node.js\n\nThis is a part of [Node3D](https://github.com/node-3d) project.\n\n[![NPM](https://badge.fury.io/js/glfw-raub.svg)](https://badge.fury.io/js/glfw-raub)\n[![ESLint](https://github.com/node-3d/glfw-raub/actions/workflows/eslint.yml/badge.svg)](https://github.com/node-3d/glfw-raub/actions/workflows/eslint.yml)\n[![Test](https://github.com/node-3d/glfw-raub/actions/workflows/test.yml/badge.svg)](https://github.com/node-3d/glfw-raub/actions/workflows/test.yml)\n[![Cpplint](https://github.com/node-3d/glfw-raub/actions/workflows/cpplint.yml/badge.svg)](https://github.com/node-3d/glfw-raub/actions/workflows/cpplint.yml)\n\n```console\nnpm i -s glfw-raub\n```\n\n**Node.js** addon with **GLFW3** bindings.\n\n![Example](examples/screenshot.jpg)\n\n* **GLFW** version **3.4.0** backend.\n* Exposes low-level **GLFW** interface.\n* Multiple windows for a single **Node.js** process.\n* Able to switch to fullscreen and back.\n* Has `Window` class, simplifying low-level interactions.\n* Has `Document` class, capable of tricking other libs, as if we are in a browser.\n\n```js\nimport glfw from 'glfw-raub';\nconst { Window } = glfw;\n\nconst wnd = new Window({ title: 'GLFW Test', vsync: true });\n\nwnd.loop(() =\u003e {\n\tif (wnd.shouldClose || wnd.getKey(glfw.KEY_ESCAPE)) {\n\t\tprocess.exit(0);\n\t\treturn;\n\t}\n\t\n\tglfw.testScene(wnd.width, wnd.height);\n});\n```\n\n\u003e Note: this **addon uses N-API**, and therefore is ABI-compatible across different\nNode.js versions. Addon binaries are precompiled and **there is no compilation**\nstep during the `npm i` command.\n\n\n## GLFW\n\nThis is a low-level interface, where most of the stuff is directly reflecting\nGLFW API. GLFW **does NOT EXPOSE** OpenGL commands, it only [controls the window-related\nsetup and resources](http://www.glfw.org/docs/latest/group__window.html).\nTo access OpenGL/WebGL API you can use [webgl-raub](https://github.com/node-3d/webgl-raub)\nor any other similar addon.\n\nAside from several additional features, this addon directly exposes the GLFW API to JS. E.g.:\n\n```cpp\nDBG_EXPORT JS_METHOD(pollEvents) {\n\tglfwPollEvents();\n\tRET_GLFW_VOID;\n}\n```\n\nNothing is added between you and GLFW, unless necessary or explicitly mentioned.\n\n* All `glfw*` functions are accessible as\n    `glfw.*`. E.g. `glfwPollEvents` -\u003e `glfw.pollEvents`.\n* All `GLFW_*` constants are accessible as\n    `glfw.*`. E.g. `GLFW_TRUE` -\u003e `glfw.TRUE`.\n* Method `glfw.createWindow` takes some additional arguments. This is mostly related to\n    JS events being generated from GLFW callbacks,\n    and here's where you provide an Emitter object.\n* Pointers are directly exposed as numbers to JS and are expected as\n    arguments in specific methods. Such as, `glfw.createWindow` returns a number\n    (pointer), and then you provide it back to e.g. `glfw.setWindowTitle`.\n\nSee [this example](/examples/vulkan.mjs) for raw GLFW calls.\n\nSee [TS declarations](/index.d.ts) for more details.\n\n----------\n\n\n### class Window\n\n```js\nconst { Window } = glfw;\nconst wnd = new Window({ title: 'GLFW Test', vsync: true });\n```\n\nThis class helps managing window objects and their events. It can also switch between\nfullscreen, borderless and windowed modes.\n\nThe first window creates an additional invisible root-window for context sharing\n(so that you can also close any window and still keep the root context).\nThe platform context (pointers/handles) for sharing may be obtained when necessary.\n\nSee [TS declarations](/index.d.ts) for more details.\n\n----------\n\n### class Document\n\n```js\nconst { Document } = glfw;\nconst doc = new Document({ title: 'GLFW Test', vsync: true });\n```\n\nDocument inherits from `Window` and has the same features in general.\nIt exposes additional APIs to mimic the content of web `document`.\nThere are some tricks to provide WebGL libraries with necessary environment.\nDocument is specifically designed for compatibility with [three.js](https://threejs.org/).\nOther web libraries may work too, but may require additional tweaking.\n\nSee [TS declarations](/index.d.ts) for more details.\n\n----------\n\n### Extras\n\n* `glfw.hideConsole(): void` - tries to hide the console window on Windows.\n* `glfw.showConsole(): void` - shows the console window if it has been hidden.\n* `glfw.drawWindow(w: number, cb: (dateNow: number) =\u003e void): void` - this is a shortcut\n    to call `pollEvents`, then `cb`, and then `swapBuffers`, where you only supply `cb`\n    and C++ side does the rest.\n* `glfw.platformDevice(w: number): number` - returns the window HDC on Windows,\n    or whatever is similar on other systems.\n* `glfw.platformWindow(w: number): number` - returns the window HWND on Windows,\n    or whatever is similar on other systems.\n* `glfw.platformContext(w: number): number` - returns the window WGL Context on Windows,\n    or whatever is similar on other systems.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnode-3d%2Fglfw-raub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnode-3d%2Fglfw-raub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnode-3d%2Fglfw-raub/lists"}