#led-matrix #rpi #raspberry-pi #rgb-led

sys rpi-led-matrix-sys

system library for the rpi-rgb-led-matrix C++ library

4 releases

0.2.1 Jan 5, 2022
0.2.0 Jan 5, 2022
0.1.4 Dec 5, 2021

#18 in #rpi


Used in rpi-led-matrix

GPL-3.0 license

1MB
4K SLoC

C++ 3.5K SLoC // 0.1% comments Rust 271 SLoC // 0.0% comments C 178 SLoC // 0.3% comments

rpi-led-matrix-sys

This crate provides direct, low-level bindings to the C++ library rpi-rgb-led-matrix.

Documentation

Safe Rust Bindings

The rpi-led-matrix crate builds safe rust bindings on top of this crate and is the recommended way to interact with rpi-rgb-led-matrix


lib.rs:

Rust bindings into the C++ library rpi-rgb-led-matrix.

Features

c-stubs

Instead of linking to the C++ library, we make stub C functions ourselves with the same signature to enable limited testing on non-raspberry pi computers.

By default, we link dynamically to libstdc++ as the underlying C++ library requires access to the C++ standard library. However, sometimes people want to statically link so everything is bundled in a single binary. Enabling this feature changes our build behavior to statically link to libstdc++.

libstdc++.a must be "visible" to rustc when compiling. This means it is in the global linker search path, or you've passed it in manually, like:

RUSTFLAGS="-L /PATH/TO/LIBSTDC++/DIR/" cargo build --features="stdcpp-static-link"

Dependencies