-
Notifications
You must be signed in to change notification settings - Fork 70
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
[build] [wip] Support for the dune build system. #73
Conversation
TODO: - configuration - fix warnings - run tests - opam generation? - CI?
This needs rebasing. |
is this planned to be rebased & merged & zarith to be released (with the very nice other changes that are so far only in trunk)? thanks. |
I'd be happy to do more progress on this, once I get feedback from the developers as whether this would be considered. |
I have no strong opinion. I think that the main complexity of the build system for Zarith lies in the configure script. The Makefile is rather simple, we have few files and directories. |
My Cryptokit library recently moved to using Dune: xavierleroy/cryptokit#24 . On the one hand, the previous build system (based on Oasis) had issues, so Dune was an improvement. On the other hand, Dune's support for autoconfiguration is rather primitive, to the point that I'd rather stick with a handwritten |
My main motivation to write this was to be able to debug Dune also provides some other advantages and extra tooling such as documentation, dune-release, etc... YMMV.
I don't think that the configure script would be replaced, only adapted to output files that can be |
I would also like to have it using dune + autoconf, like opam itself does it. It simplifies a lot when cross compiling zarith to other platforms. |
(name zarith) | ||
(wrapped false) | ||
(flags -w -6) | ||
(library_flags -cclib -lgmp) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest to use dune-configurator
here instead, having -lgmp
as a fallback.
See ocaml/opam-repository#18131 & ocaml/opam-repository#18128
FYI, I've rebased and updated this PR in https://github.com/hhugo/zarith/tree/dune.
|
Great @hhugo , please feel free to take over / close this PR, it is unlikely I can put any cycles on this any time soon. |
I've updated https://github.com/hhugo/zarith/tree/dune to demonstrate what a near complete dune-based build system would look like for zarith. |
This is a preliminary draft PR for building
zarith
with dune; my motivation was to be able to composezarith
with other developments, so far seems to work well!If developers like this, I could finish the TODO: