Reference documentation for libCEC's public APIs, one best-of-breed generator
per binding, assembled into a single site and published to GitHub Pages by
.github/workflows/docs.yml on every push to
master that touches an API surface.
| Binding | Tool | Source | Config |
|---|---|---|---|
| C / C++ | Doxygen | include/*.h |
doxygen/Doxyfile |
| .NET | DocFX | src/dotnetlib/cs/** |
dotnet/docfx.json |
| Node.js | TypeDoc | src/nodejs/index.d.ts |
nodejs/typedoc.json |
| Python | Sphinx | SWIG cec module from src/libcec/libcec.i |
python/conf.py |
| Rust | rustdoc | src/rust/src/** |
the crate's own doc comments |
The landing page links the five together. All bindings
wrap the same core engine (ICECAdapter + the protocol types in
include/cectypes.h), so the C/C++ reference documents the concepts in the most
depth and the others mirror them.
- Doxygen reads the public headers.
cec.his already richly documented;EXTRACT_ALLalso surfaces the (comment-free) C declarations incecc.h. The CI job injectsPROJECT_NUMBER/OUTPUT_DIRECTORYon stdin and drops the doxygen-awesome theme next to theDoxyfile. - DocFX compiles a docs-only
dotnet/docs.csprojthat globs the samecs/sources as the real binding (which is generated from a.csproj.inby cmake) and extracts their XML doc comments. This keeps the docs build independent of the cmake configure step. - TypeDoc renders
src/nodejs/index.d.ts— hand-authored TypeScript typings for the addon that are also shipped to consumers via thetypesfield inpackage.json. - Sphinx documents the SWIG-generated
cecmodule. The CI job runsswig -python -doxygen, which carriescec.h's Doxygen comments intocec.pydocstrings, then autodoc reads them with the native_cecextension mocked — so no full libCEC compile is needed just to build the docs. - rustdoc reads the crate's own doc comments; there is no config file
because the crate is the input. It needs no libCEC installed — documenting a
crate never links it, and
build.rsonly emits link flags. The CI job runs withRUSTDOCFLAGS=-D warnings, so a broken intra-doc link fails the build. rustdoc writes its output underlibcec/and generates no root index for a single crate, sorust/index.htmlis copied in as a redirect.
Each generator runs independently; you only need the tool for the binding you
care about. Output is git-ignored (see .gitignore).
# C / C++ (needs: doxygen, graphviz)
cd docs/api/doxygen
git clone --depth 1 -b v2.3.4 https://github.com/jothepro/doxygen-awesome-css /tmp/dac
cp /tmp/dac/doxygen-awesome*.css .
doxygen Doxyfile # -> docs/api/doxygen/html/
# .NET (needs: .NET SDK 8+, `dotnet tool install -g docfx`)
cd docs/api/dotnet
docfx metadata docfx.json && docfx build docfx.json # -> _site/
# Node.js (needs: Node 18+)
cd docs/api/nodejs
npm install --no-save typedoc typescript @types/node
npx typedoc --options typedoc.json # -> _site/
# Python (needs: swig 4+, python, pip install -r python/requirements.txt)
mkdir -p pygen
swig -c++ -python -doxygen -Iinclude -Isrc/libcec \
-DCEC_LIB_VERSION_MAJOR=8 -outdir pygen -o pygen/cec_wrap.cxx src/libcec/libcec.i
CEC_PY_MODULE_DIR=$PWD/pygen sphinx-build -b html docs/api/python site/python
# Rust (needs: a Rust toolchain; no libCEC required)
cd src/rust
cargo doc --no-deps --open # -> target/doc/libcec/The workflow deploys to GitHub Pages via actions/deploy-pages. One-time
setup: in the repository's Settings → Pages, set Source to GitHub
Actions. After that, every qualifying push republishes automatically; it can
also be triggered manually from the Actions tab (workflow_dispatch).