binaryen

(β˜… 8,604)

Optimizer and compiler/toolchain library for WebAssembly

Showing a partial file list β€” download the zip above to see everything.

  • .clang-format
  • .clang-tidy
  • .git-blame-ignore-revs
  • .gitattributes
  • .gitignore
  • .gitmodules
  • .ruff.toml
  • CHANGELOG.md
  • check.py
  • CMakeLists.txt
  • config.h.in
  • Contributing.md
  • LICENSE
  • README.md
  • requirements-dev.txt

πŸš€ Installation Guide

1. Get the code
git clone https://github.com/WebAssembly/binaryen

Downloads the entire project code from GitHub to your computer.

cd binaryen

Moves into the project folder you just downloaded.

2. CMake

Medium Recommended
Prerequisites
  • Git Needed to download the project code from GitHub.
  • CMake The tool used to generate build configuration.
  • C/C++ 컴파일러 Windows needs Visual Studio (Community edition, free), macOS needs Xcode Command Line Tools, Linux needs the gcc/g++ package.
cmake . && make

Type this command into your terminal and run it.

emcmake cmake . && emmake make binaryen_js

Type this command into your terminal and run it.

emcmake cmake -DBUILD_FOR_BROWSER=ON . && emmake make

Type this command into your terminal and run it.

"%VISUAL_STUDIO_ROOT%\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" ..

Type this command into your terminal and run it.

βœ… Check that an executable was created inside the build folder, then run it directly (e.g. ./build/app_name).

Pulled directly from this repo's README.

// repository documentation