Skip to content

Commit 4ee754b

Browse files
committed
basic opam support
1 parent 64f328f commit 4ee754b

File tree

5 files changed

+35
-2
lines changed

5 files changed

+35
-2
lines changed

interpreter/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
_build
22
wasm
3+
*.install

interpreter/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ smallinttest: smallint
8181
dunetest:
8282
dune test
8383

84+
install:
85+
dune build -p $(NAME) @install
86+
dune install
8487

8588
# Miscellaneous targets
8689

interpreter/dune

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
(include_subdirs unqualified)
22

33
(library
4-
(name wasm)
4+
(public_name wasm)
55
; The 'wasm' module shall not be part of the library, as it would start the
66
; Wasm REPL every time in all the dependencies.
77
; We exclude the 'wast' module as it is only used for the JS build.
88
; 'smallint' is a separate test module.
99
(modules :standard \ wasm smallint wast))
1010

1111
(executable
12-
(name wasm)
12+
(public_name wasm)
1313
(modules wasm)
1414
(libraries wasm)
1515
(flags

interpreter/dune-project

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,8 @@
11
(lang dune 2.9)
2+
3+
(name "wasm")
4+
5+
(generate_opam_files true)
6+
7+
(package
8+
(name "wasm"))

interpreter/wasm.opam

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# This file is generated by dune, edit dune-project instead
2+
opam-version: "2.0"
3+
depends: [
4+
"dune" {>= "2.9"}
5+
"odoc" {with-doc}
6+
]
7+
build: [
8+
["dune" "subst"] {dev}
9+
[
10+
"dune"
11+
"build"
12+
"-p"
13+
name
14+
"-j"
15+
jobs
16+
"--promote-install-files=false"
17+
"@install"
18+
"@runtest" {with-test}
19+
"@doc" {with-doc}
20+
]
21+
["dune" "install" "-p" name "--create-install-files" name]
22+
]

0 commit comments

Comments
 (0)