docs.rs failed to build ckb-std-0.5.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
ckb-std-0.15.3
ckb-std
This library contains several modules that help you write CKB contract with Rust.
Usage
Modules
syscalls
module: defines CKB syscallshigh_level
module: defines high level APIsdebug!
macro: aprintln!
like macro helps debuggingentry!
macro: defines contract entry pointdefault_alloc!
macro: defines global allocator for no-std rust
Memory allocator
Default allocator uses a mixed allocation strategy:
- Fixed block heap, only allocate fixed size(64B) memory block
- Dynamic memory heap, allocate any size memory block
User can invoke macro with arguments to customize the heap size. The default heap size arguments are:
(fixed heap size 4KB, dynamic heap size 516KB, dynamic heap min memory block 64B)
Use the macro with arguments to change it:
default_alloc!
Beware, use difference heap size or memory block size may affect the verification result of the contract, some runtime errors such as out of memory may occur; you should always test the contract after customizing.
Examples
Check examples
and tests to learn how to use.
See also ckb-tool which helps you write tests.