kdl stuff

This commit is contained in:
Borodinov Ilya 2024-05-18 15:13:55 +03:00
parent 7424dc67b7
commit 20889e9d1f
Signed by: noth
GPG key ID: 75503B2EF596D1BD
4 changed files with 62 additions and 72 deletions

106
Cargo.lock generated
View file

@ -417,15 +417,6 @@ dependencies = [
"piper", "piper",
] ]
[[package]]
name = "brownstone"
version = "3.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c5839ee4f953e811bfdcf223f509cb2c6a3e1447959b0bff459405575bc17f22"
dependencies = [
"arrayvec",
]
[[package]] [[package]]
name = "bstr" name = "bstr"
version = "1.9.1" version = "1.9.1"
@ -1639,12 +1630,6 @@ version = "0.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "029d73f573d8e8d63e6d5020011d3255b28c3ba85d6cf870a07184ed23de9284" checksum = "029d73f573d8e8d63e6d5020011d3255b28c3ba85d6cf870a07184ed23de9284"
[[package]]
name = "indent_write"
version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0cfe9645a18782869361d9c8732246be7b410ad4e919d3609ebabdac00ba12c3"
[[package]] [[package]]
name = "indexmap" name = "indexmap"
version = "2.2.6" version = "2.2.6"
@ -1760,12 +1745,6 @@ dependencies = [
"libc", "libc",
] ]
[[package]]
name = "joinery"
version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "72167d68f5fce3b8655487b8038691a3c9984ee769590f93f2a631f4ad64e4f5"
[[package]] [[package]]
name = "jpeg-decoder" name = "jpeg-decoder"
version = "0.1.22" version = "0.1.22"
@ -1785,33 +1764,16 @@ dependencies = [
] ]
[[package]] [[package]]
name = "kaydle" name = "kdl"
version = "0.2.0" version = "4.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2b2de193d14f7d6f3288f5ee1c38b0d7869e95c322fc5e54d1c385765172db53" checksum = "062c875482ccb676fd40c804a40e3824d4464c18c364547456d1c8e8e951ae47"
dependencies = [ dependencies = [
"kaydle-primitives", "miette",
"lazy_format",
"nom", "nom",
"nom-supreme",
"serde",
"serde-mobile",
"thiserror", "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]] [[package]]
name = "khronos-egl" name = "khronos-egl"
version = "5.0.0" version = "5.0.0"
@ -1838,12 +1800,6 @@ version = "5.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "10257499f089cd156ad82d0a9cd57d9501fa2c989068992a97eb3c27836f206b" checksum = "10257499f089cd156ad82d0a9cd57d9501fa2c989068992a97eb3c27836f206b"
[[package]]
name = "lazy_format"
version = "1.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b05662be9cd63006934464f935195ae936460edb75de7b9a07e0509795afbdc3"
[[package]] [[package]]
name = "lazy_static" name = "lazy_static"
version = "1.4.0" version = "1.4.0"
@ -2018,6 +1974,29 @@ dependencies = [
"paste", "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]] [[package]]
name = "mime" name = "mime"
version = "0.3.17" version = "0.3.17"
@ -2189,7 +2168,6 @@ dependencies = [
"careless", "careless",
"funnylog", "funnylog",
"inkjet", "inkjet",
"kaydle",
"log", "log",
"ming", "ming",
"serde", "serde",
@ -2219,19 +2197,6 @@ dependencies = [
"minimal-lexical", "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]] [[package]]
name = "num" name = "num"
version = "0.4.3" version = "0.4.3"
@ -3106,15 +3071,6 @@ dependencies = [
"serde_derive", "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]] [[package]]
name = "serde_derive" name = "serde_derive"
version = "1.0.201" version = "1.0.201"
@ -3149,6 +3105,14 @@ dependencies = [
"serde", "serde",
] ]
[[package]]
name = "serde_kdl"
version = "0.1.0"
dependencies = [
"kdl",
"serde",
]
[[package]] [[package]]
name = "serde_repr" name = "serde_repr"
version = "0.1.19" version = "0.1.19"

View file

@ -10,7 +10,6 @@ anyhow.workspace = true
widestring = "1.1.0" widestring = "1.1.0"
log.workspace = true log.workspace = true
serde = { workspace = true, features = ["derive"] } serde = { workspace = true, features = ["derive"] }
kaydle = "0.2.0"
inkjet = { version = "0.10.5", features = ["language-rust", "language-toml", "language-zig"], default-features = false } 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" } careless = { git = "https://codeberg.org/minky/careless", version = "0.1.0" }
@ -31,6 +30,7 @@ license = "GPL-3.0"
collections.path = "crates/collections" collections.path = "crates/collections"
ming.path = "crates/ming" ming.path = "crates/ming"
ming_macros.path = "crates/ming_macros" ming_macros.path = "crates/ming_macros"
serde_kdl.path = "crates/serde_kdl"
refineable.path = "crates/refineable" refineable.path = "crates/refineable"
util.path = "crates/util" util.path = "crates/util"

View file

@ -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

View file

@ -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);
}
}