{"id":15295070,"url":"https://github.com/web3infra-foundation/libp2p-rs","last_synced_at":"2025-10-09T18:07:57.312Z","repository":{"id":43287037,"uuid":"307301193","full_name":"web3infra-foundation/libp2p-rs","owner":"web3infra-foundation","description":"An alternative libp2p implementation in Rust","archived":false,"fork":false,"pushed_at":"2023-04-07T10:55:18.000Z","size":2689,"stargazers_count":172,"open_issues_count":0,"forks_count":23,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-09-29T20:14:27.725Z","etag":null,"topics":["async","libp2p","peer-to-peer","rust"],"latest_commit_sha":null,"homepage":"https://github.com/web3infra-foundation/libp2p-rs","language":"Rust","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/web3infra-foundation.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"docs/security.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-10-26T08:07:37.000Z","updated_at":"2025-06-14T03:25:18.000Z","dependencies_parsed_at":"2024-09-30T17:08:34.948Z","dependency_job_id":"dfb10a43-4d7f-4a19-8cb4-60a05c8c5186","html_url":"https://github.com/web3infra-foundation/libp2p-rs","commit_stats":null,"previous_names":["netwarps/libp2p-rs"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/web3infra-foundation/libp2p-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web3infra-foundation%2Flibp2p-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web3infra-foundation%2Flibp2p-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web3infra-foundation%2Flibp2p-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web3infra-foundation%2Flibp2p-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/web3infra-foundation","download_url":"https://codeload.github.com/web3infra-foundation/libp2p-rs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web3infra-foundation%2Flibp2p-rs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000691,"owners_count":26082911,"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-10-09T02:00:07.460Z","response_time":59,"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":["async","libp2p","peer-to-peer","rust"],"created_at":"2024-09-30T17:08:28.969Z","updated_at":"2025-10-09T18:07:57.274Z","avatar_url":"https://github.com/web3infra-foundation.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Alternative repository for work on libp2p\n\n\u003ca href=\"http://libp2p.io/\"\u003e\u003cimg src=\"https://img.shields.io/badge/project-libp2p-yellow.svg?style=flat-square\" /\u003e\u003c/a\u003e\n\n![Continuous integration](https://github.com/netwarps/libp2p-rs/workflows/Continuous%20integration/badge.svg?branch=master)\n\nThis repository is an alternative implementation in `Rust` of the [libp2p](https://libp2p.io) spec. Not like `rust-libp2p`, `libp2p-rs` is written with async/await syntax, and driven by async runtime. Even though, many codes are borrowed from `rust-libp2p` and some from `go-libp2p`. We are trying to keep compatible with the two implementations, but it is unfortunately not guaranteed.\n\n## Documentations\n\nHow to use the library?\n\nAs mentioned above, the API is completely different from `rust-libp2p`. There is no such thing as 'NetworkBehaviour' in `libp2p-rs` at all. Instead, you should build the Swarm with the transports you like to use, then you have to create a Swarm::Control from it. The Swarm::Control is exposing all Swarm APIs which can be used to manipulate the Swarm - open/read/write/close streams and even more. This is quite similar as the BasicHost in `go-libp2p`. As for Kad-DHT, similarly you should get the Kad::Control for the same reason. Furthermore, you can combine the Swarm with Kad, after that you have the RoutedHost, which has a routing functionality over the BasicHost.\n\nIt is strongly recommended to check the docs and sample code in details:\n\n- API Documentations can be found: https://docs.rs/libp2p-rs\n- Design documentation can be found in `docs`\n\nCode examples:\n\n- Details about how to write your code can be found in `examples`\n    + swarm_simple demonstrates how to build transport and create sub-stream for communication\n    + kad_simple demonstrates how to run a Kad-DHT server. In this example, the interactive shell is integrated for debugging/observing Kad-DHT internal data structures\n    + ... \n\n## Releases\n\nNOTE: The master branch is now an active development branch (starting with v0.1.0), which means breaking changes could be made at any time.  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweb3infra-foundation%2Flibp2p-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweb3infra-foundation%2Flibp2p-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweb3infra-foundation%2Flibp2p-rs/lists"}