{"id":13635099,"url":"https://github.com/osrg/rustybgp","last_synced_at":"2025-05-15T16:04:05.492Z","repository":{"id":37444878,"uuid":"224298534","full_name":"osrg/rustybgp","owner":"osrg","description":"BGP implemented in the Rust Programming Language","archived":false,"fork":false,"pushed_at":"2025-01-02T09:38:59.000Z","size":39458,"stargazers_count":510,"open_issues_count":32,"forks_count":48,"subscribers_count":26,"default_branch":"master","last_synced_at":"2025-04-07T21:12:41.898Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/osrg.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-11-26T22:36:33.000Z","updated_at":"2025-03-27T19:44:49.000Z","dependencies_parsed_at":"2025-03-17T18:11:32.610Z","dependency_job_id":"69b87c08-5cb8-4f63-82b5-7f594e4bdb7c","html_url":"https://github.com/osrg/rustybgp","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/osrg%2Frustybgp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osrg%2Frustybgp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osrg%2Frustybgp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osrg%2Frustybgp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/osrg","download_url":"https://codeload.github.com/osrg/rustybgp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254374403,"owners_count":22060609,"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-08-02T00:00:40.676Z","updated_at":"2025-05-15T16:04:05.454Z","avatar_url":"https://github.com/osrg.png","language":"Rust","readme":"# RustyBGP: BGP implementation in Rust\n\nThe mission is to develop a high-performance and safe BGP implementation; an experiment to implement aged and rusty BGP protocol in a modern language. RustyBGP is [much faster](https://elegantnetwork.github.io/posts/bgp-perf5-1000-internet-neighbors/) than other OSS implementations. One reason of the high performance is that RustyBGP is designed to exploit multicore processors. Here is a CPU usage comparison with FRR 7.5 during processing 32 peers with 800K prefixes each; RustyBGP (left) uses all the cores while FRR uses only few.\n\n![](.github/assets/htop.gif)\n\nRustyBGP supports the gRPC APIs same as GoBGP; your code to manage GoBGP via the APIs should work with RustyBGP. If you need CLI, [GoBGP CLI tool](https://github.com/osrg/gobgp/releases/tag/v3.0.0) allows you to manage RustyBGP. RustyBGP also supports the same configuration file format as GoBGP (only toml and yaml for now).\n\n## Get Started\n\nYou can easily build RusyBGP on any system that has Docker running. You don't need Rust development environment. You can build the x86_64 statically-linked binary as follows:\n\n```bash\n$ git clone https://github.com/osrg/rustybgp.git\n$ cd rustybgp\n$ docker pull ghcr.io/rust-cross/rust-musl-cross:x86_64-unknown-linux-musl\n$ docker run --rm -it -v \"$(pwd)\":/home/rust/src ghcr.io/rust-cross/rust-musl-cross:x86_64-unknown-linux-musl cargo build --release\n$ ls target/x86_64-unknown-linux-musl/release/rustybgpd\ntarget/x86_64-unknown-linux-musl/release/rustybgpd\n```\n\n```bash\n$ sudo ./target/x86_64-unknown-linux-musl/release/rustybgpd -f gobgpd.conf\nHello, RustyBGP (32 cpus)!\n```\n\nThen you can manage the daemon on a different terminal with GoBGP's CLI command.\n\n```bash\n$ gobgp neighbor\nPeer            AS Up/Down State       |#Received  Accepted\n198.51.100.2 65002   never Idle        |        0         0\n```\n\nIf you just want to check out the performance, start the daemon with `--any-peers` option. The daemon accepts any peers without configuration.\n\n```bash\n$ sudo ./target/x86_64-unknown-linux-musl/release/rustybgpd --as-number 65001 --router-id 203.0.113.1 --any-peers\nHello, RustyBGP (32 cpus)!\n```\n\n## Supported Features\n\nCurrently, the very basic BGP features are supported; eBGP and iBGP, active/passive connection, RPKI, BMP (BGP monitoring protocol), MRT, etc with the following gRPC APIs.\n\n| API                    | Relevant CLI                                               | Note                                         |\n| ---------------------- | ---------------------------------------------------------- | -------------------------------------------- |\n| start_bgp              | `gobgp global as \u003cVALUE\u003e router-id \u003cIP\u003e`                   |                                              |\n| get_bgp                | `gobgp global`                                             |                                              |\n| add_peer               | `gobgp neighbor add \u003cIP\u003e as \u003cVALUE\u003e router-id \u003cIP\u003e`        | v4/v6 families and addpath (rx) supported    |\n| delete_peer            | `gobgp neighbor del \u003cIP\u003e`                                  |                                              |\n| list_peer              | `gobgp neighbor`/`gobgp neighbor \u003cIP\u003e`                     |                                              |\n| enable_peer            | `gobgp neighbor \u003cIP\u003e enable`                               |                                              |\n| disable_peer           | `gobgp neighbor \u003cIP\u003e disable`                              |                                              |\n| add_peer_group         |                                                            |                                              |\n| add_dynamic_neighbor   |                                                            |                                              |\n| add_path               | `gobgp global rib add \u003cPREFIX\u003e`                            |                                              |\n| delete_path            | `gobgp global rib del \u003cPREFIX\u003e`                            |                                              |\n| list_path              | `gobgp global rib`/`gobgp neighbor \u003cIP\u003e [adj-in\\|adj-out]` |                                              |\n| add_path_stream        | `gobgp mrt global inject [FILE]`                           |                                              |\n| get_table              | `gobgp global rib summary`                                 |                                              |\n| add_policy             |                                                            |                                              |\n| list_policy            |                                                            |                                              |\n| add_defined_set        |                                                            |                                              |\n| list_defined_set       |                                                            |                                              |\n| add_statement          |                                                            |                                              |\n| list_statement         |                                                            |                                              |\n| add_policy_assignment  |                                                            |                                              |\n| list_policy_assignment |                                                            |                                              |\n| add_rpki               | `gobgp rpki server \u003cIP\u003e add`                               |                                              |\n| list_rpki              | `gobgp rpki server`                                        |                                              |\n| list_rpki_table        | `gobgp rpki table`                                         |                                              |\n| enable_mrt             |                                                            |                                              |\n| add_bmp                | `gobgp bmp add`                                            | routemonitoring is supported only with adjin |\n| list_bmp               | `gobgp bmp`                                                |                                              |\n\n## Community, discussion and support\n\nYou have code or documentation for RustyBGP? Awesome! Send a pull request. No CLA, board members, governance, or other mess. See [`BUILD.md`](BUILD.md) for info on code contributing.\n","funding_links":[],"categories":["Applications","Rust"],"sub_categories":["Routing protocols"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosrg%2Frustybgp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fosrg%2Frustybgp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosrg%2Frustybgp/lists"}