Skip to content

Commit

Permalink
docs: Describe supported language versions
Browse files Browse the repository at this point in the history
Tested: By viewing generated docs in browser.
Change-Id: I1166ae2fd9736f8263bcb11b5945c3f5f7f29e74
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/100743
Commit-Queue: Ted Pudlik <[email protected]>
Reviewed-by: Wyatt Hepler <[email protected]>
  • Loading branch information
tpudlik authored and CQ Bot Account committed Jul 18, 2022
1 parent 2bfd28c commit afabbcd
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 7 deletions.
18 changes: 18 additions & 0 deletions docs/concepts/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,21 @@ to keep in mind:
* 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 <https://discord.gg/M9NSeTA>`_ to get help.

Supported language versions
===========================

C++
---
Most Pigweed code requires C++17, but a few modules, such as
:ref:`module-pw_kvs` and :ref:`module-pw_tokenizer`, work with C++14. All
Pigweed code is compatible with C++20. Pigweed defines toolchains for testing
with C++14 and C++20; see :ref:`target-host` target documentation for more
information.

Python
------
We currently officially support Python 3.7.7, 3.8, and 3.9.

.. note::
Python 3.10 is not yet supported (https://bugs.pigweed.dev/234874769).
11 changes: 4 additions & 7 deletions docs/style_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ embedded development beyond just C++ style.

C++ standard
============
Pigweed primarily uses the C++17 standard. A few modules maintain support for
C++14, however (e.g. :ref:`module-pw_kvs` and its dependencies).

All Pigweed C++ code must compile with ``-std=c++17`` in Clang and GCC. C++20
features may be used as long as the code still compiles unmodified with C++17.
See ``pw_polyfill/language_feature_macros.h`` for macros that provide C++20
Expand Down Expand Up @@ -841,10 +838,10 @@ Pigweed uses the standard Python style: PEP8, which is available on the web at
https://www.python.org/dev/peps/pep-0008/. All Pigweed Python code should pass
``yapf`` when configured for PEP8 style.

Python 3
========
Pigweed uses Python 3. Some modules may offer limited support for Python 2, but
Python 3.6 or newer is required for most Pigweed code.
Python versions
===============
Pigweed code must support Python 3.7.7, 3.8, and 3.9. The only exception is
:ref:`module-pw_env_setup`, which also supports Python 2 and 3.6.

---------------
Build files: GN
Expand Down

0 comments on commit afabbcd

Please sign in to comment.