87 releases (24 breaking)

new 0.120.0-rc2 Nov 20, 2024
0.119.0 Oct 25, 2024
0.117.0 Jul 29, 2024
0.115.0-rc2 Mar 20, 2024
0.38.0 Nov 18, 2020

#62 in Magic Beans

Download history 664/week @ 2024-07-31 756/week @ 2024-08-07 793/week @ 2024-08-14 759/week @ 2024-08-21 931/week @ 2024-08-28 1013/week @ 2024-09-04 1146/week @ 2024-09-11 3388/week @ 2024-09-18 1699/week @ 2024-09-25 783/week @ 2024-10-02 2718/week @ 2024-10-09 4528/week @ 2024-10-16 1987/week @ 2024-10-23 1052/week @ 2024-10-30 473/week @ 2024-11-06 776/week @ 2024-11-13

5,955 downloads per month
Used in 60 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