Skip to content

Commit 6f0d835

Browse files
committed
upgrade dune version to get WASM build
1 parent 12f2578 commit 6f0d835

File tree

6 files changed

+19
-17
lines changed

6 files changed

+19
-17
lines changed

analysis.opam

+3-2
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@ bug-reports: "https://github.com/rescript-lang/rescript-compiler/issues"
99
depends: [
1010
"ocaml" {>= "4.14"}
1111
"cppo" {= "1.8.0"}
12-
"dune"
12+
"dune" {>= "3.17"}
13+
"odoc" {with-doc}
1314
]
1415
build: [
15-
["dune" "subst"] {pinned}
16+
["dune" "subst"] {dev}
1617
[
1718
"dune"
1819
"build"

compiler/jsoo/dune

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22

33
(executables
44
(names jsoo_playground_main)
5-
(modes js)
5+
(modes js wasm)
66
(enabled_if
77
(= %{profile} browser))
88
(flags
99
(:standard -w +a-4-9-40-42-44-45))
10-
(libraries core syntax ml js_of_ocaml))
10+
(libraries core syntax ml js_of_ocaml)
11+
(preprocess (pps js_of_ocaml-ppx)))

compiler/jsoo/jsoo_playground_main.ml

+6-8
Original file line numberDiff line numberDiff line change
@@ -676,11 +676,9 @@ module Export = struct
676676
end
677677

678678
let () =
679-
export "rescript_compiler"
680-
Js.Unsafe.(
681-
obj
682-
[|
683-
("api_version", inject @@ Js.string api_version);
684-
("version", inject @@ Js.string Bs_version.version);
685-
("make", inject @@ Export.make);
686-
|])
679+
Js.export "rescript_compiler"
680+
(object%js
681+
val api_version = api_version
682+
val version = Bs_version.version
683+
method make = Export.make ()
684+
end)

dune-project

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(lang dune 2.3)
1+
(lang dune 3.17)
22

33
(name rescript)
44

rescript.opam

+3-2
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@ depends: [
1414
"cppo" {= "1.8.0"}
1515
"js_of_ocaml" {= "6.0.1"}
1616
"ounit2" {= "2.2.7"}
17-
"dune"
17+
"dune" {>= "3.17"}
18+
"odoc" {with-doc}
1819
]
1920
build: [
20-
["dune" "subst"] {pinned}
21+
["dune" "subst"] {dev}
2122
[
2223
"dune"
2324
"build"

tools.opam

+3-2
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@ depends: [
1010
"ocaml" {>= "4.14"}
1111
"cppo" {= "1.8.0"}
1212
"analysis"
13-
"dune"
13+
"dune" {>= "3.17"}
14+
"odoc" {with-doc}
1415
]
1516
build: [
16-
["dune" "subst"] {pinned}
17+
["dune" "subst"] {dev}
1718
[
1819
"dune"
1920
"build"

0 commit comments

Comments
 (0)