Skip to content

Commit ba26db7

Browse files
committed
[interpreter] Minor dune simplifications
1 parent 9e9db5c commit ba26db7

File tree

2 files changed

+45
-54
lines changed

2 files changed

+45
-54
lines changed

interpreter/dune

Lines changed: 37 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,56 @@
11
(include_subdirs unqualified)
22

33
(library
4-
(public_name wasm)
5-
; The 'wasm' module shall not be part of the library, as it would start the
6-
; Wasm REPL every time in all the dependencies.
7-
; We exclude the 'wast' module as it is only used for the JS build.
8-
; 'smallint' is a separate test module.
9-
(modules :standard \ main wasm smallint wast)
10-
(libraries menhirLib))
4+
(public_name wasm)
5+
(modules :standard \ main wasm wast smallint)
6+
)
117

128
(executable
13-
(public_name wasm)
14-
(modules wasm)
15-
(libraries wasm)
16-
(flags
17-
(-open Wasm)))
9+
(public_name wasm)
10+
(modules wasm)
11+
(libraries wasm)
12+
(flags (-open Wasm))
13+
)
1814

1915
(executable
20-
(name smallint)
21-
(modules smallint)
22-
(libraries wasm)
23-
(flags
24-
(-open Wasm)))
16+
(name smallint)
17+
(modules smallint)
18+
(libraries wasm)
19+
(flags (-open Wasm))
20+
)
2521

2622
(executable
2723
(name wast)
2824
(modules wast)
2925
(modes js)
3026
(libraries js_of_ocaml wasm)
31-
(preprocess (pps js_of_ocaml-ppx)))
27+
(preprocess (pps js_of_ocaml-ppx))
28+
)
29+
30+
(env (_ (flags (-w +a-4-27-42-44-45-70 -warn-error +a-3))))
31+
32+
(subdir text
33+
(ocamllex (modules lexer))
34+
(menhir (modules parser))
35+
)
3236

3337
(rule
3438
(targets wasm.ml)
3539
(deps main/main.ml)
36-
(action (copy main/main.ml wasm.ml)))
37-
38-
(subdir
39-
text
40-
(rule
41-
(target lexer.ml)
42-
(deps lexer.mll)
43-
(action
44-
(chdir
45-
%{workspace_root}
46-
(run %{bin:ocamllex} -ml -q -o %{target} %{deps}))))
47-
(menhir
48-
(modules parser)))
49-
50-
(env
51-
(_
52-
(flags
53-
(-w +a-4-27-42-44-45-70 -warn-error +a-3))))
40+
(action (copy main/main.ml wasm.ml))
41+
)
5442

5543
(rule
56-
(alias runtest)
57-
(deps
58-
./wasm.exe
59-
./smallint.exe
60-
(source_tree ../test))
61-
(action
62-
(progn
63-
(run ../test/core/run.py --wasm ./wasm.exe)
64-
(run ./smallint.exe))))
44+
(alias runtest)
45+
(deps
46+
./wasm.exe
47+
./smallint.exe
48+
(source_tree ../test)
49+
)
50+
(action
51+
(progn
52+
(run ../test/core/run.py --wasm ./wasm.exe)
53+
(run ./smallint.exe)
54+
)
55+
)
56+
)

interpreter/dune-project

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
11
(lang dune 2.9)
22

33
(name wasm)
4-
5-
(generate_opam_files true)
6-
(using menhir 2.1)
7-
(implicit_transitive_deps false)
8-
94
(license Apache-2.0)
10-
11-
(source
12-
(github WebAssembly/spec))
5+
(source (github WebAssembly/spec))
136

147
(authors "Andreas Rossberg <[email protected]")
158
(maintainers "Andreas Rossberg <[email protected]")
169

10+
(generate_opam_files true)
11+
(using menhir 2.1)
12+
(implicit_transitive_deps false)
13+
1714
(package
1815
(name wasm)
1916
(synopsis "Library to read and write WebAssembly (Wasm) files and manipulate their AST")
2017
(tags (wasm webassembly spec interpreter))
2118
(depends
2219
(ocaml (>= 4.12))
23-
(menhir (>= 20220210))))
20+
(menhir (>= 20220210))
21+
)
22+
)

0 commit comments

Comments
 (0)