retire ocplib-endian. Since OCaml 4.01 the primitives are part of Bigarray #177
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
in the same spirit as inhabitedtype/faraday#24 (thanks @seliopou) we can directly use the primitives provided by the OCaml runtime (since 4.01, https://caml.inria.fr/mantis/view.php?id=5771 -- cstruct is only available on
>= 4.02.3
).Why? Well, less dependencies are always better. ocplib-endian is additionally LGPL licensed (see https://github.com/OCamlPro/ocplib-endian/blob/master/COPYING.txt) - thus pretty deep down in our dependency chain a not very permissively licensed library.
What do we loose? big endian support (which AFAICT hasn't been used anyways, or has it?) -- it can be re-added by either some preprocessing (cpp0?) or by dynamic checks forSys.big_endian
. I don't know enough about cpp0 do go that way, but I can add the dynamicSys.big_endian
checks if this is desired.EDIT: I added
Sys.big_endian
tests, performance could be improved using a preprocessor (but since ocplib as well uses runtime checks, there's no performance regression in here)