{"id":19257253,"url":"https://github.com/coinrust/erpc-rs","last_synced_at":"2025-10-13T20:10:16.667Z","repository":{"id":57625727,"uuid":"230929260","full_name":"coinrust/erpc-rs","owner":"coinrust","description":"eRPC library for Rust","archived":false,"fork":false,"pushed_at":"2020-01-16T09:09:58.000Z","size":68,"stargazers_count":14,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-22T07:21:38.566Z","etag":null,"topics":["erpc","erpc-library","erpc-rs","low-latency","rpc","rust"],"latest_commit_sha":null,"homepage":"https://erpc.io/","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/coinrust.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-12-30T14:25:43.000Z","updated_at":"2025-04-09T02:48:41.000Z","dependencies_parsed_at":"2022-08-30T14:31:43.972Z","dependency_job_id":null,"html_url":"https://github.com/coinrust/erpc-rs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/coinrust/erpc-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coinrust%2Ferpc-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coinrust%2Ferpc-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coinrust%2Ferpc-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coinrust%2Ferpc-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coinrust","download_url":"https://codeload.github.com/coinrust/erpc-rs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coinrust%2Ferpc-rs/sbom","scorecard":{"id":299002,"data":{"date":"2025-08-11","repo":{"name":"github.com/coinrust/erpc-rs","commit":"2de6224732db91e766b848e7f3c01cee7252496b"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/26 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-17T20:13:00.473Z","repository_id":57625727,"created_at":"2025-08-17T20:13:00.473Z","updated_at":"2025-08-17T20:13:00.473Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279016934,"owners_count":26085905,"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-13T02:00:06.723Z","response_time":61,"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":["erpc","erpc-library","erpc-rs","low-latency","rpc","rust"],"created_at":"2024-11-09T19:09:14.648Z","updated_at":"2025-10-13T20:10:16.624Z","avatar_url":"https://github.com/coinrust.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# erpc-rs\neRPC library for Rust\n\n# Dependencies\n```\nsudo apt install libibverbs-dev libnuma-dev libgflags-dev libgtest-dev libboost-dev\n```\n\n# Installing rdma-core\n```\nsudo apt install libibverbs-dev libibverbs1 rdma-core ibverbs-utils\n# start\nsudo rxe_cfg start\n  Name  Link  Driver     Speed  NMTU  IPv4_addr  RDEV  RMTU  \n  eth0  yes   hv_netvsc\n# add \u003cinterface_name\u003e\nsudo rxe_cfg add eth0\n# status\nsudo rxe_cfg status\n  Name  Link  Driver     Speed  NMTU  IPv4_addr  RDEV  RMTU          \n  eth0  yes   hv_netvsc                          rxe0  1024  (3)\n```\n\n# Installing junction \u0026 turf\n```\n$ git clone https://github.com/preshing/junction.git\n$ git clone https://github.com/preshing/turf.git\n$ cd junction\n$ mkdir build\n$ cd build\n$ cmake -DCMAKE_INSTALL_PREFIX=~/junction-install -DJUNCTION_WITH_SAMPLES=OFF ..\n$ cmake --build . --target install --config RelWithDebInfo\n```\n\n# Installing eRPC\n```\nsudo apt-get install libboost-dev libboost-filesystem-dev libboost-thread-dev libboost-program-options-dev libboost-python-dev libboost-dev\n\n# Installing googletest\nsudo apt install libgtest-dev build-essential cmake\ncd /usr/src/googletest\nsudo cmake .\nsudo cmake --build . --target install\n\ncd ~/\ngit clone https://github.com/erpc-io/eRPC.git\ncd eRPC/\ncmake . -DPERF=OFF -DTRANSPORT=infiniband -DROCE=on; make -j;\n```\n\n# Build \u0026 Run\n```\n# use -DERPC_INFINIBAND=true\nERPC_INFINIBAND=true cargo build\n\n# use -DERPC_RAW=true\nERPC_RAW=true cargo build\n\n# use -DERPC_DPDK=true\nERPC_DPDK=true cargo build\n\n# Set up hugepages\nsudo bash -c \"echo 1024 \u003e /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages\"\n\n# Build examples\ncargo build --examples\n\n# Run examples\nsudo ./target/debug/examples/server\nsudo ./target/debug/examples/client\n```\n\n# Server\n```rust,editable\nuse erpc_rs::context::AppContext;\nuse erpc_rs::nexus::Nexus;\nuse erpc_rs::reqhandle::ReqHandle;\nuse erpc_rs::rpc::Rpc;\nuse erpc_sys::ffi;\nuse std::os::raw::{c_int, c_void};\nuse std::thread;\nuse std::thread::JoinHandle;\n\nconst LOCAL_URI: \u0026str = \"127.0.0.1:31850\";\n\nextern \"C\" fn req_handler(req_handle: *mut ffi::ReqHandle, context: *mut c_void) -\u003e () {\n    println!(\"req_handler start\");\n    let req_handle = ReqHandle::from_raw(req_handle);\n    let s = req_handle.get_req_msgbuf();\n    println!(\"req: {}\", String::from_utf8(s).expect(\"\"));\n\n    let c = AppContext::from_raw(context);\n    let r = Rpc::from_context(\u0026c);\n    let s = \"world\".to_string().into_bytes();\n    r.enqueue_response(\u0026req_handle, s);\n    println!(\"req_handler end\");\n}\n\nextern \"C\" fn sm_handler(\n    _session_num: c_int,\n    _sm_event_type: ffi::SmEventType,\n    _sm_err_type: ffi::SmErrType,\n    _context: *mut c_void,\n) {\n    println!(\"sm_handler\");\n}\n\nfn main() {\n    let nexus = Nexus::new(LOCAL_URI.to_string(), 0, 0);\n    nexus.register_req_func(1, req_handler, 0);\n\n    let mut wait_vec: Vec\u003cJoinHandle\u003c()\u003e\u003e = Vec::new();\n\n    let num_threads = 2;\n\n    for i in 0..num_threads {\n        let context = AppContext::new();\n        let nexus = nexus.clone();\n\n        let handle = thread::spawn(move || {\n            let rpc = Rpc::new(\u0026context, \u0026nexus, i, sm_handler, 0);\n            loop {\n                rpc.run_event_loop(1000);\n            }\n        });\n\n        wait_vec.push(handle);\n    }\n    for handle in wait_vec {\n        handle.join().unwrap();\n    }\n}\n```\n\n# Client\n```rust,editable\nuse erpc_rs::context::AppContext;\nuse erpc_rs::msgbuffs;\nuse erpc_rs::nexus::Nexus;\nuse erpc_rs::rpc::Rpc;\nuse erpc_sys::ffi;\nuse std::os::raw::{c_int, c_void};\n\nuse msgbuffs::MsgBuffers;\nuse std::thread;\nuse std::thread::JoinHandle;\n\nconst LOCAL_URI: \u0026str = \"127.0.0.1:31851\";\nconst SERVER_URI: \u0026str = \"127.0.0.1:31850\";\n\nextern \"C\" fn sm_handler(\n    session_num: c_int,\n    sm_event_type: ffi::SmEventType,\n    sm_err_type: ffi::SmErrType,\n    context: *mut c_void,\n) {\n    println!(\n        \"sm_handler session_num: {} sm_event_type: {} sm_err_type: {}\",\n        session_num, sm_event_type, sm_err_type\n    );\n    let _ctx: *mut ffi::AppContext = context as *mut ffi::AppContext;\n}\n\nextern \"C\" fn cont_func(_context: *mut c_void, tag: *mut c_void) {\n    let context = AppContext::from_raw(_context);\n    let tag = tag as usize;\n\n    let msg_buffs = MsgBuffers::from_context(\u0026context, tag);\n    let s = msg_buffs.get_resp_msgbuf();\n    let s = String::from_utf8(s).expect(\"\");\n    println!(\"cont_func tag: {} resp: {}\", tag, s);\n\n    let session_num = context.get_session_num();\n    let rpc = Rpc::from_context(\u0026context);\n    let s = \"hello\".to_string().into_bytes();\n    rpc.enqueue_request(\u0026context, session_num, 1, s, cont_func, 1000, 0);\n}\n\nfn main() {\n    let nexus = Nexus::new(LOCAL_URI.to_string(), 0, 0);\n\n    let mut wait_vec: Vec\u003cJoinHandle\u003c()\u003e\u003e = Vec::new();\n\n    let num_threads = 2;\n\n    for i in 0..num_threads {\n        let context = AppContext::new();\n        let nexus = nexus.clone();\n\n        let handle = thread::spawn(move || {\n            let rpc = Rpc::new(\u0026context, \u0026nexus, i, sm_handler, 0);\n\n            let session_num = context.connect_session(SERVER_URI.to_string(), 0);\n\n            println!(\"session_num: {}\", session_num);\n\n            while !rpc.is_connected(session_num) {\n                rpc.run_event_loop_once();\n            }\n\n            println!(\"connected\");\n\n            loop {\n                rpc.run_event_loop(1000);\n                let s = \"hello\".to_string().into_bytes();\n                rpc.enqueue_request(\u0026context, session_num, 1, s, cont_func, 0, 8);\n            }\n        });\n\n        wait_vec.push(handle);\n    }\n\n    for handle in wait_vec {\n        handle.join().unwrap();\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoinrust%2Ferpc-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoinrust%2Ferpc-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoinrust%2Ferpc-rs/lists"}