Skip to content

Commit 7dffd26

Browse files
committed
Turn interpreter into a Dune package
1 parent c4699b1 commit 7dffd26

File tree

3 files changed

+34
-12
lines changed

3 files changed

+34
-12
lines changed

interpreter/.merlin

Lines changed: 0 additions & 12 deletions
This file was deleted.

interpreter/dune

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
(include_subdirs unqualified)
2+
3+
(library
4+
(name wasm)
5+
; The 'main' module shall not be part of the library, as it would start the
6+
; WASM REPL every time in all the dependencies.
7+
; We also need to exclude the 'wasm' module as it overlaps with the library
8+
; name.
9+
(modules :standard \ main wasm))
10+
11+
(executable
12+
(name main)
13+
(modules main)
14+
(libraries wasm)
15+
(flags
16+
(-open Wasm)))
17+
18+
(subdir
19+
text
20+
(rule
21+
(target lexer.ml)
22+
(deps lexer.mll)
23+
(action
24+
(chdir
25+
%{workspace_root}
26+
(run %{bin:ocamllex} -ml -q -o %{target} %{deps}))))
27+
(ocamlyacc
28+
(modules parser)))
29+
30+
(env
31+
(dev
32+
(flags
33+
(-w +a-4-27-42-44-45 -warn-error +a-3))))

interpreter/dune-project

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
(lang dune 2.9)

0 commit comments

Comments
 (0)