73 releases (20 breaking)

0.116.1 May 11, 2024
0.116.0-rc2 Apr 25, 2024
0.115.0-rc2 Mar 20, 2024
0.113.0-rc2 Dec 19, 2023
0.38.0 Nov 18, 2020

#20 in #bundled

Download history 508/week @ 2024-02-05 522/week @ 2024-02-12 880/week @ 2024-02-19 1618/week @ 2024-02-26 617/week @ 2024-03-04 586/week @ 2024-03-11 1086/week @ 2024-03-18 750/week @ 2024-03-25 1228/week @ 2024-04-01 530/week @ 2024-04-08 417/week @ 2024-04-15 1091/week @ 2024-04-22 305/week @ 2024-04-29 1267/week @ 2024-05-06 652/week @ 2024-05-13 436/week @ 2024-05-20

2,745 downloads per month
Used in 58 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.75.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

~9MB
~158K SLoC