{"id":13731980,"url":"https://github.com/ggerganov/imgui-ws","last_synced_at":"2025-04-05T03:09:55.535Z","repository":{"id":39664945,"uuid":"194545965","full_name":"ggerganov/imgui-ws","owner":"ggerganov","description":"Dear ImGui over WebSockets","archived":false,"fork":false,"pushed_at":"2024-05-20T20:40:11.000Z","size":129,"stargazers_count":449,"open_issues_count":10,"forks_count":53,"subscribers_count":19,"default_branch":"master","last_synced_at":"2024-10-03T13:51:12.680Z","etag":null,"topics":["imgui","websockets"],"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/ggerganov.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":"2019-06-30T18:02:23.000Z","updated_at":"2024-09-28T07:20:37.000Z","dependencies_parsed_at":"2024-10-25T18:35:44.276Z","dependency_job_id":"d1cf7d9f-eb15-4707-8d7b-85865f548862","html_url":"https://github.com/ggerganov/imgui-ws","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/ggerganov%2Fimgui-ws","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ggerganov%2Fimgui-ws/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ggerganov%2Fimgui-ws/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ggerganov%2Fimgui-ws/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ggerganov","download_url":"https://codeload.github.com/ggerganov/imgui-ws/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247280272,"owners_count":20912967,"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":["imgui","websockets"],"created_at":"2024-08-03T02:01:43.029Z","updated_at":"2025-04-05T03:09:55.518Z","avatar_url":"https://github.com/ggerganov.png","language":"C++","funding_links":[],"categories":["Graphics"],"sub_categories":[],"readme":" [![Actions Status](https://github.com/ggerganov/imgui-ws/workflows/CI/badge.svg)](https://github.com/ggerganov/imgui-ws/actions)\n\n# imgui-ws\n\n[Dear ImGui](https://github.com/ocornut/imgui) over WebSockets\n\nThis is a small library that allows to stream a Dear ImGui scene to multiple WebSocket clients at once. This is achieved by sending Dear ImGui's DrawData structure which is then rendered in the browser using WebGL. To reduce the amount of network traffic, we send only the diffs between sequential frames (for more info - see [#1](../../issues/1/)).\n\n## Live examples\n\nThese are sample applications using **imgui-ws**, running on a [Linode 2GB](https://www.linode.com/pricing) instance:\n\n| Example | URL | Description |\n| ------- | --- | ----------- |\n| [demo-null](https://github.com/ggerganov/imgui-ws/tree/master/examples/demo-null) | http://imgui-ws.ggerganov.com:5001/ | Dear ImGui's demo app |\n| [basic-null](https://github.com/ggerganov/imgui-ws/tree/master/examples/basic-null) | http://imgui-ws.ggerganov.com:5002/ | Basic read-only data visualization |\n| [textures-null](https://github.com/ggerganov/imgui-ws/tree/master/examples/textures-null) | http://imgui-ws.ggerganov.com:5003/ | Textures example |\n\nNote that these examples are \"headless\". This means that no graphics backend (like OpenGL, SDL, Vulkan, etc) is needed on the server, because it does not render anything. The application just generates the Dear ImGui draw data and sends it to any connected WebSocket clients where the actual rendering occurs. This has the advantage of being able to run applications with Dear ImGui interface on almost any kind of hardware, even one without a monitor or a graphics card. For example, the applications can run on a [Raspberry Pi](https://www.raspberrypi.org), or on a cloud VM as in the examples above.\n\n## Tools\n\nThere are a few tools that help with the development and the optimization of the ImDrawData compression.\nTo build the SDL-based tools, use `cmake -DIMGUI_WS_SUPPORT_SDL2=ON`.\n\n- [record-sdl2](https://github.com/ggerganov/imgui-ws/tree/master/tools/record-sdl2)\n\n  Record the ImDrawData for all rendered frames in a Dear ImGui session\n\n      ./bin/record-sdl2 session.imdd\n\n- [replay-sdl2](https://github.com/ggerganov/imgui-ws/tree/master/tools/replay-sdl2)\n\n  Replay a session recorded with the **record-sdl2** tool\n\n      ./bin/replay-sdl2 session.imdd\n\n- [compressor-benchmark](https://github.com/ggerganov/imgui-ws/tree/master/tools/compressor-benchmark)\n\n  Run the available ImDrawData compression algorithms on various pre-recorded Dear ImGui sessions. Reports compression ratio, average required bandwidth and cpu utilization:\n\n      ./bin/compressor-benchmark session0.imdd [session1.imdd] [session2.imdd] [...]\n\n## Building \u0026 running\n\n```bash\n# build\ngit clone https://github.com/ggerganov/imgui-ws --recursive\ncd imgui-ws \u0026\u0026 mkdir build \u0026\u0026 cd build\ncmake ..\nmake\n\n# running\n./bin/demo-null 5000\n```\n\nOpen some browsers and point them to http://localhost:5000/\n\n## Using in your application\n\nA simple way of using this library in your cmake-based application is\nto add the following to your `CMakeLists.txt`:\n\n```cmake\ninclude(FetchContent)\nFetchContent_Declare(imgui-ws\n    GIT_REPOSITORY    https://github.com/ggerganov/imgui-ws.git\n    GIT_TAG           eab5d6b169ed3e5f8d26c4a6cd9a3271dd6e2dda\n    GIT_SUBMODULES_RECURSE YES\n    )\nFetchContent_MakeAvailable(imgui-ws)\nset(INCPPECT_DEBUG NO)\n# add_executable(«your_executable» «sources»)\n# ...\ntarget_link_libraries(«your_executable» imgui imgui-ws)\ninstall(TARGETS incppect uWS)\n```\n\n## Dependencies\n\n - [uWebSockets](https://github.com/uNetworking/uWebSockets)\n - [SDL2](https://www.libsdl.org) - *optional, used by some of the examples and tools*\n\n## Screenshot \n\n \u003ca href=\"https://i.imgur.com/TVxj8cf.png\" target=\"_blank\"\u003e![imgui-ws](https://i.imgur.com/TVxj8cf.png)\u003c/a\u003e\n\n## Credits\n - This project is heavily inspired by https://github.com/JordiRos/remoteimgui\n - Most of the JS code is taken from https://github.com/flyover/imgui-js\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fggerganov%2Fimgui-ws","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fggerganov%2Fimgui-ws","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fggerganov%2Fimgui-ws/lists"}