Releases: mirage/ocaml-cstruct
Fix composition of cstruct.ppx with other drivers
- ppx: remove an errant standalone initialiser that was messing up
the composition of cstruct with otherppx_driver
based ppx converters
(most notablyppx_sexp_conv
. If you are having trouble with using
ppx_cstruct
with other drivers, put a constraint onppx_cstruct>=3.0.1
.
(#151 #150 #149 #148 via @djs55 @g2p @avsm @diml). - ppx: also add a test case for
cstruct
andlwt
working together, but
this will not work until alwt>3.0
release happens. - Update opam rules to use
jbuilder subst
for version information
in the distribution. - Fix tests so that
check_alignment
expects a negative result. - Add opam test target for core library.
Split up OPAM packages into separate ones, port to Jbuilder
-
Split up OPAM packages into multiple independent ones. We now
have a standalonecstruct
, and then separatecstruct-lwt
,
cstruct-async
,cstruct-unix
packages, and appx_cstruct
package for the syntax extension. Transitional findlib packages
with the old scheme are available, but now packages should migrate
to usingcstruct-async
instead ofcstruct.async
for example.
This has the added benefit of the OPAM package names now matching
the findlib names. (#138 by @avsm @rgrinberg). -
Port build to jbuilder.
See the README for local development instructions. -
Ensure that
check_alignment
only takes a non-zero argument
for alignment (#143 #145 by @cfcs @avsm).
Fix linking regression introduced in 2.4.0
- fix missing ppx_tools_versioned dependency (#136, @et-def)
Support jbuilder and ppx_driver
Distribute the PPX extension so that it is compatible with Jbuilder.
ppx_cstruct
is now distributed as both a library and a binary.
Findlib predicates are used to distinguish usage:
- the binary is used for toplevel and simple -ppx building
- the library is used for linking custom rewriters
-package cstruct.ppx
alone uses the binary for rewriting.-package cstruct.ppx
-predicates custom_ppx,ppx_driver" is used to link the rewriter.
To use the PPX extension in jbuilder, just add:
(libraries (cstruct))
(preprocess (pps (cstruct.ppx)))
to your jbuild
file. This may be renamed to ppx_cstruct
in a
future release so that the PPX dependency is decoupled from the main
library, so this cstruct.ppx
is intended to be transitional as it
is what was originally used.
More flexible OCaml version support
This release uses ocaml-migrate-parsetree (described here) in order to make it more independent to the base OCaml version. There should be no observable changes, but the internals are much cleaner now.
OCaml 4.05 PPX support
- Add support for OCaml 4.05 for the PPX extension.
- Docs: correct to description of shift function (#121 via @orbifx).
Minor updates
Add to/of_bytes functions and support OCaml 4.04.0
Zero out new buffers by default
- Make
create
zero out the new buffer. The newcreate_unsafe
function can be used if you want to trade safety for speed.