Skip to content

Commit

Permalink
A bit of fiddling to restore the JS build. (Won't load yet, I presume.)
Browse files Browse the repository at this point in the history
  • Loading branch information
msprotz committed Jan 30, 2024
1 parent 2839d7d commit 75c219a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
7 changes: 6 additions & 1 deletion js/MLS_JS.ml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ let _ =
Js.null

method currentEpoch (s: MLS.state) =
Z.to_int s.MLS.tree_state.MLS_TreeSync_Types.version3
Z.to_int s.MLS.epoch

method create1 (e: Typed_array.uint8Array Js.t) (credential: _ Js.t) (priv: Typed_array.uint8Array Js.t)
(group_id: Js.js_string Js.t)
Expand Down Expand Up @@ -152,6 +152,11 @@ let _ =
val kind = "add"
val identity = js_string_of_bytes identity
end)
| MLS.MsgRemove identity ->
Obj.magic (object%js
val kind = "remove"
val identity = js_string_of_bytes identity
end)
val state = state
end)
| InternalError s ->
Expand Down
4 changes: 2 additions & 2 deletions js/dune
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
(modes byte js)
(modules MLS_JS)
(js_of_ocaml
(flags "--disable" "genprim" "--opt" "3")
;(flags "--disable" "genprim" "--opt" "3")
;(flags "--disable" "genprim" "--opt" "3" "--set" "tc_depth=0" "--pretty" "--disable" "excwrap")
(javascript_files "BigInteger.js" "zarith.js" "overrides.js"))
(preprocess
(pps js_of_ocaml-ppx))
(libraries mls.core js_of_ocaml))
(libraries fstar.lib mls_star mls_test js_of_ocaml))
10 changes: 9 additions & 1 deletion ml/tests/dune
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
(copy_files# src/*)

(library
(wrapped false)
(libraries mls_star)
(name mls_test)
(modules :standard \
MLS_Test))

(test
(libraries fstar.lib mls_star yojson)
(libraries fstar.lib mls_star mls_test yojson)
(modules MLS_Test)
(name MLS_Test))

(env
Expand Down

0 comments on commit 75c219a

Please sign in to comment.