| // Copyright 2018 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.sys2; |
| |
| using zx; |
| |
| // A component is a unit of executable software. |
| // |
| // This object provides the component's declaration, access to its package's |
| // content, and relevant metadata. |
| table Component { |
| // The resolved URI of the component. |
| // This is the canonical URI obtained by the component resolver after |
| // after following redirects and resolving relative paths. |
| 1: string resolved_uri; |
| |
| // The component's declaration. |
| // This information is typically obtained from the component's manifest |
| // or generated by the component resolver. |
| 2: ComponentDecl decl; |
| |
| // 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_uri|. This mechanism is used for web |
| // applications. |
| // |
| // TODO(CP-154): It might be better to return a package loader interface |
| // here instead of immediately providing the package's content. |
| // That would allow for finer grained pipelining of component installation |
| // and launching of the component's runner. Moreover, sometimes we only |
| // need the component's declarative information. |
| 3: Package package; |
| }; |