Skip to content

EvergineTeam/JoltPhysics.NET

Repository files navigation

JoltPhysics.NET

This repository contains low-level bindings for JoltPhysics (via JoltPhysicsC) used in Evergine.

CI CD Nuget

Purpose

JoltPhysics is a high-performance, multi-core friendly rigid body physics engine written in C++. JoltPhysicsC provides a pure C API layer, and this repository auto-generates .NET P/Invoke bindings from those C headers using CppAst.

Features

  • Full JoltPhysics C API — Covers the complete JoltPhysicsC surface: physics system, body management, shapes, constraints, queries, character controllers, vehicles, skeletons, and ragdolls
  • Auto-generated bindings — Generated from JoltPhysicsC headers using CppAst; easily regenerated when the upstream API evolves
  • Blittable structs — Math types (Vec3, Quat, Mat44, etc.) and settings structs are blittable, allowing zero-copy interop
  • Unsafe raw pointers — Native pointer semantics preserved for maximum performance
  • Pre-built native libraries — Ships with JoltPhysicsC binaries for all supported platforms

Supported Platforms

  • Windows x64
  • Windows ARM64
  • Linux x64
  • Linux ARM64
  • macOS ARM64
  • Android ARM
  • Android ARM64
  • iOS ARM64
  • iOS Simulator ARM64
  • Browser WASM

Development

Generate bindings locally

dotnet run --project JoltPhysicsGen/JoltPhysicsGen.csproj

Build the binding library

dotnet build Evergine.Bindings.JoltPhysics/Evergine.Bindings.JoltPhysics.csproj

Pack for NuGet

dotnet pack Evergine.Bindings.JoltPhysics/Evergine.Bindings.JoltPhysics.csproj -c Release

Run API smoke tests (Windows)

dotnet test Tests/JoltPhysics.APITests/JoltPhysics.APITests.csproj -c Debug -r win-x64

Workflows

Workflow Trigger Description
CI push/PR to main Build and validate bindings
CD manual Regenerate bindings and publish NuGet
Sync standards monthly / manual Sync shared scripts from evergine-standards

License

See LICENSE.

About

This repository contains low-level bindings for JoltPhysics used in Evergine.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Contributors