Skip to content

Commit

Permalink
feat!: Upgrade to libbinaryen v110 (#173)
Browse files Browse the repository at this point in the history
chore!: Require dune 3.0 to better support js_of_ocaml
feat: Add operations on the Type System
feat: Add operations on Packed Types
feat: Add operations on Heap Types
feat!: Update memory operations to require memory name
chore!: Remove RttCanon and RttSub expression kinds
feat: Add strings feature
feat!: Add optimize argument to StackIR emitting functions
feat: Add Stringref and Stringview Types
feat: Add functions for converting between Types and Heap Types
chore!: Require js_of_ocaml 4.1 to ensure optimization fix
chore: Fallback to upstream repository if possible
  • Loading branch information
phated committed Jan 12, 2023
1 parent 9ea20fe commit 474e5cd
Show file tree
Hide file tree
Showing 68 changed files with 1,376 additions and 674 deletions.
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)

0 comments on commit 474e5cd

Please sign in to comment.