-
Notifications
You must be signed in to change notification settings - Fork 454
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[interpreter] Minor dune simplifications
- Loading branch information
Showing
2 changed files
with
45 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,56 @@ | ||
(include_subdirs unqualified) | ||
|
||
(library | ||
(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 \ main wasm smallint wast) | ||
(libraries menhirLib)) | ||
(public_name wasm) | ||
(modules :standard \ main wasm wast smallint) | ||
) | ||
|
||
(executable | ||
(public_name wasm) | ||
(modules wasm) | ||
(libraries wasm) | ||
(flags | ||
(-open Wasm))) | ||
(public_name wasm) | ||
(modules wasm) | ||
(libraries wasm) | ||
(flags (-open Wasm)) | ||
) | ||
|
||
(executable | ||
(name smallint) | ||
(modules smallint) | ||
(libraries wasm) | ||
(flags | ||
(-open Wasm))) | ||
(name smallint) | ||
(modules smallint) | ||
(libraries wasm) | ||
(flags (-open Wasm)) | ||
) | ||
|
||
(executable | ||
(name wast) | ||
(modules wast) | ||
(modes js) | ||
(libraries js_of_ocaml wasm) | ||
(preprocess (pps js_of_ocaml-ppx))) | ||
(preprocess (pps js_of_ocaml-ppx)) | ||
) | ||
|
||
(env (_ (flags (-w +a-4-27-42-44-45-70 -warn-error +a-3)))) | ||
|
||
(subdir text | ||
(ocamllex (modules lexer)) | ||
(menhir (modules parser)) | ||
) | ||
|
||
(rule | ||
(targets wasm.ml) | ||
(deps main/main.ml) | ||
(action (copy main/main.ml wasm.ml))) | ||
|
||
(subdir | ||
text | ||
(rule | ||
(target lexer.ml) | ||
(deps lexer.mll) | ||
(action | ||
(chdir | ||
%{workspace_root} | ||
(run %{bin:ocamllex} -ml -q -o %{target} %{deps})))) | ||
(menhir | ||
(modules parser))) | ||
|
||
(env | ||
(_ | ||
(flags | ||
(-w +a-4-27-42-44-45-70 -warn-error +a-3)))) | ||
(action (copy main/main.ml wasm.ml)) | ||
) | ||
|
||
(rule | ||
(alias runtest) | ||
(deps | ||
./wasm.exe | ||
./smallint.exe | ||
(source_tree ../test)) | ||
(action | ||
(progn | ||
(run ../test/core/run.py --wasm ./wasm.exe) | ||
(run ./smallint.exe)))) | ||
(alias runtest) | ||
(deps | ||
./wasm.exe | ||
./smallint.exe | ||
(source_tree ../test) | ||
) | ||
(action | ||
(progn | ||
(run ../test/core/run.py --wasm ./wasm.exe) | ||
(run ./smallint.exe) | ||
) | ||
) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,22 @@ | ||
(lang dune 2.9) | ||
|
||
(name wasm) | ||
|
||
(generate_opam_files true) | ||
(using menhir 2.1) | ||
(implicit_transitive_deps false) | ||
|
||
(license Apache-2.0) | ||
|
||
(source | ||
(github WebAssembly/spec)) | ||
(source (github WebAssembly/spec)) | ||
|
||
(authors "Andreas Rossberg <rossberg@mpi-sws.org") | ||
(maintainers "Andreas Rossberg <rossberg@mpi-sws.org") | ||
|
||
(generate_opam_files true) | ||
(using menhir 2.1) | ||
(implicit_transitive_deps false) | ||
|
||
(package | ||
(name wasm) | ||
(synopsis "Library to read and write WebAssembly (Wasm) files and manipulate their AST") | ||
(tags (wasm webassembly spec interpreter)) | ||
(depends | ||
(ocaml (>= 4.12)) | ||
(menhir (>= 20220210)))) | ||
(menhir (>= 20220210)) | ||
) | ||
) |