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

Accept PRs for making cross platform? #1

Open
jsm174 opened this issue Jun 4, 2020 · 2 comments
Open

Accept PRs for making cross platform? #1

jsm174 opened this issue Jun 4, 2020 · 2 comments

Comments

@jsm174
Copy link

jsm174 commented Jun 4, 2020

Hello. I was wondering if you would be open to accepting PRs to make a this library cross platform.

I did some modifications as a proof of concept, and I was able to successfully get it to work on macOS:

https://github.com/jsm174/MiniZ.Net/commit/330c2c5f59ebc17b8ca4aa7f25ae6affe4ee86db

If so, I'd like to model the design similar to net-vips, and net-vips-native (ie, NetVips.Native.win-x86, NetVips.Native.win-x64, NetVips.Native.osx-x64).

@ActuallyaDeviloper
Copy link
Owner

ActuallyaDeviloper commented Aug 31, 2020

Hi,

sorry for the late response.

If you are still interested in contributing a full pull request you are more than welcome to send me one.

There is just one thing that we need to solve in the code and that is how we can keep support for .Net Framework versions older than 4.7.1. It seems to me that in the code there is a problem in static Functions(). I think here we can just add preprocessor switch to compile for older versions which are then only support Windows. So far so simple.

Also when I checkout net-vips it seems they have different Nuget packages for different platforms which concerns me. Do you know if it is possible to make single .net binary that targets all platforms? A quick look around online suggests that it is possible to target multiple frameworks and platforms from within a single package at least. And on Windows we can addionally automatically choose between 32 bits and 64 bits like we manage right now.

What I am also not so sure about is how we can then build all this. My approach would be to ditch Visual Studio for the build because it won't do us any good on MacOs and to instead use the zig C cross compiler and a command line script. That sounds nicely simple and should work everywhere including on Windows.

@jsm174
Copy link
Author

jsm174 commented Aug 31, 2020

No worries. I appreciate the response!

I did end up making a new library, NetMiniZ based on all your work. https://github.com/jsm174/net-miniz.
It's currently using GitHub workflows to build the native libraries, managed dll, and nuget.

It is also being used quite heavily in a Unity project: https://github.com/freezy/VisualPinball.Engine

The developer of NetVips has been helping us getting NetVips running in Unity on Linux. That work has given me some more ideas on how to package NetMiniz, so I may go back and do the same.

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

2 participants