{"id":15566975,"url":"https://github.com/netrexmc/raknet","last_synced_at":"2025-06-11T03:14:06.993Z","repository":{"id":44732098,"uuid":"339873587","full_name":"NetrexMC/RakNet","owner":"NetrexMC","description":"RakNet implementation in Rust","archived":false,"fork":false,"pushed_at":"2024-07-22T18:07:19.000Z","size":738,"stargazers_count":47,"open_issues_count":10,"forks_count":12,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-14T20:50:50.420Z","etag":null,"topics":["raknet","rust","rust-lang"],"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/NetrexMC.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2021-02-17T22:34:27.000Z","updated_at":"2025-04-24T08:11:23.000Z","dependencies_parsed_at":"2023-02-09T20:15:14.466Z","dependency_job_id":"d526edec-19b3-4dc7-872c-e9285a604b5b","html_url":"https://github.com/NetrexMC/RakNet","commit_stats":{"total_commits":289,"total_committers":7,"mean_commits":"41.285714285714285","dds":"0.11764705882352944","last_synced_commit":"799a339d53928d33dd274a523fa8ae8e0c0dbf02"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NetrexMC%2FRakNet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NetrexMC%2FRakNet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NetrexMC%2FRakNet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NetrexMC%2FRakNet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NetrexMC","download_url":"https://codeload.github.com/NetrexMC/RakNet/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NetrexMC%2FRakNet/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259189819,"owners_count":22819096,"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":["raknet","rust","rust-lang"],"created_at":"2024-10-02T17:09:19.785Z","updated_at":"2025-06-11T03:14:06.944Z","avatar_url":"https://github.com/NetrexMC.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rak-rs\n\nA fully functional RakNet implementation in pure rust, asynchronously driven.\n\n\u003ca href=\"https://discord.gg/y4aWA5MQxK\"\u003e\u003cimg src=\"https://img.shields.io/discord/846586369568800798.svg?label=\u0026logo=discord\u0026logoColor=ffffff\u0026color=7389D8\u0026labelColor=6A7EC2\"\u003e\u003c/a\u003e\n\n## Getting Started\n\nRakNet (rak-rs) is available on [crates.io](https://crates.io/crates/rak-rs), to use it, add the following to your `Cargo.toml`:\n\n```toml\n[dependencies]\nrak-rs = \"0.3.3\"\n```\n\n## Features\n\nThis RakNet implementation comes with 3 primary features, `async_std`, `async_tokio` and `mcpe`.  However, by default, only `async_std` is enabled, and `mcpe` requires you to modify your `Cargo.toml`.\n\nIf you wish to use these features, add them to your `Cargo.toml` as seen below:\n\n```toml\n[dependencies]\nrak-rs = { version = \"0.3.3\", default-features = false, features = [ \"async_tokio\", \"mcpe\" ] }\n```\n\n\n\nrak-rs also provides the following modules:\n\n- [`rak_rs::client`](https://docs.rs/rak-rs/latest/rak-rs/client) - A client implementation of RakNet, allowing you to connect to a RakNet server.\n- [`rak_rs::connection`](https://docs.rs/rak-rs/latest/rak-rs/client) - A bare-bones implementation of a Raknet peer, this is mainly used for types.\n- [`rak_rs::error`](https://docs.rs/rak-rs/latest/rak-rs/error) - A module with errors that both the Client and Server can respond with.\n- [`rak_rs::protocol`](https://docs.rs/rak-rs/latest/rak-rs/protocol) - A lower level implementation of RakNet, responsible for encoding and decoding packets.\n- [`rak_rs::server`](https://docs.rs/rak-rs/latest/rak-rs/server) - The base server implementation of RakNet.\n- [`rak_rs::util`](https://docs.rs/rak-rs/latest/rak-rs/utils)  - General utilities used within `rak-rs`.\n\n# Client\n\nThe `client` module provides a way for you to interact with RakNet servers with code.\n\n**Example:**\n\n```rust\nuse rak_rs::client::{Client, DEFAULT_MTU};\nuse std::net::ToSocketAddrs;\n\n#[async_std::main]\nasync fn main() {\n    let version: u8 = 10;\n    let mut client = Client::new(version, DEFAULT_MTU);\n\n    client.connect(\"my_server.net:19132\").await.unwrap();\n\n    // receive packets\n    loop {\n        let packet = client.recv().await.unwrap();\n\n        println!(\"Received a packet! {:?}\", packet);\n\n        client.send_ord(vec![254, 0, 1, 1], Some(1));\n    }\n}\n\n```\n\n# Server\n\nA RakNet server implementation in pure rust.\n\n**Example:**\n\n```rust\nuse rakrs::connection::Connection;\nuse rakrs::Listener;\nuse rakrs::\n\n#[async_std::main]\nasync fn main() {\n    let mut server = Listener::bind(\"0.0.0.0:19132\").await.unwrap();\n    server.start().await.unwrap();\n\n    loop {\n        let conn = server.accept().await;\n        async_std::task::spawn(handle(conn.unwrap()));\n    }\n}\n\nasync fn handle(mut conn: Connection) {\n    loop {\n        // keeping the connection alive\n        if conn.is_closed() {\n            println!(\"Connection closed!\");\n            break;\n        }\n        if let Ok(pk) = conn.recv().await {\n            println!(\"Got a connection packet {:?} \", pk);\n        }\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetrexmc%2Fraknet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnetrexmc%2Fraknet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetrexmc%2Fraknet/lists"}