{"id":25433138,"url":"https://github.com/sigeth/chatserver-lab","last_synced_at":"2025-06-27T14:06:05.009Z","repository":{"id":265425561,"uuid":"895971829","full_name":"Sigeth/chatserver-lab","owner":"Sigeth","description":null,"archived":false,"fork":false,"pushed_at":"2024-11-29T14:16:02.000Z","size":81,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-27T14:05:55.049Z","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/Sigeth.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-11-29T09:38:54.000Z","updated_at":"2024-11-29T14:16:06.000Z","dependencies_parsed_at":"2024-11-29T10:44:17.492Z","dependency_job_id":"62586291-0f16-47bf-b7e2-cdb6a60a95db","html_url":"https://github.com/Sigeth/chatserver-lab","commit_stats":null,"previous_names":["sigeth/chatserver-lab"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Sigeth/chatserver-lab","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sigeth%2Fchatserver-lab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sigeth%2Fchatserver-lab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sigeth%2Fchatserver-lab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sigeth%2Fchatserver-lab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sigeth","download_url":"https://codeload.github.com/Sigeth/chatserver-lab/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sigeth%2Fchatserver-lab/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262270430,"owners_count":23285164,"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":"2025-02-17T05:18:13.263Z","updated_at":"2025-06-27T14:06:04.992Z","avatar_url":"https://github.com/Sigeth.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rust lab work - chat service\n\n## Setup\n\n* install Rust\n* make sure everything works by running `cargo test`\n\n## Part 1, network protocol\n\nIn the `chatproto/src/netproto` directory, edit `decode.rs` and `encode.rs`. The network protocol\nwork in the following way:\n\n* structs are encoded by encoding each field, in the order they appear in the definition\n* enums are encoded by first inserting a byte designing the variant we are in (starting at 0),\n   and then encoding the enum fields\n* numbers are encoded in the following way:\n  * with `u \u003c 251`, encode it as a single byte with that value,\n  * with `251 \u003c= u \u003c 2**16`, encode it as `251` followed by a little-endian `u16` value,\n  * with `2**16 \u003c= u \u003c 2**32`, encode it as `252` followed by a little-endian `u32` value,\n  * with `2**32 \u003c= u \u003c 2**64`, encode it as `253` followed by a little-endian `u64` value,\n  * with `2**64 \u003c= u \u003c 2**128`, encode it as `254` followed by a little-endian `u128` value.\n* collections are encoded by first putting their sizes, and they the contents\n\nYou can test your implementation by running:\n\n```shell\ncargo test netproto\n```\n\nIt is suggested to implement the encoding/decoding pair of functions in the order they are presented.\n\n## Part 2, simple server logic\n\nBefore starting, do the following:\n\n* rename the `sample.rs` file using a name unique to your group;\n* in the renamed file, edit the `GROUP_NAME` constant and put your names in it.\n\nYou will only have to edit the renamed file, do not edit any other file! You will be graded on that file,\nand you should only send this file to the course teacher.\n\nYou will have to find fill the `Server` structure with data structures that will allow you to write the\ntraits methods. You will most likely want to use `RwLock` (the one from `async_std::sync::RwLock`).\n\n## Part 3, federation\n\nRun tests and executables with the `-F federation` flag.\n\n## Running the client and server\n\n### Server\n\n```shell\n$ RUST_LOG=debug cargo run --bin server\n...\n```\n\n### Client\n\n```shell\n$ RUST_LOG=debug cargo run --bin client -- --name my_name\n...\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsigeth%2Fchatserver-lab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsigeth%2Fchatserver-lab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsigeth%2Fchatserver-lab/lists"}