WasmSDK is a toolchain for WebAssembly (WASM). In addition to being a general purpose WebAssembly toolchain, EOSIO specific optimizations are available to support building EOSIO smart contracts. This new toolchain is built around Clang 7, which means that the SDK has the most currently available optimizations and analyses from LLVM, but as the WASM target is still considered experimental, some optimizations are not available or incomplete.
- Compile (-c) option flag will compile to a WASM-elf object file
- ranlib and ar support for static libraries for WASM
- __FILE__ and __BASE_FILE__ will now only return the file name and not the fullpath. This eliminates any non-determinism from location of the compiled binary
- Global constructors and global destructors are now supported
- eosio-cpp, eosio-cc, eosio-ld, and eosio-pp are set the core set of tools that you will interact with.
- These are the C++ compiler, C compiler, linker and postpass tools.
- A simple CMake interface to build EOSIO smart contracts against WasmSDK
- ABI generator (Coming Soon)
First clone
$ git clone --recursive https://github.com/eosio/eosio.wasmsdk
$ cd eosio.wasmsdk
Now run build.sh
and give the core symbol for the EOSIO blockchain that intend to deploy to.
*build.sh
will install any dependencies that are needed.
$ ./build.sh <CORE_SYMBOL>
Finally, install the build
*This install will install the core to /usr/local/eosio.wasmsdk
and symlinks to the top level tools (compiler, ld, etc.) to /usr/local/bin
$ cd build
$ sudo make install
WasmSDK requires CMake v3.5+ and Boost 1.67.0 to run.
First clone the repo and create a build directory
$ git clone --recursive https://github.com/eosio/wasmsdk
$ cd wasmsdk
$ mkdir build && cd build
Then configure with cmake to install to /usr/local/eosio.wasmsdk
$ cmake ..
or configure cmake to install to a specific path
$ cmake -DCMAKE_INSTALL_PREFIX=<install path> ..
Then to install, simply
$ make && make install