{"id":31173283,"url":"https://github.com/mathiswellmann/gym-rs","last_synced_at":"2025-09-19T12:47:53.303Z","repository":{"id":49813675,"uuid":"299899780","full_name":"MathisWellmann/gym-rs","owner":"MathisWellmann","description":"OpenAI's Gym written in pure Rust for blazingly fast performance","archived":false,"fork":false,"pushed_at":"2024-10-18T21:24:09.000Z","size":3403,"stargazers_count":76,"open_issues_count":1,"forks_count":13,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-11-02T03:32:59.510Z","etag":null,"topics":["ai","ml","openai-gym","reinforcement-learning","rl"],"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/MathisWellmann.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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":"2020-09-30T11:40:21.000Z","updated_at":"2024-10-23T16:21:12.000Z","dependencies_parsed_at":"2023-11-09T13:05:12.793Z","dependency_job_id":"fbf579a8-645d-408e-8719-38c90be6f0fd","html_url":"https://github.com/MathisWellmann/gym-rs","commit_stats":{"total_commits":130,"total_committers":6,"mean_commits":"21.666666666666668","dds":"0.46923076923076923","last_synced_commit":"2e448c6e3acc16353a706a3fe52ccd6ae91bf8e5"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/MathisWellmann/gym-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MathisWellmann%2Fgym-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MathisWellmann%2Fgym-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MathisWellmann%2Fgym-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MathisWellmann%2Fgym-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MathisWellmann","download_url":"https://codeload.github.com/MathisWellmann/gym-rs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MathisWellmann%2Fgym-rs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275941523,"owners_count":25556976,"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","status":"online","status_checked_at":"2025-09-19T02:00:09.700Z","response_time":108,"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":["ai","ml","openai-gym","reinforcement-learning","rl"],"created_at":"2025-09-19T12:47:51.971Z","updated_at":"2025-09-19T12:47:53.290Z","avatar_url":"https://github.com/MathisWellmann.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenAI Gym (Unofficial Rust Implementation)\n\nThis library aims be be close to the original OpenAI Gym library written in Python.\n\nIf you don't mind Python and would like to use the original implementation from Rust,\ncheck out a [OpenAI Gym wrapper](https://github.com/MrRobb/gym-rs).\n\n\n## Prerequisites\nThis library use's SDL2 to enable various forms of rendering. Even when an SDL2\nwindow is not explictly shown, renders can be saved to files making it a mandatory \ndependency if any form of rendering is to be done.\n\n- [SDL2](https://wiki.libsdl.org/Installation)\n- [SDL2_gfx](https://www.ferzkopp.net/Software/SDL2_gfx/Docs/html/index.html)\n\nOn Ubuntu you can install the dependency as such:\n```shell\nsudo apt install libsdl2-dev\nsudo apt install libsdl2-gfx-dev\n```\n\nOn Arch:\n```shell\nsudo pacman -S sdl2 sdl2_gfx\n```\n\nIf your using nix, you can get into the reproducible build environment as simple as:\n```shell\nnix develop\n```\n\n## Usage\nTo use this crate in your project, put this in your Cargo.toml:\n\n```toml\n[dependencies]\ngym_rs = \"0.3.0\"\n```\n\n## Usage on Windows:\nAs per [#6](https://github.com/MathisWellmann/gym-rs/issues/6), here are some instructions for the windows folks:\n\n0. clone the repo \u0026 cd to the root dir of the repo\n1. modify Cargo.toml, remove dependency sdl2 line and add following code:\n\n```\n[dependencies.sdl2]\nversion = \"0.35.2\"\ndefault-features = false\nfeatures = [\"static-link\", \"use-vcpkg\", \"gfx\"]\n\n[package.metadata.vcpkg]\ndependencies = [\"sdl2\", \"sdl2-gfx\"]\ngit = \"https://github.com/microsoft/vcpkg\"\nrev = \"16ee2ec\"\n\n[package.metadata.vcpkg.target]\nx86_64-pc-windows-msvc = { triplet = \"x64-windows-static-md\" }\n\n```\n2. install cargo-vcpkg using cargo install cargo-vcpkg\n3. under the root dir of the repo, cargo vcpkg build\n4. now build and run, such as cargo run --example=mountain_car\n\n## Examples\n\n```bash\ncargo run --example=cartpole\n```\n![cart_pole](assets/cartpole.png)\n\n```bash\ncargo run --example=mountain_car\n```\n![mountain_car](assets/mountain_car.png)\n\n\n## Contributions\n\nContributions are welcome. For the contribution guidelines, please take a look at [CONTRIBUTING.md](./CONTRIBUTING.md).\n\n## Donations\n\nIf you would like to support the development of this crate, feel free to send over a donation:\n\nMonero:\n\n```plain\n47xMvxNKsCKMt2owkDuN1Bci2KMiqGrAFCQFSLijWLs49ua67222Wu3LZryyopDVPYgYmAnYkSZSz9ZW2buaDwdyKTWGwwb\n```\n\n![monero](assets/monero_donations_qrcode.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathiswellmann%2Fgym-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmathiswellmann%2Fgym-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathiswellmann%2Fgym-rs/lists"}