Skip to content

Commit

Permalink
basic opam support
Browse files Browse the repository at this point in the history
  • Loading branch information
zapashcanon committed Jun 20, 2023
1 parent 64f328f commit 4ee754b
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 2 deletions.
1 change: 1 addition & 0 deletions interpreter/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
_build
wasm
*.install
3 changes: 3 additions & 0 deletions interpreter/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ smallinttest: smallint
dunetest:
dune test

install:
dune build -p $(NAME) @install
dune install

# Miscellaneous targets

Expand Down
4 changes: 2 additions & 2 deletions interpreter/dune
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
(include_subdirs unqualified)

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

(executable
(name wasm)
(public_name wasm)
(modules wasm)
(libraries wasm)
(flags
Expand Down
7 changes: 7 additions & 0 deletions interpreter/dune-project
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
(lang dune 2.9)

(name "wasm")

(generate_opam_files true)

(package
(name "wasm"))
22 changes: 22 additions & 0 deletions interpreter/wasm.opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# This file is generated by dune, edit dune-project instead
opam-version: "2.0"
depends: [
"dune" {>= "2.9"}
"odoc" {with-doc}
]
build: [
["dune" "subst"] {dev}
[
"dune"
"build"
"-p"
name
"-j"
jobs
"--promote-install-files=false"
"@install"
"@runtest" {with-test}
"@doc" {with-doc}
]
["dune" "install" "-p" name "--create-install-files" name]
]

0 comments on commit 4ee754b

Please sign in to comment.