{"id":27027943,"url":"https://github.com/openpeeps/libdatachannel-nim","last_synced_at":"2026-05-02T03:32:00.106Z","repository":{"id":286039112,"uuid":"957835791","full_name":"openpeeps/libdatachannel-nim","owner":"openpeeps","description":"Nim bindings for Libdatachannel ⚡️ A standalone WebRTC Data Channels, WebRTC Media Transport, and WebSockets library","archived":false,"fork":false,"pushed_at":"2025-09-13T11:25:01.000Z","size":92,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-13T13:47:29.472Z","etag":null,"topics":["bindings","libdatachannel","livestream","media","messaging","nim","nim-lang","openpeeps","webrtc","webrtc-video","websockets"],"latest_commit_sha":null,"homepage":"https://openpeeps.github.io/libdatachannel-nim/","language":"Nim","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/openpeeps.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-03-31T08:03:01.000Z","updated_at":"2025-09-13T11:25:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"f9ecba5b-591c-497c-ae35-ab7066f04ed4","html_url":"https://github.com/openpeeps/libdatachannel-nim","commit_stats":null,"previous_names":["openpeeps/libdatachannel-nim"],"tags_count":0,"template":false,"template_full_name":"openpeeps/pistachio","purl":"pkg:github/openpeeps/libdatachannel-nim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openpeeps%2Flibdatachannel-nim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openpeeps%2Flibdatachannel-nim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openpeeps%2Flibdatachannel-nim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openpeeps%2Flibdatachannel-nim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openpeeps","download_url":"https://codeload.github.com/openpeeps/libdatachannel-nim/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openpeeps%2Flibdatachannel-nim/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32522245,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T01:12:54.858Z","status":"online","status_checked_at":"2026-05-02T02:00:05.923Z","response_time":132,"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":["bindings","libdatachannel","livestream","media","messaging","nim","nim-lang","openpeeps","webrtc","webrtc-video","websockets"],"created_at":"2025-04-05T00:18:40.679Z","updated_at":"2026-05-02T03:32:00.097Z","avatar_url":"https://github.com/openpeeps.png","language":"Nim","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  Nim language 👑 bindings for Libdatachannel\u003cbr\u003eA standalone WebRTC Data Channels, WebRTC Media Transport, and WebSockets\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ccode\u003enimble install libdatachannel\u003c/code\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://openpeeps.github.io/libdatachannel-nim\"\u003eAPI reference\u003c/a\u003e\u003cbr\u003e\n  \u003cimg src=\"https://github.com/openpeeps/libdatachannel-nim/workflows/test/badge.svg\" alt=\"Github Actions\"\u003e  \u003cimg src=\"https://github.com/openpeeps/libdatachannel-nim/workflows/docs/badge.svg\" alt=\"Github Actions\"\u003e\n\u003c/p\u003e\n\n## 😍 Key Features\n- [x] Lightweight WebRTC Data Channel/Media Transport\n- [x] Fast Server/Client WebSockets\n\n- [x] High-level API in Nim style!\n- [x] Low-level bindings `libdatachannel`\n\n## Build the library\nFirst, you will need to build [libdatachannel](https://libdatachannel.org/) from [GitHub source](https://github.com/paullouisageneau/libdatachannel). See [Building instructions](https://github.com/paullouisageneau/libdatachannel/blob/master/BUILDING.md)\n\n## Examples\n\n### WebSocket Example\n\n**WebSocket Server**\nThis is a simple WebSocket server that listens for incoming connections and echoes back any messages it receives.\n```nim\nfrom std/os implement sleep\nimport libdatachannel/websockets\n\nproc connectionCallback(wsserver: cint, ws: cint, userPtr: pointer) {.cdecl.} =\n\n  proc wsMessageCallback(ws: cint, msg: cstring, size: cint, userPtr: pointer) =\n    echo \"Message from client \", $msg    \n    ws.message(msg) # echo the message back\n\n  discard rtcSetMessageCallback(ws, wsMessageCallback)\n\n  # send a welcome message\n  ws.message(\"Welcome to WebSocket Server!\")\n\nlet wss = newWebSocketServer(port = Port(1234))\nwss.startServer(connectionCallback)\n\nwhile true:\n  sleep(1000)\n```\n\n**WebSocket Client**\n```nim\nfrom std/os implement sleep\nimport libdatachannel/websockets\n\nlet client = newWebSocketClient(\"ws://127.0.0.1:1234\")\nclient.listen(onMessage) do(ws: cint, message: cstring, size: cint, userPtr: pointer):\n  echo $message\n\nsleep(500)\nwhile true:\n  wsclient.send(\"Hello from client!\")\n  sleep(1000)\n```\n\n### Peer Connection\n_todo_\n\n### ❤ Contributions \u0026 Support\n- 🐛 Found a bug? [Create a new Issue](https://github.com/openpeeps/libdatachannel-nim/issues)\n- 👋 Wanna help? [Fork it!](https://github.com/openpeeps/libdatachannel-nim/fork)\n- 😎 [Get €20 in cloud credits from Hetzner](https://hetzner.cloud/?ref=Hm0mYGM9NxZ4)\n\n### 🎩 License\nMIT license. [Made by Humans from OpenPeeps](https://github.com/openpeeps).\u003cbr\u003e\nCopyright \u0026copy; 2025 OpenPeeps \u0026 Contributors \u0026mdash; All rights reserved.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenpeeps%2Flibdatachannel-nim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenpeeps%2Flibdatachannel-nim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenpeeps%2Flibdatachannel-nim/lists"}