Repository navigation
Conversation
serde_yaml is archived and pulls in unsafe-libyaml, which RUSTSEC-2024-0449 reports as unmaintained (cloudflare#1058). serde-saphyr is safe Rust, maintained, and the replacement the advisory suggests. It is used in the same three places: ServerConf::from_yaml, ServerConf::to_yaml and the modify_response example. The one test that inspected a serde_yaml::Value now checks the written yaml and that it reads back as the same configuration. Refs cloudflare#779 Refs cloudflare#1058 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…phyr serde-saphyr uses let chains and declares rust-version 1.89, so the job that checked 1.85.0 cannot build pingora-core any more. The oldest toolchain in the matrix becomes 1.89.0 (the same exclusions as before), and pingora-cache, which declares a rust-version and depends on pingora-core, declares 1.89 as well. This commit is separate so that it can be dropped or reworked if the project prefers another way to keep an older MSRV. Refs cloudflare#779 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This was referenced Nov 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #779 (replace the deprecated
serde_yaml; the maintainers' answer there was that they would). Fixes #1058 (RUSTSEC-2024-0449).Why
serde_yamlis archived, and it pulls inunsafe-libyaml, which the advisory RUSTSEC-2024-0449 reports as unmaintained. It reaches every downstream project throughpingora-core, so each of them has to ignore the advisory (#1058).serde-saphyris safe Rust, maintained, and the replacement the advisory suggests.What
pingora-core:ServerConf::from_yamlandServerConf::to_yamluseserde_saphyr::from_str/to_string. The API ofpingora-coredoes not change.pingora-proxy: themodify_responseexample (and the dev-dependency) usesserde_saphyr::to_string.serde_yaml::Value(test_working_directory_deserializes_from_yaml_string) now checks the written yaml and that it reads back as the same configuration.serde_yamlandunsafe-libyamlare gone from the dependency tree ofpingora-coreandpingora-proxy(cargo tree -i unsafe-libyamlfinds nothing).The MSRV (please read)
serde-saphyruses let chains and declaresrust-version = "1.89"(its releases from 1.2.0 on; 1.1.0 declares nothing but already fails on 1.85 witherror[E0658]: let expressions in this position are unstable). The job that checks the oldest toolchain, 1.85.0, therefore cannot buildpingora-corewith it. This was the question raised in #779 ("it requires rust 1.89").I kept that change in its own commit, so it is easy to drop or rework: the oldest toolchain in
.github/workflows/build.ymlbecomes1.89.0(same exclusions as before), andpingora-cache, which declares arust-versionand depends onpingora-core, declares1.89. I did not touchclippy.toml(msrv = "1.85"), because changing it can enable new lints, which is a separate decision. If you prefer to keep 1.85, the alternative is a maintained fork of the same libyaml port (for exampleserde_norway), which keeps the C-translated parser and may build on 1.85; I did not try it. Tell me which way you prefer and I will rework the PR.Checked
cargo test -p pingora-core --lib server::configuration: 14 passed, on stable (1.99.1, Linux).cargo check -p pingora-core -p pingora-proxy -p pingora-cache -p pingora-load-balancing --all-targetsandcargo check -p pingora-proxy --example modify_responseon 1.89.0 and on stable.cargo fmt --all -- --checkis clean.cargo check --workspace(the BoringSSL crates need libclang, which my machine lacks), the TLS-backend tests, the 1.89.0 test leg of CI.🤖 Generated with Claude Code