# Arduino interview: Larry Bank on portable C/C++ libraries, Linux gpiod wrappers and FOSS funding

> **Key takeaway:** Bank builds Arduino libraries as portable C worker functions wrapped in C++ classes, with a separate wrapper file mapping pinMode/digitalWrite/digitalRead onto Linux gpiod so the same source runs on AVR boards and Linux hosts.

**Published:** 2026-12-04T12:17:05+00:00 
**Source:** Arduino Official Blog 
**Category:** open-hardware 
**Canonical URL:** https://fosswire.org/news/arduino-interview-larry-bank-on-portable-cc-libraries-linux 

## Summary
Arduino has published a second interview with Larry Bank, an open-source developer known for code optimization work and contributions to the Arduino library ecosystem. The conversation focuses on how he structures libraries that must run across many Arduino boards and architectures, how he approaches performance work, and how he funds and sustains that maintenance effort. Bank describes starting from C worker functions and layering a C++ class on top to expose an Arduino-style API, keeping the core source identical across targets.

The portability mechanism he details is a separate source file of wrapper functions that mimic the Arduino API on non-Arduino targets; for Linux GPIO he implemented pinMode, digitalWrite and digitalRead on top of the Linux gpiod interface. On performance, he argues that the common warning against premature optimization is misapplied, and says his imaging and video codecs were tuned using Apple's Xcode profiler, which reports line-level timing, by running thousands of iterations on a MacBook. He also discusses FOSS sustainability, citing GitHub Sponsors monthly donations, one-off PayPal contributions, grants from the Nlnet Foundation, and limited-exclusivity licensing deals, and floats tiered GitHub support and micropayments as future models.

## How Bank structures portable Arduino libraries
- **Layering:** Bank writes C worker functions first and then wraps them in a C++ class that presents a high-level, Arduino-style API; for simpler libraries he writes C++ directly from the start.
- **Linux portability shim:** pinMode, digitalWrite and digitalRead are reimplemented as wrappers around the Linux gpiod functions and kept in a separate source file, so the main library source stays byte-identical between Arduino and Linux builds.
- **Profiling workflow:** Because the code is portable, the same libraries compile inside macOS and iOS projects, letting him run thousands of iterations per function under the Xcode profiler, which provides line-level as well as function-level timing.
- **Hardware limits:** He names heavy double-precision floating-point math on an 8-bit AVR microcontroller as a genuine hardware red flag, while advising developers to assume software structure can still be improved and to check what others have achieved on the same chip.
- **Funding channels:** Support comes through GitHub Sponsors monthly donations, ad-hoc PayPal payments, Nlnet Foundation grants, and time-limited exclusivity licenses granted to companies before open release; he proposes tiered GitHub support (priority issue resolution, tutoring/consulting) and micropayments.

## Why it matters
The gpiod wrapper pattern is a practical template for embedded maintainers who want one codebase to serve microcontrollers and Linux single-board computers without forking the library. Bank's account of Nlnet grants, sponsorship tiers and exclusivity licensing also gives a concrete picture of how small embedded library maintainers piece together funding, which matters for anyone depending on Arduino libraries in production hardware.