Skip to content

Conversation

@Coeur
Copy link
Contributor

@Coeur Coeur commented Jun 15, 2025

SPM is Swift Package Manager.

It's cross-platform (Darwin, Linux, Android, Windows) and it supports Swift, ObjC, C++, C, ...

It's a bit like a CMakeLists.txt, just more restrictive as it runs in a sandbox preventing running commands that could be potentially risky.

I wrote it because on macOS, double-clicking Package.swift will open an Xcode project that can be used for building, analyzing and editing the project, just like the existing par2cmdline.sln for Visual Studio.

On the caveats, due to sandboxing, it can't run ./configure, so it can't generate config.h, so I had to add the missing definitions for i8, i16, i32 and i64 when HAVE_CONFIG_H was not defined.

@BlackIkeEagle
Copy link
Member

The main difference would be that we now don't use this swift file for building so the chance of it going out-of-date is large. With the visualstudio project file we will notice if something is missing since it is actually used for building. Is there a way for us to notice this in CI as well that this swift file is not updated correctly ?

@Coeur
Copy link
Contributor Author

Coeur commented Jun 20, 2025

Yes, let me work on adding a CI build in the coming days.
The command would be simply swift build on a macOS environment.

@BlackIkeEagle
Copy link
Member

@BlackIkeEagle
Copy link
Member

@Coeur could you find the time to answer my question? And is there additional work needed for this ?

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