1*61c4878aSAndroid Build Coastguard Worker.. _docs-overview: 2*61c4878aSAndroid Build Coastguard Worker 3*61c4878aSAndroid Build Coastguard Worker======== 4*61c4878aSAndroid Build Coastguard WorkerOverview 5*61c4878aSAndroid Build Coastguard Worker======== 6*61c4878aSAndroid Build Coastguard Worker 7*61c4878aSAndroid Build Coastguard WorkerWhy Build Pigweed? 8*61c4878aSAndroid Build Coastguard Worker================== 9*61c4878aSAndroid Build Coastguard Worker.. note:: 10*61c4878aSAndroid Build Coastguard Worker 11*61c4878aSAndroid Build Coastguard Worker See our :ref:`docs-mission` for more details. 12*61c4878aSAndroid Build Coastguard Worker 13*61c4878aSAndroid Build Coastguard WorkerOur goal is to make embedded software development efficient, robust, and 14*61c4878aSAndroid Build Coastguard Workerheck, even delightful, for projects ranging from weekend Arduino experiements 15*61c4878aSAndroid Build Coastguard Workerto commercial products selling in the millions. 16*61c4878aSAndroid Build Coastguard Worker 17*61c4878aSAndroid Build Coastguard WorkerEmbedded software development is notoriously arcane. Developers often have to 18*61c4878aSAndroid Build Coastguard Workertrack down vendor toolchains specific to the hardware they're targeting, write 19*61c4878aSAndroid Build Coastguard Workertheir code against hardware-specfic SDKs/HALs, and limit themselves to a small 20*61c4878aSAndroid Build Coastguard Workersubset of C. Project teams are on their own to figure out how to set up a build 21*61c4878aSAndroid Build Coastguard Workersystem, automated testing, serial communication, and many other embedded 22*61c4878aSAndroid Build Coastguard Workerproject fundamentals. This is error prone and takes effort away from developing 23*61c4878aSAndroid Build Coastguard Workerthe actual product! 24*61c4878aSAndroid Build Coastguard Worker 25*61c4878aSAndroid Build Coastguard WorkerThere are solutions on the market that promise to solve all of these problems 26*61c4878aSAndroid Build Coastguard Workerwith a monolithic framework—just write your code against the framework and use 27*61c4878aSAndroid Build Coastguard Workerhardware the framework supports, and you get an efficient embedded development 28*61c4878aSAndroid Build Coastguard Workerenvironment. But this approach doesn't work well for existing projects that 29*61c4878aSAndroid Build Coastguard Workerweren't built on the framework from the beginning or for projects that have 30*61c4878aSAndroid Build Coastguard Workerspecific needs the framework wasn't designed for. We know from experience that 31*61c4878aSAndroid Build Coastguard Workerthis approach alone doesn't meet our goal. 32*61c4878aSAndroid Build Coastguard Worker 33*61c4878aSAndroid Build Coastguard WorkerSo we have set out to build a platform that supports successful embedded 34*61c4878aSAndroid Build Coastguard Workerdevelopers at every scale by allowing them to adopt as much or as little of 35*61c4878aSAndroid Build Coastguard Workerwhat Pigweed provides as they need, in the way that works best for their 36*61c4878aSAndroid Build Coastguard Workerproject. 37*61c4878aSAndroid Build Coastguard Worker 38*61c4878aSAndroid Build Coastguard WorkerHow Pigweed Works 39*61c4878aSAndroid Build Coastguard Worker================= 40*61c4878aSAndroid Build Coastguard WorkerPigweed provides four foundational pillars to support your embedded development: 41*61c4878aSAndroid Build Coastguard Worker 42*61c4878aSAndroid Build Coastguard Worker* :ref:`A comprehensive set of libraries for embedded development<docs-concepts-embedded-development-libraries>` 43*61c4878aSAndroid Build Coastguard Worker* :ref:`A hermetic and replicable development environment<docs-concepts-development-environment>` 44*61c4878aSAndroid Build Coastguard Worker* :ref:`A system for building, testing, and linting your project<docs-concepts-build-system>` 45*61c4878aSAndroid Build Coastguard Worker* :ref:`A full framework for new projects that want a turn-key solution<docs-concepts-full-framework>` 46*61c4878aSAndroid Build Coastguard Worker 47*61c4878aSAndroid Build Coastguard Worker.. _docs-concepts-embedded-development-libraries: 48*61c4878aSAndroid Build Coastguard Worker 49*61c4878aSAndroid Build Coastguard WorkerEmbedded Development Libraries 50*61c4878aSAndroid Build Coastguard Worker------------------------------ 51*61c4878aSAndroid Build Coastguard WorkerPigweed enables you to use modern C++ and software development best practices in 52*61c4878aSAndroid Build Coastguard Workeryour embedded project without compromising performance or increasing memory use 53*61c4878aSAndroid Build Coastguard Workercompared to conventional embedded C. 54*61c4878aSAndroid Build Coastguard Worker 55*61c4878aSAndroid Build Coastguard WorkerWe provide libraries (:ref:`modules <docs-glossary-module>`) for 56*61c4878aSAndroid Build Coastguard Worker:ref:`strings<module-pw_string>`, :ref:`time<module-pw_chrono>`, 57*61c4878aSAndroid Build Coastguard Worker:ref:`assertions<module-pw_assert>`, :ref:`logging<module-pw_log>`, 58*61c4878aSAndroid Build Coastguard Worker:ref:`serial communication<module-pw_spi>`, :ref:`remote procedure calls (RPC) 59*61c4878aSAndroid Build Coastguard Worker<module-pw_rpc>`, and :ref:`much more<docs-module-guides>`. 60*61c4878aSAndroid Build Coastguard Worker 61*61c4878aSAndroid Build Coastguard WorkerThese modules are designed to work both on your host machine and on a wide 62*61c4878aSAndroid Build Coastguard Workervariety of target devices. We achieve this by writing them in an inherently 63*61c4878aSAndroid Build Coastguard Workerportable way, or through the facade/backend pattern. As a result, you can write 64*61c4878aSAndroid Build Coastguard Workermost or all of your code to run transparently on your host machine and targets. 65*61c4878aSAndroid Build Coastguard Worker 66*61c4878aSAndroid Build Coastguard Worker.. _docs-concepts-development-environment: 67*61c4878aSAndroid Build Coastguard Worker 68*61c4878aSAndroid Build Coastguard WorkerDevelopment Environment 69*61c4878aSAndroid Build Coastguard Worker----------------------- 70*61c4878aSAndroid Build Coastguard WorkerManaging toolchains, build systems, and other software needed for a project is 71*61c4878aSAndroid Build Coastguard Workercomplex. Pigweed provides all of this out of the box for Linux, Mac, and 72*61c4878aSAndroid Build Coastguard WorkerWindows systems in a sealed environment that leaves the rest of your system 73*61c4878aSAndroid Build Coastguard Workeruntouched. Getting new developers started is as simple as cloning your project 74*61c4878aSAndroid Build Coastguard Workerrepository and activating the Pigweed environment. 75*61c4878aSAndroid Build Coastguard Worker 76*61c4878aSAndroid Build Coastguard Worker.. _docs-concepts-build-system: 77*61c4878aSAndroid Build Coastguard Worker 78*61c4878aSAndroid Build Coastguard WorkerBuild System 79*61c4878aSAndroid Build Coastguard Worker------------ 80*61c4878aSAndroid Build Coastguard WorkerPigweed modules are built to integrate seamlessly into projects using GN. We 81*61c4878aSAndroid Build Coastguard Workerare rapidly expanding our good support for CMake and nascent support for Bazel 82*61c4878aSAndroid Build Coastguard Workerso you can use your build system of choice. For new projects, Pigweed provides a 83*61c4878aSAndroid Build Coastguard Workerbuild system you can integrate your own code into that works out of the box. 84*61c4878aSAndroid Build Coastguard Worker 85*61c4878aSAndroid Build Coastguard Worker.. _docs-concepts-full-framework: 86*61c4878aSAndroid Build Coastguard Worker 87*61c4878aSAndroid Build Coastguard WorkerFull Framework 88*61c4878aSAndroid Build Coastguard Worker-------------- 89*61c4878aSAndroid Build Coastguard WorkerFor those who want a fully-integrated solution that provides everything Pigweed 90*61c4878aSAndroid Build Coastguard Workerhas to offer with an opinionated project structure, we are working diligently 91*61c4878aSAndroid Build Coastguard Workeron a :ref:`Pigweed framework<module-pw_system>`. Stay tuned for more news to 92*61c4878aSAndroid Build Coastguard Workercome! In the meantime, we invite you to discuss this and collaborate with us 93*61c4878aSAndroid Build Coastguard Workeron `Discord <https://discord.gg/M9NSeTA>`_. 94*61c4878aSAndroid Build Coastguard Worker 95*61c4878aSAndroid Build Coastguard Worker.. _docs-concepts-right-for-my-project: 96*61c4878aSAndroid Build Coastguard Worker 97*61c4878aSAndroid Build Coastguard WorkerIs Pigweed Right for My Project? 98*61c4878aSAndroid Build Coastguard Worker================================ 99*61c4878aSAndroid Build Coastguard WorkerPigweed is still in its early stages, and while we have ambitious plans for it, 100*61c4878aSAndroid Build Coastguard WorkerPigweed might not be the right fit for your project today. Here are some things 101*61c4878aSAndroid Build Coastguard Workerto keep in mind: 102*61c4878aSAndroid Build Coastguard Worker 103*61c4878aSAndroid Build Coastguard Worker* Many individual modules are stable and are running on shipped devices today. 104*61c4878aSAndroid Build Coastguard Worker If any of those modules meet your needs, you should feel safe bringing them 105*61c4878aSAndroid Build Coastguard Worker into your project. 106*61c4878aSAndroid Build Coastguard Worker 107*61c4878aSAndroid Build Coastguard Worker* Some modules are in very early and active stages of development. They likely 108*61c4878aSAndroid Build Coastguard Worker have unstable APIs and may not work on all supported targets. If this is the 109*61c4878aSAndroid Build Coastguard Worker case, it will be indicated in the module's documentation. If you're interested 110*61c4878aSAndroid Build Coastguard Worker in contributing to the development of one of these modules, we encourage you 111*61c4878aSAndroid Build Coastguard Worker to experiment with them. Otherwise they aren't ready for use in most projects. 112*61c4878aSAndroid Build Coastguard Worker 113*61c4878aSAndroid Build Coastguard Worker* Setting up new projects to use Pigweed is currently not very easy, but we are 114*61c4878aSAndroid Build Coastguard Worker working to address that. In the meantime, join the Pigweed community on 115*61c4878aSAndroid Build Coastguard Worker `Discord <https://discord.gg/M9NSeTA>`_ to get help. 116*61c4878aSAndroid Build Coastguard Worker 117*61c4878aSAndroid Build Coastguard WorkerSupported language versions 118*61c4878aSAndroid Build Coastguard Worker=========================== 119*61c4878aSAndroid Build Coastguard Worker 120*61c4878aSAndroid Build Coastguard WorkerC++ 121*61c4878aSAndroid Build Coastguard Worker--- 122*61c4878aSAndroid Build Coastguard WorkerAll Pigweed code requires C++17 and is fully compatible with C++20. Pigweed 123*61c4878aSAndroid Build Coastguard Workerdefines GN toolchains for building with C++17 and C++20; see :ref:`target-host` 124*61c4878aSAndroid Build Coastguard Workertarget documentation for more information. For Bazel, the C++ standard version 125*61c4878aSAndroid Build Coastguard Workercan be configured using the `--cxxopt flag 126*61c4878aSAndroid Build Coastguard Worker<https://bazel.build/docs/user-manual#cxxopt>`_. 127*61c4878aSAndroid Build Coastguard Worker 128*61c4878aSAndroid Build Coastguard Worker.. _docs-concepts-python-version: 129*61c4878aSAndroid Build Coastguard Worker 130*61c4878aSAndroid Build Coastguard WorkerPython 131*61c4878aSAndroid Build Coastguard Worker------ 132*61c4878aSAndroid Build Coastguard WorkerPigweed officially supports Python 3.10 and 3.11. 133*61c4878aSAndroid Build Coastguard Worker 134*61c4878aSAndroid Build Coastguard Worker.. toctree:: 135*61c4878aSAndroid Build Coastguard Worker :maxdepth: 1 136*61c4878aSAndroid Build Coastguard Worker :hidden: 137*61c4878aSAndroid Build Coastguard Worker 138*61c4878aSAndroid Build Coastguard Worker mission 139