Coder Social home page Coder Social logo

sbnair / platon-cdt Goto Github PK

View Code? Open in Web Editor NEW

This project forked from platonnetwork/platon-cdt

0.0 0.0 0.0 10.82 MB

Wasm contract Development Kit

License: GNU General Public License v3.0

CMake 0.50% Batchfile 0.01% C++ 92.67% Python 0.68% C 5.29% HTML 0.73% CSS 0.01% Makefile 0.03% Objective-C 0.01% Assembly 0.02% Awk 0.05% Shell 0.01% sed 0.01%

platon-cdt's Introduction

logo

δΈ­ζ–‡

PlatON-CDT (Contract Development Toolkit)

PlatON-CDT is a toolchain for WebAssembly(WASM) and set of tools to faciliate contract writing for the PlatON platform.

Build

Required

  • GCC 5.4+ or Clang 4.0+
  • CMake 3.5+
  • Git
  • Tar
  • Wget
  • Golang 1.14+

Ubuntu

Required: 18.04

  • Install Dependencies
sudo apt install build-essential cmake libz-dev libtinfo-dev tar wget
  • Get Source Code
git clone https://github.com/PlatONnetwork/PlatON-CDT.git
cd PlatON-CDT
git checkout feature/wasm
  • Build Code

    • Build with script

      ./scripts/build.sh
      cd build
      sudo make install
    • cmake build

      mkdir build && cd build
      cmake ..
      make -j
      sudo make install

      Some common cmake options:

      • -DTEST=ON To build a unit test module, you need to install go1.13 and above first (the unit test module is not built by default).
      • -DCMAKE_INSTALL_PREFIX=directory Specify the directory to install cdt related tools and dependent libraries (default / usr / local).
      • -DCDT_BUILD_TYPE=type The valid options for the build type are Debug and Release. Debug mode assertion checking will be enabled, and the log file will print debugging and error information. (The default is Release).

      If you are building a unit test module, you need to download PlatON-Go in the ./tools/platon-test/node directory, and compile it after the download is complete.

      cd tools/platon-test && mkdir node && cd node
      git clone [email protected]:PlatONnetwork/PlatON-Go.git --recursive
      cd PlatON-Go
      git checkout ${BRANCH}
      make all

Usage

If you use the CMAKE_INSTALL_PREFIX option to specify the installation directory, you must add the executable file path generated by PlatON-CDT to the PATH environment variable before using PlatON-CDT (installed in the /usr/local/bin directory by default).

platon-cpp test.cpp

run command could generate test.wasm and test.abi.json in current dirctoy.

License

GNU General Public License v3.0, see LICENSE.

platon-cdt's People

Contributors

benbaley avatar fksyuan avatar guiting-platon avatar jatel avatar mowind avatar platon-support avatar tracebundy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.