@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.
- binaryen-archive/CHANGELOG.md +37 -0
- binaryen-archive/binaryen.opam +3 -3
- binaryen-archive/esy.lock/index.json +366 -391
- binaryen-archive/esy.lock/opam/base.v0.17.3/opam +5 -3
- binaryen-archive/esy.lock/opam/{chrome-trace.3.20.2 → chrome-trace.3.24.1}/opam +6 -8
- binaryen-archive/esy.lock/opam/{cmdliner.1.3.0 → cmdliner.2.1.1}/opam +26 -10
- binaryen-archive/esy.lock/opam/{dune-build-info.3.20.2 → dune-build-info.3.24.2}/opam +6 -8
- binaryen-archive/esy.lock/opam/{dune-configurator.3.20.2 → dune-configurator.3.24.2}/opam +6 -8
- binaryen-archive/esy.lock/opam/{dune.3.20.2 → dune.3.24.2}/opam +15 -10
- binaryen-archive/esy.lock/opam/fix.20250919/opam +1 -0
- binaryen-archive/esy.lock/opam/js_of_ocaml-compiler.6.4.1/opam +67 -0
- binaryen-archive/esy.lock/opam/{menhir.20250912 → menhir.20260209}/opam +6 -4
- binaryen-archive/esy.lock/opam/{menhirCST.20250912 → menhirCST.20260209}/opam +4 -3
- binaryen-archive/esy.lock/opam/menhirGLR.20260209/opam +30 -0
- binaryen-archive/esy.lock/opam/{menhirLib.20250912 → menhirLib.20260209}/opam +5 -4
- binaryen-archive/esy.lock/opam/{menhirSdk.20250912 → menhirSdk.20260209}/opam +5 -4
- binaryen-archive/esy.lock/opam/ocaml-lsp-server.1.23.1/opam +2 -2
- binaryen-archive/esy.lock/opam/{ocaml-version.4.0.3 → ocaml-version.4.1.3}/opam +3 -3
- binaryen-archive/esy.lock/opam/{ocaml_intrinsics_kernel.v0.17.1 → ocaml_intrinsics_kernel.v0.17.2}/opam +3 -3
- binaryen-archive/esy.lock/opam/ocamlbuild.0.16.1/opam +1 -0
- binaryen-archive/esy.lock/opam/ocamlfind.1.9.8/opam +2 -1
- binaryen-archive/esy.lock/opam/{ocamlformat-lib.0.27.0 → ocamlformat-lib.0.29.0}/opam +7 -6
- binaryen-archive/esy.lock/opam/{ocamlformat-rpc-lib.0.28.1 → ocamlformat-rpc-lib.0.29.0}/opam +4 -4
- binaryen-archive/esy.lock/opam/{ocamlformat.0.27.0 → ocamlformat.0.29.0}/opam +6 -5
- binaryen-archive/esy.lock/opam/{ocp-indent.1.7.0 → ocp-indent.1.9.0}/opam +10 -9
- binaryen-archive/esy.lock/opam/ppx_yojson_conv_lib.v0.17.0/opam +2 -0
- binaryen-archive/esy.lock/opam/{ppxlib.0.37.0 → ppxlib.0.39.0~5.6preview}/opam +12 -13
- binaryen-archive/esy.lock/opam/sexplib0.v0.17.0/opam +2 -0
- binaryen-archive/esy.lock/opam/stdio.v0.17.0/opam +3 -1
- binaryen-archive/esy.lock/opam/{xdg.3.20.2 → xdg.3.24.2}/opam +6 -8
- binaryen-archive/package.json +9 -5
- binaryen-archive/src/dune +6 -1
- binaryen-archive/src/export.c +10 -0
- binaryen-archive/src/export.js +13 -0
- binaryen-archive/src/export.ml +4 -0
- binaryen-archive/src/export.mli +1 -0
- binaryen-archive/src/expression.c +636 -0
- binaryen-archive/src/expression.js +423 -7
- binaryen-archive/src/expression.ml +224 -0
- binaryen-archive/src/expression.mli +159 -0
- binaryen-archive/src/heap_type.c +19 -0
- binaryen-archive/src/heap_type.js +12 -0
- binaryen-archive/src/heap_type.ml +10 -1
- binaryen-archive/src/heap_type.mli +8 -1
- binaryen-archive/src/import.c +32 -0
- binaryen-archive/src/import.js +47 -0
- binaryen-archive/src/import.ml +12 -0
- binaryen-archive/src/import.mli +5 -0
- binaryen-archive/src/memory.c +6 -1
- binaryen-archive/src/memory.js +2 -2
- binaryen-archive/src/memory.ml +1 -1
- binaryen-archive/src/memory.mli +1 -1
- binaryen-archive/src/module.js +9 -22
- binaryen-archive/src/module.ml +4 -0
- binaryen-archive/src/module.mli +1 -0
- binaryen-archive/src/module_feature.c +6 -0
- binaryen-archive/src/module_feature.js +6 -0
- binaryen-archive/src/ocaml_helpers.c +17 -0
- binaryen-archive/src/ocaml_helpers.h +9 -0
- binaryen-archive/src/ocaml_helpers.js +11 -0
- binaryen-archive/src/passes.ml +13 -11
- binaryen-archive/src/passes.mli +13 -11
- binaryen-archive/src/tag.c +61 -0
- binaryen-archive/src/tag.js +43 -0
- binaryen-archive/src/tag.ml +11 -0
- binaryen-archive/src/tag.mli +8 -0
- binaryen-archive/src/type.c +5 -3
- binaryen-archive/src/type.js +5 -9
- binaryen-archive/src/type.ml +4 -1
- binaryen-archive/src/type.mli +1 -1
- binaryen-archive/src/type_builder.c +180 -0
- binaryen-archive/src/type_builder.js +116 -0
- binaryen-archive/src/type_builder.ml +67 -0
- binaryen-archive/src/type_builder.mli +28 -0
- binaryen-archive/test/test.expected +323 -33
- binaryen-archive/test/test.ml +220 -4
- binaryen-archive/esy.lock/opam/base-bytes.base/opam +0 -10
- binaryen-archive/esy.lock/opam/js_of_ocaml-compiler.6.2.0/opam +0 -56
- 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.
|
|
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.
|
|
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.
|
|
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
|
-
|
|
59
|
-
|
|
60
|
-
"
|
|
61
|
-
|
|
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
|
+
|
|
@@ -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.
|
|
13
|
-
"ocaml" {>= "4.
|
|
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.
|
|
33
|
+
"https://github.com/ocaml/dune/releases/download/3.24.2/dune-3.24.2.tbz"
|
|
36
34
|
checksum: [
|
|
37
|
-
"sha256=
|
|
38
|
-
"sha512=
|
|
35
|
+
"sha256=472798691b0216daf538709f0f4703b3617ef24ad0866c9096068baaba4d762a"
|
|
36
|
+
"sha512=13082a66a28e940d4b3c9f78b556f6c1455987cd522355ba4502e01e60a3d002d3101b51284726ae21aa87494efa2dc54d016173f05b616bbc5dad714d5714a3"
|
|
39
37
|
]
|
|
40
38
|
}
|
|
41
|
-
x-commit-hash: "
|
|
39
|
+
x-commit-hash: "ce734ac25ffb06994a4530426bb06ee8cda19e50"
|
binaryen-archive/package.json
CHANGED
|
@@ -1,22 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grain/binaryen.ml",
|
|
3
|
-
"version": "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": ">=
|
|
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.
|
|
15
|
-
"@opam/ocamlformat": "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.
|
|
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
|
-
|
|
50
|
+
type_builder.js
|
|
51
|
+
struct_type.js
|
|
52
|
+
ocaml_helpers.js)))
|
binaryen-archive/src/export.c
CHANGED
|
@@ -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);
|
binaryen-archive/src/export.js
CHANGED
|
@@ -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) {
|
binaryen-archive/src/export.ml
CHANGED
|
@@ -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
|
binaryen-archive/src/export.mli
CHANGED
|
@@ -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
|