{"id":19196027,"url":"https://github.com/acj/webots-rs","last_synced_at":"2025-05-09T00:34:15.226Z","repository":{"id":66824294,"uuid":"402836815","full_name":"acj/webots-rs","owner":"acj","description":"Build controllers for the Webots robot simulator in Rust","archived":false,"fork":false,"pushed_at":"2024-12-18T00:31:51.000Z","size":18,"stargazers_count":22,"open_issues_count":0,"forks_count":6,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-20T09:43:56.040Z","etag":null,"topics":["robots","rust","webots"],"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/acj.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,"zenodo":null}},"created_at":"2021-09-03T16:41:47.000Z","updated_at":"2025-02-18T06:47:26.000Z","dependencies_parsed_at":"2024-03-17T00:56:09.162Z","dependency_job_id":"af770348-6067-4ad8-95ec-f51eb4f732ad","html_url":"https://github.com/acj/webots-rs","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/acj%2Fwebots-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acj%2Fwebots-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acj%2Fwebots-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acj%2Fwebots-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/acj","download_url":"https://codeload.github.com/acj/webots-rs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253171191,"owners_count":21865276,"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":["robots","rust","webots"],"created_at":"2024-11-09T12:12:16.039Z","updated_at":"2025-05-09T00:34:15.208Z","avatar_url":"https://github.com/acj.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Webots controllers in Rust\n\n**Status**: experimental\n\nThis is a reference project that shows how to build controllers for the [Webots robot simulator](https://cyberbotics.com) using the Rust programming language.\n\n## Getting Started\n\n1. Download and install [Webots](https://cyberbotics.com) for your operating system\n1. Install [Rust](https://www.rust-lang.org/learn/get-started) if you haven't already\n1. Clone this repository\n1. Run `make` to compile the Rust controller and copy it into place\n1. Open the `sample_project/worlds/my_first_simulation.wbt` file in Webots\n1. Run the simulation\n\nYou should see \"The Rust controller has started\" in the Webots console.\n\nTo make changes to the controller, you can edit `src/main.rs` and then run `make` again. You might need to reset the simulation (File \u003e Reset Simulation) or restart Webots to use the updated code.\n\n## How this works\n\nAt compile time, I use [bindgen](https://github.com/rust-lang/rust-bindgen) to convert a list of Webots C header files (see `wrapper.h`) into Rust structures and types. Those types form a bridge between the Rust-based controller code and the Webots C library that does the hard work of interacting with the simulation engine. See `build.rs` for more details.\n\n## Contributing\n\nImprovements are welcome. If you have an idea, please open an issue so that we can discuss it.\n\n## TODO\n\n- Improve API safety. While any of the Webots C functions can be called from Rust, many are marked as `unsafe` due to raw pointer usage. I have started wrapping a few of them in Rust functions (see `lib.rs`), but this approach doesn't scale very well given the size of the API.\n- More example controllers\n- Resolve \"not FFI-safe\" warnings somehow\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facj%2Fwebots-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Facj%2Fwebots-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facj%2Fwebots-rs/lists"}