@grain/binaryen.ml 0.11.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 (67) hide show
  1. binaryen-archive/CHANGELOG.md +53 -0
  2. binaryen-archive/README.md +25 -1
  3. binaryen-archive/binaryen.opam +5 -5
  4. binaryen-archive/esy.lock/index.json +325 -310
  5. binaryen-archive/esy.lock/opam/base-bytes.base/opam +9 -0
  6. binaryen-archive/esy.lock/opam/{base.v0.14.2 → base.v0.14.3}/opam +2 -2
  7. binaryen-archive/esy.lock/opam/{dune-build-info.2.9.1 → dune-build-info.2.9.3}/opam +5 -4
  8. binaryen-archive/esy.lock/opam/{dune-configurator.2.9.1 → dune-configurator.2.9.3}/opam +5 -4
  9. binaryen-archive/esy.lock/opam/{dune.2.9.1 → dune.2.9.3}/opam +5 -4
  10. binaryen-archive/esy.lock/opam/either.1.0.0/opam +40 -0
  11. binaryen-archive/esy.lock/opam/{fix.20211231 → fix.20220121}/opam +3 -3
  12. binaryen-archive/esy.lock/opam/menhir.20211128/opam +1 -1
  13. binaryen-archive/esy.lock/opam/{ocaml-lsp-server.1.9.0 → ocaml-lsp-server.1.9.1}/opam +5 -5
  14. binaryen-archive/esy.lock/opam/{ocamlfind.1.9.1 → ocamlfind.1.9.3}/opam +3 -3
  15. binaryen-archive/esy.lock/opam/{ocamlformat.0.18.0 → ocamlformat.0.20.1}/opam +14 -15
  16. binaryen-archive/esy.lock/opam/ocp-indent.1.7.0/opam +57 -0
  17. binaryen-archive/esy.lock/opam/odoc-parser.1.0.0/opam +46 -0
  18. binaryen-archive/esy.lock/opam/{ppxlib.0.22.2 → ppxlib.0.24.0}/opam +9 -6
  19. binaryen-archive/esy.lock/opam/{topkg.1.0.4 → topkg.1.0.5}/opam +3 -3
  20. binaryen-archive/esy.lock/overrides/{opam__s__ocamlfind_opam__c__1.9.1_opam_override/files/findlib-1.9.1.patch → opam__s__ocamlfind_opam__c__1.9.3_opam_override/files/findlib.patch} +0 -0
  21. binaryen-archive/esy.lock/overrides/{opam__s__ocamlfind_opam__c__1.9.1_opam_override → opam__s__ocamlfind_opam__c__1.9.3_opam_override}/package.json +1 -1
  22. binaryen-archive/js/binaryen.es5.js +363 -5
  23. binaryen-archive/js/dune +1 -1
  24. binaryen-archive/js/export.ml +1 -4
  25. binaryen-archive/js/expression.ml +161 -0
  26. binaryen-archive/js/literal.ml +0 -1
  27. binaryen-archive/js/module.ml +9 -9
  28. binaryen-archive/js/op.ml +0 -223
  29. binaryen-archive/js/prelude.js +2 -0
  30. binaryen-archive/js/table.ml +2 -2
  31. binaryen-archive/js/type.ml +0 -9
  32. binaryen-archive/package.json +11 -8
  33. binaryen-archive/src/binaryen_stubs_exports.c +2 -2
  34. binaryen-archive/src/binaryen_stubs_expressions.c +250 -0
  35. binaryen-archive/src/binaryen_stubs_features.c +24 -0
  36. binaryen-archive/src/binaryen_stubs_modules.c +7 -0
  37. binaryen-archive/src/binaryen_stubs_tables.c +4 -3
  38. binaryen-archive/src/dune +1 -2
  39. binaryen-archive/src/element_segment.ml +0 -1
  40. binaryen-archive/src/export.ml +2 -4
  41. binaryen-archive/src/expression.ml +94 -63
  42. binaryen-archive/src/function.ml +0 -6
  43. binaryen-archive/src/global.ml +0 -2
  44. binaryen-archive/src/literal.ml +0 -3
  45. binaryen-archive/src/module.ml +19 -9
  46. binaryen-archive/src/settings.ml +0 -6
  47. binaryen-archive/src/table.ml +2 -2
  48. binaryen-archive/src/type.ml +0 -1
  49. binaryen-archive/test/config/ocamlopt_flags.ml +8 -1
  50. binaryen-archive/test/test.expected +13 -5
  51. binaryen-archive/test/test.ml +47 -22
  52. binaryen-archive/virtual/element_segment.mli +0 -4
  53. binaryen-archive/virtual/export.mli +1 -16
  54. binaryen-archive/virtual/expression.mli +93 -115
  55. binaryen-archive/virtual/function.mli +0 -12
  56. binaryen-archive/virtual/global.mli +0 -8
  57. binaryen-archive/virtual/import.mli +0 -4
  58. binaryen-archive/virtual/literal.mli +0 -5
  59. binaryen-archive/virtual/module.mli +5 -28
  60. binaryen-archive/virtual/op.mli +0 -315
  61. binaryen-archive/virtual/settings.mli +0 -17
  62. binaryen-archive/virtual/table.mli +1 -4
  63. binaryen-archive/virtual/type.mli +0 -11
  64. binaryen-archive/esy.lock/opam/ocaml-migrate-parsetree.2.3.0/opam +0 -39
  65. binaryen-archive/esy.lock/opam/odoc.1.5.3/opam +0 -53
  66. binaryen-archive/esy.lock/opam/tyxml.4.5.0/opam +0 -42
  67. binaryen-archive/js/postlude.js +0 -2
@@ -1,5 +1,58 @@
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
+
17
+ ### [0.12.1](https://github.com/grain-lang/binaryen.ml/compare/v0.12.0...v0.12.1) (2022-02-03)
18
+
19
+
20
+ ### Features
21
+
22
+ * **ci:** Upgrade release-please ([#131](https://github.com/grain-lang/binaryen.ml/issues/131)) ([ca3bdb7](https://github.com/grain-lang/binaryen.ml/commit/ca3bdb7aa324a013205a80759bcc733fea64ae4a))
23
+
24
+
25
+ ### Bug Fixes
26
+
27
+ * Restrict js_of_ocaml to version 3 ([fa39480](https://github.com/grain-lang/binaryen.ml/commit/fa39480fc74b19cf7052ec5c0764ee58b5783549))
28
+
29
+
30
+ ### Miscellaneous Chores
31
+
32
+ * Fix release version ([5d1bd42](https://github.com/grain-lang/binaryen.ml/commit/5d1bd42a7132298a902060c46dae72507e702eb0))
33
+
34
+ ## [0.12.0](https://www.github.com/grain-lang/binaryen.ml/compare/v0.11.2...v0.12.0) (2022-01-26)
35
+
36
+
37
+ ### ⚠ BREAKING CHANGES
38
+
39
+ * Add table type to add_table signature
40
+ * Rename Event to Tag to match Binaryen
41
+
42
+ ### Features
43
+
44
+ * Add table type to add_table signature ([5c50272](https://www.github.com/grain-lang/binaryen.ml/commit/5c502720943a8bf6e649891051db00336eec9451))
45
+ * Add update_maps function that Binaryen added ([5c50272](https://www.github.com/grain-lang/binaryen.ml/commit/5c502720943a8bf6e649891051db00336eec9451))
46
+ * Rename Event to Tag to match Binaryen ([5c50272](https://www.github.com/grain-lang/binaryen.ml/commit/5c502720943a8bf6e649891051db00336eec9451))
47
+ * Upgrade to libbinaryen v102 ([#120](https://www.github.com/grain-lang/binaryen.ml/issues/120)) ([5c50272](https://www.github.com/grain-lang/binaryen.ml/commit/5c502720943a8bf6e649891051db00336eec9451))
48
+
49
+ ### [0.11.2](https://www.github.com/grain-lang/binaryen.ml/compare/v0.11.1...v0.11.2) (2022-01-24)
50
+
51
+
52
+ ### Bug Fixes
53
+
54
+ * Handle JS global in non-node environments ([#125](https://www.github.com/grain-lang/binaryen.ml/issues/125)) ([74e94fe](https://www.github.com/grain-lang/binaryen.ml/commit/74e94fe8ac7b2c2a66b8118b5eaa3a81e5f9296a))
55
+
3
56
  ### [0.11.1](https://www.github.com/grain-lang/binaryen.ml/compare/v0.11.0...v0.11.1) (2022-01-16)
4
57
 
5
58
 
@@ -35,7 +35,7 @@ let _ = Module.dispose wasm_mod
35
35
  This project aims to provide full feature parity with the [Binaryen C API](https://github.com/WebAssembly/binaryen/blob/master/src/binaryen-c.h). It's fairly complete, but a few things still need bindings:
36
36
 
37
37
  - SIMD instructions
38
- - Events
38
+ - Tags
39
39
  - Atomics
40
40
  - Query operations on expressions
41
41
  - Query operations on functions
@@ -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.11.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"
@@ -15,8 +15,8 @@ depends: [
15
15
  "ocaml" {>= "4.12"}
16
16
  "dune" {>= "2.9.1"}
17
17
  "dune-configurator" {>= "2.9.1"}
18
- "js_of_ocaml" {>= "3.10.0"}
19
- "js_of_ocaml-ppx" {>= "3.10.0"}
20
- "js_of_ocaml-compiler" {>= "3.10.0"}
21
- "libbinaryen" {>= "101.0.1" < "102.0.0"}
18
+ "js_of_ocaml" {>= "3.10.0" < "4.0.0"}
19
+ "js_of_ocaml-ppx" {>= "3.10.0" < "4.0.0"}
20
+ "js_of_ocaml-compiler" {>= "3.10.0" < "4.0.0"}
21
+ "libbinaryen" {>= "103.0.1" < "104.0.0"}
22
22
  ]