diff --git a/Cargo.lock b/Cargo.lock index ae34826..be24b23 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -417,15 +417,6 @@ dependencies = [ "piper", ] -[[package]] -name = "brownstone" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5839ee4f953e811bfdcf223f509cb2c6a3e1447959b0bff459405575bc17f22" -dependencies = [ - "arrayvec", -] - [[package]] name = "bstr" version = "1.9.1" @@ -1639,12 +1630,6 @@ version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "029d73f573d8e8d63e6d5020011d3255b28c3ba85d6cf870a07184ed23de9284" -[[package]] -name = "indent_write" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cfe9645a18782869361d9c8732246be7b410ad4e919d3609ebabdac00ba12c3" - [[package]] name = "indexmap" version = "2.2.6" @@ -1760,12 +1745,6 @@ dependencies = [ "libc", ] -[[package]] -name = "joinery" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72167d68f5fce3b8655487b8038691a3c9984ee769590f93f2a631f4ad64e4f5" - [[package]] name = "jpeg-decoder" version = "0.1.22" @@ -1785,33 +1764,16 @@ dependencies = [ ] [[package]] -name = "kaydle" -version = "0.2.0" +name = "kdl" +version = "4.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b2de193d14f7d6f3288f5ee1c38b0d7869e95c322fc5e54d1c385765172db53" +checksum = "062c875482ccb676fd40c804a40e3824d4464c18c364547456d1c8e8e951ae47" dependencies = [ - "kaydle-primitives", - "lazy_format", + "miette", "nom", - "nom-supreme", - "serde", - "serde-mobile", "thiserror", ] -[[package]] -name = "kaydle-primitives" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f31f657f34304c4853f1e3a3f3c9a556d0462d7004460791728713d61d88272" -dependencies = [ - "arrayvec", - "memchr", - "nom", - "nom-supreme", - "serde", -] - [[package]] name = "khronos-egl" version = "5.0.0" @@ -1838,12 +1800,6 @@ version = "5.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "10257499f089cd156ad82d0a9cd57d9501fa2c989068992a97eb3c27836f206b" -[[package]] -name = "lazy_format" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b05662be9cd63006934464f935195ae936460edb75de7b9a07e0509795afbdc3" - [[package]] name = "lazy_static" version = "1.4.0" @@ -2018,6 +1974,29 @@ dependencies = [ "paste", ] +[[package]] +name = "miette" +version = "5.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59bb584eaeeab6bd0226ccf3509a69d7936d148cf3d036ad350abe35e8c6856e" +dependencies = [ + "miette-derive", + "once_cell", + "thiserror", + "unicode-width", +] + +[[package]] +name = "miette-derive" +version = "5.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49e7bc1560b95a3c4a25d03de42fe76ca718ab92d1a22a55b9b4cf67b3ae635c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.63", +] + [[package]] name = "mime" version = "0.3.17" @@ -2189,7 +2168,6 @@ dependencies = [ "careless", "funnylog", "inkjet", - "kaydle", "log", "ming", "serde", @@ -2219,19 +2197,6 @@ dependencies = [ "minimal-lexical", ] -[[package]] -name = "nom-supreme" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bd3ae6c901f1959588759ff51c95d24b491ecb9ff91aa9c2ef4acc5b1dcab27" -dependencies = [ - "brownstone", - "indent_write", - "joinery", - "memchr", - "nom", -] - [[package]] name = "num" version = "0.4.3" @@ -3106,15 +3071,6 @@ dependencies = [ "serde_derive", ] -[[package]] -name = "serde-mobile" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c32e12ac49f4f1fde3b44b9eccfcc6cb70bbb2622dac40698b34c3d607cf21a4" -dependencies = [ - "serde", -] - [[package]] name = "serde_derive" version = "1.0.201" @@ -3149,6 +3105,14 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_kdl" +version = "0.1.0" +dependencies = [ + "kdl", + "serde", +] + [[package]] name = "serde_repr" version = "0.1.19" diff --git a/Cargo.toml b/Cargo.toml index 9b86945..e065d7e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,6 @@ anyhow.workspace = true widestring = "1.1.0" log.workspace = true serde = { workspace = true, features = ["derive"] } -kaydle = "0.2.0" inkjet = { version = "0.10.5", features = ["language-rust", "language-toml", "language-zig"], default-features = false } careless = { git = "https://codeberg.org/minky/careless", version = "0.1.0" } @@ -31,6 +30,7 @@ license = "GPL-3.0" collections.path = "crates/collections" ming.path = "crates/ming" ming_macros.path = "crates/ming_macros" +serde_kdl.path = "crates/serde_kdl" refineable.path = "crates/refineable" util.path = "crates/util" diff --git a/crates/serde_kdl/Cargo.toml b/crates/serde_kdl/Cargo.toml new file mode 100644 index 0000000..0d78872 --- /dev/null +++ b/crates/serde_kdl/Cargo.toml @@ -0,0 +1,12 @@ +[package] +name = "serde_kdl" +version.workspace = true +edition.workspace = true +license.workspace = true + +[dependencies] +kdl = "4.6.0" +serde.workspace = true + +[lints] +workspace = true diff --git a/crates/serde_kdl/src/lib.rs b/crates/serde_kdl/src/lib.rs new file mode 100644 index 0000000..7d12d9a --- /dev/null +++ b/crates/serde_kdl/src/lib.rs @@ -0,0 +1,14 @@ +pub fn add(left: usize, right: usize) -> usize { + left + right +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn it_works() { + let result = add(2, 2); + assert_eq!(result, 4); + } +}