How To Install binaryen on Fedora 34

binaryen is Compiler and toolchain infrastructure library for WebAssembly

Introduction

In this tutorial we learn how to install binaryen on Fedora 34.

What is binaryen

Binaryen is a compiler and toolchain infrastructure library for WebAssembly, written in C++. It aims to make compiling to WebAssembly easy, fast, and effective * Easy from JavaScript. It accepts input in WebAssembly-like form but also accepts a general control flow graph for compilers that prefer that. * Fast completely parallel codegen and optimization, using all available CPU cores. Binaryen’s IR also compiles down to WebAssembly extremely easily and quickly because it is essentially a subset of WebAssembly. * Effective significantly (e.g. local coloring to coalesce local variables; dead code elimination; precomputing expressions when possible at compile time; etc.). These optimizations aim to make Binaryen powerful enough to be used as a compiler backend by itself. One specific area of focus is on WebAssembly-specific optimizations (that general-purpose compilers might not do), which you can think of as wasm minification , similar to minification for JavaScript, CSS, etc., all of which are language-specific (an example of such an optimization is block return value generation in SimplifyLocals).

We can use yum or dnf to install binaryen on Fedora 34. In this tutorial we discuss both methods but you only need to choose one of method to install binaryen.

Install binaryen on Fedora 34 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

After updating yum database, We can install binaryen using dnf by running the following command:

sudo dnf -y install binaryen

Install binaryen on Fedora 34 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

After updating yum database, We can install binaryen using yum by running the following command:

sudo yum -y install binaryen

How To Uninstall binaryen on Fedora 34

To uninstall only the binaryen package we can use the following command:

sudo dnf remove binaryen

binaryen Package Contents on Fedora 34

/usr/bin/wasm-as
/usr/bin/wasm-ctor-eval
/usr/bin/wasm-dis
/usr/bin/wasm-emscripten-finalize
/usr/bin/wasm-metadce
/usr/bin/wasm-opt
/usr/bin/wasm-reduce
/usr/bin/wasm-shell
/usr/bin/wasm-split
/usr/bin/wasm2js
/usr/include/binaryen-c.h
/usr/include/wasm-delegations.h
/usr/lib/.build-id
/usr/lib/.build-id/09
/usr/lib/.build-id/09/40c98b1da82025f6eeea09f1977ab9bd880575
/usr/lib/.build-id/11
/usr/lib/.build-id/11/a266dc9b934cf7f8f968b19301ca5ffc479f6e
/usr/lib/.build-id/18
/usr/lib/.build-id/18/719e89a2a04a3e608228f273d4c5479c555817
/usr/lib/.build-id/30
/usr/lib/.build-id/30/92bd8344427b2656a077bd5c3ff2e2b70115dc
/usr/lib/.build-id/42
/usr/lib/.build-id/42/eaf78d2fd87658ce23a4d7db9d2dc2cc27b46a
/usr/lib/.build-id/60
/usr/lib/.build-id/60/40cd16184101613e72f80a0a5437140ae7f13d
/usr/lib/.build-id/7e
/usr/lib/.build-id/7e/ad0d7b9d00706d4910b206e53d1934d5d5e4e8
/usr/lib/.build-id/9f
/usr/lib/.build-id/9f/a51d70ffc8cf2a237371efdd209af40fd19cbd
/usr/lib/.build-id/ac
/usr/lib/.build-id/ac/f9bd4ea98a6e7e4cff4ad3f39251937bc241e3
/usr/lib/.build-id/d8
/usr/lib/.build-id/d8/6c452570416bc34e96ae17f975d73ce161297d
/usr/lib/.build-id/e3
/usr/lib/.build-id/e3/9e5acfb2f88f8fd4a9e495713c2d196e4b2132
/usr/lib64/binaryen/libbinaryen.so
/usr/share/doc/binaryen
/usr/share/doc/binaryen/README.md
/usr/share/licenses/binaryen
/usr/share/licenses/binaryen/LICENSE
/usr/bin/wasm-as
/usr/bin/wasm-ctor-eval
/usr/bin/wasm-dis
/usr/bin/wasm-emscripten-finalize
/usr/bin/wasm-metadce
/usr/bin/wasm-opt
/usr/bin/wasm-reduce
/usr/bin/wasm-shell
/usr/bin/wasm-split
/usr/bin/wasm2js
/usr/include/binaryen-c.h
/usr/include/wasm-delegations.h
/usr/lib/.build-id
/usr/lib/.build-id/1a
/usr/lib/.build-id/1a/38337ae1fe19ee48fcd185209f13495505b321
/usr/lib/.build-id/32
/usr/lib/.build-id/32/9e7f550dda76176cc3d6ee927f95763f2c029c
/usr/lib/.build-id/5b
/usr/lib/.build-id/5b/cd09dd3092855c4597f6ab7ee13f17a48043ae
/usr/lib/.build-id/6d
/usr/lib/.build-id/6d/82660cd0413fcbb8b2e1f0cc7c70f194caa7e4
/usr/lib/.build-id/79
/usr/lib/.build-id/79/25cdeddfe6828507b2cb7b45c578f276c36606
/usr/lib/.build-id/84
/usr/lib/.build-id/84/2f98039ed64aa29321d36638d90abaf087ea0c
/usr/lib/.build-id/a8
/usr/lib/.build-id/a8/a946a245cdb14fcb59cd091b0a0e21bf7e62fe
/usr/lib/.build-id/da
/usr/lib/.build-id/da/0b3b67cfeb488b00f475de1d4812c36d8da754
/usr/lib/.build-id/dc
/usr/lib/.build-id/dc/49c11bba5d967ea0f1c63ce5db1e6f2a68739a
/usr/lib/.build-id/f1
/usr/lib/.build-id/f1/4db840eebf78e1248687024ad22c18282eadd3
/usr/lib/.build-id/fd
/usr/lib/.build-id/fd/06e7bfbbf5939cd6c76b87ac47abd1801f3f5e
/usr/lib64/binaryen/libbinaryen.so
/usr/share/doc/binaryen
/usr/share/doc/binaryen/README.md
/usr/share/licenses/binaryen
/usr/share/licenses/binaryen/LICENSE

References

Summary

In this tutorial we learn how to install binaryen on Fedora 34 using yum and dnf.