Upgrade dependencies and refactor serialization in build.rs

- Updated `bincode` to version 2.0.1, modifying serialization calls to use the new API with `serde` support.
- Added new dependencies in `Cargo.lock`, including `alloca`, `atomic-waker`, and `aws-lc-rs`, ensuring compatibility with the latest features.
- Refactored file creation and serialization logic in `build.rs` for improved clarity and performance.
- Updated various dependencies in `Cargo.toml` to their latest versions, enhancing overall project stability and functionality.
This commit is contained in:
Joe 2026-02-06 18:57:29 -06:00
parent 0a4496a6c9
commit 71ea25fe0e
47 changed files with 933 additions and 517 deletions

View file

@ -99,11 +99,19 @@ fn main() -> Result<(), anyhow::Error> {
}),
});
let template_file = File::create(Path::new(&out_dir).join("templates.bincode"))?;
let plugin_file = File::create(Path::new(&out_dir).join("plugin.bincode"))?;
let mut template_file = File::create(Path::new(&out_dir).join("templates.bincode"))?;
let mut plugin_file = File::create(Path::new(&out_dir).join("plugin.bincode"))?;
bincode::serialize_into(plugin_file, &plugin_snapshot)?;
bincode::serialize_into(template_file, &template_snapshot)?;
bincode::serde::encode_into_std_write(
&plugin_snapshot,
&mut plugin_file,
bincode::config::standard(),
)?;
bincode::serde::encode_into_std_write(
&template_snapshot,
&mut template_file,
bincode::config::standard(),
)?;
println!("cargo:rerun-if-changed=build/windows/rojo-manifest.rc");
println!("cargo:rerun-if-changed=build/windows/rojo.manifest");