File: dune

package info (click to toggle)
js-of-ocaml 6.2.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 37,932 kB
  • sloc: ml: 135,957; javascript: 58,364; ansic: 437; makefile: 422; sh: 12; perl: 4
file content (47 lines) | stat: -rw-r--r-- 925 bytes parent folder | download
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}))))