package libbinaryen

  1. Overview
  2. Docs
Libbinaryen packaged for OCaml

Install

dune-project
 Dependency

Authors

Maintainers

Sources

libbinaryen-v115.0.0.tar.gz
md5=0079cc78b9a3f9eee566642f305d7086
sha512=fc826f141912edfe7a723cd1cb4786e0d176bd66c0394569a2e51fc692273aff83ee0e51266b6e0dda99a22bbb180ed496844f9e7e2ed63cd1b5773923f521eb

Description

Added to opam-repository:

README

libbinaryen

Libbinaryen packaged for OCaml.

This is just the low-level C library. If you are looking for OCaml bindings to Binaryen, check out Binaryen.ml!

Usage

Inside your dune file, you can depend on libbinaryen as such:

(library
 (name binaryen)
 (public_name binaryen)
 (libraries libbinaryen.c)
 (foreign_stubs
  (language c)
  (names binaryen_stubs)
  (flags :standard -O2 -Wall -Wextra)))

MacOS C++ Compiler

When including this library in your dune MacOS executables, you'll need to specify -cc clang++ in your (flags) stanza. This is required because Binaryen will throw errors for itself to catch and using clang++ is the only way to handle them correctly. You can find more info on this ocaml issue.

Your stanza could look something like this:

 (executable
  (name example)
  (public_name example)
  (package example)
+ (flags -cc clang++)
  (modules example)
  (libraries binaryen))

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/.

Static Linking

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:

 (executable
  (name example)
  (public_name example)
  (package example)
+ (flags (:standard -ccopt -- -ccopt -static))
  (modules example)
  (libraries binaryen))

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/.

Contributing

You'll need Node.js and esy to build this project. You should be able to use Opam if you are more comfortable with it, but the core team does all development using esy.

dune will take care of compiling Binaryen, so to build the project you'll only need to run:

esy

This will take a while. Once it's done, you can run the tests:

esy test

Dependencies (4)

  1. ocaml >= "4.12"
  2. dune-configurator >= "3.0.0"
  3. dune >= "3.0.0"
  4. conf-cmake build

Dev Dependencies (1)

  1. js_of_ocaml-compiler with-test & >= "4.1.0" & < "6.0.0"

Used by (1)

  1. binaryen = "0.25.0"

Conflicts

None

Build status

Results of building libbinaryen with each compiler on check.ci.ocaml.org, run of against opam-repository 7cdc698. All results for this package.

Each result links to its build log. To keep crawlers from overloading the site, build logs require a GitHub sign-in (see ocurrent/opam-health-check). On your first log, GitHub asks you to “Authorize opam-health-check”, the OCurrent app that runs these checks; it sees only your public profile, not your repositories. The sign-in lasts 30 days.

This version is not in the latest run; the versions below are.

Version OCaml 4.11 OCaml 4.14 OCaml 5.2 OCaml 5.4 OCaml 5.5
133.0.0 n/a good good good good
  • good Package successfully built
  • partial One of the dependencies failed to build
  • bad Package failed to build
  • n/a Package is not available in this environment
  • internal Internal failure