An open API service indexing awesome lists of open source software.

https://github.com/jjyr/ckb-vm-rust-demo


https://github.com/jjyr/ckb-vm-rust-demo

ckb ckb-vm rust

Last synced: about 1 year ago
JSON representation

Awesome Lists containing this project

README

          

# CKB VM Rust Demo

[rust-contract](https://github.com/jjyr/ckb-vm-rust-demo/tree/master/rust-contract) shows how to build a minimal rust contract.

The contract is composited by a `entry.c` file and a rust static library that actually implement the contract, check Makefile to see how to build the contract.

-----------------

> I'm failed to directly build a Rust binary that works on ckb-vm, However if you succeed to build a binary please send me a PR or open an issue!

## Usage

Add riscv target:

``` sh
rustup target add riscv64imac-unknown-none-elf
```

Use `make test` to compile and run, try modify the contract youself.