[build] [wip] Support for the dune build system.#73
[build] [wip] Support for the dune build system.#73ejgallego wants to merge 1 commit intoocaml:masterfrom
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.
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
zarithwith dune; my motivation was to be able to composezarithwith other developments, so far seems to work well!If developers like this, I could finish the TODO: