Crates.io | ckb-capsule |
lib.rs | ckb-capsule |
version | 0.10.5 |
source | src |
created_at | 2020-10-13 16:53:16.283477 |
updated_at | 2024-05-17 03:23:04.691366 |
description | Capsule is a development framework for creating smart contract for Nervos' CKB. |
homepage | https://github.com/nervosnetwork/capsule |
repository | https://github.com/nervosnetwork/capsule |
max_upload_size | |
id | 299287 |
size | 1,267,509 |
Capsule is an out-of-box development framework for creating smart contract on Nervos' CKB.
Capsule consists of:
CKB supports several programming languages for writing scripts, and the language supporting libraries are maintained in the following repositories:
ckb-std - Rust
ckb-c-stdlib - C
ckb-lua - Lua
The following must be installed and available to use Capsule.
cargo
to generate Rust contracts and run tests. https://www.rust-lang.org/tools/install.docker
container to reproducible build contracts. It's also used by cross. https://docs.docker.com/get-docker/cross
to build rust contracts. Install with$ cargo install cross --git https://github.com/cross-rs/cross
Note: All commands must be accessible in the PATH
in order for them to be used by Capsule.
Note: The current user must have permission to manage Docker instances. How to manage Docker as a non-root user.
Install the latest version
cargo install ckb-capsule
Install the develop branch
cargo install ckb-capsule --git https://github.com/nervosnetwork/capsule.git --branch develop
capsule help
# check environment
capsule check
# create project
capsule new my-demo
cd my-demo
capsule build
capsule test
capsule.toml
- Capsule manifest file.contracts
- Contracts directory.tests
- Contracts tests.build
- Contracts binaries.Upgrade an existing project to capsule 0.10