# Bigstringaf\_blit\_from\_bytes not implemented

**URL:** <https://discuss.ocaml.org/t/bigstringaf-blit-from-bytes-not-implemented/6524>\
**Category:** Ecosystem\
**Tags:** javascript, js\_of\_ocaml, jsoo\
**Created:** [September 29, 2020, 8:16pm UTC](https://discuss.ocaml.org/t/bigstringaf-blit-from-bytes-not-implemented/6524 "2020-09-29T20:16:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![orbitz](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/orbitz/32/110_2.png) [@orbitz](https://discuss.ocaml.org/u/orbitz)\
**Post date:** [September 29, 2020, 8:16pm UTC](https://discuss.ocaml.org/t/bigstringaf-blit-from-bytes-not-implemented/6524/1 "2020-09-29T20:16:24Z")

</div>

I’m trying to use something that in jsoo that uses angstrom parser but getting the following error. Looking through the trail of PRs it seems like work has been put into support bigstringaf on JSOO.

Anyone know what the situation is?

---

<div class="post-metadata">

**Author:** ![dinosaure](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/dinosaure/32/16_2.png) [@dinosaure](https://discuss.ocaml.org/u/dinosaure)\
**Post date:** [September 30, 2020, 10:01am UTC](https://discuss.ocaml.org/t/bigstringaf-blit-from-bytes-not-implemented/6524/2 "2020-09-30T10:01:46Z")

</div>

You probably should make an issue [here](https://github.com/inhabitedtype/bigstringaf) where `bigstringaf_blit_from_bytes` is a C function provided by the `bigstringaf` package (used by `angstrom`). As far as I can tell, a JSOO bindings exists but it seems that the binding does not appear for `js_of_ocaml`.

I’m not really aware about the `js_of_ocaml` compilation but it should be easy to fix I believe.

---

<div class="post-metadata">

**Author:** ![dinosaure](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/dinosaure/32/16_2.png) [@dinosaure](https://discuss.ocaml.org/u/dinosaure)\
**Post date:** [September 30, 2020, 10:12am UTC](https://discuss.ocaml.org/t/bigstringaf-blit-from-bytes-not-implemented/6524/3 "2020-09-30T10:12:27Z")

</div>

Then, with `bigstringaf.0.6.1`, it seems that the bug does not appear with:

```ocaml
let str = "Hello World!"
let () =
  let v = Bigstringaf.of_string ~off:0 ~len:(String.length str) str in
  print_endline (Bigstringaf.to_string str)

```

And this `dune` file:

```auto
(executable
 (name main)
 (modes js)
 (libraries bigstringaf))

```

You can compile it with `dune build main.bc.js` and the JS file has (as expected) `bigstringaf_blit_from_bytes`.

---

<div class="post-metadata">

**Author:** ![orbitz](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/orbitz/32/110_2.png) [@orbitz](https://discuss.ocaml.org/u/orbitz)\
**Post date:** [October 1, 2020, 7:24pm UTC](https://discuss.ocaml.org/t/bigstringaf-blit-from-bytes-not-implemented/6524/4 "2020-10-01T19:24:37Z")

</div>

Whoo, I figured it out. Thanks @dinosaure. The issue is on my side, so it’s good all works. For various reasons, I’m not using dune, and so I was not including the runtime.

Tangential question: I see some jsoo values in the bigstringaf META file, is there any way to use ocamlfind to access those? Do they exist just for dune to parse?

---

<div class="post-metadata">

**Author:** ![orbitz](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/orbitz/32/110_2.png) [@orbitz](https://discuss.ocaml.org/u/orbitz)\
**Post date:** [October 1, 2020, 7:36pm UTC](https://discuss.ocaml.org/t/bigstringaf-blit-from-bytes-not-implemented/6524/5 "2020-10-01T19:36:36Z")

</div>

Ah, I see I can do what I want with ocamlfind query.

`ocamlfind query -r -predicates "javascript" -format "%(linkopts)" uri`
