This commit is contained in:
swrup 2025-11-11 02:07:51 +01:00
parent aa2ff7b2f0
commit 2f3113f55d
11742 changed files with 1223940 additions and 0 deletions

View file

@ -0,0 +1,6 @@
let name = "bin1"
let hello name = print_endline ("Hi " ^ name)
let () = Library1.hello name
let () = hello Library1.name

View file

@ -0,0 +1,6 @@
let name = "bin2"
let hello name = print_endline ("Hi " ^ name)
let () = Library1.hello name
let () = hello Library1.name

View file

@ -0,0 +1,6 @@
let name = "bin3"
let hello name = print_endline ("Hi " ^ name)
let () = Library1.hello name
let () = hello Library1.name

View file

@ -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)
)

View file

@ -0,0 +1,6 @@
(env
(_
(wasm_of_ocaml
(flags (:standard --quiet))
(compilation_mode separate)
)))

View file

@ -0,0 +1 @@
(library (name library1))

View file

@ -0,0 +1,3 @@
let name = "library1"
let hello name = print_endline ("Hello " ^ name)

View file

@ -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