-
Notifications
You must be signed in to change notification settings - Fork 15
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
Remove cmake
#17
Remove cmake
#17
Conversation
deprecated-msvc provides a correct version already.
It's not set/discovered in neither makefile nor platform.hpp
Hi, removing cmake dep is of course a good idea. From what i recall, I only used the cmake build because building zmq without it was god awfull. If you can make this to work with only However the are a couple things i would like to see before I can merge:
|
I'll switch the entire CI step to run on GitHub actions then if you don't mind, and work on getting more or less feature parity with what was there before. How attached are you to breaking/non-breaking changes to this crate? Right now I've kept the API mostly the same but there's quite a few things that aren't being used upstream, or not needed anymore (for example the profile always seems to get set to the current building profile - however |
The CI run on the fork has turned green now https://github.com/Traverse-Research/zeromq-src-rs/runs/5069154901?check_suite_focus=true |
Like mentioned previously, I'm fine with going the full static linking route everywhere as long we also vendor libsodium behind a |
Also update the |
Also checkout the |
Right now it's set up such that if libsodium is enabled, we automatically enable the curve feature. Would you want it the other way around? Or just to have one feature for both? |
It's better to have one feature. I think its better to use the CURVE feature because most users don't really care about implementation details of what exact encryption library is used. |
I see what you mean - the reason it is the way it is, is because the libsodium feature requires some additional info to know where to locate it and it's headers. Want me to switch it - we'll have to move the libsodium params to the curve feature which also doesn't quite sound ideal? |
What I was thinking was to depend on |
@jean-airoldie I /think/ I've addressed most of your feedback - thanks, and I've made sure the build is green. I'm calling it quits for tonight, please let me know if there is any more feedback and I'll address it during the week. |
@jean-airoldie We've been running with this for a few days now - do you think it's mergable and if so could you also spin a new release? |
Sorry, I totally forgot about this, i'll do this today. |
I'm thinking I'm gonna merge, then do some of the changes I wanted to do myself, so its faster. In this case I was thinking of removing the artifact structure entirely and link against libsodium automatically when curve is enabled. |
Thanks for your work! I'm sure making this build work was painful. |
Why?
Currently because of the way this crate is set up (calling
cmake
) it requires that any user of this crate hascmake
on their system installed. We think this badly impacts developer experience when usingzmq
(or our own downstream crates). As an example of where this shows up (not just our Traverse Research crates), is for example in Google's evcxr setup instructions for all platforms.What?
It's become pretty standard in the Rust ecosystem to avoid
cmake
and instead to mirror it's buildscripts directly in Rust, usually it's relatively straight forward (just move over some defines and point it to some cpp files).This switches over to the
cc
crate so that people using this crate don't needcmake
to be installed on their system, but instead can just usecargo build
without any additional requirements. The setup for this PR mirrors for example the setup used in breakpad-sys by Embark Studios.As a result of switching to
cc
directly - we can enable parallel builds, and speed up the build times forzmq
quite a bit when using thevendored
feature - potentially making the non-vendored use-case of this crate obsolete.Platform support