Giter Site home page Giter Site logo

dipperin / dipc Goto Github PK

View Code? Open in Web Editor NEW
0.0 8.0 0.0 69.31 MB

Dipc is a compiler that compile Dipperin C++ smart contract code to WebAssembly program.

License: GNU General Public License v3.0

CMake 0.11% C++ 97.30% C 2.20% Perl 0.01% HTML 0.19% M4 0.01% Batchfile 0.01% Shell 0.01% Python 0.12% CSS 0.01% Makefile 0.06% Objective-C 0.01% Assembly 0.01% Awk 0.01% sed 0.01%

dipc's Introduction

Dipc (Dipperin Contract Compiler)

Dipc is a compiler that compile Dipperin C++ smart contract code to WebAssembly program.

Build

Required

  • GCC 5.4+ or Clang 4.0+
  • CMake 3.5+
  • Git
  • Python

Ubuntu

Required: 16.04+

  • Install Dependencies
sudo apt install build-essential cmake libz-dev libtinfo-dev
  • Get Source Code
git clone https://github.com/dipperin/dipc.git
cd dipc
git submodule update --init --recursive
  • Build Code
cd dipc
mkdir build && cd build
cmake .. 
make && make install

Windows

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/dipperin/dipc.git
cd dipc
git submodule update --init --recursive
  • Build Code
cd dipc
mkdir build && cd build
cmake -G "MinGW Makefiles" .. -DCMAKE_INSTALL_PREFIX="C:/dipc.cdt" -DCMAKE_MAKE_PROGRAM=mingw32-make
mingw32-make && mingw32-make install

Usage

Skeleton Smart Contract Without CMake Support

  • Init a project
dipc-init -project example -bare
  • Build contract
cd example
dipc-cpp -o example.wasm example.cpp -abigen

Skeleton Smart Contract With CMake Support

  • Init CMake project
dipc-init -project cmake_example
  • Build contract

    • Linux
    cd cmake_example/build
    cmake ..
    
    • Windows

    Required:

    cd cmake_example/build
    cmake .. -G "MinGW Makefiles" -DCMAKE_PREFIX_PATH=<cdt_install_dir>

contract instruction

You can find more guidelines for contract writing and deploying in the contract instruction.

License

GNU General Public License v3.0, see LICENSE

dipc's People

Contributors

ffcczz avatar

Watchers

 avatar James Cloos avatar weathering avatar Terence avatar jerryha avatar Xib avatar  avatar  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.