64 releases (18 breaking)

new 0.114.0-rc2 Feb 20, 2024
0.113.1 Jan 31, 2024
0.113.0-rc2 Dec 19, 2023
0.112.1 Nov 21, 2023
0.38.0 Nov 18, 2020

#1909 in Magic Beans

Download history 1711/week @ 2023-10-30 1368/week @ 2023-11-06 1576/week @ 2023-11-13 1575/week @ 2023-11-20 1013/week @ 2023-11-27 915/week @ 2023-12-04 1258/week @ 2023-12-11 1435/week @ 2023-12-18 936/week @ 2023-12-25 1008/week @ 2024-01-01 1576/week @ 2024-01-08 851/week @ 2024-01-15 1261/week @ 2024-01-22 1678/week @ 2024-01-29 805/week @ 2024-02-05 661/week @ 2024-02-12

4,473 downloads per month
Used in 55 crates (8 directly)

MIT license

255KB
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.71.1


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

~7MB
~126K SLoC