This commit is contained in:
parent
aa2ff7b2f0
commit
2f3113f55d
11742 changed files with 1223940 additions and 0 deletions
|
|
@ -0,0 +1,6 @@
|
|||
let name = "bin1"
|
||||
let hello name = print_endline ("Hi " ^ name)
|
||||
|
||||
let () = Library1.hello name
|
||||
|
||||
let () = hello Library1.name
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
let name = "bin2"
|
||||
let hello name = print_endline ("Hi " ^ name)
|
||||
|
||||
let () = Library1.hello name
|
||||
|
||||
let () = hello Library1.name
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
let name = "bin3"
|
||||
let hello name = print_endline ("Hi " ^ name)
|
||||
|
||||
let () = Library1.hello name
|
||||
|
||||
let () = hello Library1.name
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
(executable
|
||||
(name bin1)
|
||||
(modules bin1)
|
||||
(modes wasm)
|
||||
(libraries library1)
|
||||
)
|
||||
|
||||
(executable
|
||||
(name bin2)
|
||||
(modules bin2)
|
||||
(modes wasm)
|
||||
(libraries library1)
|
||||
)
|
||||
|
||||
(executable
|
||||
(name bin3)
|
||||
(modules bin3)
|
||||
(modes wasm)
|
||||
(libraries library1)
|
||||
)
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
(env
|
||||
(_
|
||||
(wasm_of_ocaml
|
||||
(flags (:standard --quiet))
|
||||
(compilation_mode separate)
|
||||
)))
|
||||
|
|
@ -0,0 +1 @@
|
|||
(lang dune 3.17)
|
||||
|
|
@ -0,0 +1 @@
|
|||
(library (name library1))
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
let name = "library1"
|
||||
|
||||
let hello name = print_endline ("Hello " ^ name)
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
tests js_of_ocaml configs
|
||||
|
||||
$ dune build bin/bin1.bc.wasm.js bin/bin2.bc.wasm.js bin/bin3.bc.wasm.js
|
||||
$ node _build/default/bin/bin1.bc.wasm.js
|
||||
Hello bin1
|
||||
Hi library1
|
||||
$ node _build/default/bin/bin2.bc.wasm.js
|
||||
Hello bin2
|
||||
Hi library1
|
||||
$ node _build/default/bin/bin3.bc.wasm.js
|
||||
Hello bin3
|
||||
Hi library1
|
||||
Loading…
Add table
Add a link
Reference in a new issue