linux-wire is a minimal Linux-native I2C abstraction that mirrors Arduino's Wire API. It ships a tiny C shim over /dev/i2c-* plus a TwoWire C++ class so Arduino-style sketches can run on Raspberry Pi-class systems without heavyweight dependencies.
cmake -S . -B build -DBUILD_TESTING=ON
cmake --build build
ctest --test-dir build --output-on-failureUse cmake --install build to install headers and the static library; downstream CMake projects can simply find_package(linux_wire CONFIG REQUIRED) and link against linux_wire::linux_wire.
Example binaries (i2c_scanner, master_reader, master_writer, master_multiplier) live under build/ after compiling.
- Docs index – architecture overview, API examples, CI info
- API reference – detailed class and method documentation
- Testing guide – running mock-based unit tests and suggested hardware validation steps
- Arduino companion – ready-made Nano sketch for loopback testing
GPL-3.0-or-later. See LICENSE.