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