Re: [RFC PATCH 6/6] contrib/cgit-rs: add a subset of configset wrappers
From: Calvin Wan <hidden>
Date: 2024-09-04 17:30:57
"brian m. carlson" [off-list ref] writes:
On 2024-08-07 at 18:21:31, Josh Steadmon wrote:quoted
diff --git a/contrib/cgit-rs/Cargo.toml b/contrib/cgit-rs/Cargo.toml index 7b55e6f3e1..5768fce9e5 100644 --- a/contrib/cgit-rs/Cargo.toml +++ b/contrib/cgit-rs/Cargo.toml@@ -14,3 +14,4 @@ path = "src/lib.rs" [dependencies] libc = "0.2.155" +home = "0.5.9"Okay, here's where we get to my previous mention of supported platforms. This depends on Rust 1.70, and Debian stable has only 1.63. Trying `cargo build --release` on that version returns this: Downloaded home v0.5.9 Downloaded libc v0.2.155 Downloaded 2 crates (752.3 KB) in 0.17s error: package `home v0.5.9` cannot be built because it requires rustc 1.70.0 or newer, while the currently active rustc version is 1.63.0 My recommended approach here is to support the version in Debian stable, plus the version in Debian oldstable for a year after the new stable comes out, which is what I do. That gives people a year to upgrade if they want to use our code. We _don't_ want to follow the latest-stable-Rust approach because it isn't appropriate that software has a six-week lifespan of support and that isn't going to work for software like Git that people often compile locally on older versions. We also need to be conscious that while Rust upstream provides some binaries for some platforms, many platforms rely on the distro packages because Rust upstream doesn't ship binaries for their target. Thus, simply using rustup is not viable for many targets, which is another reason that latest-stable-Rust won't fly. Debian stable is the version that most projects who have defined lifespans track, so it's also what we should track. According to my recommended approach, that would be 1.63.
After getting rid of the `home` crate, the only other issue we ran into
downgrading the version to 1.63 was with `std::ffi{c_char, c_int}`.
Those were only made available in 1.64 and they are obviously quite
necessary for us to be able to call C functions. Do you know of any
alternatives we can use? I also don't think reinventing the wheel with
our own implementation makes sense in this case, and even if Debian were
to upgrade stable to a higher version today, we would still need to
support oldstable for another year.