96 releases (26 breaking)

0.200.0 Mar 5, 2025
0.121.0 Jan 22, 2025
0.120.0 Dec 11, 2024
0.120.0-rc2 Nov 20, 2024
0.38.0 Nov 18, 2020

#7 in #specs

Download history 1290/week @ 2024-12-01 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 1375/week @ 2025-03-16

6,328 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–9MB
~156K SLoC