third_party.pigweed.src/targets/host/target_docs.rst
Alexei Frolov eb94e96186 pw_rpc: Move system_server backends into targets
Backends for the pw_rpc/system_server facade were defined in the pw_rpc
module, preventing targets from customizing their server configurations
and channels. This change moves the backends into the respective target
directories. Additionally, pw_unit_test's RPC main is updated to use the
system server.

Change-Id: I670e13dd178ab8a7fc8dfa8fade3f82a46d5208c
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/28500
Reviewed-by: Wyatt Hepler <hepler@google.com>
Reviewed-by: Keir Mierle <keir@google.com>
Commit-Queue: Alexei Frolov <frolv@google.com>
2021-01-06 17:42:18 +00:00

50 lines
1.4 KiB
ReStructuredText

.. _target-host:
----
host
----
The Pigweed host target is used for unit testing and some host side tooling.
Building
========
To build for this target, invoke ninja with the top-level "host" group as the
target to build.
.. code:: sh
$ ninja -C out host
There are two host toolchains, and both of them can be manually invoked by
replacing `host` with `host_clang` or `host_gcc`. Not all toolchains are
supported on all platforms. Unless working specifically on one toolchain, it is
recommended to leave this to the default.
Running Tests
=============
Tests are automatically run as part of the host build, but if you desire to
manually run tests, you may invoke them from a shell directly.
Example:
... code:: sh
$ ./out/host_[compiler]_debug/obj/pw_status/status_test
RPC server
==========
The host target implements a system RPC server that runs over a local socket,
defaulting to port 33000. To communicate with a process running the host RPC
server, use ``pw rpc -s localhost:33000 <protos>``.
Configuration
=============
The host target exposes a few options that may be used to change the host build
behavior.
pw_build_HOST_TOOLS
-------------------
Pigweed includes a number of host-only tooling that may be built as part of the
host build. These tools are included as part of the bootstrap, so it's only
necessary to enable this setting when modifying host tooling. This is
disabled by default.