94 releases (26 breaking)

new 0.200.0-rc1 Feb 21, 2025
0.120.0 Dec 11, 2024
0.120.0-rc2 Nov 20, 2024
0.117.0 Jul 29, 2024
0.38.0 Nov 18, 2020

#20 in #ckb

Download history 1316/week @ 2024-10-29 436/week @ 2024-11-05 951/week @ 2024-11-12 1019/week @ 2024-11-19 811/week @ 2024-11-26 1496/week @ 2024-12-03 2100/week @ 2024-12-10 1548/week @ 2024-12-17 1339/week @ 2024-12-24 1114/week @ 2024-12-31 1466/week @ 2025-01-07 1950/week @ 2025-01-14 1466/week @ 2025-01-21 243/week @ 2025-01-28 945/week @ 2025-02-04 647/week @ 2025-02-11

3,490 downloads per month
Used in 61 crates (8 directly)

MIT license

260KB
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.81.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

~7–9.5MB
~160K SLoC