cluConstData 2.1.2

Compile-time macros for building persistent data structures in no_std and const environments. Supports buffer composition, and numeric formatting.
1
2
3
4
5
6
7
8
9
10
11
12
13
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:?}");
}