{"id":17919231,"url":"https://github.com/fastestmolasses/convars","last_synced_at":"2026-05-05T07:32:10.308Z","repository":{"id":197556178,"uuid":"698855047","full_name":"FastestMolasses/convars","owner":"FastestMolasses","description":"Console config variables library for game engines","archived":false,"fork":false,"pushed_at":"2023-10-10T06:49:58.000Z","size":60,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-04T18:21:26.804Z","etag":null,"topics":["bevy","console-variables","convar","cvars","game","game-engine","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FastestMolasses.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}},"created_at":"2023-10-01T07:12:20.000Z","updated_at":"2023-10-01T07:17:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"5fa845bc-7267-4a35-aab0-410223c3387e","html_url":"https://github.com/FastestMolasses/convars","commit_stats":null,"previous_names":["fastestmolasses/convars"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/FastestMolasses/convars","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FastestMolasses%2Fconvars","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FastestMolasses%2Fconvars/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FastestMolasses%2Fconvars/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FastestMolasses%2Fconvars/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FastestMolasses","download_url":"https://codeload.github.com/FastestMolasses/convars/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FastestMolasses%2Fconvars/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32640533,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-04T10:08:07.713Z","status":"online","status_checked_at":"2026-05-05T02:00:06.033Z","response_time":54,"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":["bevy","console-variables","convar","cvars","game","game-engine","rust"],"created_at":"2024-10-28T20:15:35.299Z","updated_at":"2026-05-05T07:32:10.293Z","avatar_url":"https://github.com/FastestMolasses.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ConVars\nConVars is a Rust library to create console variables for games made. Designed with the [Bevy engine](https://bevyengine.org/) in mind but can work in any project. It allows developers to access and modify game configuration variables at runtime through a console or other user input mechanisms.\n\n## Features\n* Define configuration variables with default values\n* Update configuration variables at runtime\n* Structs supported\n* Serialize and deserialize configuration variables\n\n## Usage\nAdd this to your Cargo.toml:\n\n```\ncargo add convars\n```\n\n```toml\n[dependencies]\nconvars = \"0.1.0\"\n```\n\nHere's a basic example:\n\n```rust\nuse convars::convars;\n\nconvars! {\n    max_enemies: i32 = 10,\n    view_distance: f32 = 100.0,\n}\n\nfn main() {\n    let mut convars = ConVars::default();\n    \n    // These values will come from a UI or console\n    convars.set_str(\"max_enemies\", \"20\").unwrap();\n}\n```\n\n## User Defined Types\nYou can define your own configuration variable types by implementing the ConVarType trait:\n\n```rust\nuse convars::ConVarType;\n\n#[derive(Debug, PartialEq)]\npub struct PlayerConfig {\n    pub level: i32,\n    pub damage: f32,\n}\n\nimpl ConVarType for PlayerConfig {\n    fn from_convar_str(value: \u0026str) -\u003e Result\u003cSelf, \u0026'static str\u003e {\n        let parts: Vec\u003c\u0026str\u003e = value.split(',').collect();\n        if parts.len() != 2 {\n            return Err(\"invalid format for PlayerConfig\");\n        }\n        let level = parts[0].parse::\u003ci32\u003e().map_err(|_| \"failed to parse i32\")?;\n        let damage = parts[1].parse::\u003cf32\u003e().map_err(|_| \"failed to parse f32\")?;\n        Ok(PlayerConfig { level, damage })\n    }\n\n    fn to_convar_str(\u0026self) -\u003e String {\n        format!(\"{},{}\", self.level, self.damage)\n    }\n}\n\nconvars! {\n    player_config: PlayerConfig = PlayerConfig { level: 5, damage: 30.0 },\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffastestmolasses%2Fconvars","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffastestmolasses%2Fconvars","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffastestmolasses%2Fconvars/lists"}