| Crates.io | cluConstData |
| lib.rs | cluConstData |
| version | 2.1.2 |
| created_at | 2019-05-06 17:31:21.251616+00 |
| updated_at | 2025-08-01 22:49:30.731355+00 |
| description | Compile-time macros for building persistent data structures in no_std and const environments. Supports buffer composition, and numeric formatting. |
| homepage | |
| repository | https://github.com/clucompany/cluConstData.git |
| max_upload_size | |
| id | 132419 |
| size | 58,139 |
[cluconstdata]
(Compile-time macros for building persistent data structures in no_std and const environments. Supports buffer composition, and numeric formatting.)
Add this to your Cargo.toml:
[dependencies]
cluConstData = "2.1.1"
and this to your source code:
use cluConstData::const_data;
Purpose: Combine any values at compile time.
use cluConstData::const_data;
const_data! {
pub(crate) const URL: &str = "https://", "api.example.com";
const TIMEOUT_MS: u32 = 3000;
const HEADERS: &[&str] = &["Accept"], &["Content-Type"];
}
fn main() {
println!("Endpoint: {URL}");
println!("Timeout: {TIMEOUT_MS} ms");
println!("Headers: {HEADERS:?}");
}
See all
This project has a dual license according to (LICENSE-MIT) and (LICENSE-APACHE-2-0).