aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornokoe <nokoe@mailbox.org>2025-12-14 01:43:22 +0100
committernokoe <nokoe@mailbox.org>2025-12-14 01:44:14 +0100
commitf43daec5936b827285a14c50377bb592ed9d1311 (patch)
tree28573f5b4339c3f23f455b0debef178c9ea45b55
parentb87392558f12de8404bd5ab181d328fd66a106e2 (diff)
downloadhurrycurry-f43daec5936b827285a14c50377bb592ed9d1311.tar
hurrycurry-f43daec5936b827285a14c50377bb592ed9d1311.tar.bz2
hurrycurry-f43daec5936b827285a14c50377bb592ed9d1311.tar.zst
replace `serde_yml` with `serde_yaml_ng`
-rw-r--r--Cargo.lock30
-rw-r--r--server/data/Cargo.toml2
-rw-r--r--server/data/src/index.rs6
-rw-r--r--server/editor/Cargo.toml2
-rw-r--r--server/editor/src/save.rs4
5 files changed, 19 insertions, 25 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 0b0a83e9..5a687108 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1007,7 +1007,7 @@ dependencies = [
"log",
"serde",
"serde_json",
- "serde_yml",
+ "serde_yaml_ng",
"shlex",
]
@@ -1042,7 +1042,7 @@ dependencies = [
"rustls",
"serde",
"serde_json",
- "serde_yml",
+ "serde_yaml_ng",
"shlex",
"tokio",
"tokio-tungstenite",
@@ -1545,16 +1545,6 @@ dependencies = [
]
[[package]]
-name = "libyml"
-version = "0.0.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3302702afa434ffa30847a83305f0a69d6abd74293b6554c18ec85c7ef30c980"
-dependencies = [
- "anyhow",
- "version_check",
-]
-
-[[package]]
name = "linux-raw-sys"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2450,18 +2440,16 @@ dependencies = [
]
[[package]]
-name = "serde_yml"
-version = "0.0.12"
+name = "serde_yaml_ng"
+version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "59e2dd588bf1597a252c3b920e0143eb99b0f76e4e082f4c92ce34fbc9e71ddd"
+checksum = "7b4db627b98b36d4203a7b458cf3573730f2bb591b28871d916dfa9efabfd41f"
dependencies = [
"indexmap",
"itoa",
- "libyml",
- "memchr",
"ryu",
"serde",
- "version_check",
+ "unsafe-libyaml",
]
[[package]]
@@ -3028,6 +3016,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853"
[[package]]
+name = "unsafe-libyaml"
+version = "0.2.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861"
+
+[[package]]
name = "untrusted"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
diff --git a/server/data/Cargo.toml b/server/data/Cargo.toml
index 65064735..9233de18 100644
--- a/server/data/Cargo.toml
+++ b/server/data/Cargo.toml
@@ -11,7 +11,7 @@ serde_json = "1.0.145"
serde = { version = "1.0.225", features = ["derive"] }
shlex = "1.3.0"
clap = { version = "4.5.47", features = ["derive"] }
-serde_yml = "0.0.12"
+serde_yaml_ng = "0.10.0"
log = "0.4.28"
[features]
diff --git a/server/data/src/index.rs b/server/data/src/index.rs
index a74b283c..7eed1699 100644
--- a/server/data/src/index.rs
+++ b/server/data/src/index.rs
@@ -48,7 +48,7 @@ impl DataIndex {
}
pub fn reload(&mut self) -> Result<()> {
let path = self.path.clone();
- *self = serde_yml::from_reader(
+ *self = serde_yaml_ng::from_reader(
File::open(self.path.join("index.yaml")).context("Failed opening data index")?,
)?;
self.path = path;
@@ -72,13 +72,13 @@ impl DataIndex {
}
pub fn generate(&self, map: &str) -> Result<(Gamedata, Serverdata)> {
debug!("Loading map {map}...");
- let map_in: MapDecl = serde_yml::from_str(
+ let map_in: MapDecl = serde_yaml_ng::from_str(
&self
.read_map(map)
.context(anyhow!("Failed to read map file ({map})"))?,
)
.context(anyhow!("Failed to parse map file ({map})"))?;
- let recipes_in = serde_yml::from_str(
+ let recipes_in = serde_yaml_ng::from_str(
&self
.read_recipes(map_in.recipes.as_deref().unwrap_or("default"))
.context("Failed read recipe file")?,
diff --git a/server/editor/Cargo.toml b/server/editor/Cargo.toml
index 80b939fe..fb144215 100644
--- a/server/editor/Cargo.toml
+++ b/server/editor/Cargo.toml
@@ -17,7 +17,7 @@ rustls = { version = "0.23.31", features = ["ring"] }
clap = { version = "4.5.47", features = ["derive"] }
futures-util = "0.3.31"
shlex = "1.3.0"
-serde_yml = "0.0.12"
+serde_yaml_ng = "0.10.0"
hurrycurry-protocol = { path = "../protocol" }
hurrycurry-game-core = { path = "../game-core", features = ["sync-network"] }
diff --git a/server/editor/src/save.rs b/server/editor/src/save.rs
index c8ff350a..43a2fe93 100644
--- a/server/editor/src/save.rs
+++ b/server/editor/src/save.rs
@@ -72,11 +72,11 @@ pub fn export_state(state: &State) -> String {
customer_spawn: '!',
score_baseline: 200,
};
- serde_yml::to_string(&decl).unwrap()
+ serde_yaml_ng::to_string(&decl).unwrap()
}
pub fn import_state(state: &mut State, s: &str) -> Result<()> {
- let decl: MapDecl = serde_yml::from_str(s)?;
+ let decl: MapDecl = serde_yaml_ng::from_str(s)?;
let name_to_tile = HashMap::<_, _, RandomState>::from_iter(
TILES