Resolves the 13 rows still partial in docs/rewrite/notes/review-rv4- codex.md (details in final-Z5.md): - Escaped config strings are decoded to raw bytes at every OS boundary: Flatpak cwd/argv to D-Bus, screen-file paths, the default config template, GHOSTTY_RESOURCES_DIR/TERMINFO/shell integration/ bindtextdomain consumers, custom shader loading, list-themes hyperlinks. - osbytes escapes literal U+FDD0 on non-Unix too (bijective everywhere); the GTK paste dialog only decodes text that was actually encoded. - shadertoy: whole-array uses of iChannelTime rebuild a plain float[4] from the std140-padded members (naga-validated, MSL offsets checked). - libghostty-vt: the OSC parser holds caller-allocated storage inline and command payloads borrow from it, so ghostty_osc_end performs no global allocations (verified from Rust and C). - crash: aarch64 Linux minidump context fixed; macOS fatal signals record siginfo, registers and a fault-safe stack walk. - tripwire: selectionString map allocation-failure cleanup test ported. - libghostty-vt emits the versioned soname libghostty-vt.so.0 at build time (no patchelf needed at install). Test Plan: - cargo test --workspace (3342 passed) - just check-macos; just check-macos x86_64-apple-darwin; just check-windows; just check-wasm - cargo check --target aarch64-unknown-linux-gnu -p ghostty-crash
30 lines
1.1 KiB
Rust
30 lines
1.1 KiB
Rust
//! The shared library must carry the versioned soname `libghostty-vt.so.<major>`
|
|
//! straight from the build (Zig sets `.version` on the shared library), not
|
|
//! via a post-install `patchelf` step.
|
|
#![cfg(target_os = "linux")]
|
|
#![allow(clippy::unwrap_used)]
|
|
|
|
mod common;
|
|
|
|
use std::process::Command;
|
|
|
|
#[test]
|
|
fn shared_library_has_versioned_soname() {
|
|
let lib = common::install_native_lib();
|
|
let so = lib.join("libghostty-vt.so");
|
|
let Ok(out) = Command::new("readelf").arg("-d").arg(&so).output() else {
|
|
eprintln!("readelf not available; skipping");
|
|
return;
|
|
};
|
|
let text = String::from_utf8_lossy(&out.stdout);
|
|
let want = format!("[libghostty-vt.so.{}]", common::VT_MAJOR);
|
|
assert!(
|
|
text.lines()
|
|
.any(|l| l.contains("SONAME") && l.contains(&want)),
|
|
"expected SONAME {want}:\n{text}"
|
|
);
|
|
// build.rs is the single source of the version (install-lib.sh reads it).
|
|
let build_rs = std::fs::read_to_string(common::manifest_dir().join("build.rs")).unwrap();
|
|
assert!(build_rs.contains(&format!("const VT_VERSION: &str = \"{}.", common::VT_MAJOR)));
|
|
}
|