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 cd163ee
Show file tree
Hide file tree
Showing 5 changed files with 310 additions and 2 deletions.
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"))
276 changes: 276 additions & 0 deletions interpreter/wasm.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,276 @@
lib: [
"_build/install/default/lib/wasm/META"
"_build/install/default/lib/wasm/binary/decode.ml" {"binary/decode.ml"}
"_build/install/default/lib/wasm/binary/decode.mli" {"binary/decode.mli"}
"_build/install/default/lib/wasm/binary/encode.ml" {"binary/encode.ml"}
"_build/install/default/lib/wasm/binary/encode.mli" {"binary/encode.mli"}
"_build/install/default/lib/wasm/binary/utf8.ml" {"binary/utf8.ml"}
"_build/install/default/lib/wasm/binary/utf8.mli" {"binary/utf8.mli"}
"_build/install/default/lib/wasm/dune-package"
"_build/install/default/lib/wasm/exec/eval.ml" {"exec/eval.ml"}
"_build/install/default/lib/wasm/exec/eval.mli" {"exec/eval.mli"}
"_build/install/default/lib/wasm/exec/eval_num.ml" {"exec/eval_num.ml"}
"_build/install/default/lib/wasm/exec/eval_num.mli" {"exec/eval_num.mli"}
"_build/install/default/lib/wasm/exec/eval_vec.ml" {"exec/eval_vec.ml"}
"_build/install/default/lib/wasm/exec/eval_vec.mli" {"exec/eval_vec.mli"}
"_build/install/default/lib/wasm/exec/f32.ml" {"exec/f32.ml"}
"_build/install/default/lib/wasm/exec/f32_convert.ml" {"exec/f32_convert.ml"}
"_build/install/default/lib/wasm/exec/f32_convert.mli" {"exec/f32_convert.mli"}
"_build/install/default/lib/wasm/exec/f64.ml" {"exec/f64.ml"}
"_build/install/default/lib/wasm/exec/f64_convert.ml" {"exec/f64_convert.ml"}
"_build/install/default/lib/wasm/exec/f64_convert.mli" {"exec/f64_convert.mli"}
"_build/install/default/lib/wasm/exec/fxx.ml" {"exec/fxx.ml"}
"_build/install/default/lib/wasm/exec/i16.ml" {"exec/i16.ml"}
"_build/install/default/lib/wasm/exec/i32.ml" {"exec/i32.ml"}
"_build/install/default/lib/wasm/exec/i32_convert.ml" {"exec/i32_convert.ml"}
"_build/install/default/lib/wasm/exec/i32_convert.mli" {"exec/i32_convert.mli"}
"_build/install/default/lib/wasm/exec/i64.ml" {"exec/i64.ml"}
"_build/install/default/lib/wasm/exec/i64_convert.ml" {"exec/i64_convert.ml"}
"_build/install/default/lib/wasm/exec/i64_convert.mli" {"exec/i64_convert.mli"}
"_build/install/default/lib/wasm/exec/i8.ml" {"exec/i8.ml"}
"_build/install/default/lib/wasm/exec/ixx.ml" {"exec/ixx.ml"}
"_build/install/default/lib/wasm/exec/v128.ml" {"exec/v128.ml"}
"_build/install/default/lib/wasm/exec/v128.mli" {"exec/v128.mli"}
"_build/install/default/lib/wasm/host/env.ml" {"host/env.ml"}
"_build/install/default/lib/wasm/host/spectest.ml" {"host/spectest.ml"}
"_build/install/default/lib/wasm/main/flags.ml" {"main/flags.ml"}
"_build/install/default/lib/wasm/opam"
"_build/install/default/lib/wasm/runtime/data.ml" {"runtime/data.ml"}
"_build/install/default/lib/wasm/runtime/data.mli" {"runtime/data.mli"}
"_build/install/default/lib/wasm/runtime/elem.ml" {"runtime/elem.ml"}
"_build/install/default/lib/wasm/runtime/elem.mli" {"runtime/elem.mli"}
"_build/install/default/lib/wasm/runtime/func.ml" {"runtime/func.ml"}
"_build/install/default/lib/wasm/runtime/func.mli" {"runtime/func.mli"}
"_build/install/default/lib/wasm/runtime/global.ml" {"runtime/global.ml"}
"_build/install/default/lib/wasm/runtime/global.mli" {"runtime/global.mli"}
"_build/install/default/lib/wasm/runtime/instance.ml" {"runtime/instance.ml"}
"_build/install/default/lib/wasm/runtime/memory.ml" {"runtime/memory.ml"}
"_build/install/default/lib/wasm/runtime/memory.mli" {"runtime/memory.mli"}
"_build/install/default/lib/wasm/runtime/table.ml" {"runtime/table.ml"}
"_build/install/default/lib/wasm/runtime/table.mli" {"runtime/table.mli"}
"_build/install/default/lib/wasm/script/import.ml" {"script/import.ml"}
"_build/install/default/lib/wasm/script/import.mli" {"script/import.mli"}
"_build/install/default/lib/wasm/script/js.ml" {"script/js.ml"}
"_build/install/default/lib/wasm/script/js.mli" {"script/js.mli"}
"_build/install/default/lib/wasm/script/run.ml" {"script/run.ml"}
"_build/install/default/lib/wasm/script/run.mli" {"script/run.mli"}
"_build/install/default/lib/wasm/script/script.ml" {"script/script.ml"}
"_build/install/default/lib/wasm/syntax/ast.ml" {"syntax/ast.ml"}
"_build/install/default/lib/wasm/syntax/free.ml" {"syntax/free.ml"}
"_build/install/default/lib/wasm/syntax/free.mli" {"syntax/free.mli"}
"_build/install/default/lib/wasm/syntax/operators.ml" {"syntax/operators.ml"}
"_build/install/default/lib/wasm/syntax/types.ml" {"syntax/types.ml"}
"_build/install/default/lib/wasm/syntax/values.ml" {"syntax/values.ml"}
"_build/install/default/lib/wasm/text/arrange.ml" {"text/arrange.ml"}
"_build/install/default/lib/wasm/text/arrange.mli" {"text/arrange.mli"}
"_build/install/default/lib/wasm/text/lexer.ml" {"text/lexer.ml"}
"_build/install/default/lib/wasm/text/lexer.mli" {"text/lexer.mli"}
"_build/install/default/lib/wasm/text/parse.ml" {"text/parse.ml"}
"_build/install/default/lib/wasm/text/parse.mli" {"text/parse.mli"}
"_build/install/default/lib/wasm/text/parser.ml" {"text/parser.ml"}
"_build/install/default/lib/wasm/text/parser.mli" {"text/parser.mli"}
"_build/install/default/lib/wasm/text/print.ml" {"text/print.ml"}
"_build/install/default/lib/wasm/text/print.mli" {"text/print.mli"}
"_build/install/default/lib/wasm/util/error.ml" {"util/error.ml"}
"_build/install/default/lib/wasm/util/error.mli" {"util/error.mli"}
"_build/install/default/lib/wasm/util/lib.ml" {"util/lib.ml"}
"_build/install/default/lib/wasm/util/lib.mli" {"util/lib.mli"}
"_build/install/default/lib/wasm/util/sexpr.ml" {"util/sexpr.ml"}
"_build/install/default/lib/wasm/util/sexpr.mli" {"util/sexpr.mli"}
"_build/install/default/lib/wasm/util/source.ml" {"util/source.ml"}
"_build/install/default/lib/wasm/util/source.mli" {"util/source.mli"}
"_build/install/default/lib/wasm/valid/valid.ml" {"valid/valid.ml"}
"_build/install/default/lib/wasm/valid/valid.mli" {"valid/valid.mli"}
"_build/install/default/lib/wasm/wasm.a"
"_build/install/default/lib/wasm/wasm.cma"
"_build/install/default/lib/wasm/wasm.cmi"
"_build/install/default/lib/wasm/wasm.cmt"
"_build/install/default/lib/wasm/wasm.cmx"
"_build/install/default/lib/wasm/wasm.cmxa"
"_build/install/default/lib/wasm/wasm.ml"
"_build/install/default/lib/wasm/wasm__Arrange.cmi"
"_build/install/default/lib/wasm/wasm__Arrange.cmt"
"_build/install/default/lib/wasm/wasm__Arrange.cmti"
"_build/install/default/lib/wasm/wasm__Arrange.cmx"
"_build/install/default/lib/wasm/wasm__Ast.cmi"
"_build/install/default/lib/wasm/wasm__Ast.cmt"
"_build/install/default/lib/wasm/wasm__Ast.cmx"
"_build/install/default/lib/wasm/wasm__Data.cmi"
"_build/install/default/lib/wasm/wasm__Data.cmt"
"_build/install/default/lib/wasm/wasm__Data.cmti"
"_build/install/default/lib/wasm/wasm__Data.cmx"
"_build/install/default/lib/wasm/wasm__Decode.cmi"
"_build/install/default/lib/wasm/wasm__Decode.cmt"
"_build/install/default/lib/wasm/wasm__Decode.cmti"
"_build/install/default/lib/wasm/wasm__Decode.cmx"
"_build/install/default/lib/wasm/wasm__Elem.cmi"
"_build/install/default/lib/wasm/wasm__Elem.cmt"
"_build/install/default/lib/wasm/wasm__Elem.cmti"
"_build/install/default/lib/wasm/wasm__Elem.cmx"
"_build/install/default/lib/wasm/wasm__Encode.cmi"
"_build/install/default/lib/wasm/wasm__Encode.cmt"
"_build/install/default/lib/wasm/wasm__Encode.cmti"
"_build/install/default/lib/wasm/wasm__Encode.cmx"
"_build/install/default/lib/wasm/wasm__Env.cmi"
"_build/install/default/lib/wasm/wasm__Env.cmt"
"_build/install/default/lib/wasm/wasm__Env.cmx"
"_build/install/default/lib/wasm/wasm__Error.cmi"
"_build/install/default/lib/wasm/wasm__Error.cmt"
"_build/install/default/lib/wasm/wasm__Error.cmti"
"_build/install/default/lib/wasm/wasm__Error.cmx"
"_build/install/default/lib/wasm/wasm__Eval.cmi"
"_build/install/default/lib/wasm/wasm__Eval.cmt"
"_build/install/default/lib/wasm/wasm__Eval.cmti"
"_build/install/default/lib/wasm/wasm__Eval.cmx"
"_build/install/default/lib/wasm/wasm__Eval_num.cmi"
"_build/install/default/lib/wasm/wasm__Eval_num.cmt"
"_build/install/default/lib/wasm/wasm__Eval_num.cmti"
"_build/install/default/lib/wasm/wasm__Eval_num.cmx"
"_build/install/default/lib/wasm/wasm__Eval_vec.cmi"
"_build/install/default/lib/wasm/wasm__Eval_vec.cmt"
"_build/install/default/lib/wasm/wasm__Eval_vec.cmti"
"_build/install/default/lib/wasm/wasm__Eval_vec.cmx"
"_build/install/default/lib/wasm/wasm__F32.cmi"
"_build/install/default/lib/wasm/wasm__F32.cmt"
"_build/install/default/lib/wasm/wasm__F32.cmx"
"_build/install/default/lib/wasm/wasm__F32_convert.cmi"
"_build/install/default/lib/wasm/wasm__F32_convert.cmt"
"_build/install/default/lib/wasm/wasm__F32_convert.cmti"
"_build/install/default/lib/wasm/wasm__F32_convert.cmx"
"_build/install/default/lib/wasm/wasm__F64.cmi"
"_build/install/default/lib/wasm/wasm__F64.cmt"
"_build/install/default/lib/wasm/wasm__F64.cmx"
"_build/install/default/lib/wasm/wasm__F64_convert.cmi"
"_build/install/default/lib/wasm/wasm__F64_convert.cmt"
"_build/install/default/lib/wasm/wasm__F64_convert.cmti"
"_build/install/default/lib/wasm/wasm__F64_convert.cmx"
"_build/install/default/lib/wasm/wasm__Flags.cmi"
"_build/install/default/lib/wasm/wasm__Flags.cmt"
"_build/install/default/lib/wasm/wasm__Flags.cmx"
"_build/install/default/lib/wasm/wasm__Free.cmi"
"_build/install/default/lib/wasm/wasm__Free.cmt"
"_build/install/default/lib/wasm/wasm__Free.cmti"
"_build/install/default/lib/wasm/wasm__Free.cmx"
"_build/install/default/lib/wasm/wasm__Func.cmi"
"_build/install/default/lib/wasm/wasm__Func.cmt"
"_build/install/default/lib/wasm/wasm__Func.cmti"
"_build/install/default/lib/wasm/wasm__Func.cmx"
"_build/install/default/lib/wasm/wasm__Fxx.cmi"
"_build/install/default/lib/wasm/wasm__Fxx.cmt"
"_build/install/default/lib/wasm/wasm__Fxx.cmx"
"_build/install/default/lib/wasm/wasm__Global.cmi"
"_build/install/default/lib/wasm/wasm__Global.cmt"
"_build/install/default/lib/wasm/wasm__Global.cmti"
"_build/install/default/lib/wasm/wasm__Global.cmx"
"_build/install/default/lib/wasm/wasm__I16.cmi"
"_build/install/default/lib/wasm/wasm__I16.cmt"
"_build/install/default/lib/wasm/wasm__I16.cmx"
"_build/install/default/lib/wasm/wasm__I32.cmi"
"_build/install/default/lib/wasm/wasm__I32.cmt"
"_build/install/default/lib/wasm/wasm__I32.cmx"
"_build/install/default/lib/wasm/wasm__I32_convert.cmi"
"_build/install/default/lib/wasm/wasm__I32_convert.cmt"
"_build/install/default/lib/wasm/wasm__I32_convert.cmti"
"_build/install/default/lib/wasm/wasm__I32_convert.cmx"
"_build/install/default/lib/wasm/wasm__I64.cmi"
"_build/install/default/lib/wasm/wasm__I64.cmt"
"_build/install/default/lib/wasm/wasm__I64.cmx"
"_build/install/default/lib/wasm/wasm__I64_convert.cmi"
"_build/install/default/lib/wasm/wasm__I64_convert.cmt"
"_build/install/default/lib/wasm/wasm__I64_convert.cmti"
"_build/install/default/lib/wasm/wasm__I64_convert.cmx"
"_build/install/default/lib/wasm/wasm__I8.cmi"
"_build/install/default/lib/wasm/wasm__I8.cmt"
"_build/install/default/lib/wasm/wasm__I8.cmx"
"_build/install/default/lib/wasm/wasm__Import.cmi"
"_build/install/default/lib/wasm/wasm__Import.cmt"
"_build/install/default/lib/wasm/wasm__Import.cmti"
"_build/install/default/lib/wasm/wasm__Import.cmx"
"_build/install/default/lib/wasm/wasm__Instance.cmi"
"_build/install/default/lib/wasm/wasm__Instance.cmt"
"_build/install/default/lib/wasm/wasm__Instance.cmx"
"_build/install/default/lib/wasm/wasm__Ixx.cmi"
"_build/install/default/lib/wasm/wasm__Ixx.cmt"
"_build/install/default/lib/wasm/wasm__Ixx.cmx"
"_build/install/default/lib/wasm/wasm__Js.cmi"
"_build/install/default/lib/wasm/wasm__Js.cmt"
"_build/install/default/lib/wasm/wasm__Js.cmti"
"_build/install/default/lib/wasm/wasm__Js.cmx"
"_build/install/default/lib/wasm/wasm__Lexer.cmi"
"_build/install/default/lib/wasm/wasm__Lexer.cmt"
"_build/install/default/lib/wasm/wasm__Lexer.cmti"
"_build/install/default/lib/wasm/wasm__Lexer.cmx"
"_build/install/default/lib/wasm/wasm__Lib.cmi"
"_build/install/default/lib/wasm/wasm__Lib.cmt"
"_build/install/default/lib/wasm/wasm__Lib.cmti"
"_build/install/default/lib/wasm/wasm__Lib.cmx"
"_build/install/default/lib/wasm/wasm__Memory.cmi"
"_build/install/default/lib/wasm/wasm__Memory.cmt"
"_build/install/default/lib/wasm/wasm__Memory.cmti"
"_build/install/default/lib/wasm/wasm__Memory.cmx"
"_build/install/default/lib/wasm/wasm__Operators.cmi"
"_build/install/default/lib/wasm/wasm__Operators.cmt"
"_build/install/default/lib/wasm/wasm__Operators.cmx"
"_build/install/default/lib/wasm/wasm__Parse.cmi"
"_build/install/default/lib/wasm/wasm__Parse.cmt"
"_build/install/default/lib/wasm/wasm__Parse.cmti"
"_build/install/default/lib/wasm/wasm__Parse.cmx"
"_build/install/default/lib/wasm/wasm__Parser.cmi"
"_build/install/default/lib/wasm/wasm__Parser.cmt"
"_build/install/default/lib/wasm/wasm__Parser.cmti"
"_build/install/default/lib/wasm/wasm__Parser.cmx"
"_build/install/default/lib/wasm/wasm__Print.cmi"
"_build/install/default/lib/wasm/wasm__Print.cmt"
"_build/install/default/lib/wasm/wasm__Print.cmti"
"_build/install/default/lib/wasm/wasm__Print.cmx"
"_build/install/default/lib/wasm/wasm__Run.cmi"
"_build/install/default/lib/wasm/wasm__Run.cmt"
"_build/install/default/lib/wasm/wasm__Run.cmti"
"_build/install/default/lib/wasm/wasm__Run.cmx"
"_build/install/default/lib/wasm/wasm__Script.cmi"
"_build/install/default/lib/wasm/wasm__Script.cmt"
"_build/install/default/lib/wasm/wasm__Script.cmx"
"_build/install/default/lib/wasm/wasm__Sexpr.cmi"
"_build/install/default/lib/wasm/wasm__Sexpr.cmt"
"_build/install/default/lib/wasm/wasm__Sexpr.cmti"
"_build/install/default/lib/wasm/wasm__Sexpr.cmx"
"_build/install/default/lib/wasm/wasm__Source.cmi"
"_build/install/default/lib/wasm/wasm__Source.cmt"
"_build/install/default/lib/wasm/wasm__Source.cmti"
"_build/install/default/lib/wasm/wasm__Source.cmx"
"_build/install/default/lib/wasm/wasm__Spectest.cmi"
"_build/install/default/lib/wasm/wasm__Spectest.cmt"
"_build/install/default/lib/wasm/wasm__Spectest.cmx"
"_build/install/default/lib/wasm/wasm__Table.cmi"
"_build/install/default/lib/wasm/wasm__Table.cmt"
"_build/install/default/lib/wasm/wasm__Table.cmti"
"_build/install/default/lib/wasm/wasm__Table.cmx"
"_build/install/default/lib/wasm/wasm__Types.cmi"
"_build/install/default/lib/wasm/wasm__Types.cmt"
"_build/install/default/lib/wasm/wasm__Types.cmx"
"_build/install/default/lib/wasm/wasm__Utf8.cmi"
"_build/install/default/lib/wasm/wasm__Utf8.cmt"
"_build/install/default/lib/wasm/wasm__Utf8.cmti"
"_build/install/default/lib/wasm/wasm__Utf8.cmx"
"_build/install/default/lib/wasm/wasm__V128.cmi"
"_build/install/default/lib/wasm/wasm__V128.cmt"
"_build/install/default/lib/wasm/wasm__V128.cmti"
"_build/install/default/lib/wasm/wasm__V128.cmx"
"_build/install/default/lib/wasm/wasm__Valid.cmi"
"_build/install/default/lib/wasm/wasm__Valid.cmt"
"_build/install/default/lib/wasm/wasm__Valid.cmti"
"_build/install/default/lib/wasm/wasm__Valid.cmx"
"_build/install/default/lib/wasm/wasm__Values.cmi"
"_build/install/default/lib/wasm/wasm__Values.cmt"
"_build/install/default/lib/wasm/wasm__Values.cmx"
]
libexec: [
"_build/install/default/lib/wasm/wasm.cmxs"
]
bin: [
"_build/install/default/bin/wasm"
]
doc: [
"_build/install/default/doc/wasm/LICENSE"
"_build/install/default/doc/wasm/README.md"
]
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 cd163ee

Please sign in to comment.