From 0b44214b0afd752f1a5ae7360737627004fc3c52 Mon Sep 17 00:00:00 2001 From: Sami Salonen Date: Sat, 29 Aug 2026 20:13:11 +0300 Subject: [PATCH 1/2] docs: deprecate libcec-sys in favor of official libcec crate --- CONTRIBUTING.md | 19 +++++++++++-------- Cargo.toml | 4 ++-- README.md | 14 +++++++++++++- 3 files changed, 26 insertions(+), 11 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4b360921..1149fb7a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,20 +1,23 @@ # Contribution guidelines -First off, thank you for considering contributing to libcec-sys. +> **This repository is deprecated.** New applications should use the official +> [Pulse-Eight `libcec` crate](https://crates.io/crates/libcec), with Rust +> sources in [Pulse-Eight/libcec](https://github.com/Pulse-Eight/libcec/tree/master/src/rust). +> It replaces both the safe wrapper and raw FFI needs for libCEC 8+. +> Please direct Rust binding contributions and issues upstream to +> [Pulse-Eight/libcec](https://github.com/Pulse-Eight/libcec). -If your contribution is not straightforward, please first discuss the change you -wish to make by creating a new issue before making the change. +This document is retained for historical releases of `libcec-sys`. ## Reporting issues -Before reporting an issue on the -[issue tracker](https://github.com/ssalonen/libcec-sys/issues), -please check that it has not already been reported by searching for some related -keywords. +Please report Rust binding issues upstream at +[Pulse-Eight/libcec issues](https://github.com/Pulse-Eight/libcec/issues). ## Pull requests -Try to do one pull request per change. +Please contribute Rust binding changes upstream to +[Pulse-Eight/libcec](https://github.com/Pulse-Eight/libcec). ### Updating the changelog diff --git a/Cargo.toml b/Cargo.toml index 61a11db6..101e590b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,7 @@ version = "9.0.4-dev" authors = ['Sami Salonen'] edition = '2021' license = 'GPL-2.0' -description = 'FFI bindings to libcec' +description = 'Deprecated FFI bindings to libcec; use the official libcec crate for libCEC 8+' documentation = 'https://docs.rs/libcec-sys' readme = 'README.md' include = [ @@ -45,7 +45,7 @@ vendored = [] static = [] [badges.maintenance] -status = 'passively-maintained' +status = 'deprecated' [lints.rust] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(abi4)', 'cfg(abi5)', 'cfg(abi6)', 'cfg(abi7)'] } diff --git a/README.md b/README.md index e25f50d2..fcdc5bf8 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,14 @@ [![Docs.rs](https://docs.rs/libcec-sys/badge.svg)](https://docs.rs/libcec-sys) [![CI](https://github.com/ssalonen/libcec-sys/workflows/Continuous%20Integration/badge.svg)](https://github.com/ssalonen/libcec-sys/actions) +> [!WARNING] +> **This crate is deprecated.** New applications should use the official +> [Pulse-Eight `libcec` crate](https://crates.io/crates/libcec), whose Rust +> sources live in [Pulse-Eight/libcec](https://github.com/Pulse-Eight/libcec/tree/master/src/rust). +> It replaces both the safe wrapper and raw FFI needs for libCEC 8+. +> Please direct Rust binding contributions and issues upstream to +> [Pulse-Eight/libcec](https://github.com/Pulse-Eight/libcec). + FFI bindings for the libcec ## Finding libcec @@ -14,7 +22,7 @@ As a fallback, static pre-built `libcec` (v7.1.1) is downloaded from [ssalonen/l There are `vendored` and `static` feature to allow more explicit control. There are also `LIBCEC_VENDORED` and `LIBCEC_STATIC` environment variables, just set them to value `1`. -The crate is tested mainly with Linux and Windows but could work with other platforms as well. PRs welcome. +The crate is tested mainly with Linux and Windows but could work with other platforms as well. ### Linux (general) @@ -77,6 +85,10 @@ This repo contains content distributed under three different licenses. ## Contribution +This repository is deprecated. Please file Rust binding issues and contribute +to the official [Pulse-Eight/libcec](https://github.com/Pulse-Eight/libcec) +repository instead. + Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions. From 25525c1cd1f169d84a6d871a6c9d3094e19c49ca Mon Sep 17 00:00:00 2001 From: Sami Salonen Date: Sat, 29 Aug 2026 21:33:26 +0300 Subject: [PATCH 2/2] fix: satisfy current clippy lint --- build/build.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build/build.rs b/build/build.rs index 9621729a..a665e28a 100644 --- a/build/build.rs +++ b/build/build.rs @@ -80,7 +80,7 @@ fn prepare_vendored_build(dst: &Path) { let mut build_info_file = OpenOptions::new() .write(true) .open(&set_build_info_path) - .unwrap_or_else(|_| panic!("Error opening {}", &set_build_info_path.to_string_lossy())); + .unwrap_or_else(|_| panic!("Error opening {}", set_build_info_path.to_string_lossy())); build_info_file .set_len(0) .expect("Error truncacting SetBuildInfo.cmake"); @@ -89,7 +89,7 @@ fn prepare_vendored_build(dst: &Path) { b" set(LIB_INFO \"\")", ) - .unwrap_or_else(|_| panic!("Error writing {}", &set_build_info_path.to_string_lossy())); + .unwrap_or_else(|_| panic!("Error writing {}", set_build_info_path.to_string_lossy())); #[cfg(target_os = "windows")] prepare_windows_libcec_cmake_opts(&dst_src); @@ -404,7 +404,7 @@ pub fn fetch_static_libcec>(path: P, debug_build: bool) { let response = reqwest::blocking::get(&url) .unwrap_or_else(|_| panic!("failed to download libcec from {url}")); if response.status() == StatusCode::NOT_FOUND { - panic!("Could not find pre-built static libcec for {}", &target); + panic!("Could not find pre-built static libcec for {}", target); } response .error_for_status_ref()