@grain/binaryen.ml 0.36.0 → 0.37.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.
@@ -1,5 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.37.0](https://github.com/grain-lang/binaryen.ml/compare/v0.36.0...v0.37.0) (2026-09-02)
4
+
5
+
6
+ ### ⚠ BREAKING CHANGES
7
+
8
+ * Upgrade to Binaryen v127 ([#274](https://github.com/grain-lang/binaryen.ml/issues/274))
9
+
10
+ ### Features
11
+
12
+ * Upgrade to Binaryen v127 ([#274](https://github.com/grain-lang/binaryen.ml/issues/274)) ([4dff6e4](https://github.com/grain-lang/binaryen.ml/commit/4dff6e442a08b616ee992a5889371f95cfeee330))
13
+
3
14
  ## [0.36.0](https://github.com/grain-lang/binaryen.ml/compare/v0.35.0...v0.36.0) (2026-09-02)
4
15
 
5
16
 
@@ -1,5 +1,5 @@
1
1
  opam-version: "2.0"
2
- version: "0.36.0"
2
+ version: "0.37.0"
3
3
  synopsis: "OCaml bindings for Binaryen"
4
4
  maintainer: "oscar@grain-lang.org"
5
5
  author: "Oscar Spencer"
@@ -16,6 +16,6 @@ depends: [
16
16
  "dune" {>= "3.0.0"}
17
17
  "dune-configurator" {>= "3.0.0"}
18
18
  "js_of_ocaml-compiler" {>= "6.4.0" < "7.0.0"}
19
- "libbinaryen" {>= "126.0.0" < "127.0.0"}
19
+ "libbinaryen" {>= "127.0.0" < "128.0.0"}
20
20
  ]
21
21
  x-maintenance-intent: ["0.(latest)"]
@@ -1,5 +1,5 @@
1
1
  {
2
- "checksum": "5c222c1460a4598620ddef56248bc82f",
2
+ "checksum": "a2b1f45014de94318280736834285de9",
3
3
  "root": "@grain/binaryen.ml@link-dev:./package.json",
4
4
  "node": {
5
5
  "ocaml@5.3.0@d41d8cd9": {
@@ -968,7 +968,7 @@
968
968
  "@opam/dune-rpc@opam:3.20.2@c55481ce",
969
969
  "@opam/dune-build-info@opam:3.24.2@e3506498",
970
970
  "@opam/dune@opam:3.24.2@dc9091c2", "@opam/csexp@opam:1.5.2@46614bf4",
971
- "@opam/chrome-trace@opam:3.24.1@98879dd0",
971
+ "@opam/chrome-trace@opam:3.24.2@cd44885b",
972
972
  "@opam/camlp-streams@opam:5.0.1@8e96208c",
973
973
  "@opam/base@opam:v0.17.3@1b4d501e",
974
974
  "@opam/astring@opam:0.8.5@9975798d",
@@ -991,7 +991,7 @@
991
991
  "@opam/dune-rpc@opam:3.20.2@c55481ce",
992
992
  "@opam/dune-build-info@opam:3.24.2@e3506498",
993
993
  "@opam/dune@opam:3.24.2@dc9091c2", "@opam/csexp@opam:1.5.2@46614bf4",
994
- "@opam/chrome-trace@opam:3.24.1@98879dd0",
994
+ "@opam/chrome-trace@opam:3.24.2@cd44885b",
995
995
  "@opam/camlp-streams@opam:5.0.1@8e96208c",
996
996
  "@opam/base@opam:v0.17.3@1b4d501e",
997
997
  "@opam/astring@opam:0.8.5@9975798d"
@@ -1759,20 +1759,20 @@
1759
1759
  [ "windows", "x86_64" ]
1760
1760
  ]
1761
1761
  },
1762
- "@opam/chrome-trace@opam:3.24.1@98879dd0": {
1763
- "id": "@opam/chrome-trace@opam:3.24.1@98879dd0",
1762
+ "@opam/chrome-trace@opam:3.24.2@cd44885b": {
1763
+ "id": "@opam/chrome-trace@opam:3.24.2@cd44885b",
1764
1764
  "name": "@opam/chrome-trace",
1765
- "version": "opam:3.24.1",
1765
+ "version": "opam:3.24.2",
1766
1766
  "source": {
1767
1767
  "type": "install",
1768
1768
  "source": [
1769
- "archive:https://opam.ocaml.org/cache/sha256/0a/0a8eaa62dfcb945802bcaf9a6f2026ca5228333ee391a1bdedd3e70a3f26ea2c#sha256:0a8eaa62dfcb945802bcaf9a6f2026ca5228333ee391a1bdedd3e70a3f26ea2c",
1770
- "archive:https://github.com/ocaml/dune/releases/download/3.24.1/dune-3.24.1.tbz#sha256:0a8eaa62dfcb945802bcaf9a6f2026ca5228333ee391a1bdedd3e70a3f26ea2c"
1769
+ "archive:https://opam.ocaml.org/cache/sha256/47/472798691b0216daf538709f0f4703b3617ef24ad0866c9096068baaba4d762a#sha256:472798691b0216daf538709f0f4703b3617ef24ad0866c9096068baaba4d762a",
1770
+ "archive:https://github.com/ocaml/dune/releases/download/3.24.2/dune-3.24.2.tbz#sha256:472798691b0216daf538709f0f4703b3617ef24ad0866c9096068baaba4d762a"
1771
1771
  ],
1772
1772
  "opam": {
1773
1773
  "name": "chrome-trace",
1774
- "version": "3.24.1",
1775
- "path": "esy.lock/opam/chrome-trace.3.24.1"
1774
+ "version": "3.24.2",
1775
+ "path": "esy.lock/opam/chrome-trace.3.24.2"
1776
1776
  }
1777
1777
  },
1778
1778
  "overrides": [],
@@ -1934,14 +1934,14 @@
1934
1934
  [ "windows", "x86_64" ]
1935
1935
  ]
1936
1936
  },
1937
- "@grain/libbinaryen@126.0.0@d41d8cd9": {
1938
- "id": "@grain/libbinaryen@126.0.0@d41d8cd9",
1937
+ "@grain/libbinaryen@127.0.0@d41d8cd9": {
1938
+ "id": "@grain/libbinaryen@127.0.0@d41d8cd9",
1939
1939
  "name": "@grain/libbinaryen",
1940
- "version": "126.0.0",
1940
+ "version": "127.0.0",
1941
1941
  "source": {
1942
1942
  "type": "install",
1943
1943
  "source": [
1944
- "archive:https://registry.npmjs.org/@grain/libbinaryen/-/libbinaryen-126.0.0.tgz#sha1:ab54f1245bd408c96fa72573adb2ebbdeee1bb96"
1944
+ "archive:https://registry.npmjs.org/@grain/libbinaryen/-/libbinaryen-127.0.0.tgz#sha1:ab94716e590c89241c24f690b81b54481cef60cd"
1945
1945
  ]
1946
1946
  },
1947
1947
  "overrides": [],
@@ -1952,6 +1952,7 @@
1952
1952
  "@opam/conf-cmake@github:grain-lang/cmake:esy.json#033cab656dc71a6488b3c1ca6ea45099f794bd03@d41d8cd9"
1953
1953
  ],
1954
1954
  "devDependencies": [],
1955
+ "installConfig": { "pnp": false },
1955
1956
  "available": [
1956
1957
  [ "darwin", "x86_64" ],
1957
1958
  [ "darwin", "arm64" ],
@@ -1973,7 +1974,7 @@
1973
1974
  "ocaml@5.3.0@d41d8cd9",
1974
1975
  "@opam/dune-configurator@opam:3.24.2@7928eaef",
1975
1976
  "@opam/dune@opam:3.24.2@dc9091c2",
1976
- "@grain/libbinaryen@126.0.0@d41d8cd9"
1977
+ "@grain/libbinaryen@127.0.0@d41d8cd9"
1977
1978
  ],
1978
1979
  "devDependencies": [
1979
1980
  "@opam/ocamlformat@opam:0.29.0@966c16ee",
@@ -30,10 +30,10 @@ build: [
30
30
  ]
31
31
  url {
32
32
  src:
33
- "https://github.com/ocaml/dune/releases/download/3.24.1/dune-3.24.1.tbz"
33
+ "https://github.com/ocaml/dune/releases/download/3.24.2/dune-3.24.2.tbz"
34
34
  checksum: [
35
- "sha256=0a8eaa62dfcb945802bcaf9a6f2026ca5228333ee391a1bdedd3e70a3f26ea2c"
36
- "sha512=b9faebfa70cf87e5eb582a0cdd1cb2aa99b8195342afdd7f462365444a0a904819cacc8522a5a85800ed2281f84e82d49360010de7ff16e28047a74df9258e5e"
35
+ "sha256=472798691b0216daf538709f0f4703b3617ef24ad0866c9096068baaba4d762a"
36
+ "sha512=13082a66a28e940d4b3c9f78b556f6c1455987cd522355ba4502e01e60a3d002d3101b51284726ae21aa87494efa2dc54d016173f05b616bbc5dad714d5714a3"
37
37
  ]
38
38
  }
39
- x-commit-hash: "a5d7d322823927dd5d85ae102fd7d442be2f7e66"
39
+ x-commit-hash: "ce734ac25ffb06994a4530426bb06ee8cda19e50"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grain/binaryen.ml",
3
- "version": "0.36.0",
3
+ "version": "0.37.0",
4
4
  "description": "OCaml bindings for Binaryen.",
5
5
  "author": "Oscar Spencer <oscar@grain-lang.org>",
6
6
  "license": "Apache-2.0",
@@ -9,7 +9,7 @@
9
9
  },
10
10
  "dependencies": {
11
11
  "ocaml": ">= 4.13.0 < 5.4.0",
12
- "@grain/libbinaryen": ">= 126.0.0 < 127.0.0",
12
+ "@grain/libbinaryen": ">= 127.0.0 < 128.0.0",
13
13
  "@opam/dune": ">= 3.0.0",
14
14
  "@opam/dune-configurator": ">= 3.0.0"
15
15
  },
@@ -389,8 +389,7 @@ function caml_binaryen_const(wasm_mod, lit) {
389
389
 
390
390
  if (lit.type === "int64") {
391
391
  return wasm_mod.i64.const(
392
- caml_int64_lo32(lit.value),
393
- caml_int64_hi32(lit.value)
392
+ (BigInt(caml_int64_hi32(lit.value)) << 32n) | BigInt(caml_int64_lo32(lit.value) >>> 0)
394
393
  );
395
394
  }
396
395
 
@@ -404,8 +403,7 @@ function caml_binaryen_const(wasm_mod, lit) {
404
403
 
405
404
  if (lit.type === "float64_bits") {
406
405
  return wasm_mod.f64.const_bits(
407
- caml_int64_lo32(lit.value),
408
- caml_int64_hi32(lit.value)
406
+ (BigInt(caml_int64_hi32(lit.value)) << 32n) | BigInt(caml_int64_lo32(lit.value) >>> 0)
409
407
  );
410
408
  }
411
409
 
@@ -102,6 +102,11 @@ module Feature = struct
102
102
 
103
103
  let relaxed_atomics = relaxed_atomics ()
104
104
 
105
+ external custom_page_sizes : unit -> t
106
+ = "caml_binaryen_feature_custom_page_sizes"
107
+
108
+ let custom_page_sizes = custom_page_sizes ()
109
+
105
110
  external all : unit -> t = "caml_binaryen_feature_all"
106
111
 
107
112
  let all = all ()
@@ -26,6 +26,7 @@ module Feature : sig
26
26
  val bulk_memory_opt : t
27
27
  val call_indirect_overlong : t
28
28
  val relaxed_atomics : t
29
+ val custom_page_sizes : t
29
30
  val all : t
30
31
  end
31
32
 
@@ -161,6 +161,12 @@ caml_binaryen_feature_relaxed_atomics(value unit) {
161
161
  CAMLreturn(Val_int(BinaryenFeatureRelaxedAtomics()));
162
162
  }
163
163
 
164
+ CAMLprim value
165
+ caml_binaryen_feature_custom_page_sizes(value unit) {
166
+ CAMLparam1(unit);
167
+ CAMLreturn(Val_int(BinaryenFeatureCustomPageSizes()));
168
+ }
169
+
164
170
  CAMLprim value
165
171
  caml_binaryen_feature_all(value unit) {
166
172
  CAMLparam1(unit);
@@ -146,6 +146,12 @@ function caml_binaryen_feature_relaxed_atomics() {
146
146
  return Binaryen.Features.RelaxedAtomics;
147
147
  }
148
148
 
149
+ //Provides: caml_binaryen_feature_custom_page_sizes
150
+ //Requires: Binaryen
151
+ function caml_binaryen_feature_custom_page_sizes() {
152
+ return Binaryen.Features.CustomPageSizes;
153
+ }
154
+
149
155
  //Provides: caml_binaryen_feature_all
150
156
  //Requires: Binaryen
151
157
  function caml_binaryen_feature_all() {
@@ -16,6 +16,9 @@ let dae = "dae"
16
16
  removed *)
17
17
  let dae_optimizing = "dae-optimizing"
18
18
 
19
+ (** Experimental reimplementation of DAE *)
20
+ let dae_2 = "dae-2"
21
+
19
22
  (** refine and merge abstract (never-created) types *)
20
23
  let abstract_type_refining = "abstract-type-refining"
21
24
 
@@ -16,6 +16,9 @@ val dae_optimizing : t
16
16
  (** removes arguments to calls in an lto-like manner, and optimizes where we
17
17
  removed *)
18
18
 
19
+ val dae_2 : t
20
+ (** Experimental reimplementation of DAE *)
21
+
19
22
  val abstract_type_refining : t
20
23
  (** refine and merge abstract (never-created) types *)
21
24