A [component manifest](https://fuchsia.dev/fuchsia-src/concepts/components/v2/component_manifests#component-manifest) is a file that defines a component
by encoding a [component declaration](https://fuchsia.dev/fuchsia-src/concepts/components/v2/component_manifests#component-declaration). This document
gives an overview of the concepts used by component declarations.
Component declarations contain information about the following:

- **Execution:** Details about the runtime and executable binary for components that include an [executable program](https://fuchsia.dev/reference/cml#program).
- **Composition:** [Child component instances](https://fuchsia.dev/docs/concepts/components/v2/realms#child-component-instances) and [dynamic collections](https://fuchsia.dev/docs/concepts/components/v2/realms#collections) managed by this component.
- **Capabilities:** [Routing rules](https://fuchsia.dev/docs/concepts/components/v2/capabilities/README) that describe how capabilities are provided and consumed between components.
- **Metadata:** [Freeform data](https://fuchsia.dev/reference/cml#facets), which is ignored by the component framework but can be interpreted by third parties.

> [!NOTE]
> **Note:** For complete details on component manifest attributes and syntax, see the [CML reference](https://fuchsia.dev/reference/cml).

![Component manifest stages](https://fuchsia.dev/static/fuchsia-src/concepts/components/v2/images/component-manifest.png)

## Component manifest source

A


[](https://fuchsia.dev/docs/glossary#component-manifest-source)


is a file that
encodes part of a component manifest. Component manifest sources are written in
component manifest language (CML), which is the developer-facing source format
for component manifests. CML files are [JSON5](https://json5.org/)
files that end with a `.cml` extension.

The [`cmc`](https://cs.opensource.google/fuchsia/fuchsia/+/main:/tools/cmc) tool compiles component manifest sources to
[component manifests](https://fuchsia.dev/fuchsia-src/concepts/components/v2/component_manifests#component-manifest) as a part of the build process.

## Component manifest

A


[](https://fuchsia.dev/docs/glossary#component-manifest)


is a binary file that
encodes the [component declaration](https://fuchsia.dev/fuchsia-src/concepts/components/v2/component_manifests#component-declaration), usually distributed
as part of a


[](https://fuchsia.dev/docs/glossary#package)


. The binary format is the
[persistent encoded form](https://fuchsia.dev/docs/reference/fidl/language/wire-format/README#dual-forms) of the component declaration FIDL
object.

A [component URL](https://fuchsia.dev/docs/concepts/components/v2/identifiers#component-urls) identifies a component in a package by its
component manifest resource path, typically ending in a `.cm` extension.

## Component declaration

A


[](https://fuchsia.dev/docs/glossary#component-declaration)


describes what a
component can do, the capabilities it uses and exposes, its children, and other
information needed to run the component. Component declarations are represented
using the [`Component`](https://fuchsia.dev/reference/fidl/fuchsia.component.decl#Component) FIDL table.

The framework calls a [component resolver](https://fuchsia.dev/docs/concepts/components/v2/capabilities/resolver) to retrieve a
component declaration from a component URL.
[](https://issues.fuchsia.dev/issues/new?component=1439230&template=1881640&description=Issue+on:+https://fuchsia.dev/docs/concepts/components/v2/component_manifests.md "Report a bug or suggest improvements on this page") [](https://cs.opensource.google/fuchsia/fuchsia/+/main:docs/concepts/components/v2/component_manifests.md "View the source code of this page") [](https://ci.android.com/edit?repo=fuchsia/fuchsia/main&file=docs/concepts/components/v2/component_manifests.md&cloneRepo=fuchsia/fuchsia:refs/heads/main&fullPath=fuchsia/docs/concepts/components/v2/component_manifests.md "Edit the source code of this page")