90 releases (24 breaking)

new 0.120.0 Dec 11, 2024
0.120.0-rc2 Nov 20, 2024
0.117.0 Jul 29, 2024
0.115.0-rc2 Mar 20, 2024
0.38.0 Nov 18, 2020

#592 in Magic Beans

Download history 696/week @ 2024-08-20 962/week @ 2024-08-27 1010/week @ 2024-09-03 1259/week @ 2024-09-10 2880/week @ 2024-09-17 2103/week @ 2024-09-24 639/week @ 2024-10-01 2448/week @ 2024-10-08 3403/week @ 2024-10-15 3291/week @ 2024-10-22 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 1419/week @ 2024-12-03

4,236 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

~9.5MB
~166K SLoC