| Crates.io | protobuf-ckb-syscalls |
| lib.rs | protobuf-ckb-syscalls |
| version | 1.0.0 |
| created_at | 2025-09-02 11:17:39.716186+00 |
| updated_at | 2025-10-31 05:47:39.46643+00 |
| description | Provides protobuf format for syscalls |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1821006 |
| size | 46,744 |
A Rust library that provides Protocol Buffer format definitions and implementations for CKB syscalls, enabling serialization, replay, and analysis of CKB smart contract syscall interactions.
The protobuf-ckb-syscalls library offers a standardized way to capture, serialize, and replay CKB VM syscall traces using Protocol Buffers.
The library defines several key message types in traces.proto.
use protobuf_ckb_syscalls::ProtobufImpls;
use ckb_std::syscalls::traits::SyscallImpls;
// Load syscalls from protobuf data
let impls = ProtobufImpls::new_with_bytes(&protobuf_data)
.expect("Failed to parse protobuf data");
// Use with CKB syscalls
let result = impls.load_cell(&mut buffer, 0, 0, Source::Input);
use protobuf_ckb_syscalls::ProtobufVmRunnerImpls;
use ckb_vm::DefaultMachine;
// Create VM runner with protobuf syscalls.
let runner = ProtobufVmRunnerImpls::<DefaultMachine>::new_with_bytes(&data)
.expect("Failed to create runner");
// Use with fuzzing or testing frameworks.
This project is licensed under the MIT License - see the LICENSE file for details.