Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Provide binaryen.js with library #48

Merged
merged 5 commits into from Mar 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 16 additions & 0 deletions README.md
Expand Up @@ -77,6 +77,22 @@ If you are planning to create portable binaries for Windows, it will try to find

These flags might not work on other operating systems (like MacOS), 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).

## JavaScript

When compiling to JavaScript with `js_of_ocaml`, you'll need to add the `--disable share` flag. This is needed until we can depend on the bug fix from [ocsigen/js_of_ocaml#1249](https://github.com/ocsigen/js_of_ocaml/pull/1249). In the meantime, you can change your dune file:

```diff
(executable
(name example)
(public_name example)
(modes
(byte js))
+ (js_of_ocaml
+ (flags --disable share))
(modules example)
(libraries binaryen))
```

## Contributing

You'll need Node.js and [`esy`](https://esy.sh/docs/en/getting-started.html#install-esy) to build this project.
Expand Down
367 changes: 367 additions & 0 deletions binaryen.es5.js

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion dune
Expand Up @@ -3,7 +3,9 @@
(public_name libbinaryen.c)
(foreign_archives binaryen)
(c_library_flags :standard -lstdc++ -lpthread)
(install_c_headers binaryen-c))
(install_c_headers binaryen-c)
(js_of_ocaml
(javascript_files binaryen.es5.js)))

(install
(section lib)
Expand Down
582 changes: 351 additions & 231 deletions esy.lock/index.json

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

54 changes: 54 additions & 0 deletions esy.lock/opam/js_of_ocaml-compiler.3.11.0/opam

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 39 additions & 0 deletions esy.lock/opam/ocaml-compiler-libs.v0.12.4/opam

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions esy.lock/opam/ocamlformat.0.20.1/opam

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.