Skip to content

Commit

Permalink
Merge pull request #218 from avsm/rel-3.3
Browse files Browse the repository at this point in the history
prepare release 3.3.0
  • Loading branch information
avsm authored Jan 23, 2019
2 parents ee8ff9b + dc88e53 commit fc7875e
Show file tree
Hide file tree
Showing 32 changed files with 159 additions and 173 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ env:
- PACKAGE="cstruct" DISTRO="alpine" OCAML_VERSION="4.06"
- PACKAGE="cstruct" DISTRO="alpine" OCAML_VERSION="4.07"
- PACKAGE="cstruct-lwt" DISTRO="debian-testing" OCAML_VERSION="4.07"
- PACKAGE="cstruct-async" DISTRO="debian-unstable" OCAML_VERSION="4.07"
- PACKAGE="cstruct-async" DISTRO="centos" OCAML_VERSION="4.07"
- PACKAGE="ppx_cstruct" DISTRO="debian-unstable" OCAML_VERSION="4.07"
- PACKAGE="cstruct-unix" DISTRO="ubuntu" OCAML_VERSION="4.07"
- PACKAGE="cstruct-unix" DISTRO="fedora" OCAML_VERSION="4.07"
22 changes: 22 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
v3.3.0 2019-01-22
-----------------

- Support for bi-endian cstructs that generate both sets of accessor
functions (#212 by @XVilka). This generates both `BE` and `LE`
modules to use as needed.

- Modify `of_string` and `of_bytes` to have an option `?off`
offset argument into the source bytes. (#208 by @XVilka)

- Improve tests to work on 32-bit architectures and handle
Gc better (@samoht)

- Do not depend explicitly on deprecated `ppx_driver`. This was
primarily there for older compilers, and new uses should be
based around `ppxlib`. (#201 by @edwintorok).

- Upgrade opam metadata to 2.0 format. (#217 by @XVilka @avsm)

- Upgrade to dune from jbuilder and support dune-release instead
of topkg (@avsm)

v3.2.1 2017-12-13
-----------------

Expand Down
21 changes: 4 additions & 17 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,31 +1,18 @@
.PHONY: all clean fuzz build-fuzz

all:
jbuilder build @install --dev
dune build

clean:
jbuilder clean
dune clean

test:
jbuilder runtest --dev
dune runtest

build-fuzz:
jbuilder build --dev fuzz/fuzz.exe
dune build fuzz/fuzz.exe

fuzz: build-fuzz
mkdir -p _build/in
echo > _build/in/empty
afl-fuzz -i _build/in -o _build/out -- _build/default/fuzz/fuzz.exe @@

REPO=../../mirage/opam-repository
PACKAGES=$(REPO)/packages
# until we have https://github.com/ocaml/opam-publish/issues/38
pkg-%:
topkg opam pkg -n $*
mkdir -p $(PACKAGES)/$*
cp -r _build/$*.* $(PACKAGES)/$*/
cd $(PACKAGES) && git add $*

PKGS=$(basename $(wildcard *.opam))
opam-pkg:
$(MAKE) $(PKGS:%=pkg-%)
5 changes: 5 additions & 0 deletions async/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
(library
(name async_cstruct)
(wrapped false)
(public_name cstruct-async)
(libraries core_kernel cstruct async_kernel async_unix))
5 changes: 0 additions & 5 deletions async/jbuild

This file was deleted.

12 changes: 5 additions & 7 deletions cstruct-async.opam
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,21 @@ license: "ISC"
dev-repo: "git+https://github.com/mirage/ocaml-cstruct.git"
bug-reports: "https://github.com/mirage/ocaml-cstruct/issues"
tags: [ "org:mirage" "org:ocamllabs" ]
doc: "https://mirage.githbu.io/ocaml-cstruct/"
build: [
["jbuilder" "subst" "-p" name "--name" name] {pinned}
["jbuilder" "build" "-p" name "-j" jobs]
["dune" "subst"] {pinned}
["dune" "build" "-p" name "-j" jobs]
]
depends: [
"ocaml" {>= "4.03.0"}
"jbuilder" {build & >= "1.0+beta7"}
"dune" {build & >= "1.0"}
"async_kernel" {>= "v0.9.0" & < "v0.12"}
"async_unix" {>= "v0.9.0" & < "v0.12"}
"core_kernel" {>= "v0.9.0" & < "v0.12"}
"cstruct" {>= "3.0.0"}
"cstruct" {>= "3.2.0"}
]
synopsis: "Access C-like structures directly from OCaml"
description: """
Cstruct is a library and syntax extension to make it easier to access C-like
structures directly from OCaml. It supports both reading and writing to these
structures, and they are accessed via the `Bigarray` module."""
url {
src: "git+https://github.com/mirage/ocaml-cstruct.git"
}
9 changes: 5 additions & 4 deletions cstruct-lwt.opam
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,18 @@ homepage: "https://github.com/mirage/ocaml-cstruct"
license: "ISC"
dev-repo: "git+https://github.com/mirage/ocaml-cstruct.git"
bug-reports: "https://github.com/mirage/ocaml-cstruct/issues"
doc: "https://mirage.githbu.io/ocaml-cstruct/"
tags: [ "org:mirage" "org:ocamllabs" ]
build: [
["jbuilder" "subst" "-p" name "--name" name] {pinned}
["jbuilder" "build" "-p" name "-j" jobs]
["dune" "subst"] {pinned}
["dune" "build" "-p" name "-j" jobs]
]
depends: [
"ocaml" {>= "4.03.0"}
"base-unix"
"lwt"
"cstruct"
"jbuilder" {build & >= "1.0+beta7"}
"cstruct" {>="3.2.0"}
"dune" {build & >= "1.0"}
]
synopsis: "Access C-like structures directly from OCaml"
description: """
Expand Down
19 changes: 10 additions & 9 deletions cstruct-unix.opam
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,23 @@ homepage: "https://github.com/mirage/ocaml-cstruct"
license: "ISC"
dev-repo: "git+https://github.com/mirage/ocaml-cstruct.git"
bug-reports: "https://github.com/mirage/ocaml-cstruct/issues"
doc: "https://mirage.githbu.io/ocaml-cstruct/"

tags: [ "org:mirage" "org:ocamllabs" ]
build: [
["jbuilder" "subst" "-p" name "--name" name] {pinned}
["jbuilder" "build" "-p" name "-j" jobs]
["dune" "subst"] {pinned}
["dune" "build" "-p" name "-j" jobs]
]
depends: [
"ocaml" {>= "4.03.0"}
"jbuilder" {build & >= "1.0+beta7"}
"dune" {build & >= "1.0"}
"base-unix"
"cstruct"
"cstruct" {>="3.2.0"}
]
synopsis: "Access C-like structures directly from OCaml"

description: """
Cstruct is a library and syntax extension to make it easier to access C-like
structures directly from OCaml. It supports both reading and writing to these
structures, and they are accessed via the `Bigarray` module."""
url {
src: "git+https://github.com/mirage/ocaml-cstruct.git"
}
structures directly from OCaml. It supports both reading and writing to these
structures, and they are accessed via the `Bigarray` module.
"""
14 changes: 6 additions & 8 deletions cstruct.opam
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,21 @@ homepage: "https://github.com/mirage/ocaml-cstruct"
license: "ISC"
dev-repo: "git+https://github.com/mirage/ocaml-cstruct.git"
bug-reports: "https://github.com/mirage/ocaml-cstruct/issues"
doc: "https://mirage.githbu.io/ocaml-cstruct/"
tags: [ "org:mirage" "org:ocamllabs" ]
build: [
["jbuilder" "subst" "-p" name "--name" name] {pinned}
["jbuilder" "build" "-p" name "-j" jobs]
["jbuilder" "runtest" "-p" name] {with-test}
["dune" "subst"] {pinned}
["dune" "build" "-p" name "-j" jobs]
["dune" "runtest" "-p" name "-j" jobs] {with-test}
]
depends: [
"ocaml" {>= "4.03.0"}
"jbuilder" {build & >= "1.0+beta10"}
"dune" {build & >= "1.0"}
"sexplib" {< "v0.12"}
"alcotest" {test}
"alcotest" {with-test}
]
synopsis: "Access C-like structures directly from OCaml"
description: """
Cstruct is a library and syntax extension to make it easier to access C-like
structures directly from OCaml. It supports both reading and writing to these
structures, and they are accessed via the `Bigarray` module."""
url {
src: "git+https://github.com/mirage/ocaml-cstruct.git"
}
2 changes: 2 additions & 0 deletions dune-project
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
(lang dune 1.0)
(name cstruct)
3 changes: 3 additions & 0 deletions fuzz/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
(executable
(name fuzz)
(libraries cstruct crowbar fmt))
5 changes: 0 additions & 5 deletions fuzz/jbuild

This file was deleted.

4 changes: 4 additions & 0 deletions js/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
(install
(section lib)
(files cstruct.js)
(package cstruct))
6 changes: 0 additions & 6 deletions js/jbuild

This file was deleted.

7 changes: 7 additions & 0 deletions lib/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
(library
(name cstruct)
(public_name cstruct)
(modules cstruct)
(wrapped false)
(libraries sexplib)
(c_names cstruct_stubs))
9 changes: 0 additions & 9 deletions lib/jbuild

This file was deleted.

11 changes: 11 additions & 0 deletions lib_test/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
(executables
(libraries cstruct alcotest)
(names tests bounds))

(alias
(name runtest)
(package cstruct)
(deps
(:< tests.exe))
(action
(run %{<} -e)))
11 changes: 0 additions & 11 deletions lib_test/jbuild

This file was deleted.

5 changes: 5 additions & 0 deletions lwt/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
(library
(name cstruct_lwt)
(wrapped false)
(public_name cstruct-lwt)
(libraries cstruct lwt.unix))
5 changes: 0 additions & 5 deletions lwt/jbuild

This file was deleted.

8 changes: 0 additions & 8 deletions pkg/pkg.ml

This file was deleted.

10 changes: 10 additions & 0 deletions ppx/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
(library
(name ppx_cstruct)
(public_name ppx_cstruct)
(kind ppx_rewriter)
(wrapped false)
(ppx_runtime_libraries cstruct)
(preprocess
(pps ppx_tools_versioned.metaquot_404))
(libraries ocaml-migrate-parsetree ppx_tools_versioned
ppx_tools_versioned.metaquot_404 bigarray))
14 changes: 0 additions & 14 deletions ppx/jbuild

This file was deleted.

13 changes: 6 additions & 7 deletions ppx_cstruct.opam
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,17 @@ homepage: "https://github.com/mirage/ocaml-cstruct"
license: "ISC"
dev-repo: "git+https://github.com/mirage/ocaml-cstruct.git"
bug-reports: "https://github.com/mirage/ocaml-cstruct/issues"
doc: "https://mirage.githbu.io/ocaml-cstruct/"

tags: [ "org:mirage" "org:ocamllabs" ]
build: [
["jbuilder" "subst" "-p" name "--name" name] {pinned}
["jbuilder" "build" "-p" name "-j" jobs]
["jbuilder" "runtest" "-p" name "-j" jobs] {with-test}
["dune" "subst"] {pinned}
["dune" "build" "-p" name "-j" jobs]
["dune" "runtest" "-p" name "-j" jobs] {with-test}
]
depends: [
"ocaml" {>= "4.03.0"}
"jbuilder" {build & >= "1.0+beta9"}
"dune" {build & >= "1.0"}
"cstruct" {>= "3.1.1"}
"ounit" {with-test}
"ppx_tools_versioned" {>= "5.0.1"}
Expand All @@ -29,6 +31,3 @@ description: """
Cstruct is a library and syntax extension to make it easier to access C-like
structures directly from OCaml. It supports both reading and writing to these
structures, and they are accessed via the `Bigarray` module."""
url {
src: "git+https://github.com/mirage/ocaml-cstruct.git"
}
29 changes: 29 additions & 0 deletions ppx_test/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
(executables
(libraries cstruct-unix)
(preprocess
(pps ppx_cstruct))
(names pcap basic enum))

(alias
(name runtest)
(package ppx_cstruct)
(deps
(:< pcap.exe))
(action
(run %{<})))

(alias
(name runtest)
(package ppx_cstruct)
(deps
(:< basic.exe))
(action
(run %{<})))

(alias
(name runtest)
(package ppx_cstruct)
(deps
(:< enum.exe))
(action
(run %{<})))
24 changes: 0 additions & 24 deletions ppx_test/jbuild

This file was deleted.

Loading

0 comments on commit fc7875e

Please sign in to comment.