js_of_ocaml icon indicating copy to clipboard operation
js_of_ocaml copied to clipboard

Update typing of typed arrays to support Wasm, and test Typed_array.Bytes

Open OlivierNicole opened this issue 1 year ago • 1 comments

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_array so that they work with the Wasm backend as well
  • Adds tests for the new Typed_array.Bytes module.

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

OlivierNicole avatar Jul 30 '24 11:07 OlivierNicole

Turning the PR into a draft until the underlying PR is merged.

hhugo avatar Jul 30 '24 12:07 hhugo

I rebased and marked the PR as ready for review.

OlivierNicole avatar Sep 03 '24 15:09 OlivierNicole

Any idea how much breakage the change of API generates ?

hhugo avatar Sep 04 '24 09:09 hhugo

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

hhugo avatar Sep 04 '24 09:09 hhugo

The PR definitely need a changelog entry

hhugo avatar Sep 04 '24 09:09 hhugo

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 avatar Sep 04 '24 14:09 OlivierNicole

@OlivierNicole, can you look at Jerome suggestion ? and rebase and squash commits ?

hhugo avatar Sep 13 '24 15:09 hhugo

Oh, I was rebasing, but you merged before I could update the PR.

OlivierNicole avatar Sep 13 '24 15:09 OlivierNicole

In any case, thank you for the review and @vouillon for the explanations!

OlivierNicole avatar Sep 13 '24 16:09 OlivierNicole

I ended up squashing during the merge

hhugo avatar Sep 13 '24 17:09 hhugo

This breaks ezjs_crypto. I am adding a constraint in opam. See https://github.com/ocaml/opam-repository/pull/26932/commits/e1c4e8e30ca0cd9014ea023f8f536367601e6986

hhugo avatar Nov 23 '24 07:11 hhugo