diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md new file mode 100644 index 000000000..a200b9f80 --- /dev/null +++ b/ARCHITECTURE.md @@ -0,0 +1,17 @@ +## Repository architecture + +The architecture of this repository is a bit unusual because we are using some tricks to have both +the 2D and 3D version of Rapier share the same code-base. Here are the main folders: +- **`build/`**: contains one folder per Rapier crate (for the 2D, 3D, `f32`, and `f64` versions). Each + crate has its own `Cargo.toml` file that adjusts some cargo features, and reference the `src` folder. +- **`src/`**: contains the actual `.rs` source code of the Rapier physics engine. +- **`src_testbed/`**: contains the `.rs` source code of the Rapier testbed (which our examples are based on). +- **`examples2d/`**: simple 2D scenes showcasing some of Rapier's capabilities. + Run them with `cargo run --release --bin all_examples2`. +- **`examples3d/`**: simple 3D scenes showcasing some of Rapier's capabilities. + Run them with `cargo run --release --bin all_examples3`. +- **`benchmarks2d/`**: a set of 2D stress-tests, to see how Rapier performs when it has lots of elements + to simulate. +- **`benchmarks3d/`**: a set of 3D stress-tests, to see how Rapier performs when it has lots of elements + to simulate. We use the these benchmarks to track the performances of Rapier after some changes, + and spot unexpected regressions: https://www.rapier.rs/benchmarks/ \ No newline at end of file diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 000000000..13f092727 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,34 @@ +# The Dimforge Code of Conduct + +## Conduct + +- We are committed to providing a friendly, safe and welcoming environment for all, regardless of level of experience, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, nationality, or other similar characteristic. +- On Discord, the forums, IRC, GitHub, or any other community area, please avoid using overtly sexual nicknames or other nicknames that might detract from a friendly, safe and welcoming environment for all. +- Please be kind and courteous. There's no need to be mean or rude. +- Respect that people have differences of opinion and that every design or implementation choice carries a trade-off and numerous costs. There is seldom a right answer. +- Please keep unstructured critique to a minimum. If you have solid ideas you want to experiment with, make a fork and see how it works. +- We will exclude you from interaction if you insult, demean or harass anyone. That is not welcome behavior; we strive to be inclusive. In particular, we don't tolerate behavior that excludes people in socially marginalized groups. +- Private harassment is also unacceptable. No matter who you are, if you feel you have been or are being harassed or made uncomfortable by a community member, please contact one of the channel ops or any of the [Dimforge moderation team][mods@dimforge.com] immediately. Whether you're a regular contributor or a newcomer, we care about making this community a safe place for you and we've got your back. +- Likewise any spamming, trolling, flaming, baiting or other attention-stealing behavior is not welcome. +- Keep political and religious discussions out of the public Dimforge spaces. + +## Moderation + +These are the policies for upholding our community's standards of conduct. If you feel that a thread needs moderation, please contact the [Dimforge moderation team][mods@dimforge.com]. + +1. Remarks that violate the Dimforge standards of conduct, including hateful, hurtful, oppressive, or exclusionary remarks, are not allowed. (Cursing in general is discouraged, and never tolerated if targeting another user, and never in a hateful manner.) +1. Remarks that moderators find inappropriate, whether listed in the code of conduct or not, are also not allowed. +1. Moderators will first respond to such remarks with a warning. +1. If the warning is unheeded, the user will be "kicked," i.e., kicked out of the communication channel to cool off. +1. If the user comes back and continues to make trouble, they will be banned, i.e., indefinitely excluded. +1. Moderators may choose at their discretion to un-ban the user if it was a first offense and they offer the offended party a genuine apology. +1. If a moderator bans someone and you think it was unjustified, please take it up with that moderator, or with a different moderator, **in private**. Complaints about bans in-channel are not allowed. +1. Moderators, organization members, and anyone closely involved with the Dimforge projects are held to a higher standard than other community members. If a moderator creates an inappropriate situation, they should expect less leeway than others. + +In the Dimforge community we strive to go the extra step to look out for each other. Don't just aim to be technically unimpeachable, try to be your best self. In particular, avoid flirting with offensive or sensitive issues, particularly if they're off-topic; this all too often leads to unnecessary fights, hurt feelings, and damaged trust; worse, it can drive people away from the community entirely. + +And if someone takes issue with something you said or d resist the urge to be defensive. Just stop doing what it was they complained about and apologize. Even if you feel you were misinterpreted or unfairly accused, chances are good there was something you could've communicated better — remember that it's your responsibility to make your fellow Dimforge community members comfortable. Everyone wants to get along and we are all here first and foremost because we want to talk about making games. You will find that people will be eager to assume good intent and forgive as long as you earn their trust. + +The enforcement policies listed above apply to all official Dimforge venues; including all Dimforge Discord channels; GitHub repositories under Dimforge. + +_This Code of Conduct is based on the Rust Code of Conduct, available here: https://www.rust-lang.org/conduct.html_ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..c12c695b5 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,75 @@ +# Contributing to Rapier + +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](https://github.com/sponsors/dimforge). + +It is strongly recommended to [open an issue](https://github.com/dimforge/rapier/issues) or to discuss +with us [on Discord](discord) before fixing complicated issues, or implementing new +features. + + +## Contributing to the Rust code +The Rust source code of the Rapier physics engines is available on our `rapier` repository +[on GitHub](https://github.com/dimforge/rapier.rs). + +1. Fork our `rapier` repository [on GitHub](https://github.com/dimforge/rapier). +2. Clone the repository and make the necessary changes. +3. 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 `parallel` and `simd-stable` features enabled: `cd all_examples2; cargo run --release --features parallel,simd-stable` + - Run the 3D examples with the `parallel` and `simd-stable` features enabled: `cd all_examples3; cargo run --release --features parallel,simd-stable` +4. Once you are satisfied with your changes, submit them by [opening a Pull Request](https://github.com/dimforge/rapier/pulls) on GitHub. +5. 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](discord) for a review. +6. Iterate with the reviewer until the PR gets merged. + +## Contributing to the user-guide [rapier](https://rapier.rs) +The [official website](https://rapier.rs) for Rapier is built with [Docusaurus 2](https://docusaurus.io/). +Its source code can be found on our `rapier.rs` repository [on GitHub](https://github.com/dimforge/rapier.rs). +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: + +1. Fork our `rapier.rs` repository [on GitHub](https://github.com/dimforge/rapier.rs). +2. Clone the repository and make the necessary changes. +3. 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 . +4. Once you are satisfied with your changes, submit them by [opening a Pull Request](https://github.com/dimforge/rapier.rs/pulls) on GitHub. +5. 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](discord) for a review. +6. Iterate with the reviewer until the PR gets merged. + +## Contributing to the JavaScript/TypeScript bindings +The source code of the official JavaScript/TypeScript bindings for Rapier are available +on our `rapier.js` repository [on GitHub](https://github.com/dimforge/rapier.rs). + +You will have to make sure that you have [wasm-pack](https://github.com/rustwasm/wasm-pack) installed because +it is responsible for generating the low-level bindings. In order to modify the bindings and test your +changes you may: + +1. Fork our `rapier.js` repository [on GitHub](https://github.com/dimforge/rapier.js). +2. Clone the repository and make the necessary changes. +3. In order to debug your changes and check that it works, do the following for the 3D version of rapier (the procedure + for the 2D version is similar): + - `cd rapier3d; npm install; ./build_all.sh`. This will build the JS bindings, TS type definitions, and generate + the documentation. This will take several minutes to complete. + - After making changes to the Rust code on that repository, you need to run `./build_rust.sh`. + - After making changes to the TypeScript code on that repository, you need to run `./build_typescript.sh`. + - To test your changes, go back to the repository's root directory, and do: `cd testbed3d; npm install; npm link ../rapier3d/pkg; npm run start`. + This will open the 3D examples on your browser. + - Our build system for these JS bindings is still a bit messy right now. If you have any trouble, don't + hesitate to contact us [on Discord](discord). +4. Once you are satisfied with your changes, submit them by [opening a Pull Request](https://github.com/dimforge/rapier.js/pulls) on GitHub. +5. 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](discord) for a review. +6. Iterate with the reviewer until the PR gets merged. + +[discord]: https://discord.gg/vt9DJSW \ No newline at end of file diff --git a/README.md b/README.md index aa8853c40..3ddba1197 100644 --- a/README.md +++ b/README.md @@ -32,10 +32,39 @@ ----- -## Gold sponsors +## What is Rapier? + +Rapier is a set of 2D and 3D physics engines for games, animation, and robotics. It is built in Rust +by the [Dimforge](https://dimforge.com) organization. It is forever free and open-source! + +## Roadmap +We update our roadmap at the beginning of each year. Our 2021 roadmap can be seen +[there](https://www.dimforge.com/blog/2021/01/01/physics-simulation-with-rapier-2021-roadmap/#rapier-roadmap-for-2021). + +## Getting started +The easiest way to get started with Rapier is to: +1. Read the [user-guides](https://www.rapier.rs/docs/). +2. Play with the examples: `cargo run --release --bin all_examples2` and `cargo run --release --bin all_examples3`. + Their source code are available on the `examples2d/` and `examples3d/` directory. +3. Don't hesitate to ask for help on [Discord](https://discord.gg/vt9DJSW), or by opening an issue on GitHub. + +## Resources and discussions +- [Dimforge](https://dimforge.com): See all the open-source projects we are working on. Follow our announcements + on our [blog](https://www.dimforge.com/blog). +- [User guide](https://www.rapier.rs/docs/): Learn to use Rapier in your project by reading the official User Guides. +- [Discord](https://discord.gg/vt9DJSW): Come chat with us, get help, suggest features, on Discord! +- [NPM packages](https://www.npmjs.com/search?q=%40dimforge): Check out our NPM packages for Rapier, if you need to + use it with JavaScript/Typescript. + +Please make sure to familiarize yourself with our [Code of Conduct](CODE_OF_CONDUCT.md) +and our [Contribution Guidelines](CONTRIBUTING.md) before contributing or participating in +discussions with the community. + + +## Platinum sponsors Rapier is supported by:

- +

\ No newline at end of file