98 releases (27 breaking)

Uses new Rust 2024

new 0.201.0-rc2 Mar 25, 2025
0.200.0 Mar 5, 2025
0.120.0 Dec 11, 2024
0.120.0-rc2 Nov 20, 2024
0.38.0 Nov 18, 2020

#613 in Magic Beans

Download history 1798/week @ 2024-12-08 2082/week @ 2024-12-15 1026/week @ 2024-12-22 1295/week @ 2024-12-29 1398/week @ 2025-01-05 1816/week @ 2025-01-12 1647/week @ 2025-01-19 487/week @ 2025-01-26 773/week @ 2025-02-02 706/week @ 2025-02-09 1043/week @ 2025-02-16 1720/week @ 2025-02-23 1465/week @ 2025-03-02 1586/week @ 2025-03-09 1530/week @ 2025-03-16 951/week @ 2025-03-23

5,680 downloads per month
Used in 61 crates (8 directly)

MIT license

265KB
5.5K SLoC

ckb-resource

This crate is a component of ckb.

Bundled resources for the CKB binary.

Minimum Supported Rust Version policy (MSRV)

This crate's minimum supported rustc version is 1.85.0


lib.rs:

Bundles resources in the ckb binary.

This crate bundles the files ckb.toml, ckb-miner.toml, default.db-options, and all files in the directory specs in the binary.

The bundled files can be read via Resource::Bundled, for example:

// Read bundled ckb.toml
use ckb_resource::{Resource, CKB_CONFIG_FILE_NAME};

let ckb_toml_bytes = Resource::bundled(CKB_CONFIG_FILE_NAME.to_string()).get().unwrap();
println!("ckb.toml\n{}", String::from_utf8(ckb_toml_bytes.to_vec()).unwrap());

These bundled files can be customized for different chains using spec branches. See Template.

Dependencies

~6–8.5MB
~136K SLoC