xref: /aosp_15_r20/external/pigweed/pw_sys_io_stdio/docs.rst (revision 61c4878ac05f98d0ceed94b57d316916de578985)
1.. _module-pw_sys_io_stdio:
2
3---------------
4pw_sys_io_stdio
5---------------
6The ``pw_sys_io_stdio`` backend implements the ``pw_sys_io`` facade using
7stdio.
8
9Why not just use stdio directly?
10--------------------------------
11The nice thing about using ``pw_sys_io`` is that it's rather easy to get a
12board up and running with a target-specific backend. This means when drafting
13out a quick application you can write it against ``pw_sys_io`` and, with some
14care, the application will be able to run on both host and target devices.
15
16While it's not recommended to use ``pw_sys_io`` for any production
17applications, it can be rather helpful for early prototyping.
18
19Setup
20=====
21This module requires relatively minimal setup:
22
231. Write code against the ``pw_sys_io`` facade.
242. Setup build system to point to this backend.
25
26 - For GN, direct the ``pw_sys_io_BACKEND`` GN build arg to point here.
27 - For Bazel, the default backend multiplexer will automatically pick this stdio
28   backend for host builds. To use this backend on non-host platforms, add the
29   ``@pigweed//pw_sys_io_stdio:backend`` constraint_value to your platform.
30
31Module usage
32============
33For the most part, applications built with this backend will behave similarly
34to an application built directly against stdio.
35
36Dependencies
37============
38- :ref:`module-pw_sys_io`
39