Giter VIP home page Giter VIP logo

xdev's Introduction

XDEV 文档

XDEV 是 XuperChain 合约构建测试工具,支持

  • WASM 合约构建
  • 不同语言和类型的合约测试

XDEV 安装

  1. 安装依赖项

    XDEV 使用 Docker 进行 WASM 合约构建,如果你使用XDEV 构建 WASM 合约,在使用前你需要 安装Docker

  2. 构建 xdev

    xdev 需要从源码开始构建

    git clone https://github.com/xuperchain/xdev.git 
    cd xdev 
    git checkout v1.0.1
    make 

构建产出在当前目录下的 bin 目录下

  1. 设置环境变量(可选)

    可以将<XDEV_ROOT>/bin 目录加入到环境变量,以便可以在任意路径使用xdev,其中 XDEV_ROOT 是 xdev 源码的根目录。

合约构建

  1. 单文件构建

以 C++ 合约counter 合约为例

    xdev build -o counter.wasm example/counter.cc 
  1. 多文件构建 以 xuper_relay 为例,执行
    xdev build 

合约测试

  1. 单文件测试 合约测试需要编写测试文件,以 xuper_relay 合约的测试为例
    xdev test xuper_relay.test.js

参与贡献

如果你遇到问题或需要新功能,欢迎创建issue。

如果你可以解决某个issue, 欢迎发送PR。

如项目对您有帮助,欢迎star支持。

xdev's People

Contributors

chenfengjin avatar icexin avatar tri-stone avatar qizheng09 avatar kenianshi avatar zsy-cn avatar

Watchers

litian 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.