{"id":22978378,"url":"https://github.com/konsumer/web-zen-dev","last_synced_at":"2025-08-25T16:06:26.756Z","repository":{"id":260857973,"uuid":"882545628","full_name":"konsumer/web-zen-dev","owner":"konsumer","description":"Easily make games in WASI that use 2D graphics, sound, and input","archived":false,"fork":false,"pushed_at":"2025-06-05T22:08:25.000Z","size":1688,"stargazers_count":3,"open_issues_count":11,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-17T13:49:45.647Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://konsumer.js.org/web-zen-dev/","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/konsumer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2024-11-03T04:10:52.000Z","updated_at":"2025-06-05T22:08:28.000Z","dependencies_parsed_at":"2025-06-05T23:29:17.218Z","dependency_job_id":null,"html_url":"https://github.com/konsumer/web-zen-dev","commit_stats":null,"previous_names":["konsumer/web-zen-dev"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/konsumer/web-zen-dev","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/konsumer%2Fweb-zen-dev","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/konsumer%2Fweb-zen-dev/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/konsumer%2Fweb-zen-dev/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/konsumer%2Fweb-zen-dev/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/konsumer","download_url":"https://codeload.github.com/konsumer/web-zen-dev/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/konsumer%2Fweb-zen-dev/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272092448,"owners_count":24871953,"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-25T02:00:12.092Z","response_time":1107,"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-15T01:18:36.952Z","updated_at":"2025-08-25T16:06:26.708Z","avatar_url":"https://github.com/konsumer.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"This library allows you to easily make games in WASI that use 2D graphics, sound, and input. It's meant to be a light alternative to emscripten/SDL, but also allows languages other than C to target the web.\n\nI wanted to be able to use my [easywasi](https://github.com/konsumer/easywasi) with [zenfs](https://www.npmjs.com/package/@zenfs/core) to output graphics/sound and read input, over WASI fs.\n\nIt will run on web or anywhere else with js/canvas/audiocontext, like nodejs, via other libraries.\n\nAlso check out [@zen-fs/devices](https://github.com/zen-fs/devices). It's a typescript-focused soft-fork of the work here.\n\n## demos\n\n- [static](https://konsumer.js.org/web-zen-dev/static)\n- [drawing with pntr](https://konsumer.js.org/web-zen-dev/pntr)\n- [sound](https://konsumer.js.org/web-zen-dev/sound)\n\n## devices\n\nThese are the devices I am implementing here:\n\n- `/dev/dsp` - sound (similar to OSS)\n- `/dev/fb0` - 2D graphics (framebuffer)\n- `/dev/input/*` - input devices (keyboard, mouse, gamepad)\n\nand maybe this:\n\n- `/proc/bus/input/devices` - get list of input devices\n\nadditionally, zenfs already provides these, if you use `addDevices:true`:\n\n```\n/dev/null\n/dev/zero\n/dev/full\n/dev/random\n```\n\n## usage\n\nYou can use it like this:\n\n```js\nimport { configure, fs } from '@zenfs/core'\nimport { framebuffer, dsp } from 'web-zen-dev'\n\nawait configure({\n  addDevices: true\n})\n\nfs.mounts.get('/dev').createDevice('/fb0', framebuffer())\nfs.mounts.get('/dev').createDevice('/dsp', await dsp())\n```\n\nYou can see an example [here](docs/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkonsumer%2Fweb-zen-dev","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkonsumer%2Fweb-zen-dev","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkonsumer%2Fweb-zen-dev/lists"}