Skip to content

Conversation

@ldomaradzki
Copy link

This PR introduces a Package.swift manifest to enable Swift Package Manager (SPM) support for the Box2D library. With this change, Swift developers can now easily integrate Box2D into their projects by declaring it as a dependency in their own Package.swift files.

Changes:

  • Added a Package.swift file to the root of the repository.
  • Defined targets and sources for Box2D's C/C++ code to allow compilation in Swift projects.
  • Exposed the Box2D module under the name box2d

Usage Example (in Swift project's Package.swift):

.package(url: "https://github.com/erincatto/box2d.git", from: "your-version-tag")

I understand that pull requests might not be your preferred way of contributing - if that’s the case, please let me know and I’ll be happy to open an issue and attach the file there instead.

@erincatto
Copy link
Owner

I think this is nice but I have no way to validate or maintain this. I'm not a Swift programmer. My usual requirement for this sort of thing is that there is a GitHub action that tests it.

@ldomaradzki
Copy link
Author

I've added a GitHub Action to test the Swift Package Manager integration. The swift-package-manager job validates that the package builds correctly in both debug and release configurations and that the package manifest is valid. If you approve the workflow you will see it running.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants