Build from source on MacOS
- Model:
- M1
- Operating System
- Big Sur
- Catalina
If you would like to develop WasmEdge on MacOS, please follow this guide to build and test from source code.
Requirements and Dependencies
WasmEdge will try to use the latest LLVM release to create our nightly build. If you want to build from source, you may need to install these dependencies by yourself.
- LLVM 12.0.0 (>= 10.0.0), installed via brew, please don’t use the built-in one.
- Because the default version of LLVM on the latest brew is 13. Please use to fix the LLVM version.
If you don’t want to build Ahead-of-Time runtime/compiler
WasmEdge provides various tools for enabling different runtime environments for optimal performance. After the build is finished, you can find there are several wasmedge related tools:
wasmedge
is for general wasm runtime.wasmedge
executes aWASM
file in interpreter mode or a compiled WASMdyld
file in ahead-of-time compilation mode.- To disable building all tools, you can set the CMake option
WASMEDGE_BUILD_TOOLS
to .
- is the WasmEdge C API shared library.
libwasmedge_c.dyld
provides C API for the ahead-of-time compiler and the WASM runtime.- The APIs about the ahead-of-time compiler will always return failed if the CMake option
WASMEDGE_BUILD_AOT_RUNTIME
is set asOFF
. - To disable building the shared library only, you can set the CMake option
WASMEDGE_BUILD_SHARED_LIB
toOFF
.
Run built-in tests
The following built-in tests are only available when the build flag WASMEDGE_BUILD_TESTS
sets to ON
.
Next, follow to run WebAssembly bytecode programs in .
The following tests can not pass on macos, we are investigating these issues:
- wasmedgeAPIVMCoreTests
- wasmedgeAPIStepsCoreTests
- wasmedgeAPIAOTCoreTests