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!: Upgrade to libbinaryen v110 #173

Merged
merged 19 commits into from Jan 12, 2023
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
21 changes: 19 additions & 2 deletions .github/workflows/opam.yml
Expand Up @@ -20,8 +20,25 @@ jobs:
with:
submodules: "recursive"

# This is supposed to be solved by the time opam 2.2.0 is released
# Hack provided by https://github.com/ocaml/setup-ocaml/issues/529#issuecomment-1142547616
- name: Hack Git CRLF for ocaml/setup-ocaml with MinGW and upstream repository
if: ${{ startsWith(matrix.os, 'windows-') }}
run: |
git config --system core.autocrlf input

- name: Setup OCaml ${{ matrix.ocaml-compiler }}
uses: ocaml/setup-ocaml@v2
if: ${{ startsWith(matrix.os, 'windows-') }}
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
opam-repositories: |
default: https://github.com/fdopen/opam-repository-mingw.git#opam2
upstream: https://github.com/ocaml/opam-repository.git

- name: Setup OCaml ${{ matrix.ocaml-compiler }}
uses: ocaml/setup-ocaml@v2
if: ${{ !startsWith(matrix.os, 'windows-') }}
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}

Expand All @@ -31,8 +48,8 @@ jobs:

- name: Build project
run: |
opam exec -- dune build @all @install --no-buffer
opam exec -- dune build

- name: Run tests
run: |
opam exec -- dune runtest --force
opam exec -- dune runtest --display=short
16 changes: 0 additions & 16 deletions README.md
Expand Up @@ -76,22 +76,6 @@ 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.

## 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
8 changes: 4 additions & 4 deletions binaryen.opam
Expand Up @@ -13,8 +13,8 @@ build: [
]
depends: [
"ocaml" {>= "4.12.0"}
"dune" {>= "2.9.1"}
"dune-configurator" {>= "2.9.1"}
"js_of_ocaml-compiler" {>= "3.10.0"}
"libbinaryen" {>= "109.0.0" < "110.0.0"}
"dune" {>= "3.0.0"}
"dune-configurator" {>= "3.0.0"}
"js_of_ocaml-compiler" {>= "4.1.0" < "5.0.0"}
"libbinaryen" {>= "110.0.0" < "111.0.0"}
]
2 changes: 1 addition & 1 deletion dune-project
@@ -1,3 +1,3 @@
(lang dune 2.7)
(lang dune 3.0)

(name binaryen)
2 changes: 1 addition & 1 deletion dune-workspace
@@ -1,3 +1,3 @@
(lang dune 2.7)
(lang dune 3.0)

(profile release)