diff --git a/Makefile b/Makefile index 8a00756..07ed872 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ .PHONY : run run : - jbuilder build --dev tester/tester.exe reporter/reporter.exe + dune build tester/tester.exe reporter/reporter.exe mkdir -p _report _build/default/tester/tester.exe -ascii -quota 10 > _report/core_bench.txt _build/default/reporter/reporter.exe \ @@ -9,7 +9,7 @@ run : .PHONY : test-correctness test-correctness : - jbuilder build --dev correctness/correctness.exe + dune build correctness/correctness.exe _build/default/correctness/correctness.exe MEMORY_TESTS := $(shell ls memory/*/test.ml) @@ -17,7 +17,7 @@ MEMORY_TESTS := $(MEMORY_TESTS:.ml=.exe) .PHONY : compare-memory-usage compare-memory-usage : - jbuilder build --dev $(MEMORY_TESTS) + dune build $(MEMORY_TESTS) @echo "map stack heap total" @for TEST in $(MEMORY_TESTS) ; \ do \ @@ -32,5 +32,5 @@ depend : .PHONY : clean clean : - jbuilder clean + dune clean rm -rf _report diff --git a/correctness/dune b/correctness/dune new file mode 100644 index 0000000..511cc21 --- /dev/null +++ b/correctness/dune @@ -0,0 +1,4 @@ +(executable + (name correctness) + (flags :standard -w +A) + (libraries faster-map.functions)) diff --git a/correctness/jbuild b/correctness/jbuild deleted file mode 100644 index 273c21e..0000000 --- a/correctness/jbuild +++ /dev/null @@ -1,6 +0,0 @@ -(jbuild_version 1) - -(executable - ((name correctness) - (flags (:standard -w +A)) - (libraries (faster-map.functions)))) diff --git a/dune-project b/dune-project new file mode 100644 index 0000000..8a3b1d1 --- /dev/null +++ b/dune-project @@ -0,0 +1,2 @@ +(lang dune 1.0) +(name faster-map) diff --git a/faster-map.opam b/faster-map.opam index 4cd99f4..aa7e300 100644 --- a/faster-map.opam +++ b/faster-map.opam @@ -1,9 +1,14 @@ -opam-version: "1.2" +opam-version: "2.0" +synopsis: "A tail-recursive list map with good performance for all list sizes. Not actually written in assembly" +authors: "Anton Bachin " +maintainer: "Anton Bachin " +homepage: "https://github.com/aantron/faster-map" +bug-reports: "https://github.com/aantron/faster-map/issues" depends: [ "base" "batteries" "containers" "core_bench" - "jbuilder" {build & >= "1.0+beta13"} + "dune" ] diff --git a/functions/dune b/functions/dune new file mode 100644 index 0000000..d37763a --- /dev/null +++ b/functions/dune @@ -0,0 +1,18 @@ +; Example output of the generator can be found in results/faster_map.ml. That is +; basically a dumped and commented generated.ml. + +(rule + (targets generated.ml) + (deps + (:< %{workspace_root}/generator/generator.exe)) + (action + (with-stdout-to + %{targets} + (run %{<})))) + +(library + (name functions) + (public_name faster-map.functions) + (flags :standard -w +A) + (ocamlopt_flags :standard -O3) + (libraries base batteries containers)) diff --git a/functions/jbuild b/functions/jbuild deleted file mode 100644 index b3d3d63..0000000 --- a/functions/jbuild +++ /dev/null @@ -1,15 +0,0 @@ -(jbuild_version 1) - -; Example output of the generator can be found in results/faster_map.ml. That is -; basically a dumped and commented generated.ml. -(rule - ((targets (generated.ml)) - (deps (${ROOT}/generator/generator.exe)) - (action (with-stdout-to ${@} (run ${<}))))) - -(library - ((name functions) - (public_name faster-map.functions) - (flags (:standard -w +A)) - (ocamlopt_flags (:standard -O3)) - (libraries (base batteries containers)))) diff --git a/generator/dune b/generator/dune new file mode 100644 index 0000000..948c154 --- /dev/null +++ b/generator/dune @@ -0,0 +1,3 @@ +(executable + (name generator) + (flags :standard -w +A)) diff --git a/generator/jbuild b/generator/jbuild deleted file mode 100644 index 283dc9b..0000000 --- a/generator/jbuild +++ /dev/null @@ -1,5 +0,0 @@ -(jbuild_version 1) - -(executable - ((name generator) - (flags (:standard -w +A)))) diff --git a/memory/base/dune b/memory/base/dune new file mode 100644 index 0000000..b994981 --- /dev/null +++ b/memory/base/dune @@ -0,0 +1,5 @@ +(executable + (name test) + (flags :standard -w +A) + (ocamlopt_flags :standard -O3) + (libraries faster-map.instrumented)) diff --git a/memory/base/jbuild b/memory/base/jbuild deleted file mode 120000 index ec5815f..0000000 --- a/memory/base/jbuild +++ /dev/null @@ -1 +0,0 @@ -../jbuild.common \ No newline at end of file diff --git a/memory/batteries/dune b/memory/batteries/dune new file mode 100644 index 0000000..b994981 --- /dev/null +++ b/memory/batteries/dune @@ -0,0 +1,5 @@ +(executable + (name test) + (flags :standard -w +A) + (ocamlopt_flags :standard -O3) + (libraries faster-map.instrumented)) diff --git a/memory/batteries/jbuild b/memory/batteries/jbuild deleted file mode 120000 index ec5815f..0000000 --- a/memory/batteries/jbuild +++ /dev/null @@ -1 +0,0 @@ -../jbuild.common \ No newline at end of file diff --git a/memory/containers/dune b/memory/containers/dune new file mode 100644 index 0000000..b994981 --- /dev/null +++ b/memory/containers/dune @@ -0,0 +1,5 @@ +(executable + (name test) + (flags :standard -w +A) + (ocamlopt_flags :standard -O3) + (libraries faster-map.instrumented)) diff --git a/memory/containers/jbuild b/memory/containers/jbuild deleted file mode 120000 index ec5815f..0000000 --- a/memory/containers/jbuild +++ /dev/null @@ -1 +0,0 @@ -../jbuild.common \ No newline at end of file diff --git a/memory/dune b/memory/dune new file mode 100644 index 0000000..956d321 --- /dev/null +++ b/memory/dune @@ -0,0 +1,5 @@ +(library + (name instrumented) + (public_name faster-map.instrumented) + (flags :standard -w +A) + (ocamlopt_flags :standard -O3)) diff --git a/memory/jbuild b/memory/jbuild deleted file mode 100644 index 7d5bb95..0000000 --- a/memory/jbuild +++ /dev/null @@ -1,7 +0,0 @@ -(jbuild_version 1) - -(library - ((name instrumented) - (public_name faster-map.instrumented) - (flags (:standard -w +A)) - (ocamlopt_flags (:standard -O3)))) diff --git a/memory/naive/dune b/memory/naive/dune new file mode 100644 index 0000000..b994981 --- /dev/null +++ b/memory/naive/dune @@ -0,0 +1,5 @@ +(executable + (name test) + (flags :standard -w +A) + (ocamlopt_flags :standard -O3) + (libraries faster-map.instrumented)) diff --git a/memory/naive/jbuild b/memory/naive/jbuild deleted file mode 120000 index ec5815f..0000000 --- a/memory/naive/jbuild +++ /dev/null @@ -1 +0,0 @@ -../jbuild.common \ No newline at end of file diff --git a/memory/proposed/dune b/memory/proposed/dune new file mode 100644 index 0000000..b994981 --- /dev/null +++ b/memory/proposed/dune @@ -0,0 +1,5 @@ +(executable + (name test) + (flags :standard -w +A) + (ocamlopt_flags :standard -O3) + (libraries faster-map.instrumented)) diff --git a/memory/proposed/jbuild b/memory/proposed/jbuild deleted file mode 120000 index ec5815f..0000000 --- a/memory/proposed/jbuild +++ /dev/null @@ -1 +0,0 @@ -../jbuild.common \ No newline at end of file diff --git a/memory/stdlib/dune b/memory/stdlib/dune new file mode 100644 index 0000000..b994981 --- /dev/null +++ b/memory/stdlib/dune @@ -0,0 +1,5 @@ +(executable + (name test) + (flags :standard -w +A) + (ocamlopt_flags :standard -O3) + (libraries faster-map.instrumented)) diff --git a/memory/stdlib/jbuild b/memory/stdlib/jbuild deleted file mode 120000 index ec5815f..0000000 --- a/memory/stdlib/jbuild +++ /dev/null @@ -1 +0,0 @@ -../jbuild.common \ No newline at end of file diff --git a/memory/unrolled/dune b/memory/unrolled/dune new file mode 100644 index 0000000..b994981 --- /dev/null +++ b/memory/unrolled/dune @@ -0,0 +1,5 @@ +(executable + (name test) + (flags :standard -w +A) + (ocamlopt_flags :standard -O3) + (libraries faster-map.instrumented)) diff --git a/memory/unrolled/jbuild b/memory/unrolled/jbuild deleted file mode 120000 index ec5815f..0000000 --- a/memory/unrolled/jbuild +++ /dev/null @@ -1 +0,0 @@ -../jbuild.common \ No newline at end of file diff --git a/reporter/dune b/reporter/dune new file mode 100644 index 0000000..45cd280 --- /dev/null +++ b/reporter/dune @@ -0,0 +1,3 @@ +(executable + (name reporter) + (flags :standard -w +A)) diff --git a/reporter/jbuild b/reporter/jbuild deleted file mode 100644 index 8c151ee..0000000 --- a/reporter/jbuild +++ /dev/null @@ -1,5 +0,0 @@ -(jbuild_version 1) - -(executable - ((name reporter) - (flags (:standard -w +A)))) diff --git a/tester/dune b/tester/dune new file mode 100644 index 0000000..eec9b15 --- /dev/null +++ b/tester/dune @@ -0,0 +1,5 @@ +(executable + (name tester) + (flags :standard -w +A) + (ocamlopt_flags :standard -O3) + (libraries core_bench faster-map.functions)) diff --git a/tester/jbuild b/tester/jbuild deleted file mode 100644 index fe60c9b..0000000 --- a/tester/jbuild +++ /dev/null @@ -1,7 +0,0 @@ -(jbuild_version 1) - -(executable - ((name tester) - (flags (:standard -w +A)) - (ocamlopt_flags (:standard -O3)) - (libraries (core_bench faster-map.functions))))