Thank you for wanting to contribute! Contribution can take many forms, including:
- Reporting a bug.
- Submitting a fix.
- Fixing typos.
- Improving the docs.
- Donations on GitHub Sponsors.
It is strongly recommended to open an issue or to discuss with us on Discord before fixing complicated issues, or implementing new features.
The Rust source code of the Rapier physics engines is available on our rapier repository
on GitHub.
- Fork our
rapierrepository on GitHub. - Clone the repository and make the necessary changes.
- In order to debug your changes and check that it works, do the following:
- Run the tests
cargo test - Run the 2D examples and see if they behave as expected:
cargo run --release --bin all_examples2 - Run the 3D examples and see if they behave as expected:
cargo run --release --bin all_examples3 - Run the 2D examples with the
parallelfeature enabled:cargo run --release --bin all_examples2 --features parallel - Run the 3D examples with the
parallelfeature enabled:cargo run --release --bin all_examples3 --features parallel
- Run the tests
- Once you are satisfied with your changes, submit them by opening a Pull Request on GitHub.
- If that Pull Request does something you need urgently, or if you think it has been forgotten, don't hesitate to ask @sebcrozet directly on Discord for a review.
- Iterate with the reviewer until the PR gets merged.
Contributing to the user-guide rapier
The official website for Rapier is built with Docusaurus 3.
Its source code can be found in the website/ directory of the rapier repository: the user guide is
written once in website/docs/user_guides/templates, and its code snippets are compiled from
website/docs-examples (see the website README).
If you find a typo or some outdated information on the website, please don't hesitate to reach
out! We can't stress enough how helpful it is for you to report (or fix) typo errors.
If you would like to fix it yourself, here is the procedure:
- Fork our
rapierrepository on GitHub. - Clone the repository and make the necessary changes.
- In order to debug your changes and check that it works, do the following:
cd website; yarn install; yarn start;This will open the website on your browser locally. The default local address is http://localhost:3000 .- If you changed a code snippet, check that it still compiles, e.g., with
cd website/docs-examples; cargo testfor the Rust snippets (see the docs-examples README for the other languages).
- Once you are satisfied with your changes, submit them by opening a Pull Request on GitHub.
- If that Pull Request does something you need urgently, or if you think it has been forgotten, don't hesitate to ask @sebcrozet directly on Discord for a review.
- Iterate with the reviewer until the PR gets merged.
The official bindings and the Bevy plugin live in the bindings/ directory of the rapier repository:
bindings/typescript: the JavaScript/TypeScript bindings. You will need wasm-pack to build them; see its README.bindings/c: the C and C++ bindings; see its README.bindings/python: the Python bindings; see its README.bindings/bevy_rapier: thebevy_rapier2dandbevy_rapier3dplugins for the Bevy game engine. They build against the rapier crates of this repository.
The procedure is the same as for the Rust code:
- Fork our
rapierrepository on GitHub. - Clone the repository and make the necessary changes.
- In order to debug your changes and check that it works:
- JavaScript: from
bindings/typescript, build the packages (see its README), then run the 3D examples withcd testbed3d; npm install; npm run start(the procedure for the 2D version is similar). - Bevy: from
bindings/bevy_rapier, run the tests withcargo testand the examples with, e.g.,cargo run --release -p bevy_rapier3d --example boxes3.
- JavaScript: from
- Once you are satisfied with your changes, submit them by opening a Pull Request on GitHub.
- If that Pull Request does something you need urgently, or if you think it has been forgotten, don't hesitate to ask @sebcrozet directly on Discord for a review.
- Iterate with the reviewer until the PR gets merged.