{"id":19566246,"url":"https://github.com/rtradeltd/libcp2p","last_synced_at":"2025-04-27T02:31:13.792Z","repository":{"id":56362287,"uuid":"279015860","full_name":"RTradeLtd/libcp2p","owner":"RTradeLtd","description":"A libp2p-like protocol with first class support for embedded systems. End goal is a protocol that can run on anything from your fridge, embedded systems, and anything else. Higher level languages bindings will be done via FFI. Heavy WIP","archived":false,"fork":false,"pushed_at":"2020-11-12T08:12:54.000Z","size":79383,"stargazers_count":34,"open_issues_count":12,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-04T19:24:05.409Z","etag":null,"topics":["c","c-lang","c-libp2p","cid","cmake","cmocka","doxygen","embedded-c","embedded-systems","gcc","ipfs","ipld","libp2p","multiaddr","multibase","multicodec","multiformats","multihash","valgrind"],"latest_commit_sha":null,"homepage":"https://libcp2p.temporal.cloud","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RTradeLtd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-07-12T07:38:12.000Z","updated_at":"2025-02-20T23:36:41.000Z","dependencies_parsed_at":"2022-08-15T17:20:29.753Z","dependency_job_id":null,"html_url":"https://github.com/RTradeLtd/libcp2p","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/RTradeLtd%2Flibcp2p","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RTradeLtd%2Flibcp2p/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RTradeLtd%2Flibcp2p/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RTradeLtd%2Flibcp2p/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RTradeLtd","download_url":"https://codeload.github.com/RTradeLtd/libcp2p/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251080026,"owners_count":21533040,"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":["c","c-lang","c-libp2p","cid","cmake","cmocka","doxygen","embedded-c","embedded-systems","gcc","ipfs","ipld","libp2p","multiaddr","multibase","multicodec","multiformats","multihash","valgrind"],"created_at":"2024-11-11T05:30:27.995Z","updated_at":"2025-04-27T02:31:13.339Z","avatar_url":"https://github.com/RTradeLtd.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# libcp2p\n\n[![Build Status](https://travis-ci.com/RTradeLtd/libcp2p.svg?branch=master)](https://travis-ci.com/RTradeLtd/libcp2p)\n\n\u003e **this is a work in progress**\n\nA libp2p-like protocol written in C with first class support for embedded systems. Goal is to be able to run in your fridge, arduinos, and any embedded system. Higher level languages will be done using FFI.\n\n# difference between libcp2p and libp2p\n\n* Written in C\n* Base58 replaced with base32\n* Removal of built-in identify protocol\n  * LibP2P is heavily reliant on the identify protocol and it is not possible to remove it\n  * Redesigned so that identify is optional\n* Protobuf replaced with cbor\n* first class support for embedded systems\n* higher level languages will use FFI instead of a language specific implementation\n\n# compatability with libp2p\n\n* in theory there will be network level compatability\n  * a libcp2p node would be able to open a connection to a libp2p node\n  * this is in no way a design goal, nor a priority\n* dht will not be compatible\n\n# features\n\n## multiformats\n\n* multicodec\n  * full encode/decode support for all codecs except 0xcert-imprint-256\n* multiaddr\n  * full multiaddr functionality\n* multihash\n  * basic multihash functionality, only supports SHAX-XXX, and Blake2B\n* multibase\n  * supports base16, base32, base64\n  \n## peerstore\n\n* Adds a peerstore to contain public key and peer identifier information\n* Eventually will contain addressing information\n\n## networking\n\n* TCP socket server\n  * UDP has been tabled until we get a stable implementation of TCP\n* Uses the multiaddress standard as the method of addressing other hosts\n* Allows specifying two separate execution handlers whenever a new TCP connection is received\n* todo:\n  * enable secure connections\n  * enable using peerIds\n\n## misc\n\n* cid\n  * basic support only\n* protobuf support\n  * basic support only\n  * this will eventually be removed in favor of CBOR\n* cryptography\n  * ecdsa key management\n  * sha1, sha256, sha512 hashing\n  * misc other crypto functionality\n\n# installation\n\n## building\n\n```shell\n$\u003e make # builds in release mode\n$\u003e make build-debug # builds in debug mode\n$\u003e make build-analysis # builds in static analysis mode\n```\n## testing\n\n```shell\n$\u003e cd build \u0026\u0026 ctest # runs regular tests\n$\u003e cd build \u0026\u0026 ctest -T memcheck # runs valgrind \n```\n\n## dependencies\n\n* CMake \u003e= 3.0\n* GCC with support for C17\n  * If you want to run static analysis, GCC-10 installed\n* CMocka (testing dependency)\n* Valgrind (dynamic analysis)\n* clang-format (code formatting)\n* doxygen (documentation generation)\n* pthreads\n* tinycbor\n  * in repo using [this commit](https://github.com/intel/tinycbor/commit/085ca40781f7c39febe6d14fb7e5cba342e1804b)\n\n\n# development/contribution\n\nFor instructions on development and contribution practices please see [CONTRIBUTING.md](CONTRIBUTING.md)\n\n# license\n\nCertain libraries are copy\u0026pasted from other open sources repositories are explicitly licensed under MIT or GPLv3. The code written for this lbirary specifically is licensed under AGPLv3. [According to this stack overflow post](https://opensource.stackexchange.com/questions/5909/is-every-license-that-is-gplv3-compatible-also-agplv3-compatible/6785#6785) this is acceptable. If you think this is not acceptable please open a github issue and we will make ammends","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frtradeltd%2Flibcp2p","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frtradeltd%2Flibcp2p","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frtradeltd%2Flibcp2p/lists"}