xdev

command module
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

README

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支持。

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package jstest is a test framework using js as test script
Package jstest is a test framework using js as test script

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL