Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cross-platform Releases #6

Open
nvzqz opened this issue Aug 29, 2016 · 3 comments
Open

Cross-platform Releases #6

nvzqz opened this issue Aug 29, 2016 · 3 comments

Comments

@nvzqz
Copy link

nvzqz commented Aug 29, 2016

I noticed that SwiftGMP is currently only available for iOS and macOS. I'd love to see it embrace other platforms like tvOS and even Linux.

The main concern with Linux is that, reading through the original GMP header, it seems to act differently depending on architecture among other things when running make.

@twodayslate
Copy link
Contributor

My understanding is that GMP MP supports multiple platforms and as long as the correct architecture and ABI are selected everything should run smoothly. You can even have generic builds but with a significant performance loss.

gmp.h will vary, and can’t be just copied around. gmp.h remains compiler independent though, since all compilers for a particular ABI will be expected to use the same limb type.

generic C code can be selected with the configure --disable-assembly.
Note that this will run quite slowly, but it should be portable and should at least make it possible to get something running if all else fails.

GMP iOS Builder would have to be modified to support Apple TV and could also be edited to support a generic C build.

@nvzqz
Copy link
Author

nvzqz commented Aug 29, 2016

One of the great things about GMP is that it's optimized for various architectures. It would be amazing to be able to utilize that optimization within Swift in a broad way using SwiftGMP.

A run script phase could accomplish this within Xcode however it's not a Linux-friendly solution (although would work well for Carthage, I don't know about Cocoapods). I'm wondering how this could be accomplished using module maps and the Swift Package Manager since that's the main form of library distribution on Linux.

@NeoTeo
Copy link
Owner

NeoTeo commented Aug 29, 2016

It is my intention to have a good look at the SPM once released although I'm also considering the gx package manager.

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

No branches or pull requests

3 participants