blob: 72238a96a694ce8f6d33296b61002a6bd7d918c4 [file] [log] [blame]
// Copyright 2021 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.decl;
using fuchsia.data;
/// A component declaration.
///
/// This information is typically encoded in the component manifest (.cm file)
/// if it has one or may be generated at runtime by a component resolver for
/// those that don't.
type Component = table {
/// (Optional) Information about the program to run when the component is executed.
/// Omitted for non-executable components.
1: program Program;
/// (Optional) List of capabilities used by the component. These consist of
/// capabilities offered to the component that are installed in its incoming
/// namespace.
///
/// The used capabilities must be unique and non-overlapping.
2: uses vector<Use>:MAX;
/// (Optional) List of capabilities exposed by the component. These consist of
/// capabilities that are made visible to the parent. The parent
/// may `offer` these capabilities to its children, but not `use` them.
///
/// The exposed capabilities must be unique and non-overlapping.
3: exposes vector<Expose>:MAX;
/// (Optional) List of capabilities offered to the component's children. These consist
/// of capabilities that the given children may `use`, which may come from a
/// child, the parent, or the component's own outgoing namespace.
///
/// The offered capabilities must be unique and non-overlapping.
4: offers vector<Offer>:MAX;
/// (Optional) List of capabilities defined by the component.
5: capabilities vector<Capability>:MAX;
/// (Optional) The component's statically instantiated children. The children must have
/// unique names.
6: children vector<Child>:MAX;
/// (Optional) The component's collections. The collections must have unique names.
7: collections vector<Collection>:MAX;
/// (Optional) List of environments created by this component.
/// Environments are assigned to children and control aspects of a child component's
/// runtime.
8: environments vector<Environment>:MAX;
/// (Optional) Additional metadata about the component.
9: facets fuchsia.data.Dictionary;
/// (Optional) The schema of the component's configuration interface.
10: config ConfigSchema;
};