@grain/binaryen.ml 0.12.1 → 0.13.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 (41) hide show
  1. binaryen-archive/CHANGELOG.md +14 -0
  2. binaryen-archive/README.md +24 -0
  3. binaryen-archive/binaryen.opam +2 -2
  4. binaryen-archive/esy.lock/index.json +6 -6
  5. binaryen-archive/js/binaryen.es5.js +363 -5
  6. binaryen-archive/js/dune +1 -1
  7. binaryen-archive/js/export.ml +0 -3
  8. binaryen-archive/js/expression.ml +161 -0
  9. binaryen-archive/js/literal.ml +0 -1
  10. binaryen-archive/js/module.ml +6 -9
  11. binaryen-archive/js/op.ml +0 -223
  12. binaryen-archive/js/prelude.js +2 -11
  13. binaryen-archive/js/type.ml +0 -9
  14. binaryen-archive/package.json +2 -2
  15. binaryen-archive/src/binaryen_stubs_expressions.c +250 -0
  16. binaryen-archive/src/binaryen_stubs_features.c +24 -0
  17. binaryen-archive/src/element_segment.ml +0 -1
  18. binaryen-archive/src/export.ml +0 -2
  19. binaryen-archive/src/expression.ml +94 -63
  20. binaryen-archive/src/function.ml +0 -6
  21. binaryen-archive/src/global.ml +0 -2
  22. binaryen-archive/src/literal.ml +0 -3
  23. binaryen-archive/src/module.ml +17 -9
  24. binaryen-archive/src/settings.ml +0 -6
  25. binaryen-archive/src/type.ml +0 -1
  26. binaryen-archive/test/config/ocamlopt_flags.ml +8 -1
  27. binaryen-archive/test/test.expected +8 -0
  28. binaryen-archive/test/test.ml +44 -22
  29. binaryen-archive/virtual/element_segment.mli +0 -4
  30. binaryen-archive/virtual/export.mli +0 -15
  31. binaryen-archive/virtual/expression.mli +93 -115
  32. binaryen-archive/virtual/function.mli +0 -12
  33. binaryen-archive/virtual/global.mli +0 -8
  34. binaryen-archive/virtual/import.mli +0 -4
  35. binaryen-archive/virtual/literal.mli +0 -5
  36. binaryen-archive/virtual/module.mli +4 -29
  37. binaryen-archive/virtual/op.mli +0 -315
  38. binaryen-archive/virtual/settings.mli +0 -17
  39. binaryen-archive/virtual/table.mli +0 -3
  40. binaryen-archive/virtual/type.mli +0 -11
  41. binaryen-archive/js/postlude.js +0 -2
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.13.0](https://github.com/grain-lang/binaryen.ml/compare/v0.12.1...v0.13.0) (2022-02-07)
4
+
5
+
6
+ ### Features
7
+
8
+ * Add all `Module.Features` that were missing ([09c5d30](https://github.com/grain-lang/binaryen.ml/commit/09c5d3064e9fd80ea6adac8b2f40cf2b708ebb8c))
9
+ * Add functions for ref & table expressions ([09c5d30](https://github.com/grain-lang/binaryen.ml/commit/09c5d3064e9fd80ea6adac8b2f40cf2b708ebb8c))
10
+ * Upgrade to libbinaryen v103 ([#134](https://github.com/grain-lang/binaryen.ml/issues/134)) ([09c5d30](https://github.com/grain-lang/binaryen.ml/commit/09c5d3064e9fd80ea6adac8b2f40cf2b708ebb8c))
11
+
12
+
13
+ ### Miscellaneous Chores
14
+
15
+ * Use a upload-release-action that works ([97dbcdc](https://github.com/grain-lang/binaryen.ml/commit/97dbcdc53e69ccdb6e88ef03ce0766443a024cf1))
16
+
3
17
  ### [0.12.1](https://github.com/grain-lang/binaryen.ml/compare/v0.12.0...v0.12.1) (2022-02-03)
4
18
 
5
19
 
@@ -66,6 +66,30 @@ Your stanza could look something like this:
66
66
 
67
67
  These flags likely won't work on other operating systems, so you'll probably need to use `dune-configurator` to vary the flags per platform. You can see an example of this in our [tests/](./tests/dune).
68
68
 
69
+ ## MacOS DWARF & Compact unwind
70
+
71
+ When including this library in your `dune` MacOS executables, you might want to specify `-cclib -Wl,-keep_dwarf_unwind -cclib -Wl,-no_compact_unwind` in your `(ocamlopt_flags)` stanza. If you don't include them, you'll probably see warnings like:
72
+
73
+ ```log
74
+ ld: warning: could not create compact unwind for _caml_start_program: dwarf uses DW_CFA_same_value
75
+ ld: warning: could not create compact unwind for _caml_raise_exn: stack subq instruction is too different from dwarf stack size
76
+ ld: warning: could not create compact unwind for _caml_raise_exception: stack subq instruction is too different from dwarf stack size
77
+ ```
78
+
79
+ Your stanza could look something like this:
80
+
81
+ ```diff
82
+ (executable
83
+ (name example)
84
+ (public_name example)
85
+ (package example)
86
+ + (ocamlopt_flags -cclib -Wl,-keep_dwarf_unwind -cclib -Wl,-no_compact_unwind)
87
+ (modules example)
88
+ (libraries binaryen))
89
+ ```
90
+
91
+ These flags likely won't work on other operating systems, so you'll probably need to use `dune-configurator` to vary the flags per platform. You can see an example of this in our [tests/](./tests/dune).
92
+
69
93
  ## Static Linking
70
94
 
71
95
  If you are planning to create portable binaries for Windows, it will try to find Cygwin/MinGW locations in your `PATH`. To avoid this, you probably want to add this to your `(executable)` stanzas:
@@ -1,5 +1,5 @@
1
1
  opam-version: "2.0"
2
- version: "0.12.1"
2
+ version: "0.13.0"
3
3
  synopsis: "OCaml bindings for Binaryen"
4
4
  maintainer: "oscar@grain-lang.org"
5
5
  author: "Oscar Spencer"
@@ -18,5 +18,5 @@ depends: [
18
18
  "js_of_ocaml" {>= "3.10.0" < "4.0.0"}
19
19
  "js_of_ocaml-ppx" {>= "3.10.0" < "4.0.0"}
20
20
  "js_of_ocaml-compiler" {>= "3.10.0" < "4.0.0"}
21
- "libbinaryen" {>= "102.0.4" < "103.0.0"}
21
+ "libbinaryen" {>= "103.0.1" < "104.0.0"}
22
22
  ]
@@ -1,5 +1,5 @@
1
1
  {
2
- "checksum": "ffd6d932e46e6aa0a49050693b592036",
2
+ "checksum": "13f3f4c2715b999554a5ca3aace8c44b",
3
3
  "root": "@grain/binaryen.ml@link-dev:./package.json",
4
4
  "node": {
5
5
  "ocaml@4.13.1000@d41d8cd9": {
@@ -1317,14 +1317,14 @@
1317
1317
  ],
1318
1318
  "devDependencies": [ "ocaml@4.13.1000@d41d8cd9" ]
1319
1319
  },
1320
- "@grain/libbinaryen@102.0.4@d41d8cd9": {
1321
- "id": "@grain/libbinaryen@102.0.4@d41d8cd9",
1320
+ "@grain/libbinaryen@103.0.1@d41d8cd9": {
1321
+ "id": "@grain/libbinaryen@103.0.1@d41d8cd9",
1322
1322
  "name": "@grain/libbinaryen",
1323
- "version": "102.0.4",
1323
+ "version": "103.0.1",
1324
1324
  "source": {
1325
1325
  "type": "install",
1326
1326
  "source": [
1327
- "archive:https://registry.npmjs.org/@grain/libbinaryen/-/libbinaryen-102.0.4.tgz#sha1:13afb8a3220d17b02b3069713f07d87356ffbe11"
1327
+ "archive:https://registry.npmjs.org/@grain/libbinaryen/-/libbinaryen-103.0.1.tgz#sha1:5e5c400a5b539ea6bdbe6429863c90abd0530d91"
1328
1328
  ]
1329
1329
  },
1330
1330
  "overrides": [],
@@ -1353,7 +1353,7 @@
1353
1353
  "@opam/js_of_ocaml@opam:3.11.0@93e18d4d",
1354
1354
  "@opam/dune-configurator@opam:2.9.3@174e411b",
1355
1355
  "@opam/dune@opam:2.9.3@f57a6d69",
1356
- "@grain/libbinaryen@102.0.4@d41d8cd9"
1356
+ "@grain/libbinaryen@103.0.1@d41d8cd9"
1357
1357
  ],
1358
1358
  "devDependencies": [
1359
1359
  "@opam/ocamlformat@opam:0.20.1@6e37e311",