About Pigweed#

Pigweed AI summary: Pigweed aims to make embedded software development efficient and enjoyable for projects of all sizes. The platform provides a comprehensive set of libraries for embedded development, a hermetic and replicable development environment, a system for building, testing, and linting projects, and a full framework for new projects. Pigweed enables developers to use modern C++ and software development best practices without compromising performance or increasing memory use. While Pigweed is still in its early stages, many individual modules are stable and running on shipped

Why Build Pigweed?#

Pigweed AI summary: Pigweed aims to make embedded software development more efficient and enjoyable, from small Arduino projects to large commercial products. Traditional embedded development is complicated and requires developers to use specific hardware and limited coding options. Pigweed offers a flexible platform that allows developers to adopt as much or as little of its framework as needed for their project, unlike monolithic frameworks that may not work for existing projects or specific needs. The goal is to support successful embedded developers at every scale.

Our goal is to make embedded software development efficient, robust, and heck, even delightful, for projects ranging from weekend Arduino experiements to commercial products selling in the millions.

Embedded software development is notoriously arcane. Developers often have to track down vendor toolchains specific to the hardware they’re targeting, write their code against hardware-specfic SDKs/HALs, and limit themselves to a small subset of C. Project teams are on their own to figure out how to set up a build system, automated testing, serial communication, and many other embedded project fundamentals. This is error prone and takes effort away from developing the actual product!

There are solutions on the market that promise to solve all of these problems with a monolithic framework—just write your code against the framework and use hardware the framework supports, and you get an efficient embedded development environment. But this approach doesn’t work well for existing projects that weren’t built on the framework from the beginning or for projects that have specific needs the framework wasn’t designed for. We know from experience that this approach alone doesn’t meet our goal.

So we have set out to build a platform that supports successful embedded developers at every scale by allowing them to adopt as much or as little of what Pigweed provides as they need, in the way that works best for their project.

How Pigweed Works#

Pigweed AI summary: Pigweed offers four foundational pillars for embedded development, including a comprehensive set of libraries, a hermetic and replicable development environment, a system for building, testing, and linting projects, and a full framework for new projects. The libraries provided by Pigweed allow for modern C++ and software development best practices without compromising performance or increasing memory use. Pigweed also provides a sealed development environment for Linux, Mac, and Windows systems, and integrates seamlessly with build systems like GN, CMake,

Pigweed provides four foundational pillars to support your embedded development:

Embedded Development Libraries#

Pigweed AI summary: Pigweed offers libraries for embedded development that allow the use of modern C++ and software development best practices without compromising performance or increasing memory use. These libraries include modules for strings, time, assertions, logging, serial communication, remote procedure calls, and more. They are designed to work on both host machines and target devices through portable writing or the facade/backend pattern. This allows for transparent code running on both machines.

Pigweed enables you to use modern C++ and software development best practices in your embedded project without compromising performance or increasing memory use compared to conventional embedded C.

We provide libraries (modules) for strings, time, assertions, logging, serial communication, remote procedure calls (RPC), and much more.

These modules are designed to work both on your host machine and on a wide variety of target devices. We achieve this by writing them in an inherently portable way, or through the facade/backend pattern. As a result, you can write most or all of your code to run transparently on your host machine and targets.

Development Environment#

Pigweed AI summary: Pigweed simplifies the management of toolchains, build systems, and other software required for a project by providing them out of the box for Linux, Mac, and Windows systems in a sealed environment that does not affect the rest of the system. It is easy to get new developers started by cloning the project repository and activating the Pigweed environment.

Managing toolchains, build systems, and other software needed for a project is complex. Pigweed provides all of this out of the box for Linux, Mac, and Windows systems in a sealed environment that leaves the rest of your system untouched. Getting new developers started is as simple as cloning your project repository and activating the Pigweed environment.

Build System#

Pigweed AI summary: Pigweed modules are designed to work seamlessly with GN, but they also offer support for CMake and Bazel. Additionally, Pigweed provides a build system that can be easily integrated into new projects.

Pigweed modules are built to integrate seamlessly into projects using GN. We are rapidly expanding our good support for CMake and nascent support for Bazel so you can use your build system of choice. For new projects, Pigweed provides a build system you can integrate your own code into that works out of the box.

Full Framework (coming in 2022)#

Pigweed AI summary: Pigweed is developing a fully-integrated solution with an opinionated project structure called the Pigweed framework, which will offer everything Pigweed has to offer. The framework is set to be released in 2022, and the company invites collaboration and discussion on Discord.

For those who want a fully-integrated solution that provides everything Pigweed has to offer with an opinionated project structure, we are working diligently on a Pigweed framework. Stay tuned for more news to come! In the meantime, we invite you to discuss this and collaborate with us on Discord.

Is Pigweed Right for My Project?#

Pigweed AI summary: Pigweed is a project that is still in its early stages and may not be suitable for all projects. Some modules are stable and can be used, while others are in active development and may have unstable APIs. Setting up new projects with Pigweed is currently difficult, but the community is working to address this. Joining the Pigweed community on Discord can provide help and support.

Pigweed is still in its early stages, and while we have ambitious plans for it, Pigweed might not be the right fit for your project today. Here are some things to keep in mind:

  • Many individual modules are stable and are running on shipped devices today. If any of those modules meet your needs, you should feel safe bringing them into your project.

  • Some modules are in very early and active stages of development. They likely have unstable APIs and may not work on all supported targets. If this is the case, it will be indicated in the module’s documentation. If you’re interested in contributing to the development of one of these modules, we encourage you to experiment with them. Otherwise they aren’t ready for use in most projects.

  • Setting up new projects to use Pigweed is currently not very easy, but we are working to address that. In the meantime, join the Pigweed community on Discord to get help.

Supported language versions#

Pigweed AI summary: The Pigweed code requires C++17, but some modules work with C++14. All Pigweed code is compatible with C++20, and GN toolchains are defined for building with C++14 and C++20. Bazel allows configuring the C++ standard version using the --cxxopt flag. Pigweed officially supports Python 3.8, 3.9, 3.10, and 3.11.

C++#

Pigweed AI summary: Pigweed code mostly requires C++17, but some modules work with C++14 and all code is compatible with C++20. GN toolchains are available for building with C++14 and C++20, and for Bazel, the C++ standard version can be configured using the --cxxopt flag.

Most Pigweed code requires C++17, but a few modules, such as pw_kvs and pw_tokenizer, work with C++14. All Pigweed code is compatible with C++20. Pigweed defines GN toolchains for building with C++14 and C++20; see host target documentation for more information. For Bazel, the C++ standard version can be configured using the –cxxopt flag.

Python#

Pigweed AI summary: Pigweed supports Python versions 3.8, 3.9, 3.10, and 3.11.

Pigweed officially supports Python 3.8, 3.9, 3.10, and 3.11.