commit | c75fe7d73b0629e985c171c64d14da21933af73c | [log] [tgz] |
---|---|---|
author | Gary Bressler <geb@google.com> | Thu Oct 10 21:20:36 2024 +0000 |
committer | CQ Bot <fuchsia-internal-scoped@luci-project-accounts.iam.gserviceaccount.com> | Thu Oct 10 21:20:36 2024 +0000 |
tree | 80cd1e584d736bf8929d49127c3b6481c53bec28 | |
parent | 5d3d1ef53907777ba8b4420ea305963865ea8f6b [diff] |
[component_manager] More extensible framework for builtin components component_manager has a builtin runner which is used for running "builtin components", i.e. components whose source code lives in component manager itself. elf_runner is one (and the only) builtin component today. For microfuchsia, we would like to run shutdown-shim and devfs in component manager as builtin components as well. It turns out though that the current implementation of builtin runner is a bit inflexible for expanding to more components. To this end, this change is a refactor which does the following: - Introduces a [BuiltinProgram] type that represents the state of a builtin program. As one of its arguments, [BuiltinProgram] contains a [BuiltinProgramFn], which is a callback that runs the builtin component's code. - Make the ABI for builtin components more similar to non-builtins. Builtin components accept a subset of procargs, including namespace, out dir, lifecycle channel, etc. This will facilitate porting non-builtin components to builtins. - [BuiltinProgram] has a universal [Controller] implementation which integrates with the Lifecycle control channel. - Refactor elf_runner to use [BuiltinProgram]. elf_runner now uses the Lifecycle control channel instead of its own Controller implementation. - builtin_runner now supports dependency injection for tests. Unit tests can bring along their own builtin components. Fixed: 372527480 Change-Id: Ic8a24d2cd9d7da05c8305572539fb932f054689f Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/1134697 Commit-Queue: Gary Bressler <geb@google.com> Reviewed-by: Claire Gonyeo <cgonyeo@google.com>
Fuchsia is an open source, general purpose operating system supporting modern 64-bit Intel and ARM processors.
We expect everyone interacting with our project to respect our code of conduct.
Read more about Fuchsia's principles.
See Getting Started.
See fuchsia.dev.