#libcec #cec #hdmi

sys libcec-sys

FFI bindings to libcec

12 releases (stable)

3.0.0 Feb 9, 2022
2.0.1 Dec 30, 2021
1.1.1 Dec 5, 2021
1.1.0 Aug 2, 2021
0.1.0 Oct 30, 2019
Download history 6/week @ 2022-01-14 6/week @ 2022-01-21 7/week @ 2022-01-28 130/week @ 2022-02-04 11/week @ 2022-02-11 18/week @ 2022-02-18 9/week @ 2022-02-25 4/week @ 2022-03-04 28/week @ 2022-03-11 51/week @ 2022-03-18 6/week @ 2022-03-25 3/week @ 2022-04-01 8/week @ 2022-04-08 3/week @ 2022-04-15 17/week @ 2022-04-22 81/week @ 2022-04-29

109 downloads per month
Used in 3 crates (via cec-rs)

GPL-2.0 license

49K SLoC

.NET Resource 19K SLoC // 0.0% comments C++ 14K SLoC // 0.1% comments C# 8K SLoC // 0.3% comments Rust 4K SLoC // 0.0% comments Python 1.5K SLoC // 0.1% comments Batch 565 SLoC C 441 SLoC // 0.1% comments Shell 243 SLoC // 0.1% comments Visual Studio Project 212 SLoC SWIG 128 SLoC // 0.1% comments OCaml 112 SLoC Visual Studio Solution 70 SLoC


Crates.io Docs.rs CI

FFI bindings for the libcec

Linking to system libcec

This crate works with libcec v4.x, v5.x and v6.x (latest version as time of writing). During the build we try to find libcec system library installation using pkg-config and compilation using default C compiler (cc crate). As a fallback, vendored libcec (v4.x) is used during the build.

Alternatively, one can the decide to skip logic above and force the use of vendored sources by enabling vendored feature.

For most convenient build process, it is recommended to install pkg-config, libcec-dev (headers and pkg-config configuration), libcec6 (dynamic library), p8-platform-dev and p8-platform from your package distribution before installing this crate. Exact package names vary between distributions and package managers.

The crate is tested mainly with linux but could work with other platforms as well. PRs welcome.


Licensed under GNU General Public License version 2, (LICENSE or https://opensource.org/licenses/GPL-2.0)

The CI/CD setup in .github/ is based on rust-github/template, and therefore licensed under either of

at your option.


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.



cargo release --skip-publish and let the github CD pipeline do the rest.