js_of_ocaml
js_of_ocaml copied to clipboard
Update typing of typed arrays to support Wasm, and test Typed_array.Bytes
Note: This PR depends on #1649 and is based on top of it. The feature change consists in the last two commits.
This:
- Updates the typing of
Typed_arrayso that they work with the Wasm backend as well - Adds tests for the new
Typed_array.Bytesmodule.
This is part of a series of PRs intending to reduce the diff between js_of_ocaml and wasm_of_ocaml (see https://github.com/ocaml-wasm/wasm_of_ocaml/issues/47).
Turning the PR into a draft until the underlying PR is merged.
I rebased and marked the PR as ready for review.
Any idea how much breakage the change of API generates ?
It seems we could now complete the api with BigInt64Array and BigUint64Array. One could do that in a subsequent PR.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt64Array
The PR definitely need a changelog entry
Any idea how much breakage the change of API generates ?
I’m not sure. I suppose we could run an opam-health-check on the PR.
@OlivierNicole, can you look at Jerome suggestion ? and rebase and squash commits ?
Oh, I was rebasing, but you merged before I could update the PR.
In any case, thank you for the review and @vouillon for the explanations!
I ended up squashing during the merge
This breaks ezjs_crypto. I am adding a constraint in opam. See https://github.com/ocaml/opam-repository/pull/26932/commits/e1c4e8e30ca0cd9014ea023f8f536367601e6986