| // Copyright 2022 The Fuchsia Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| library fuchsia.component.resolution; |
| |
| using fuchsia.mem; |
| |
| /// A component is a unit of executable software. |
| /// |
| /// This object provides the component's declaration, access to its package's |
| /// content, and relevant metadata as resolved `fuchsia.component.resolution.Resolver`. |
| type Component = resource table { |
| /// The resolved URL of the component. |
| /// This is the canonical URL obtained by the component resolver after |
| /// following redirects and resolving relative paths. |
| 1: url string:MAX_COMPONENT_URL_LENGTH; |
| |
| /// Binary representation of the component's declaration (`fuchsia.component.decl.Component`). |
| /// This information is typically obtained from the component's manifest |
| /// or generated by the component resolver. |
| 2: decl fuchsia.mem.Data; |
| |
| /// The package that contains the component. |
| /// By convention, the component's package is mapped to "/pkg" in its |
| /// namespace at runtime. |
| /// |
| /// This is null if the component is not represented as a package. |
| /// In that case, it is the runner's responsibility to load the component's |
| /// resource from the `resolved_url`. This mechanism is used for web |
| /// applications. |
| /// |
| /// Most runners, including but not limited to the builtin ELF runner, |
| /// require the package's directory connection to have OPEN_RIGHT_EXECUTABLE |
| /// rights in order to run the resolved component. |
| 3: package Package; |
| |
| /// Binary representation of the component's configuration values |
| /// (`fuchsia.component.config.ValuesData`). |
| 4: config_values fuchsia.mem.Data; |
| }; |