{"id":13594918,"url":"https://github.com/n0-computer/iroh","last_synced_at":"2025-05-13T15:05:22.865Z","repository":{"id":36960304,"uuid":"469877060","full_name":"n0-computer/iroh","owner":"n0-computer","description":"peer-2-peer that just works","archived":false,"fork":false,"pushed_at":"2025-05-13T12:03:12.000Z","size":135183,"stargazers_count":4608,"open_issues_count":183,"forks_count":231,"subscribers_count":46,"default_branch":"main","last_synced_at":"2025-05-13T12:27:27.896Z","etag":null,"topics":["does-anyone-read-these","memes","p2p","realtime","rust","tags","tagsoftags"],"latest_commit_sha":null,"homepage":"https://iroh.computer","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/n0-computer.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE-APACHE","code_of_conduct":"code_of_conduct.md","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":"2022-03-14T19:30:08.000Z","updated_at":"2025-05-13T12:09:05.000Z","dependencies_parsed_at":"2023-09-23T12:35:22.056Z","dependency_job_id":"9091e2b4-199e-4b55-8ed0-f92d2c49d506","html_url":"https://github.com/n0-computer/iroh","commit_stats":{"total_commits":1650,"total_committers":34,"mean_commits":"48.529411764705884","dds":0.6545454545454545,"last_synced_commit":"9be85dd84d03470fced2504177f7ba2c365f6c53"},"previous_names":[],"tags_count":108,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n0-computer%2Firoh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n0-computer%2Firoh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n0-computer%2Firoh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n0-computer%2Firoh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/n0-computer","download_url":"https://codeload.github.com/n0-computer/iroh/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253944377,"owners_count":21988435,"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":["does-anyone-read-these","memes","p2p","realtime","rust","tags","tagsoftags"],"created_at":"2024-08-01T16:01:40.904Z","updated_at":"2025-05-13T15:05:17.857Z","avatar_url":"https://github.com/n0-computer.png","language":"Rust","readme":"\u003ch1 align=\"center\"\u003e\u003ca href=\"https://iroh.computer\"\u003e\u003cimg alt=\"iroh\" src=\"./.img/iroh_wordmark.svg\" width=\"100\" /\u003e\u003c/a\u003e\u003c/h1\u003e\n\n\u003ch3 align=\"center\"\u003e\nless net work for networks\n\u003c/h3\u003e\n\n[![Documentation](https://img.shields.io/badge/docs-latest-blue.svg?style=flat-square)](https://docs.rs/iroh/)\n[![Crates.io](https://img.shields.io/crates/v/iroh.svg?style=flat-square)](https://crates.io/crates/iroh)\n[![downloads](https://img.shields.io/crates/d/iroh.svg?style=flat-square)](https://crates.io/crates/iroh)\n[![Chat](https://img.shields.io/discord/1161119546170687619?logo=discord\u0026style=flat-square)](https://discord.com/invite/DpmJgtU7cW)\n[![Youtube](https://img.shields.io/badge/YouTube-red?logo=youtube\u0026logoColor=white\u0026style=flat-square)](https://www.youtube.com/@n0computer)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square)](LICENSE-MIT)\n[![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg?style=flat-square)](LICENSE-APACHE)\n[![CI](https://img.shields.io/github/actions/workflow/status/n0-computer/iroh/ci.yml?branch=main\u0026style=flat-square\u0026label=CI)](https://github.com/n0-computer/iroh/actions/workflows/ci.yml)\n\n\u003cdiv align=\"center\"\u003e\n  \u003ch3\u003e\n    \u003ca href=\"https://iroh.computer/docs\"\u003e\n      Docs Site\n    \u003c/a\u003e\n    \u003cspan\u003e | \u003c/span\u003e\n    \u003ca href=\"https://docs.rs/iroh\"\u003e\n      Rust Docs\n    \u003c/a\u003e\n  \u003c/h3\u003e\n\u003c/div\u003e\n\u003cbr/\u003e\n\n## What is iroh?\n\nIroh gives you an API for dialing by public key.\nYou say “connect to that phone”, iroh will find \u0026 maintain the fastest connection for you, regardless of where it is.\n\n### Hole-punching\n\nThe fastest route is a direct connection, so if necessary, iroh tries to hole-punch.\nShould this fail, it can fall back to an open ecosystem of public relay servers.\nTo ensure these connections are as fast as possible, we [continuously measure iroh][iroh-perf].\n\n### Built on [QUIC]\n\nIroh uses [Quinn] to establish [QUIC] connections between nodes.\nThis way you get authenticated encryption, concurrent streams with stream priorities, a datagram transport and avoid head-of-line-blocking out of the box.\n\n## Compose Protocols\n\nUse pre-existing protocols built on iroh instead of writing your own:\n- [iroh-blobs] for [BLAKE3]-based content-addressed blob transfer scaling from kilobytes to terabytes\n- [iroh-gossip] for establishing publish-subscribe overlay networks that scale, requiring only resources that your average phone can handle\n- [iroh-docs] for an eventually-consistent key-value store of [iroh-blobs] blobs\n- [iroh-willow] for an (in-construction) implementation of the [willow protocol]\n\n## Getting Started\n\n### Rust Library\n\nIt's easiest to use iroh from rust.\nInstall it using `cargo add iroh`, then on the connecting side:\n\n```rs\nconst ALPN: \u0026[u8] = b\"iroh-example/echo/0\";\n\nlet endpoint = Endpoint::builder().discovery_n0().bind().await?;\n\n// Open a connection to the accepting node\nlet conn = endpoint.connect(addr, ALPN).await?;\n\n// Open a bidirectional QUIC stream\nlet (mut send, mut recv) = conn.open_bi().await?;\n\n// Send some data to be echoed\nsend.write_all(b\"Hello, world!\").await?;\nsend.finish()?;\n\n// Receive the echo\nlet response = recv.read_to_end(1000).await?;\nassert_eq!(\u0026response, b\"Hello, world!\");\n\n// As the side receiving the last application data - say goodbye\nconn.close(0u32.into(), b\"bye!\");\n\n// Close the endpoint and all its connections\nendpoint.close().await;\n```\n\nAnd on the accepting side:\n```rs\nlet endpoint = Endpoint::builder().discovery_n0().bind().await?;\n\nlet router = Router::builder(endpoint)\n    .accept(ALPN.to_vec(), Arc::new(Echo))\n    .spawn()\n    .await?;\n\n// The protocol definition:\n#[derive(Debug, Clone)]\nstruct Echo;\n\nimpl ProtocolHandler for Echo {\n    fn accept(\u0026self, connection: Connection) -\u003e BoxedFuture\u003cResult\u003c()\u003e\u003e {\n        Box::pin(async move {\n            let (mut send, mut recv) = connection.accept_bi().await?;\n\n            // Echo any bytes received back directly.\n            let bytes_sent = tokio::io::copy(\u0026mut recv, \u0026mut send).await?;\n\n            send.finish()?;\n            connection.closed().await;\n\n            Ok(())\n        })\n    }\n}\n```\n\nThe full example code with more comments can be found at [`echo.rs`][echo-rs].\n\nOr use one of the pre-existing protocols, e.g. [iroh-blobs] or [iroh-gossip].\n\n### Other Languages\n\nIf you want to use iroh from other languages, make sure to check out [iroh-ffi], the repository for FFI bindings.\n\n### Links\n\n- [Introducing Iroh (video)][iroh-yt-video]\n- [Iroh Documentation][docs]\n- [Iroh Examples]\n- [Iroh Experiments]\n\n## Repository Structure\n\nThis repository contains a workspace of crates:\n- `iroh`: The core library for hole-punching \u0026 communicating with relays.\n- `iroh-relay`: The relay server implementation. This is the code we run in production (and you can, too!).\n- `iroh-base`: Common types like `Hash`, key types or `RelayUrl`.\n- `iroh-dns-server`: DNS server implementation powering the `n0_discovery` for NodeIds, running at dns.iroh.link.\n- `iroh-net-report`: Analyzes your host's networking ability \u0026 NAT.\n\n## License\n\nCopyright 2024 N0, INC.\n\nThis project is licensed under either of\n\n * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or\n   http://www.apache.org/licenses/LICENSE-2.0)\n * MIT license ([LICENSE-MIT](LICENSE-MIT) or\n   http://opensource.org/licenses/MIT)\n\nat your option.\n\n## Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.\n\n[QUIC]: https://en.wikipedia.org/wiki/QUIC\n[BLAKE3]: https://github.com/BLAKE3-team/BLAKE3\n[Quinn]: https://github.com/quinn-rs/quinn\n[iroh-blobs]: https://github.com/n0-computer/iroh-blobs\n[iroh-gossip]: https://github.com/n0-computer/iroh-gossip\n[iroh-docs]: https://github.com/n0-computer/iroh-docs\n[iroh-willow]: https://github.com/n0-computer/iroh-willow\n[iroh-doctor]: https://github.com/n0-computer/iroh-doctor\n[willow protocol]: https://willowprotocol.org\n[iroh-ffi]: https://github.com/n0-computer/iroh-ffi\n[iroh-yt-video]: https://www.youtube.com/watch?v=RwAt36Xe3UI_\n[Iroh Examples]: https://github.com/n0-computer/iroh-examples\n[Iroh Experiments]: https://github.com/n0-computer/iroh-experiments\n[echo-rs]: /iroh/examples/echo.rs\n[iroh-perf]: https://perf.iroh.computer\n[docs]: https://iroh.computer/docs\n","funding_links":[],"categories":["Rust","HarmonyOS","🌐 Web Development - Frontend","⚙️ Development Tools \u0026 Libraries","mobile","Libraries"],"sub_categories":["Windows Manager","P2P \u0026 Networking","Network programming"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fn0-computer%2Firoh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fn0-computer%2Firoh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fn0-computer%2Firoh/lists"}