This commit is contained in:
parent
aa2ff7b2f0
commit
2f3113f55d
11742 changed files with 1223940 additions and 0 deletions
|
|
@ -0,0 +1,7 @@
|
|||
(executable
|
||||
(name main)
|
||||
(modes js wasm))
|
||||
|
||||
(env
|
||||
(js (wasm_of_ocaml (enabled_if false)))
|
||||
(wasm (js_of_ocaml (enabled_if false))))
|
||||
|
|
@ -0,0 +1 @@
|
|||
(lang dune 3.17)
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
let () =
|
||||
match Sys.backend_type with
|
||||
Other typ -> print_endline typ
|
||||
| _ -> assert false
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
Building with different combinations of submodes
|
||||
|
||||
Compiling to JavaScript
|
||||
|
||||
$ dune build --profile js
|
||||
$ node _build/default/main.bc.js
|
||||
js_of_ocaml
|
||||
$ dune build --profile js main.bc.wasm.js
|
||||
Error: Don't know how to build main.bc.wasm.js
|
||||
[1]
|
||||
|
||||
Compiling to Wasm.
|
||||
|
||||
$ dune build --profile wasm
|
||||
$ node _build/default/main.bc.wasm.js
|
||||
wasm_of_ocaml
|
||||
$ dune build --profile wasm main.bc.js
|
||||
Error: Don't know how to build main.bc.js
|
||||
[1]
|
||||
|
||||
Compiling to both JS and Wasm.
|
||||
|
||||
$ dune build --profile both
|
||||
$ node _build/default/main.bc.js
|
||||
js_of_ocaml
|
||||
$ node _build/default/main.bc.wasm.js
|
||||
wasm_of_ocaml
|
||||
Loading…
Add table
Add a link
Reference in a new issue