1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
|
(install
(section lib)
(package wasm_of_ocaml-compiler)
(files
(glob_files *.wat)
(glob_files runtime-*.wasm)
runtime.js))
(rule
(target runtime-standard.wasm)
(deps
args
(glob_files *.wat))
(action
(run
../../compiler/bin-wasm_of_ocaml/wasmoo_link_wasm.exe
--binaryen=-g
--binaryen-opt=-O3
--set=effects=jspi
--allowed-imports=bindings,Math,js,wasm:js-string,wasm:text-encoder,wasm:text-decoder
%{target}
%{read-lines:args})))
(rule
(target runtime-cps.wasm)
(deps
args
(glob_files *.wat))
(action
(run
../../compiler/bin-wasm_of_ocaml/wasmoo_link_wasm.exe
--binaryen=-g
--binaryen-opt=-O3
--set=effects=cps
--allowed-imports=bindings,Math,js,wasm:js-string,wasm:text-encoder,wasm:text-decoder
%{target}
%{read-lines:args})))
(rule
(target args)
(deps
args.ml
(glob_files *.wat))
(action
(with-stdout-to
%{target}
(run ocaml %{deps}))))
|