PlatON-CDT is a toolchain for WebAssembly(WASM) and set of tools to faciliate contract writing for the PlatON platform.
- GCC 5.4+ or Clang 4.0+
- CMake 3.5+
- Git
- Python
Required: 16.04+
- Install Dependencies
sudo apt install build-essential cmake libz-dev libtinfo-dev
- Get Source Code
git clone https://github.com/PlatONnetwork/PlatON-CDT.git
cd PlatON-CDT
git submodule update --init --recursive
- Build Code
cd PlatON-CDT
mkdir build && cd build
cmake ..
make && make install
Required: MinGW-W64 GCC-8.1.0
NOTES: MinGW and CMake must be installed in a directory without space.
- Get Source Code
git clone https://github.com/PlatONnetwork/PlatON-CDT.git
cd PlatON-CDT
git submodule update --init --recursive
- Build Code
cd PlatON-CDT
mkdir build && cd build
cmake -G "MinGW Makefiles" .. -DCMAKE_INSTALL_PREFIX="C:/platon.cdt" -DCMAKE_MAKE_PROGRAM=mingw32-make
mingw32-make && mingw32-make install
- Init a project
platon-init -project example -bare
- Build contract
cd example
platon-cpp -o example.wasm example.cpp -abigen
- Init CMake project
platon-init -project cmake_example
-
Build contract
- Linux
cd cmake_example/build cmake ..
- Windows
Required:
- MinGW-W64 GCC-8.1.0
- CMake 3.5 or higher
cd cmake_example/build cmake .. -G "MinGW Makefiles" -DPLATON_CDT_ROOT=<cdt_install_dir>
GNU General Public License v3.0, see LICENSE.