Skip to content

Mandel.CDT (Contract Development Toolkit) is a suite of tools used to build Mandel contracts

License

Notifications You must be signed in to change notification settings

elmato/mandel.cdt

 
 

Repository files navigation

CDT (Contract Development Toolkit)

Version : 3.0.0

CDT is a toolchain for WebAssembly (WASM) and a set of tools to facilitate smart contract development for the Mandel platform. In addition to being a general purpose WebAssembly toolchain, Mandel specific optimizations are available to support building smart contracts. This new toolchain is built around Clang 9, which means that CDT has the most currently available optimizations and analyses from LLVM, but as the WASM target is still considered experimental, some optimizations are incomplete or not available.

Binary Releases

CDT currently supports Linux x86_64 Debian packages.

Debian Package Install

wget https://github.com/eosnetworkfoundation/mandel.cdt/releases/download/v3.0.0-rc1/cdt_3.0.0-rc1_amd64.deb
sudo apt install ./cdt_3.0.0-rc1_amd64.deb

Debian Package Uninstall

sudo apt remove cdt

Building

Ubuntu 20.04 dependencies

apt-get update && apt-get install   \
        build-essential             \
        clang                       \
        cmake                       \
        git                         \
        libxml2-dev                 \
        opam ocaml-interp           \
        python3                     \
        python3-pip                 \
        time
python3 -m pip install pygments

If issues persist with ccache

export CCACHE_DISABLE=1

Building Integration Tests

Integration tests require access to a mandel build. Instructions below provide additional steps for using a mandel built from source. For development purposes it is generally advised to use mandel built from source.

For building integration tests with mandel built from source

Set an environment variable to tell CDT where to find the Mandel build directory:

export eosio_DIR=/path/to/mandel/build/lib/cmake/eosio

Guided Installation or Building from Scratch

git clone --recursive https://github.com/eosnetworkfoundation/mandel.cdt
cd mandel.cdt
mkdir build
cd build
cmake ..
make -j8

From here onward you can build your contracts code by simply exporting the build directory to your path, so you don't have to install globally (makes things cleaner). Or you can install globally by running this command:

sudo make install

Running Tests

Unit Tests

cd build

ctest

Running Integration Tests (if built)

cd build/tests/integration

ctest

Uninstall after manual installation

sudo rm -fr /usr/local/cdt
sudo rm -fr /usr/local/lib/cmake/cdt
sudo rm /usr/local/bin/eosio-*
sudo rm /usr/local/bin/cdt-*

Installed Tools


  • cdt-cpp
  • cdt-cc
  • cdt-ld
  • cdt-init
  • cdt-abidiff
  • cdt-wasm2wast
  • cdt-wast2wasm
  • cdt-ranlib
  • cdt-ar
  • cdt-objdump
  • cdt-readelf

License

MIT

About

Mandel.CDT (Contract Development Toolkit) is a suite of tools used to build Mandel contracts

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 99.1%
  • C 0.4%
  • CMake 0.2%
  • Python 0.1%
  • Shell 0.1%
  • JavaScript 0.1%