@grain/binaryen.ml 0.25.0 → 0.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. binaryen-archive/CHANGELOG.md +30 -0
  2. binaryen-archive/README.md +3 -2
  3. binaryen-archive/binaryen.opam +3 -3
  4. binaryen-archive/dune +2 -0
  5. binaryen-archive/esy.lock/index.json +630 -577
  6. binaryen-archive/esy.lock/opam/{base.v0.16.4 → base.v0.17.3}/opam +8 -6
  7. binaryen-archive/esy.lock/opam/{chrome-trace.3.18.2 → chrome-trace.3.20.2}/opam +5 -5
  8. binaryen-archive/esy.lock/opam/{dune-build-info.3.18.2 → dune-build-info.3.20.2}/opam +5 -5
  9. binaryen-archive/esy.lock/opam/{dune-configurator.3.18.2 → dune-configurator.3.20.2}/opam +5 -5
  10. binaryen-archive/esy.lock/opam/{dune-rpc.3.18.2 → dune-rpc.3.20.2}/opam +6 -5
  11. binaryen-archive/esy.lock/opam/{dune.3.18.2 → dune.3.20.2}/opam +8 -7
  12. binaryen-archive/esy.lock/opam/{dyn.3.18.2 → dyn.3.20.2}/opam +6 -6
  13. binaryen-archive/esy.lock/opam/{fix.20250428 → fix.20250919}/opam +3 -3
  14. binaryen-archive/esy.lock/opam/{js_of_ocaml-compiler.5.9.1 → js_of_ocaml-compiler.6.2.0}/opam +10 -10
  15. binaryen-archive/esy.lock/opam/jsonrpc.1.23.1/opam +50 -0
  16. binaryen-archive/esy.lock/opam/lsp.1.23.1/opam +60 -0
  17. binaryen-archive/esy.lock/opam/{menhir.20240715 → menhir.20250912}/opam +3 -3
  18. binaryen-archive/esy.lock/opam/{menhirCST.20240715 → menhirCST.20250912}/opam +4 -4
  19. binaryen-archive/esy.lock/opam/{menhirLib.20240715 → menhirLib.20250912}/opam +3 -3
  20. binaryen-archive/esy.lock/opam/{menhirSdk.20240715 → menhirSdk.20250912}/opam +3 -3
  21. binaryen-archive/esy.lock/opam/merlin-lib.5.6-503/opam +36 -0
  22. binaryen-archive/esy.lock/opam/ocaml-compiler-libs.v0.17.0/opam +28 -0
  23. binaryen-archive/esy.lock/opam/{ocaml-lsp-server.1.12.4 → ocaml-lsp-server.1.23.1}/opam +24 -12
  24. binaryen-archive/esy.lock/opam/{ocaml-version.3.5.0 → ocaml-version.4.0.3}/opam +33 -28
  25. binaryen-archive/esy.lock/opam/ocaml_intrinsics_kernel.v0.17.1/opam +30 -0
  26. binaryen-archive/esy.lock/opam/ocamlc-loc.3.20.2/opam +45 -0
  27. binaryen-archive/esy.lock/opam/ocamlformat-lib.0.27.0/opam +68 -0
  28. binaryen-archive/esy.lock/opam/ocamlformat.0.27.0/opam +59 -0
  29. binaryen-archive/esy.lock/opam/{ordering.3.18.2 → ordering.3.20.2}/opam +6 -6
  30. binaryen-archive/esy.lock/opam/{ppx_yojson_conv_lib.v0.16.0 → ppx_yojson_conv_lib.v0.17.0}/opam +5 -4
  31. binaryen-archive/esy.lock/opam/{ppxlib.0.35.0 → ppxlib.0.37.0}/opam +5 -5
  32. binaryen-archive/esy.lock/opam/{re.1.12.0 → re.1.14.0}/opam +35 -27
  33. binaryen-archive/esy.lock/opam/{sedlex.3.4 → sedlex.3.7}/opam +3 -3
  34. binaryen-archive/esy.lock/opam/{sexplib0.v0.16.0 → sexplib0.v0.17.0}/opam +9 -4
  35. binaryen-archive/esy.lock/opam/{stdio.v0.16.0 → stdio.v0.17.0}/opam +6 -5
  36. binaryen-archive/esy.lock/opam/{stdune.3.18.2 → stdune.3.20.2}/opam +6 -6
  37. binaryen-archive/esy.lock/opam/{topkg.1.0.8 → topkg.1.1.0}/opam +2 -2
  38. binaryen-archive/esy.lock/opam/{uucp.16.0.0 → uucp.17.0.0}/opam +5 -5
  39. binaryen-archive/esy.lock/opam/{uuseg.16.0.0 → uuseg.17.0.0}/opam +4 -4
  40. binaryen-archive/esy.lock/opam/{xdg.3.18.2 → xdg.3.20.2}/opam +6 -5
  41. binaryen-archive/esy.lock/opam/{yojson.2.2.2 → yojson.3.0.0}/opam +5 -6
  42. binaryen-archive/package.json +9 -6
  43. binaryen-archive/src/expression.c +4 -4
  44. binaryen-archive/src/expression.js +8 -7
  45. binaryen-archive/src/expression.ml +4 -28
  46. binaryen-archive/src/expression.mli +6 -6
  47. binaryen-archive/src/memory.c +30 -24
  48. binaryen-archive/src/memory.js +17 -11
  49. binaryen-archive/src/memory.ml +23 -12
  50. binaryen-archive/src/memory.mli +4 -4
  51. binaryen-archive/src/module.js +6 -3
  52. binaryen-archive/test/dune +1 -2
  53. binaryen-archive/test/test.expected +25 -23
  54. binaryen-archive/test/test.ml +7 -5
  55. binaryen-archive/esy.lock/opam/base-bigarray.base/opam +0 -6
  56. binaryen-archive/esy.lock/opam/ocaml-compiler-libs.v0.12.4/opam +0 -39
  57. binaryen-archive/esy.lock/opam/ocamlformat.0.24.1/opam +0 -57
  58. binaryen-archive/esy.lock/opam/octavius.1.2.2/opam +0 -36
  59. binaryen-archive/esy.lock/opam/odoc-parser.2.0.0/opam +0 -47
  60. binaryen-archive/esy.lock/opam/omd.1.3.2/opam +0 -50
  61. binaryen-archive/esy.lock/opam/result.1.5/opam +0 -25
@@ -82,7 +82,7 @@ let add =
82
82
  let _ = assert (Expression.Block.get_name add = Some "add")
83
83
 
84
84
  (* Create the add function *)
85
- let adder = Function.add_function wasm_mod "adder" (params ()) results [||] add
85
+ let _adder = Function.add_function wasm_mod "adder" (params ()) results [||] add
86
86
 
87
87
  let call_adder =
88
88
  Expression.Call_indirect.make wasm_mod "table"
@@ -97,7 +97,7 @@ let start =
97
97
  Function.add_function wasm_mod "start" Type.none Type.none [||]
98
98
  (Expression.Block.make wasm_mod ~return_type:Type.none "start"
99
99
  [
100
- Expression.Memory_init.make wasm_mod 1
100
+ Expression.Memory_init.make wasm_mod "world"
101
101
  (Expression.Const.make wasm_mod (Literal.int32 2048l))
102
102
  (Expression.Const.make wasm_mod (Literal.int32 0l))
103
103
  (Expression.Const.make wasm_mod (Literal.int32 5l))
@@ -157,13 +157,13 @@ let segment : Binaryen.Memory.segment =
157
157
  { offset = Expression.Const.make wasm_mod (Literal.int32 0l) }
158
158
  in
159
159
  let size = Bytes.length data in
160
- { data; kind; size }
160
+ { name = "hello"; data; kind; size }
161
161
 
162
162
  let passive_segment : Binaryen.Memory.segment =
163
163
  let data = Bytes.of_string "world" in
164
164
  let kind = Binaryen.Memory.Passive in
165
165
  let size = Bytes.length data in
166
- { data; kind; size }
166
+ { name = "world"; data; kind; size }
167
167
 
168
168
  let _ = assert (Memory.has_memory wasm_mod = false)
169
169
 
@@ -183,7 +183,9 @@ let _ = assert (Memory.get_max max_memory_wasm_mod "0" = 2)
183
183
 
184
184
  let _ =
185
185
  assert (
186
- Bytes.equal (Memory.get_segment_data wasm_mod 1) (Bytes.of_string "world"))
186
+ Bytes.equal
187
+ (Memory.get_segment_data wasm_mod "world")
188
+ (Bytes.of_string "world"))
187
189
 
188
190
  (* Create an imported "write" function i32 (externref, i32, i32) *)
189
191
  (* Similar to the example here: https://bytecodealliance.org/articles/reference-types-in-wasmtime *)
@@ -1,6 +0,0 @@
1
- opam-version: "2.0"
2
- maintainer: "https://github.com/ocaml/opam-repository/issues"
3
- description: """
4
- Bigarray library distributed with the OCaml compiler
5
- """
6
-
@@ -1,39 +0,0 @@
1
- opam-version: "2.0"
2
- synopsis: "OCaml compiler libraries repackaged"
3
- description: """
4
- This packages exposes the OCaml compiler libraries repackages under
5
- the toplevel names Ocaml_common, Ocaml_bytecomp, Ocaml_optcomp, ..."""
6
- maintainer: ["Jane Street developers"]
7
- authors: ["Jane Street Group, LLC"]
8
- license: "MIT"
9
- homepage: "https://github.com/janestreet/ocaml-compiler-libs"
10
- bug-reports: "https://github.com/janestreet/ocaml-compiler-libs/issues"
11
- depends: [
12
- "dune" {>= "2.8"}
13
- "ocaml" {>= "4.04.1" & < "5.2.0"}
14
- "odoc" {with-doc}
15
- ]
16
- build: [
17
- ["dune" "subst"] {dev}
18
- [
19
- "dune"
20
- "build"
21
- "-p"
22
- name
23
- "-j"
24
- jobs
25
- "@install"
26
- "@runtest" {with-test}
27
- "@doc" {with-doc}
28
- ]
29
- ]
30
- dev-repo: "git+https://github.com/janestreet/ocaml-compiler-libs.git"
31
- url {
32
- src:
33
- "https://github.com/janestreet/ocaml-compiler-libs/releases/download/v0.12.4/ocaml-compiler-libs-v0.12.4.tbz"
34
- checksum: [
35
- "sha256=4ec9c9ec35cc45c18c7a143761154ef1d7663036a29297f80381f47981a07760"
36
- "sha512=978dba8dfa61f98fa24fda7a9c26c2e837081f37d1685fe636dc19cfc3278a940cf01a10293504b185c406706bc1008bc54313d50f023bcdea6d5ac6c0788b35"
37
- ]
38
- }
39
- x-commit-hash: "8cd12f18bb7171c2b67d661868c4271fae528d93"
@@ -1,57 +0,0 @@
1
- opam-version: "2.0"
2
- synopsis: "Auto-formatter for OCaml code"
3
- description:
4
- "OCamlFormat is a tool to automatically format OCaml code in a uniform style."
5
- maintainer: ["OCamlFormat Team <ocamlformat-dev@lists.ocaml.org>"]
6
- authors: ["Josh Berdine <jjb@fb.com>"]
7
- homepage: "https://github.com/ocaml-ppx/ocamlformat"
8
- bug-reports: "https://github.com/ocaml-ppx/ocamlformat/issues"
9
- depends: [
10
- "ocaml" {>= "4.08" & < "5.2"}
11
- "alcotest" {with-test}
12
- "base" {>= "v0.12.0" & < "v0.17.0"}
13
- "cmdliner" {>= "1.1.0"}
14
- "dune" {>= "2.8"}
15
- "dune-build-info"
16
- "either"
17
- "fix"
18
- "fpath"
19
- "menhir" {>= "20201216"}
20
- "menhirLib" {>= "20201216"}
21
- "menhirSdk" {>= "20201216"}
22
- "ocaml-version" {>= "3.3.0" & < "3.6.0"}
23
- "ocamlformat-rpc-lib" {with-test & = version}
24
- "ocp-indent"
25
- "odoc-parser" {>= "2.0.0" & < "2.3.0"}
26
- "re" {>= "1.7.2"}
27
- "stdio"
28
- "uuseg" {>= "10.0.0"}
29
- "uutf" {>= "1.0.1"}
30
- "csexp" {>= "1.4.0"}
31
- "odoc" {with-doc}
32
- ]
33
- build: [
34
- ["dune" "subst"] {dev}
35
- [
36
- "dune"
37
- "build"
38
- "-p"
39
- name
40
- "-j"
41
- jobs
42
- "@install"
43
- "@runtest" {with-test}
44
- "@doc" {with-doc}
45
- ]
46
- ]
47
- dev-repo: "git+https://github.com/ocaml-ppx/ocamlformat.git"
48
- license: ["MIT" "LGPL-2.1-only WITH OCaml-LGPL-linking-exception"]
49
- url {
50
- src:
51
- "https://github.com/ocaml-ppx/ocamlformat/releases/download/0.24.1/ocamlformat-0.24.1.tbz"
52
- checksum: [
53
- "sha256=023425e9818f80ea50537b2371a4a766c149a9957d05807e88a004d2d5f441ce"
54
- "sha512=753b6128be68042895202f99959b360ce954db6f82b19b83b4bb346761a8e9cfdfc2b4b25e2070e60601b555562e78f9ebb02760ff127464e0b66cedbddca304"
55
- ]
56
- }
57
- x-commit-hash: "86938aa4435b251af1a3b081f7fbed90f982cf62" # OCamlFormat is distributed under the MIT license. Parts of the OCaml library are vendored for OCamlFormat and distributed under their original LGPL 2.1 license
@@ -1,36 +0,0 @@
1
- opam-version: "2.0"
2
- maintainer: ["leo@lpw25.net"]
3
- authors: ["Leo White <leo@lpw25.net>"]
4
- license: "ISC"
5
- homepage: "https://github.com/ocaml-doc/octavius"
6
- doc: "http://ocaml-doc.github.io/octavius/"
7
- bug-reports: "https://github.com/ocaml-doc/octavius/issues"
8
- depends: [
9
- "dune" {>= "1.11"}
10
- "ocaml" {>= "4.03.0"}
11
- ]
12
- build: [
13
- ["dune" "subst"] {dev}
14
- [
15
- "dune"
16
- "build"
17
- "-p"
18
- name
19
- "-j"
20
- jobs
21
- "@install"
22
- "@runtest" {with-test}
23
- "@doc" {with-doc}
24
- ]
25
- ]
26
- dev-repo: "git+https://github.com/ocaml-doc/octavius.git"
27
-
28
- synopsis: "Ocamldoc comment syntax parser"
29
- description: "Octavius is a library to parse the `ocamldoc` comment syntax."
30
- url {
31
- src: "https://github.com/ocaml-doc/octavius/archive/v1.2.2.tar.gz"
32
- checksum: [
33
- "sha256=eac9104ce0316b69da9c44b9c477700fe0b52a888c89ce4bdf1d2b782a73e0ad"
34
- "md5=72f9e1d996e6c5089fc513cc9218607b"
35
- ]
36
- }
@@ -1,47 +0,0 @@
1
- opam-version: "2.0"
2
- synopsis: "Parser for ocaml documentation comments"
3
- description: """
4
- Odoc_parser is a library for parsing the contents of OCaml documentation
5
- comments, formatted using 'odoc' syntax, an extension of the language
6
- understood by ocamldoc."""
7
- maintainer: ["Jon Ludlam <jon@recoil.org>"]
8
- authors: ["Anton Bachin <antonbachin@yahoo.com>"]
9
- license: "ISC"
10
- homepage: "https://github.com/ocaml-doc/odoc-parser"
11
- bug-reports: "https://github.com/ocaml-doc/odoc-parser/issues"
12
- dev-repo: "git+https://github.com/ocaml-doc/odoc-parser.git"
13
- # This template exists because without it dune pop is dependencies and build rules
14
- # involving odoc. Since odoc depends on this package, this doesn't work.
15
- doc: "https://ocaml-doc.github.io/odoc-parser/"
16
- depends: [
17
- "dune" {>= "2.8"}
18
- "ocaml" {>= "4.02.0"}
19
- "astring"
20
- "result"
21
- "camlp-streams"
22
- "ppx_expect" {with-test}
23
- ("ocaml" {< "4.04.1" & with-test} | "sexplib0" {with-test})
24
- ]
25
- build: [
26
- ["dune" "subst"] {dev}
27
- [
28
- "dune"
29
- "build"
30
- "-p"
31
- name
32
- "-j"
33
- jobs
34
- "@install"
35
- "@runtest" {with-test}
36
- ]
37
- ]
38
- url {
39
- src:
40
- "https://github.com/ocaml-doc/odoc-parser/releases/download/2.0.0/odoc-parser-2.0.0.tbz"
41
- checksum: [
42
- "sha256=407919fbb0eb95761d6fc6ec6777628d94aa1907343bdca678b1880bafb33922"
43
- "sha512=d2bffa3e9f30471045682e390dcee7a2c1caf3831bca4bd57c16939e782c2e23434e6f1c9887580a1804800b3629ef4c4311a9d418fca5a939f324650d54006e"
44
- ]
45
- }
46
- x-commit-hash: "ebfd3b9489e44187da2c67d79a32b6fc1e92bda4"
47
-
@@ -1,50 +0,0 @@
1
- opam-version: "2.0"
2
- synopsis: "A Markdown frontend in pure OCaml"
3
- description: """
4
- This Markdown library is implemented using only pure OCaml (including
5
- I/O operations provided by the standard OCaml compiler distribution).
6
- OMD is meant to be as faithful as possible to the original Markdown.
7
- Additionally, OMD implements a few Github markdown features, an
8
- extension mechanism, and some other features. Note that the opam
9
- package installs both the OMD library and the command line tool `omd`."""
10
- maintainer: [
11
- "Shon Feder <shon.feder@gmail.com>" "Raphael Sousa Santos <@sonologico>"
12
- ]
13
- authors: [
14
- "Philippe Wang <philippe.wang@gmail.com>"
15
- "Nicolás Ojeda Bär <n.oje.bar@gmail.com>"
16
- ]
17
- license: "ISC"
18
- tags: ["org:ocamllabs" "org:mirage"]
19
- homepage: "https://github.com/ocaml/omd"
20
- bug-reports: "https://github.com/ocaml/omd/issues"
21
- depends: [
22
- "dune" {>= "2.7"}
23
- "ocaml" {>= "4.04"}
24
- "base-bigarray"
25
- "base-bytes"
26
- "odoc" {with-doc}
27
- ]
28
- build: [
29
- ["dune" "subst"] {dev}
30
- [
31
- "dune"
32
- "build"
33
- "-p"
34
- name
35
- "-j"
36
- jobs
37
- "@install"
38
- "@runtest" {with-test}
39
- "@doc" {with-doc}
40
- ]
41
- ]
42
- dev-repo: "git+https://github.com/ocaml/omd.git"
43
- url {
44
- src: "https://github.com/ocaml/opam-source-archives/raw/main/omd-1.3.2.tbz"
45
- checksum: [
46
- "sha256=6023e1642631f08f678eb5725820879ed7bb5a3ffee777cdedebc28c1f85fadb"
47
- "sha512=fa2070a5f5d30b2cc422937ac4158bb087134a69d47fa15df403afb1c0c60a73dd436c949faa8d44e0b65bdee039779d86191b55085b717253f91ef20a69ef98"
48
- ]
49
- }
50
- x-commit-hash: "bc6c0d568b90b61143e9863cb6ef7b3989b3313a"
@@ -1,25 +0,0 @@
1
- opam-version: "2.0"
2
- maintainer: "Jane Street developers"
3
- authors: ["Jane Street Group, LLC"]
4
- homepage: "https://github.com/janestreet/result"
5
- dev-repo: "git+https://github.com/janestreet/result.git"
6
- bug-reports: "https://github.com/janestreet/result/issues"
7
- license: "BSD-3-Clause"
8
- build: [["dune" "build" "-p" name "-j" jobs]]
9
- depends: [
10
- "ocaml"
11
- "dune" {>= "1.0"}
12
- ]
13
- synopsis: "Compatibility Result module"
14
- description: """
15
- Projects that want to use the new result type defined in OCaml >= 4.03
16
- while staying compatible with older version of OCaml should use the
17
- Result module defined in this library."""
18
- url {
19
- src:
20
- "https://github.com/janestreet/result/releases/download/1.5/result-1.5.tbz"
21
- checksum: [
22
- "sha256=7c3a5e238558f4c1a4f5acca816bc705a0e12f68dc0005c61ddbf2e6cab8ee32"
23
- "md5=1b82dec78849680b49ae9a8a365b831b"
24
- ]
25
- }