Releases: mirage/ocaml-cstruct
6.2.0
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 ofCstruct.len
(@reynir, #307) - Deprecate
copy
function (alias ofto_string
) (will be removed at the next minor release)
(@reynir, #308)
6.1.1
6.1.0
CHANGES:
breaking changes
-
The deprecated functions
Cstruct.len
,Cstruct.add_len
,Cstruct.set_len
,
andCstruct.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)
v6.0.1
CHANGES:
breaking changes
-
Cstruct.len
is deprecated, it will be deleted at the next
release. You should useCstruct.length
instead.
(@dinosaure, @hannesm, #284) -
Remove color from ppx's binary to replicate diff of errors in
any contexts (@dinosaure, @sternenseemann, #285) -
Add
shiftv
(@talex5, @avsm, @dinosaure, #287) -
Use
Bytes_val
if available (@hannesm, @avsm, @dinosaure, #286)
v6.0.0
CHANGES:
breaking changes
-
Add the function
Cstruct.length
,Cstruct.len
will
be deprecated to next release (@dinosaure, @hannesm, @avsm, #279) -
Cstruct.to_string
requires 2 optional arguments?off
and?len
(@hannesm, @cfcs, @talex5, @dinosaure, #262) -
Use
ppxlib
insteadppx_tools_versioned
(@pveber, @avsm, @dinosaure, #280) -
Delete the support of old version of OCaml (< 4.07.0) for
ppx_cstruct
(@avsm, @dinosaure, #280) -
Add useful functions to be able to parse some contents
withCstruct.t
like theastring
library (#227,
@dinosaure, @avsm, @samoht, @hannesm). -
Improve the interface of
Cstruct.t
with capabilities
(@hannesm, @cfcs, @talex5, @dinosaure, #262)
v5.2.0
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
v5.1.0
CHANGES:
-
Do not issue deprecation warnings when using OCaml 4.08.0
and cstruct-ppx with enums due toPervasives
(#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
CHANGES:
Security: This release tightens bounds checks to ensure
that data outside a given view (but still inside the underlying
buffer) cannot be accessed.
sub
does more checks (#244 #245 @hannesm @talex5 review by @dinosaure)add_len
andset_len
are now deprecated and will be removed
in a future release. (#251 @hannesm)- do not add user-provided data for bounds checks
(#253 @hannesm, report and review by @talex5) - improve CI to add fuzzing (#255 #252 @avsm @yomimono @talex5)
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
CHANGES:
-
Sexplib is now an optional library for the base
Cstruct
module.
A newCstruct_sexp
module has been introduced with the serialiser
functions, contained within thecstruct-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 toCstruct.t
but also has the right
sexp-conversion functions in scope. There is an example of this
in theppx_test/with-sexp
directory in the source repo.When you have converted and released your library, add an
opam constraint ofcstruct {>="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)