9 releases (breaking)
✓ Uses Rust 2018 edition
|new 0.18.1||Nov 30, 2019|
|0.18.0||Oct 17, 2019|
|0.17.0||Sep 25, 2019|
|0.16.0||Sep 10, 2019|
|0.0.0||Nov 2, 2018|
3,653 downloads per month
Nervos CKB VM
CKB VM is a pure software implementation of the RISC-V instruction set used as scripting VM in CKB. Right now it implements full IMC instructions for both 32-bit and 64-bit register size support. In the future we might also implement V extensions to enable better crypto implementations.
This project is still in development, it's NOT in production ready status.
develop branch is regularly built and tested, but is not guaranteed to be completely stable. CKB will use released versions of CKB VM which are tested and more stable.
CKB VM is currently tested mainly with
stable Rust version on 64-bit Linux, macOS, and Windows.
# download CKB VM $ git clone https://github.com/nervosnetwork/ckb-vm $ cd ckb-vm $ cargo build
You can also run the tests:
CKB VM has already included RISC-V binaries used in tests, so you don't need a RISC-V compiler to build binaries. However if you do want to play with your own binaries, a RISC-V compiler might be needed. riscv-tools can be a good starting point here, or if you are an expert on GNU toolchain, you might also compile upstream GCC from source with RISC-V support, here is an example. CKB VM is using standard RISC-V instructions and ELF binary format, so theoretically any RISC-V compatible compilers are able to produce contracts used in CKB VM(tho bug reports are very welcome if you find breakage).