Crates.io | serde_ccl |
lib.rs | serde_ccl |
version | 0.1.1 |
created_at | 2025-01-30 19:20:33.259819+00 |
updated_at | 2025-03-04 20:55:13.602646+00 |
description | Serde-based deserializer for CCL Documents |
homepage | |
repository | https://github.com/LechintanTudor/serde_ccl |
max_upload_size | |
id | 1536774 |
size | 40,613 |
Serde-based crate for deserializing CCL Documents.
CCL document named example.ccl
.
imports =
= ~/.config/terminal/theme.ccl
= ~/.config/terminal/font.ccl
dynamic_title = false
font_size = 12
shell = tmux new-session -A -s main
Code to deserialize the CCL document.
use serde::Deserialize;
const DOCUMENT = include_str!("example.ccl");
#[derive(Debug, Deserialize)]
struct Config {
imports: Vec<String>,
dynamic_title: bool,
font_size: f64,
shell: String,
}
fn main() {
let config = serde_ccl::from_str::<Config>(DOCUMENT)
.expect("Failed to parse document");
println!("{config:?}");
}
Sparsey is dual-licensed under either
MIT License (LICENSE-MIT or https://opensource.org/license/mit/)
Apache License, Version 2.0 (LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0)
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above without any additional terms or conditions.