92 releases (25 breaking)

new 0.121.0-rc2 Jan 19, 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

#24 in Magic Beans

Download history 863/week @ 2024-09-28 1545/week @ 2024-10-05 3519/week @ 2024-10-12 3797/week @ 2024-10-19 1576/week @ 2024-10-26 596/week @ 2024-11-02 635/week @ 2024-11-09 1004/week @ 2024-11-16 906/week @ 2024-11-23 1233/week @ 2024-11-30 1816/week @ 2024-12-07 2114/week @ 2024-12-14 1063/week @ 2024-12-21 1258/week @ 2024-12-28 1430/week @ 2025-01-04 1698/week @ 2025-01-11

5,661 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