@grain/binaryen.ml 0.25.0 → 0.26.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.26.0](https://github.com/grain-lang/binaryen.ml/compare/v0.25.0...v0.26.0) (2025-05-17)
4
+
5
+
6
+ ### ⚠ BREAKING CHANGES
7
+
8
+ * Upgrade to Binaryen v116 ([#202](https://github.com/grain-lang/binaryen.ml/issues/202))
9
+
10
+ ### Features
11
+
12
+ * Upgrade to Binaryen v116 ([#202](https://github.com/grain-lang/binaryen.ml/issues/202)) ([44bdd2a](https://github.com/grain-lang/binaryen.ml/commit/44bdd2a276b1478e0d5eb74cbd5135fdf504abcc))
13
+
3
14
  ## [0.25.0](https://github.com/grain-lang/binaryen.ml/compare/v0.24.0...v0.25.0) (2025-05-15)
4
15
 
5
16
 
@@ -1,5 +1,5 @@
1
1
  opam-version: "2.0"
2
- version: "0.25.0"
2
+ version: "0.26.0"
3
3
  synopsis: "OCaml bindings for Binaryen"
4
4
  maintainer: "oscar@grain-lang.org"
5
5
  author: "Oscar Spencer"
@@ -16,5 +16,5 @@ depends: [
16
16
  "dune" {>= "3.0.0"}
17
17
  "dune-configurator" {>= "3.0.0"}
18
18
  "js_of_ocaml-compiler" {>= "4.1.0" < "6.0.0"}
19
- "libbinaryen" {>= "115.0.0" < "116.0.0"}
19
+ "libbinaryen" {>= "116.0.0" < "117.0.0"}
20
20
  ]
@@ -1,5 +1,5 @@
1
1
  {
2
- "checksum": "e92a23a12ff31f25c990b8b9d27e953f",
2
+ "checksum": "ad7ec1c1f18f2da0d805bf4ce5a7f697",
3
3
  "root": "@grain/binaryen.ml@link-dev:./package.json",
4
4
  "node": {
5
5
  "ocaml@4.14.1000@d41d8cd9": {
@@ -1609,14 +1609,14 @@
1609
1609
  "devDependencies": [ "ocaml@4.14.1000@d41d8cd9" ],
1610
1610
  "available": "true"
1611
1611
  },
1612
- "@grain/libbinaryen@115.0.0@d41d8cd9": {
1613
- "id": "@grain/libbinaryen@115.0.0@d41d8cd9",
1612
+ "@grain/libbinaryen@116.0.0@d41d8cd9": {
1613
+ "id": "@grain/libbinaryen@116.0.0@d41d8cd9",
1614
1614
  "name": "@grain/libbinaryen",
1615
- "version": "115.0.0",
1615
+ "version": "116.0.0",
1616
1616
  "source": {
1617
1617
  "type": "install",
1618
1618
  "source": [
1619
- "archive:https://registry.npmjs.org/@grain/libbinaryen/-/libbinaryen-115.0.0.tgz#sha1:7feff6d267494f6e0b1c116adf39d539ca8f3562"
1619
+ "archive:https://registry.npmjs.org/@grain/libbinaryen/-/libbinaryen-116.0.0.tgz#sha1:32d4124accc5936dbf9706a0f2aac0df9eefaae5"
1620
1620
  ]
1621
1621
  },
1622
1622
  "overrides": [],
@@ -1643,7 +1643,7 @@
1643
1643
  "ocaml@4.14.1000@d41d8cd9",
1644
1644
  "@opam/dune-configurator@opam:3.18.2@ea6c19df",
1645
1645
  "@opam/dune@opam:3.18.2@22ffdaaa",
1646
- "@grain/libbinaryen@115.0.0@d41d8cd9"
1646
+ "@grain/libbinaryen@116.0.0@d41d8cd9"
1647
1647
  ],
1648
1648
  "devDependencies": [
1649
1649
  "@opam/ocamlformat@opam:0.24.1@01d7df0f",
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@grain/binaryen.ml",
3
- "version": "0.25.0",
3
+ "version": "0.26.0",
4
4
  "description": "OCaml bindings for Binaryen.",
5
5
  "author": "Oscar Spencer <oscar@grain-lang.org>",
6
6
  "license": "Apache-2.0",
7
7
  "dependencies": {
8
8
  "ocaml": ">= 4.13.0 < 5.0.0",
9
- "@grain/libbinaryen": ">= 115.0.0 < 116.0.0",
9
+ "@grain/libbinaryen": ">= 116.0.0 < 117.0.0",
10
10
  "@opam/dune": ">= 3.0.0",
11
11
  "@opam/dune-configurator": ">= 3.0.0"
12
12
  },
@@ -442,11 +442,11 @@ caml_binaryen_pop(value _module, value _ty) {
442
442
  }
443
443
 
444
444
  CAMLprim value
445
- caml_binaryen_i31_new(value _module, value _val) {
445
+ caml_binaryen_ref_i31(value _module, value _val) {
446
446
  CAMLparam2(_module, _val);
447
447
  BinaryenModuleRef module = BinaryenModuleRef_val(_module);
448
448
  BinaryenExpressionRef val = BinaryenExpressionRef_val(_val);
449
- BinaryenExpressionRef exp = BinaryenI31New(module, val);
449
+ BinaryenExpressionRef exp = BinaryenRefI31(module, val);
450
450
  CAMLreturn(alloc_BinaryenExpressionRef(exp));
451
451
  }
452
452
 
@@ -717,9 +717,9 @@ caml_binaryen_expression_id_tuple_extract(value unit) {
717
717
  CAMLreturn(Val_int(BinaryenTupleExtractId()));
718
718
  }
719
719
  CAMLprim value
720
- caml_binaryen_expression_id_i31_new(value unit) {
720
+ caml_binaryen_expression_id_ref_i31(value unit) {
721
721
  CAMLparam1(unit);
722
- CAMLreturn(Val_int(BinaryenI31NewId()));
722
+ CAMLreturn(Val_int(BinaryenRefI31Id()));
723
723
  }
724
724
  CAMLprim value
725
725
  caml_binaryen_expression_id_i31_get(value unit) {
@@ -542,9 +542,9 @@ function caml_binaryen_pop(wasm_mod, typ) {
542
542
  return Binaryen._BinaryenPop(wasm_mod, typ);
543
543
  }
544
544
 
545
- //Provides: caml_binaryen_i31_new
546
- function caml_binaryen_i31_new(wasm_mod, typ) {
547
- return wasm_mod.i31.new(typ);
545
+ //Provides: caml_binaryen_ref_i31
546
+ function caml_binaryen_ref_i31(wasm_mod, typ) {
547
+ return wasm_mod.ref.i31(typ);
548
548
  }
549
549
 
550
550
  //Provides: caml_binaryen_i31_get
@@ -812,10 +812,10 @@ function caml_binaryen_expression_id_tuple_make() {
812
812
  function caml_binaryen_expression_id_tuple_extract() {
813
813
  return Binaryen.TupleExtractId;
814
814
  }
815
- //Provides: caml_binaryen_expression_id_i31_new
815
+ //Provides: caml_binaryen_expression_id_ref_i31
816
816
  //Requires: Binaryen
817
- function caml_binaryen_expression_id_i31_new() {
818
- return Binaryen.I31NewId;
817
+ function caml_binaryen_expression_id_ref_i31() {
818
+ return Binaryen.RefI31Id;
819
819
  }
820
820
  //Provides: caml_binaryen_expression_id_i31_get
821
821
  //Requires: Binaryen
@@ -285,9 +285,9 @@ external id_tuple_extract : unit -> int
285
285
 
286
286
  let id_tuple_extract = id_tuple_extract ()
287
287
 
288
- external id_i31_new : unit -> int = "caml_binaryen_expression_id_i31_new"
288
+ external id_ref_i31 : unit -> int = "caml_binaryen_expression_id_ref_i31"
289
289
 
290
- let id_i31_new = id_i31_new ()
290
+ let id_ref_i31 = id_ref_i31 ()
291
291
 
292
292
  external id_i31_get : unit -> int = "caml_binaryen_expression_id_i31_get"
293
293
 
@@ -394,7 +394,7 @@ let get_kind expr =
394
394
  | n when n = id_rethrow -> Rethrow
395
395
  | n when n = id_tuple_make -> TupleMake
396
396
  | n when n = id_tuple_extract -> TupleExtract
397
- | n when n = id_i31_new -> I31New
397
+ | n when n = id_ref_i31 -> I31New
398
398
  | n when n = id_i31_get -> I31Get
399
399
  | n when n = id_call_ref -> CallRef
400
400
  | n when n = id_ref_test -> RefTest
@@ -820,7 +820,7 @@ module Pop = struct
820
820
  end
821
821
 
822
822
  module I31 = struct
823
- external make : Module.t -> t -> t = "caml_binaryen_i31_new"
823
+ external make : Module.t -> t -> t = "caml_binaryen_ref_i31"
824
824
  (** Module, value *)
825
825
 
826
826
  external get : Module.t -> t -> bool -> t = "caml_binaryen_i31_get"