{"id":16714248,"url":"https://github.com/flier/rust-dpdk","last_synced_at":"2025-03-21T20:33:41.295Z","repository":{"id":54839380,"uuid":"58927223","full_name":"flier/rust-dpdk","owner":"flier","description":"Rust bindings to DPDK","archived":false,"fork":false,"pushed_at":"2021-01-26T04:00:23.000Z","size":995,"stargazers_count":80,"open_issues_count":2,"forks_count":12,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-18T05:06:58.109Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/flier.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-05-16T11:24:16.000Z","updated_at":"2025-02-22T08:16:50.000Z","dependencies_parsed_at":"2022-08-14T04:20:46.730Z","dependency_job_id":null,"html_url":"https://github.com/flier/rust-dpdk","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/flier%2Frust-dpdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flier%2Frust-dpdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flier%2Frust-dpdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flier%2Frust-dpdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flier","download_url":"https://codeload.github.com/flier/rust-dpdk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244866397,"owners_count":20523509,"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-12T20:50:03.126Z","updated_at":"2025-03-21T20:33:40.916Z","avatar_url":"https://github.com/flier.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rust-dpdk\n\nRust-Dpdk is an experimental prototype to wrap [DPDK](http://dpdk.org/) API with Rust language.\n\n## Build\n\nFirst, please follow [the official document](http://dpdk.org/doc/guides/linux_gsg/build_dpdk.html) to setup a DPDK development envrionment.\n\n```\n$ CONFIG_RTE_BUILD_COMBINE_LIBS=y EXTRA_CFLAGS=\"-fPIC -O0 -g -ggdb\" make install T=x86_64-native-linuxapp-gcc -j 4\n```\n\nAnd build `rust-dpdk` with `RTE_SDK` envrionment variable:\n\n```\n$ RTE_SDK=\u003crte_path\u003e cargo build\n```\n\n## Examples\n\n```rust\nextern crate rte;\n\nuse std::env;\nuse std::ptr;\nuse std::os::raw::c_void;\n\nuse rte::*;\n\nextern \"C\" fn lcore_hello(_: *const c_void) -\u003e i32 {\n    println!(\"hello from core {}\", lcore::id().unwrap());\n\n    0\n}\n\nfn main() {\n    let args: Vec\u003cString\u003e = env::args().collect();\n\n    eal::init(\u0026args).expect(\"Cannot init EAL\");\n\n    // call lcore_hello() on every slave lcore\n    lcore::foreach_slave(|lcore_id| {\n        launch::remote_launch(lcore_hello, None, lcore_id).expect(\"Cannot launch task\");\n    });\n\n    // call it on master lcore too\n    lcore_hello(ptr::null());\n\n    launch::mp_wait_lcore();\n}\n```\n\nPlease check [l2fwd](rte/examples/l2fwd/l2fwd.rs) example for details.\n\n```\n$ sudo RTE_SDK=\u003crte_path\u003e cargo run --example l2fwd -- --log-level 8 -v -c f -- -p f\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflier%2Frust-dpdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflier%2Frust-dpdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflier%2Frust-dpdk/lists"}