package libbinaryen

  1. Overview
  2. Docs
Libbinaryen packaged for OCaml

Install

Dune Dependency

Authors

Maintainers

Sources

libbinaryen-v101.0.1.tar.gz
md5=3f2fab345e351321edae3d4e268d817d
sha512=b30a5ea1f293911748774125741a6bcc41c0e17aa9054bfe5799987068d92c9647e901e478523004e5d5c52d84a1c223c330ef9e6808c217b7f25e003c666412

Description

Published: 11 Nov 2021

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))
 (c_library_flags :standard -lstdc++ -lpthread))

Dependencies

This project requires CMake and python (v3.5 or greater).

When installing with opam, both of these dependencies will be checked using conf-cmake and conf-python-3.

When installing with esy, CMake will be built from source, and, on Mac or Linux, Python must be globally installed within a location that esy knows about (those being /usr/local/bin, /usr/bin, /bin, /usr/sbin, or /sbin). On Windows, a suitable python is already available from esy-bash.

Library flags

This package attempts to smooth over configuration frustrations by providing specific library_flags when built.

MacOS

In order to support Mac M1, this package assumes you are using clang++ on MacOS and applies the flags -cc clang++ to the built library.

Windows

On Windows, this package assumes libbinaryen is built under MinGW and applies the flags -ccopt -- -ccopt -static to the built library.

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 (5)

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

Dev Dependencies

None

Used by (2)

  1. binaryen >= "0.11.0" & < "0.12.0"
  2. binaryen_dsl

Conflicts

None