@grain/binaryen.ml 0.34.0 → 0.36.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 (79) hide show
  1. binaryen-archive/CHANGELOG.md +37 -0
  2. binaryen-archive/binaryen.opam +3 -3
  3. binaryen-archive/esy.lock/index.json +366 -391
  4. binaryen-archive/esy.lock/opam/base.v0.17.3/opam +5 -3
  5. binaryen-archive/esy.lock/opam/{chrome-trace.3.20.2 → chrome-trace.3.24.1}/opam +6 -8
  6. binaryen-archive/esy.lock/opam/{cmdliner.1.3.0 → cmdliner.2.1.1}/opam +26 -10
  7. binaryen-archive/esy.lock/opam/{dune-build-info.3.20.2 → dune-build-info.3.24.2}/opam +6 -8
  8. binaryen-archive/esy.lock/opam/{dune-configurator.3.20.2 → dune-configurator.3.24.2}/opam +6 -8
  9. binaryen-archive/esy.lock/opam/{dune.3.20.2 → dune.3.24.2}/opam +15 -10
  10. binaryen-archive/esy.lock/opam/fix.20250919/opam +1 -0
  11. binaryen-archive/esy.lock/opam/js_of_ocaml-compiler.6.4.1/opam +67 -0
  12. binaryen-archive/esy.lock/opam/{menhir.20250912 → menhir.20260209}/opam +6 -4
  13. binaryen-archive/esy.lock/opam/{menhirCST.20250912 → menhirCST.20260209}/opam +4 -3
  14. binaryen-archive/esy.lock/opam/menhirGLR.20260209/opam +30 -0
  15. binaryen-archive/esy.lock/opam/{menhirLib.20250912 → menhirLib.20260209}/opam +5 -4
  16. binaryen-archive/esy.lock/opam/{menhirSdk.20250912 → menhirSdk.20260209}/opam +5 -4
  17. binaryen-archive/esy.lock/opam/ocaml-lsp-server.1.23.1/opam +2 -2
  18. binaryen-archive/esy.lock/opam/{ocaml-version.4.0.3 → ocaml-version.4.1.3}/opam +3 -3
  19. binaryen-archive/esy.lock/opam/{ocaml_intrinsics_kernel.v0.17.1 → ocaml_intrinsics_kernel.v0.17.2}/opam +3 -3
  20. binaryen-archive/esy.lock/opam/ocamlbuild.0.16.1/opam +1 -0
  21. binaryen-archive/esy.lock/opam/ocamlfind.1.9.8/opam +2 -1
  22. binaryen-archive/esy.lock/opam/{ocamlformat-lib.0.27.0 → ocamlformat-lib.0.29.0}/opam +7 -6
  23. binaryen-archive/esy.lock/opam/{ocamlformat-rpc-lib.0.28.1 → ocamlformat-rpc-lib.0.29.0}/opam +4 -4
  24. binaryen-archive/esy.lock/opam/{ocamlformat.0.27.0 → ocamlformat.0.29.0}/opam +6 -5
  25. binaryen-archive/esy.lock/opam/{ocp-indent.1.7.0 → ocp-indent.1.9.0}/opam +10 -9
  26. binaryen-archive/esy.lock/opam/ppx_yojson_conv_lib.v0.17.0/opam +2 -0
  27. binaryen-archive/esy.lock/opam/{ppxlib.0.37.0 → ppxlib.0.39.0~5.6preview}/opam +12 -13
  28. binaryen-archive/esy.lock/opam/sexplib0.v0.17.0/opam +2 -0
  29. binaryen-archive/esy.lock/opam/stdio.v0.17.0/opam +3 -1
  30. binaryen-archive/esy.lock/opam/{xdg.3.20.2 → xdg.3.24.2}/opam +6 -8
  31. binaryen-archive/package.json +9 -5
  32. binaryen-archive/src/dune +6 -1
  33. binaryen-archive/src/export.c +10 -0
  34. binaryen-archive/src/export.js +13 -0
  35. binaryen-archive/src/export.ml +4 -0
  36. binaryen-archive/src/export.mli +1 -0
  37. binaryen-archive/src/expression.c +636 -0
  38. binaryen-archive/src/expression.js +423 -7
  39. binaryen-archive/src/expression.ml +224 -0
  40. binaryen-archive/src/expression.mli +159 -0
  41. binaryen-archive/src/heap_type.c +19 -0
  42. binaryen-archive/src/heap_type.js +12 -0
  43. binaryen-archive/src/heap_type.ml +10 -1
  44. binaryen-archive/src/heap_type.mli +8 -1
  45. binaryen-archive/src/import.c +32 -0
  46. binaryen-archive/src/import.js +47 -0
  47. binaryen-archive/src/import.ml +12 -0
  48. binaryen-archive/src/import.mli +5 -0
  49. binaryen-archive/src/memory.c +6 -1
  50. binaryen-archive/src/memory.js +2 -2
  51. binaryen-archive/src/memory.ml +1 -1
  52. binaryen-archive/src/memory.mli +1 -1
  53. binaryen-archive/src/module.js +9 -22
  54. binaryen-archive/src/module.ml +4 -0
  55. binaryen-archive/src/module.mli +1 -0
  56. binaryen-archive/src/module_feature.c +6 -0
  57. binaryen-archive/src/module_feature.js +6 -0
  58. binaryen-archive/src/ocaml_helpers.c +17 -0
  59. binaryen-archive/src/ocaml_helpers.h +9 -0
  60. binaryen-archive/src/ocaml_helpers.js +11 -0
  61. binaryen-archive/src/passes.ml +13 -11
  62. binaryen-archive/src/passes.mli +13 -11
  63. binaryen-archive/src/tag.c +61 -0
  64. binaryen-archive/src/tag.js +43 -0
  65. binaryen-archive/src/tag.ml +11 -0
  66. binaryen-archive/src/tag.mli +8 -0
  67. binaryen-archive/src/type.c +5 -3
  68. binaryen-archive/src/type.js +5 -9
  69. binaryen-archive/src/type.ml +4 -1
  70. binaryen-archive/src/type.mli +1 -1
  71. binaryen-archive/src/type_builder.c +180 -0
  72. binaryen-archive/src/type_builder.js +116 -0
  73. binaryen-archive/src/type_builder.ml +67 -0
  74. binaryen-archive/src/type_builder.mli +28 -0
  75. binaryen-archive/test/test.expected +323 -33
  76. binaryen-archive/test/test.ml +220 -4
  77. binaryen-archive/esy.lock/opam/base-bytes.base/opam +0 -10
  78. binaryen-archive/esy.lock/opam/js_of_ocaml-compiler.6.2.0/opam +0 -56
  79. binaryen-archive/esy.lock/opam/stdlib-shims.0.3.0/opam +0 -31
@@ -20,16 +20,14 @@ doc: "https://ocaml-ppx.github.io/ppxlib/"
20
20
  bug-reports: "https://github.com/ocaml-ppx/ppxlib/issues"
21
21
  depends: [
22
22
  "dune" {>= "3.8"}
23
- "ocaml" {>= "4.08.0" & < "5.5.0"}
23
+ "ocaml" {>= "4.08.0" & < "5.7.0"}
24
24
  "ocaml-compiler-libs" {>= "v0.11.0"}
25
25
  "ppx_derivers" {>= "1.0"}
26
- "sexplib0" {>= "v0.12"}
27
- "sexplib0" {with-test & >= "v0.15"}
28
- "stdlib-shims"
26
+ "sexplib0" {>= "v0.15"}
29
27
  "ocamlfind" {with-test}
30
28
  "re" {with-test & >= "1.9.0"}
31
29
  "cinaps" {with-test & >= "v0.12.1"}
32
- "ocamlformat" {with-dev-setup & = "0.26.2"}
30
+ "ocamlformat" {with-dev-setup & = "0.28.1"}
33
31
  "odoc" {with-doc}
34
32
  ]
35
33
  conflicts: [
@@ -53,12 +51,13 @@ build: [
53
51
  ]
54
52
  dev-repo: "git+https://github.com/ocaml-ppx/ppxlib.git"
55
53
  x-maintenance-intent: ["(latest)"]
54
+ flags: avoid-version
55
+ available: opam-version >= "2.1.0"
56
56
  url {
57
- src:
58
- "https://github.com/ocaml-ppx/ppxlib/releases/download/0.37.0/ppxlib-0.37.0.tbz"
59
- checksum: [
60
- "sha256=2e223837e7cecc3bc84a432432c0a72f4e1d5be9165c9c33772f156db85db0b3"
61
- "sha512=78c62c6de7a641b950de9b4b744841c8823918c545046693e291077adfcd069a812094c11d8d51f792c0b5f340307d38f452ff0a92520df63ed17a3ca9922e2e"
62
- ]
63
- }
64
- x-commit-hash: "df39675d8ff0c3490ece8157c681691cfb67fdaf"
57
+ src: "https://github.com/ocaml-ppx/ppxlib/archive/2e150834476230e99e48dfdf34c5e4a1ea6e749b.tar.gz"
58
+ checksum: [
59
+ "sha256=591d694609fed01783c9f360602e8660ae0e49eb33b7074c1317a261e00c6cdb"
60
+ "sha512=e15e956a114ab3f61dfa8f7eceed088082a116f3b6fc832b901729f611258af3b39bda748b2046b4886f429617aa64802f90e0520db82302443ecbba461970b2"
61
+ ]
62
+ }
63
+
@@ -29,3 +29,5 @@ url {
29
29
  "sha512=ad387e40789fe70a11473db7e85fe017b801592624414e9030730b2e92ea08f98095fb6e9236430f33c801605ebee0a2a6284e0f618a26a7da4599d4fd9d395d"
30
30
  ]
31
31
  }
32
+ x-maintenance-intent: ["(latest)"]
33
+
@@ -11,7 +11,7 @@ build: [
11
11
  ]
12
12
  depends: [
13
13
  "ocaml" {>= "5.1.0"}
14
- "base" {>= "v0.17" & < "v0.18"}
14
+ "base" {>= "v0.17" & < "v0.18~"}
15
15
  "dune" {>= "3.11.0"}
16
16
  ]
17
17
  available: arch != "x86_32"
@@ -26,3 +26,5 @@ url {
26
26
  src: "https://github.com/janestreet/stdio/archive/refs/tags/v0.17.0.tar.gz"
27
27
  checksum: "sha256=e7cb473d4bffcf419f307c658cf2599fab03a2b4fe655bfd0be699f8f7af176e"
28
28
  }
29
+ x-maintenance-intent: ["(latest)"]
30
+
@@ -9,16 +9,14 @@ homepage: "https://github.com/ocaml/dune"
9
9
  doc: "https://dune.readthedocs.io/"
10
10
  bug-reports: "https://github.com/ocaml/dune/issues"
11
11
  depends: [
12
- "dune" {>= "3.20"}
13
- "ocaml" {>= "4.08"}
12
+ "dune" {>= "3.24"}
13
+ "ocaml" {>= "4.14"}
14
14
  "odoc" {with-doc}
15
15
  ]
16
16
  dev-repo: "git+https://github.com/ocaml/dune.git"
17
17
  x-maintenance-intent: ["(latest)"]
18
18
  build: [
19
19
  ["dune" "subst"] {dev}
20
- ["rm" "-rf" "vendor/csexp"]
21
- ["rm" "-rf" "vendor/pp"]
22
20
  [
23
21
  "dune"
24
22
  "build"
@@ -32,10 +30,10 @@ build: [
32
30
  ]
33
31
  url {
34
32
  src:
35
- "https://github.com/ocaml/dune/releases/download/3.20.2/dune-3.20.2.tbz"
33
+ "https://github.com/ocaml/dune/releases/download/3.24.2/dune-3.24.2.tbz"
36
34
  checksum: [
37
- "sha256=b1a86b2d60bdb4a8b9bb6861bdf2f9f28a6e7cb5d833ce81afecceb9ef9ca549"
38
- "sha512=ed14df9163e487d4ae7d0a2427eaab7823ef1f0ef2d93f0b783e6f163bbd5b44ba73f055d60b84e76f476fe11d38e794013628a1da776d9ec13cca9666e7b7ff"
35
+ "sha256=472798691b0216daf538709f0f4703b3617ef24ad0866c9096068baaba4d762a"
36
+ "sha512=13082a66a28e940d4b3c9f78b556f6c1455987cd522355ba4502e01e60a3d002d3101b51284726ae21aa87494efa2dc54d016173f05b616bbc5dad714d5714a3"
39
37
  ]
40
38
  }
41
- x-commit-hash: "1e54fd3f450aae7fb41ffb6b7c8b7a5aed754777"
39
+ x-commit-hash: "ce734ac25ffb06994a4530426bb06ee8cda19e50"
@@ -1,22 +1,26 @@
1
1
  {
2
2
  "name": "@grain/binaryen.ml",
3
- "version": "0.34.0",
3
+ "version": "0.36.0",
4
4
  "description": "OCaml bindings for Binaryen.",
5
5
  "author": "Oscar Spencer <oscar@grain-lang.org>",
6
6
  "license": "Apache-2.0",
7
+ "installConfig": {
8
+ "pnp": false
9
+ },
7
10
  "dependencies": {
8
11
  "ocaml": ">= 4.13.0 < 5.4.0",
9
- "@grain/libbinaryen": ">= 124.0.0 < 125.0.0",
12
+ "@grain/libbinaryen": ">= 126.0.0 < 127.0.0",
10
13
  "@opam/dune": ">= 3.0.0",
11
14
  "@opam/dune-configurator": ">= 3.0.0"
12
15
  },
13
16
  "devDependencies": {
14
- "@opam/js_of_ocaml-compiler": ">= 6.0.0 < 7.0.0",
15
- "@opam/ocamlformat": "0.27.0",
17
+ "@opam/js_of_ocaml-compiler": ">= 6.4.0 < 7.0.0",
18
+ "@opam/ocamlformat": "0.29.0",
16
19
  "@opam/ocaml-lsp-server": ">= 1.9.1 < 2.0.0"
17
20
  },
18
21
  "resolutions": {
19
- "@opam/ocp-indent": "1.7.0"
22
+ "@opam/ocp-indent": "1.9.0",
23
+ "@opam/ocamlfind": "1.9.8"
20
24
  },
21
25
  "esy": {
22
26
  "build": "dune build -p binaryen"
binaryen-archive/src/dune CHANGED
@@ -15,6 +15,7 @@
15
15
  export
16
16
  global
17
17
  table
18
+ tag
18
19
  memory
19
20
  module_feature
20
21
  module
@@ -23,6 +24,7 @@
23
24
  heap_type
24
25
  signature_type
25
26
  struct_type
27
+ type_builder
26
28
  ocaml_helpers)
27
29
  (flags :standard -O2 -Wall -Wextra))
28
30
  (js_of_ocaml
@@ -37,6 +39,7 @@
37
39
  export.js
38
40
  global.js
39
41
  table.js
42
+ tag.js
40
43
  memory.js
41
44
  module_feature.js
42
45
  module.js
@@ -44,4 +47,6 @@
44
47
  packed_type.js
45
48
  heap_type.js
46
49
  signature_type.js
47
- struct_type.js)))
50
+ type_builder.js
51
+ struct_type.js
52
+ ocaml_helpers.js)))
@@ -48,6 +48,16 @@ caml_binaryen_add_global_export(value _module, value _internalName, value _exter
48
48
  CAMLreturn(alloc_BinaryenExportRef(exp));
49
49
  }
50
50
 
51
+ CAMLprim value
52
+ caml_binaryen_add_tag_export(value _module, value _internalName, value _externalName) {
53
+ CAMLparam3(_module, _internalName, _externalName);
54
+ BinaryenModuleRef module = BinaryenModuleRef_val(_module);
55
+ char* internalName = Safe_String_val(_internalName);
56
+ char* externalName = Safe_String_val(_externalName);
57
+ BinaryenExportRef exp = BinaryenAddTagExport(module, internalName, externalName);
58
+ CAMLreturn(alloc_BinaryenExportRef(exp));
59
+ }
60
+
51
61
  CAMLprim value
52
62
  caml_binaryen_get_export(value _module, value _externalName) {
53
63
  CAMLparam2(_module, _externalName);
@@ -50,6 +50,19 @@ function caml_binaryen_add_global_export(
50
50
  );
51
51
  }
52
52
 
53
+ //Provides: caml_binaryen_add_tag_export
54
+ //Requires: caml_jsstring_of_string
55
+ function caml_binaryen_add_tag_export(
56
+ wasm_mod,
57
+ internal_name,
58
+ external_name
59
+ ) {
60
+ return wasm_mod.addTagExport(
61
+ caml_jsstring_of_string(internal_name),
62
+ caml_jsstring_of_string(external_name)
63
+ );
64
+ }
65
+
53
66
  //Provides: caml_binaryen_get_export
54
67
  //Requires: caml_jsstring_of_string
55
68
  function caml_binaryen_get_export(wasm_mod, external_name) {
@@ -16,6 +16,10 @@ external add_global_export : Module.t -> string -> string -> t
16
16
  = "caml_binaryen_add_global_export"
17
17
  (** Module, internal name, external name. *)
18
18
 
19
+ external add_tag_export : Module.t -> string -> string -> t
20
+ = "caml_binaryen_add_tag_export"
21
+ (** Module, internal name, external name. *)
22
+
19
23
  external get_export : Module.t -> string -> t = "caml_binaryen_get_export"
20
24
 
21
25
  external remove_export : Module.t -> string -> unit
@@ -4,6 +4,7 @@ val add_function_export : Module.t -> string -> string -> t
4
4
  val add_table_export : Module.t -> string -> string -> t
5
5
  val add_memory_export : Module.t -> string -> string -> t
6
6
  val add_global_export : Module.t -> string -> string -> t
7
+ val add_tag_export : Module.t -> string -> string -> t
7
8
  val get_export : Module.t -> string -> t
8
9
  val remove_export : Module.t -> string -> unit
9
10
  val get_num_exports : Module.t -> int