blob: 55fd94f7c71b58233461532c03bdf9e81c39ea7c [file] [log] [blame]
// 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;
// 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 URL of the component.
// This is the canonical URL obtained by the component resolver after
// after following redirects and resolving relative paths.
1: string resolved_url;
// 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_url|. 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;
};