Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion alcotest-async.opam
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ homepage: "https://github.com/mirage/alcotest"
doc: "https://mirage.github.io/alcotest"
bug-reports: "https://github.com/mirage/alcotest/issues"
depends: [
"dune" {>= "3.0"}
"dune" {>= "3.17"}
"re" {with-test}
"fmt" {with-test}
"cmdliner" {with-test & >= "1.2.0"}
Expand Down
2 changes: 1 addition & 1 deletion alcotest-js.opam
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ homepage: "https://github.com/mirage/alcotest"
doc: "https://mirage.github.io/alcotest"
bug-reports: "https://github.com/mirage/alcotest/issues"
depends: [
"dune" {>= "3.0"}
"dune" {>= "3.17"}
"alcotest" {= version}
"js_of_ocaml-compiler" {>= "3.11.0"}
"fmt" {with-test & >= "0.8.7"}
Expand Down
2 changes: 1 addition & 1 deletion alcotest-lwt.opam
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ homepage: "https://github.com/mirage/alcotest"
doc: "https://mirage.github.io/alcotest"
bug-reports: "https://github.com/mirage/alcotest/issues"
depends: [
"dune" {>= "3.0"}
"dune" {>= "3.17"}
"re" {with-test}
"cmdliner" {with-test & >= "1.2.0"}
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion alcotest-mirage.opam
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ homepage: "https://github.com/mirage/alcotest"
doc: "https://mirage.github.io/alcotest"
bug-reports: "https://github.com/mirage/alcotest/issues"
depends: [
"dune" {>= "3.0"}
"dune" {>= "3.17"}
"re" {with-test}
"cmdliner" {with-test & >= "1.2.0"}
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion alcotest.opam
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ homepage: "https://github.com/mirage/alcotest"
doc: "https://mirage.github.io/alcotest"
bug-reports: "https://github.com/mirage/alcotest/issues"
depends: [
"dune" {>= "3.0"}
"dune" {>= "3.17"}
"ocaml" {>= "4.08"}
"fmt" {>= "0.8.7"}
"astring"
Expand Down
2 changes: 1 addition & 1 deletion dune-project
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(lang dune 3.0)
(lang dune 3.17)
(implicit_transitive_deps false)
(generate_opam_files true)

Expand Down
2 changes: 2 additions & 0 deletions src/alcotest/dune
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@
(names alcotest_stubs))
(js_of_ocaml
(javascript_files runtime.js))
(wasm_of_ocaml
(wasm_files runtime.wat))
(preprocess future_syntax))
19 changes: 19 additions & 0 deletions src/alcotest/runtime.wat
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
;; WASM stubs for alcotest runtime.
;; Adapted from https://github.com/mirage/alcotest/blob/main/src/alcotest/runtime.js
;; Channel redirection is not available in WASM, so before/after are no-ops.

(module
(func (export "alcotest_before_test")
(param $voutput (ref eq)) (param $vstdout (ref eq)) (param $vstderr (ref eq))
(result (ref eq))
(ref.i31 (i32.const 0)))

(func (export "alcotest_after_test")
(param $vstdout (ref eq)) (param $vstderr (ref eq))
(result (ref eq))
(ref.i31 (i32.const 0)))

(func (export "ocaml_alcotest_get_terminal_dimensions")
(param (ref eq)) (result (ref eq))
(ref.i31 (i32.const 0)))
)
Loading