Skip to content

Releases: mirage/ocaml-cstruct

6.2.0

20 Feb 15:48
8c7c94a
Compare
Choose a tag to compare

CHANGES:

  • Add sub_copy function (@c-cube, #305)
  • Fix documentation (@MisterDA, #304)
  • Add to_hex_string function (@c-cube, #306)
  • Fix documentation and use Cstruct.length instead of Cstruct.len (@reynir, #307)
  • Deprecate copy function (alias of to_string) (will be removed at the next minor release)
    (@reynir, #308)

6.1.1

24 Jul 17:07
Compare
Choose a tag to compare

CHANGES:

  • ppx_cstruct: remove superfluous stdlib-shims dependency (@hannesm #300)

6.1.0

01 Apr 06:34
7cfde7f
Compare
Choose a tag to compare

CHANGES:

breaking changes

  • The deprecated functions Cstruct.len, Cstruct.add_len, Cstruct.set_len,
    and Cstruct.blit_to_string have been removed (@hannesm #291)

  • Implement host_endian (@haesbaert #292, fixes #72)

  • Compatibility with OCaml 5.0.0 (@dinosaure #294)

  • Drop support of OCaml < 4.08.0, remove bigarray-compat dependency
    (@hannesm #298)

  • Fix year in changes of 6.0.1 (@reynir #297)

v6.0.1

25 Jun 13:25
Compare
Choose a tag to compare

CHANGES:

breaking changes

v6.0.0

21 Sep 15:19
8864ed5
Compare
Choose a tag to compare

CHANGES:

breaking changes

v5.2.0

15 Jul 08:13
92f72ff
Compare
Choose a tag to compare

CHANGES:

Upgrade the ppx_cstruct library to use the OCaml 4.11
AST rather than than OCaml 4.04, which in turn should
make it easier to port to ppxlib in the future and
improve interoperability with other PPXs (@bikallem #275).

Also upgrades build files to use dune 2.0 (@bikallem #275)
and fixes the GitHub Actions versions (@smorimoto #273)
and also test OCaml 4.10.0 (@avsm).

v5.1.1

24 Nov 21:30
2dfc521
Compare
Choose a tag to compare

CHANGES:

This is a point release to fix a regression in 5.1.0
on compilers earlier than 4.07.

The release also fixes the test suite and CI on compilers
greater than 4.07.

v5.1.0

24 Nov 09:01
Compare
Choose a tag to compare

CHANGES:

  • Do not issue deprecation warnings when using OCaml 4.08.0
    and cstruct-ppx with enums due to Pervasives (#269 @cypheon @hannesm)

  • Tighten parsing of the [@len] attribute to ensure it is a
    valid, positive integer (#265 @emillon)

  • Update JavaScript bindings to latest Js_of_ocaml 3.5.0
    interfaces (@hhugo #268)

v5.0.0

19 Apr 21:00
Compare
Choose a tag to compare

CHANGES:

Security: This release tightens bounds checks to ensure
that data outside a given view (but still inside the underlying
buffer) cannot be accessed.

Remove Unix dependency: cstruct now uses the new bigarray-compat
library instead of Bigarray directly, to avoid a dependency on Unix
when using OCaml compilers less than 4.06.0. This will break downstream
libraries that do not have a direct dependency on Bigarray. Simply
fix it in your library by adding a bigarray dependency in your dune
file. (#247 @TheLortex)

Capability module: To improve the safety of future code with stronger type
checking, this release introduces a new Cstruct_cap module which makes the
underlying Cstruct an abstract type instead of a record. In return for this
extra abstraction, the module can enforce read-only, write only, and read/write
buffers by tracking them as phantom type variables. Although this library
shares an implementation internally with classic Cstruct, it is a significant
revision and so we will be gradually migrating to it. Feedback on it is
welcome! (#237 @dinosaure and many excited reviewers)

Ppx compare functions: A new compare_X function is generated for
cenum declarations. This respects custom ids supplied in the cenum
declaration and so is more robust than polymorphic compare (#248 @emillon)

The CI has also been switched over to both Azure Pipelines and Drone in
addition to Travis, and as a result the tests all run on Windows, macOS,
various Linux distributions, on x86 and arm64 machines, and runs AFL
fuzz tests on the Drone cloud (#255 @avsm).

v4.0.0

25 Mar 18:15
Compare
Choose a tag to compare

CHANGES:

  • Sexplib is now an optional library for the base Cstruct module.
    A new Cstruct_sexp module has been introduced with the serialiser
    functions, contained within the cstruct-sexp opam package.

    To convert old code, simply use Cstruct_sexp.t instead of
    Cstruct.t in a record type for which you are using [@@deriving sexp].
    This is a type alias to Cstruct.t but also has the right
    sexp-conversion functions in scope. There is an example of this
    in the ppx_test/with-sexp directory in the source repo.

    When you have converted and released your library, add an
    opam constraint of cstruct {>="4.0.0"} to your own opam
    packages to ensure that they pick up this version of the library.
    (fixes #222, @avsm)

  • JavaScript stubs are now installed using the jsoo mechanism
    rather than a manual specification (#241 @jonludlam)

  • Use computed versions in opam files to ensure that dependent
    opam packages such as cstruct-async get the same base version
    of cstruct to avoid mismatches. (@avsm)

  • Add a ppx test suite to checks that all error paths in ppx
    handling are reachable and have meaningful location info (#238 @emillon)