{"id":13732332,"url":"https://github.com/EmbarkStudios/physx-rs","last_synced_at":"2025-05-08T06:31:55.177Z","repository":{"id":43209883,"uuid":"194861200","full_name":"EmbarkStudios/physx-rs","owner":"EmbarkStudios","description":"🎳 Rust binding for NVIDIA PhysX 🦀","archived":false,"fork":false,"pushed_at":"2024-02-12T13:46:21.000Z","size":4382,"stargazers_count":652,"open_issues_count":28,"forks_count":42,"subscribers_count":15,"default_branch":"main","last_synced_at":"2024-10-19T14:02:12.243Z","etag":null,"topics":["hacktoberfest","nvidia-physx","physics","physx","rust","rust-binding","wrapper"],"latest_commit_sha":null,"homepage":"http://embark.rs","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EmbarkStudios.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE-APACHE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-07-02T12:43:46.000Z","updated_at":"2024-10-11T20:50:20.000Z","dependencies_parsed_at":"2023-01-21T14:16:35.600Z","dependency_job_id":"2f69c20e-ef5a-4ffc-b8ec-be0fe56bb089","html_url":"https://github.com/EmbarkStudios/physx-rs","commit_stats":{"total_commits":256,"total_committers":32,"mean_commits":8.0,"dds":0.75390625,"last_synced_commit":"926eee8e5d5e8de1aed214397271228c8c5010f5"},"previous_names":[],"tags_count":61,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmbarkStudios%2Fphysx-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmbarkStudios%2Fphysx-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmbarkStudios%2Fphysx-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmbarkStudios%2Fphysx-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EmbarkStudios","download_url":"https://codeload.github.com/EmbarkStudios/physx-rs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224708121,"owners_count":17356486,"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":["hacktoberfest","nvidia-physx","physics","physx","rust","rust-binding","wrapper"],"created_at":"2024-08-03T02:01:53.357Z","updated_at":"2024-11-14T23:32:01.403Z","avatar_url":"https://github.com/EmbarkStudios.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# `🎳 physx-rs`\n\n**Rust binding for [NVIDIA PhysX](https://github.com/NVIDIA-Omniverse/PhysX), a popular and mature physics engine well-suited for games**\n\n[![Embark](https://img.shields.io/badge/embark-open%20source-blueviolet.svg)](https://embark.dev)\n[![Embark](https://img.shields.io/badge/discord-ark-%237289da.svg?logo=discord)](https://discord.gg/dAuKfZS)\n[![Crates.io](https://img.shields.io/crates/v/physx.svg)](https://crates.io/crates/physx)\n[![Docs](https://docs.rs/physx/badge.svg)](https://docs.rs/physx)\n[![dependency status](https://deps.rs/repo/github/EmbarkStudios/physx-rs/status.svg)](https://deps.rs/repo/github/EmbarkStudios/physx-rs)\n[![Build status](https://github.com/EmbarkStudios/physx-rs/workflows/CI/badge.svg)](https://github.com/EmbarkStudios/physx-rs/actions)\n\n\u003c/div\u003e\n\nCreated and maintained by [Embark](http://embark.games) and _**not**_ officially supported by NVIDIA.\n\nThis repository contains 2 crates:\n\n| Name | Description | Links |\n| --- | --- | --- |\n| [`physx`](physx/) | High-level interface on top of `physx-sys` 🚧 | [![Crates.io](https://img.shields.io/crates/v/physx.svg)](https://crates.io/crates/physx) [![Docs](https://docs.rs/physx/badge.svg)](https://docs.rs/physx) |\n| [`physx-sys`](physx-sys/) | Unsafe bindings to the [PhysX C++ API](https://github.com/NVIDIAGameWorks/PhysX) | [![Crates.io](https://img.shields.io/crates/v/physx-sys.svg)](https://crates.io/crates/physx-sys) [![Docs](https://docs.rs/physx-sys/badge.svg)](https://docs.rs/physx-sys) |\n\n## Why use it?\n\n* You want a feature-rich and performant physics engine to use in your project.\n\n## Caveats\n\n* The high-level `physx` wrapper is work-in-progress, and only covers a part of PhysX functionality. You can follow our progress and see where contributions are needed in our [*Tracking Issue for High-Level API Completeness*](https://github.com/EmbarkStudios/physx-rs/issues/5).\n\n* Any other features have to be accessed through the unsafe [physx-sys](physx-sys/) crate.\n\n* It's a large C++ codebase which requires a C++ toolchain, and comes with a non-trivial build system.\n\n### Alternatives\n\n* [Rapier](https://github.com/dimforge/rapier): a 2D and 3D physics engine for games, animation, and robotics written in Rust.  Fully cross-platform, with web support and optional cross-platform determinism on IEEE 754-2008 compliant systems.\n\n* [nphysics](https://github.com/dimforge/nphysics): a 2- and 3-dimensional physics engine for games and animations written in Rust. It is a good option for projects which do not require the full feature set of PhysX or prefer a native Rust solution.\n\n## Presentation\n\n[Tomasz Stachowiak](https://github.com/h3r2tic) did a presentation at the Stockholm Rust Meetup on October 2019 about this project that goes through the technical details of how C++ to Rust bindings of `physx-sys` works:\n\n[![An unholy fusion of Rust and C++ in physx-rs (Stockholm Rust Meetup, October 2019)](http://img.youtube.com/vi/RxtXGeDHu0w/0.jpg)](http://www.youtube.com/watch?v=RxtXGeDHu0w)\n\n## Usage\n\nThe following code example shows how [`physx`](physx/) can be initialized.\n\n``` rust\nconst PX_PHYSICS_VERSION: u32 = physx::version(4, 1, 1);\nlet mut foundation = Foundation::new(PX_PHYSICS_VERSION);\n\nlet mut physics = PhysicsFoundation::default();\n\nlet mut scene = physics.create(\n    SceneDescriptor {\n        gravity: PxVec3::new(0.0, 0.0, -9.81),\n        ..SceneDescriptor::new(MySceneUserData::default())\n    }\n);\n\n```\n\nYou can run an example with `cargo run --example ball`, which should show the following output:\n\n![Example](images/example-ball.png)\n\nInformation about all wrapper functionality can be found in the [physx](physx/) crate docs.\n\nIf you require functionality not covered by the [physx](physx/) wrapper you can use the low level [physx-sys](physx-sys) crate, which closely maps to the official PhysX SDK. You can find the PhysX user guide [here](https://nvidia-omniverse.github.io/PhysX/physx/index.html).\n\n## Prerequisites\n\n* C++ compiler ([see the `cc` crate](https://crates.io/crates/cc) for requirements)\n\n## How to build\n\n```bash\ngit submodule update --init\ncargo build --release\n```\n\n## Windows Note\n\nIt is highly recommended to not enable debug info in release mode when building with MSVC, as the Physx C++ code will take an **extremely** long time to compile. You can disable this by putting the following in your Cargo.toml\n\n```ini\n[profile.release.package.physx-sys]\ndebug = false\n```\n\n## How to release (maintainers only)\n\n1. Install [cargo-release](https://github.com/sunng87/cargo-release#install)\n2. Look at `physx/CHANGELOG.md` and `physx-sys/CHANGELOG.md` to determine whether both or only one of the crate needs updating, and what [semantic version](https://semver.org/) bump we need\n3. Review the list of changes in the changelogs and compare with the git commit diffs to the previous release and make sure we've captured and described all changes well and that they are semantically correct\n4. Run `cargo release --manifest-path \u003cphysx|physx-sys\u003e/Cargo.toml \u003cmajor|minor|patch\u003e` to automatically update the CHANGELOG, publish, tag, and push the release. If you are publishing both `physx` and `physx-sys`, you can just add the `--skip-push` flag to avoid pushing each crate individually and then do `git push --follow-tags` to push both at the same time.\n\n## Contributing\n\n[![Contributor Covenant](https://img.shields.io/badge/contributor%20covenant-v1.4-ff69b4.svg)](../CODE_OF_CONDUCT.md)\n\nWe welcome community contributions to this project.\n\nPlease read our [Contributor Guide](CONTRIBUTING.md) for more information on how to get started.\n\n## License\n\nLicensed under either of\n\n* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or \u003chttp://www.apache.org/licenses/LICENSE-2.0\u003e)\n* MIT license ([LICENSE-MIT](LICENSE-MIT) or \u003chttp://opensource.org/licenses/MIT\u003e)\n\nat your option.\n\nNote that the [PhysX C++ SDK](https://github.com/NVIDIA-Omniverse/PhysX) has its [own BSD 3 license](https://nvidia-omniverse.github.io/PhysX/physx/5.1.3/docs/License.html) and depends on [additional C++ third party libraries](https://github.com/NVIDIA-Omniverse/PhysX/tree/release/104.2/physx#acknowledgements).\n\n### Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally\nsubmitted for inclusion in the work by you, as defined in the Apache-2.0\nlicense, shall be dual licensed as above, without any additional terms or\nconditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FEmbarkStudios%2Fphysx-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FEmbarkStudios%2Fphysx-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FEmbarkStudios%2Fphysx-rs/lists"}