{"id":16727070,"url":"https://github.com/lpil/nerf","last_synced_at":"2025-10-15T21:17:29.137Z","repository":{"id":42201296,"uuid":"437405212","full_name":"lpil/nerf","owner":"lpil","description":"Gleam bindings to gun, the Erlang HTTP/1.1, HTTP/2 and Websocket client","archived":false,"fork":false,"pushed_at":"2024-03-20T01:50:57.000Z","size":17,"stargazers_count":16,"open_issues_count":4,"forks_count":9,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-05-01T23:05:09.285Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Gleam","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/lpil.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2021-12-11T22:49:56.000Z","updated_at":"2024-04-05T13:09:02.000Z","dependencies_parsed_at":"2024-10-12T22:56:01.379Z","dependency_job_id":"569bfd4d-d829-414f-895d-9bcba0d05129","html_url":"https://github.com/lpil/nerf","commit_stats":{"total_commits":20,"total_committers":4,"mean_commits":5.0,"dds":"0.30000000000000004","last_synced_commit":"2d6a468d55cc53d96cc9472d1fd4cb7db5e6358f"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpil%2Fnerf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpil%2Fnerf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpil%2Fnerf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpil%2Fnerf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lpil","download_url":"https://codeload.github.com/lpil/nerf/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243753989,"owners_count":20342537,"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":[],"created_at":"2024-10-12T22:55:59.046Z","updated_at":"2025-10-15T21:17:24.090Z","avatar_url":"https://github.com/lpil.png","language":"Gleam","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nerf\n\nGleam bindings to [gun][gun], the Erlang HTTP/1.1, HTTP/2 and Websocket client.\n\n[gun]: https://hex.pm/packages/gun\n\nCurrently this library is very basic and only supports a portion of the\nwebsocket API, and TLS is not verified! Hopefully in future a better websocket\nclient written in Gleam can replace this one.\n\n## Usage\n\nThis package can be added to your Gleam project like so.\n\n```sh\ngleam add nerf\n```\n\nThen use it in your Gleam application.\n\n```rust\nimport nerf/websocket\nimport gleam/erlang\nimport gleam/erlang/atom\n\npub fn main() {\n  // Connect\n  let assert Ok(conn) = websocket.connect(\"example.com\", \"/ws\", 8080, [])\n\n  // Send some messages\n  websocket.send(conn, \"Hello\")\n  websocket.send(conn, \"World\")\n\n  // Receive some messages\n  let assert Ok(Text(\"Hello\")) = websocket.receive(conn, 500)\n  let assert Ok(Text(\"World\")) = websocket.receive(conn, 500)\n\n  // Close the connection\n  websocket.close(conn)\n}\n```\n\n## Testing this library\n\n```sh\npodman run --rm --detach -p 8080:8080 --name echo jmalloc/echo-server\ngleam test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flpil%2Fnerf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flpil%2Fnerf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flpil%2Fnerf/lists"}