fuchsia.component.decl

Added: 7

STRUCTS

CapabilityRef

Defined in fuchsia.component.decl/relative_refs.fidl

A reference to a capability declared in this component.

FieldTypeDescriptionDefault
name string[100] No default

ChildRef

Defined in fuchsia.component.decl/relative_refs.fidl

A reference to one of the component's child instances.

FieldTypeDescriptionDefault
name child_name

The name assigned to the child by its parent. If collection is set, name is scoped to collection and the child is a dynamic instance.

No default
collection name

The collection name belongs to. If omitted, name references a static instance. This field must be omitted if the ChildRef is being used in a component declaration. Optional.

No default

CollectionRef

Defined in fuchsia.component.decl/relative_refs.fidl

A reference to one of the component's collections.

FieldTypeDescriptionDefault
name name No default

ConfigType

Defined in fuchsia.component.decl/config.fidl

FieldTypeDescriptionDefault
layout ConfigTypeLayout No default
parameters vector<LayoutParameter>? No default
constraints vector<LayoutConstraint> No default

DebugRef

Defined in fuchsia.component.decl/relative_refs.fidl

A reference to the environment's debug capabilities.

<EMPTY>

EnvironmentRef

Defined in fuchsia.component.decl/relative_refs.fidl

A reference to the environment.

Added: HEAD

<EMPTY>

FrameworkRef

Defined in fuchsia.component.decl/relative_refs.fidl

A reference to the component framework itself.

<EMPTY>

NameMapping

Defined in fuchsia.component.decl/offer.fidl

Type used to create a mapping between 2 names. Used to rename service or component instances in FIDL declarations.

FieldTypeDescriptionDefault
source_name name

Name used in the source instance.

No default
target_name name

Name used in the target instance.

No default

ParentRef

Defined in fuchsia.component.decl/relative_refs.fidl

A reference to a component's parent instance.

<EMPTY>

ResolvedConfig

Defined in fuchsia.component.decl/config.fidl

A configuration that has been completely resolved by component manager.

Added: 12

FieldTypeDescriptionDefault
fields vector<ResolvedConfigField> No default
checksum ConfigChecksum No default

ResolvedConfigField

Defined in fuchsia.component.decl/config.fidl

Added: 12

FieldTypeDescriptionDefault
key string No default
value ConfigValue No default

SelfRef

Defined in fuchsia.component.decl/relative_refs.fidl

A reference to the component itself.

<EMPTY>

VoidRef

Defined in fuchsia.component.decl/relative_refs.fidl

A reference to an intentionally missing offer source.

<EMPTY>

ENUMS

AllowedOffers strict

Type: uint32

Defined in fuchsia.component.decl/collection.fidl

The kinds of offers that can target the children in a collection.

NameValueDescription
1

Only static offers may target components in the collection. "Static offers" are the offers in the ComponentDecl that target the collection itself.

This is the default behavior.

2

Both static offers and dynamic offers may target components in the collection. "Static offers" are the offers in the ComponentDecl that target the collection itself. "Dynamic offers" are additional offers that are passed to CreateChild at runtime.

Availability strict

Type: uint32

Defined in fuchsia.component.decl/offer.fidl

Describes the expected availability of the capability.

Some capabilities may not be present on all system configurations. In those cases, the availability will be declared as OPTIONAL along the chains of exposes/offers/uses, and the capability would be routed from void on system configurations where it does not make sense to route or provide a particular capability (e.g. graphical capabilities on a headless system).

NameValueDescription
1

The capability must be available. Failure to route the capability is an error.

2

Inside a use declaration: the component can function if it fails to obtain the capability.

Inside an offer/expose declaration: the capability may not be available in some system configurations. As a corollary, the target component must not have a required dependency on the capability.

3

If the target of the corresponding offer or expose declaration requires the capability, then the behavior is equivalent to required. If the target has an optional dependency on the capability, then the behavior is equivalent to optional. This is useful for container components that would like to change their routing availability based on ones inside.

This value is not allowed inside a use declaration.

4

The source may omit the route completely without even having to route from void.

TRANSITIONAL is used for soft transitions that introduce new capabilities.

Added: 9

ConfigTypeLayout flexible

Type: uint32

Defined in fuchsia.component.decl/config.fidl

NameValueDescription
1
2
3
4
5
6
7
8
9
10
11

DependencyType strict

Type: uint32

Defined in fuchsia.component.decl/offer.fidl

Describes the type of dependency implied by the capability.

NameValueDescription
1

A strong dependency which may be required by components that use it.

2

A weak dependency which is allowed to form a cycle. Components that use a weak dependency must support the dependency being unavailable at arbitrary times.

Durability strict

Type: uint32

Defined in fuchsia.component.decl/collection.fidl

The durability of component instances created in a collection.

NameValueDescription
2

An instance exists until either its parent instance is stopped or it is explicitly destroyed.

3

An instance is started upon creation and is immediately destroyed when it stops.

EnvironmentExtends strict

Type: uint32

Defined in fuchsia.component.decl/environment.fidl

Specifies how a declared environment's initial set of properties are assigned.

NameValueDescription
0

The environment has no initial set of properties.

1

The environment's initial set of properties are inherited from its realm. Inherited properties include any fields defined in EnvironmentDecl.

OnTerminate strict

Type: uint32

Defined in fuchsia.component.decl/child.fidl

Describes the action to take if this component instance terminates unexpectedly.

NameValueDescription
0

No action, the default

1

Trigger a graceful system reboot if the component terminates for any reason. This is a specialized feature gated by Component Framework security policy.

StartupMode strict

Type: uint32

Defined in fuchsia.component.decl/child.fidl

Describes under what conditions the component may be started.

NameValueDescription
0

Start component instance only when another instance binds to it.

1

Start component instance as soon as parent starts. This mode is only supported for statically declared children -- a dynamic instance may only be started by binding to it.

StorageId strict

Type: uint32

Defined in fuchsia.component.decl/capability.fidl

Declares which identifier to use to key a component's isolated storage directory.

NameValueDescription
1

Isolated storage directories are keyed using a component's instance ID specified in the component ID index. Components which are not listed in the index cannot use or open this storage capability.

2

Isolated storage directories are keyed using a component's instance ID if one is specified in the component ID index. Otherwise, a component's moniker from the storage capability is used to key its isolated storage directory.

TABLES

Child

Defined in fuchsia.component.decl/child.fidl

Statically declares a child component instance.

OrdinalFieldTypeDescription
name child_name

(Required) The name assigned to the child by its parent.

Must be non-empty, unique among all siblings, and contain only the following characters: [a-z0-9-_.].

url fuchsia.url/Url

(Required) The child component's URL.

Must be non-empty and a well-formed URL.

startup StartupMode

(Required) The startup mode for the component instance.

Must be set.

environment name

(Optional) The environment assigned to this child.

May be unset, in which case the child will inherit the parent component's environment. If set, the name must reference an environment defined in the ComponentDecl and it must contain only the following characters: [a-z0-9-_.].

on_terminate OnTerminate

(Optional, defaults to NONE) The action to take if this component instance terminates unexpectedly.

config_overrides vector<ConfigOverride>

Configuration overrides to apply to the child's base configuration.

For a configuration field to be overridden it must be marked as mutable by parent.

Parents must pass ConfigOverride values which match the child's declared schema types exactly.

Added: 12

Collection

Defined in fuchsia.component.decl/collection.fidl

Statically declares a component instance collection.

OrdinalFieldTypeDescription
name name

(Required) The name of the collection. Instances created in the collection are scoped to this name.

durability Durability

(Required) The durability of instances in the collection.

environment name

(Optional) The environment assigned to child instances in this collection.

May be unset, in which case children in this collection will inherit the parent component's environment. If set, the name must reference an environment defined in the ComponentDecl and it must contain only the following characters: [a-z0-9-_.].

allowed_offers AllowedOffers

(Optional, defaults to STATIC_ONLY) The kinds of offers that can target the child instances in this collection.

Only components using the dynamic_offers restricted feature may set this field.

allow_long_names bool

(Optional, defaults to false) Whether child instances in this collection can have names longer than the default length limit of 100.

Only components using the allow_long_names restricted feature may set this field.

persistent_storage bool

(Optional) Whether the data in isolated storage used by dynamic child instances and their descendants will persist after the instances are destroyed. New dynamic instances inherit the previous instances' data stores.

This setting can be overridden by a lower-level collection that is a descendant of a collection that enables/disables this setting.

This setting applies to all storage capabilities consumed by the collection components and their descendants.

The default is the value inherited from an ancestral collection if set, otherwise false.

Component

Defined in fuchsia.component.decl/component.fidl

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.

OrdinalFieldTypeDescription
program Program

(Optional) Information about the program to run when the component is executed. Omitted for non-executable components.

uses vector<Use>

(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.

exposes vector<Expose>

(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.

offers vector<Offer>

(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.

capabilities vector<Capability>

(Optional) List of capabilities defined by the component.

children vector<Child>

(Optional) The component's statically instantiated children. The children must have unique names.

collections vector<Collection>

(Optional) The component's collections. The collections must have unique names.

environments vector<Environment>

(Optional) List of environments created by this component. Environments are assigned to children and control aspects of a child component's runtime.

facets fuchsia.data/Dictionary

(Optional) Additional metadata about the component.

config ConfigSchema

(Optional) The schema of the component's configuration interface.

ConfigField

Defined in fuchsia.component.decl/config.fidl

Declares a single config field (key + type)

OrdinalFieldTypeDescription
key ConfigKey

(Required) The identifier for this config field. This key will be used to match overrides.

type ConfigType

(Required) The type of config values. Config values are verified against this layout at build time and run time.

mutability ConfigMutability

Allowed sources for runtime overrides of this field's value.

Added: 12

ConfigOverride

Defined in fuchsia.component.decl/child.fidl

A directive to override the value of a particular configuration field in the child.

Added: 12

OrdinalFieldTypeDescription
key ConfigKey
value ConfigValue

ConfigSchema

Defined in fuchsia.component.decl/config.fidl

The schema of a component's configuration interface.

OrdinalFieldTypeDescription
fields vector<ConfigField>

(Required) Ordered fields of the component's configuration interface.

checksum ConfigChecksum

(Required) Checksum over the config declaration.

value_source ConfigValueSource

(Required) Strategy used to resolve config values.

ConfigValueSpec

Defined in fuchsia.component.decl/config.fidl

An individual configuration value. It is matched against a specific configuration field based on its offset within ValuesData.values.

Added: 12

OrdinalFieldTypeDescription
value ConfigValue

ConfigValuesData

Defined in fuchsia.component.decl/config.fidl

Contents of the configuration value file. Defines the base values for a component's config.

Added: 12

OrdinalFieldTypeDescription
values vector<ConfigValueSpec>

The concrete values for the component's configuration.

checksum ConfigChecksum

A SHA-256 checksum of the configuration schema. Must match the checksum in the component manifest and config parser library used to resolve the final configuration.

Configuration

Defined in fuchsia.component.decl/capability.fidl

Declares a configuration capability.

To learn more about configuration capabilities, see: https://fuchsia.dev/fuchsia-src/glossary#configuration-capability or: https://fuchsia.dev/fuchsia-src/docs/concepts/components/v2/capabilities/configuration

Added: HEAD

OrdinalFieldTypeDescription
name name

(Required) The name of this configuration

value ConfigValue

(Required) The value of this Configuration.

DebugProtocolRegistration

Defined in fuchsia.component.decl/environment.fidl

Registers a protocol in the environment as a debug capability. This makes it available to any component in the environment that uses it with source == debug.

To learn more about protocols, see: https://fuchsia.dev/fuchsia-src/glossary#protocol

OrdinalFieldTypeDescription
source Ref

(Required) The provider of the capability relative to the component itself. Must be parent, self, or child.

source_name name

(Required) Name identifying the protocol being offered.

target_name name

(Required) The name by which the capability is being offered.

Dictionary

Defined in fuchsia.component.decl/capability.fidl

Declares a dictionary capability.

Added: HEAD

OrdinalFieldTypeDescription
name name

(Required) The name of this dictionary.

Must be unique among built-in capabilities.

source Ref

(Optional) Source of the contents used to initialize the dictionary. Must be parent, self, or child.

source_dictionary dictionary_path

(Optional) Path in a dictionary provided by ref which contains the contents that will be used to initialize the dictionary.

This must be set iff source is set.

Directory

Defined in fuchsia.component.decl/capability.fidl

Declares a directory capability backed by this component.

To learn more about directories, see: https://fuchsia.dev/fuchsia-src/glossary#directory

OrdinalFieldTypeDescription
name name

(Required) The name of this directory.

source_path string[1024]

(Optional) The path to the directory in the component's outgoing directory.

Not set for built-in capabilities.

rights fuchsia.io/Rights

(Required) The maximum rights that can be set by a component using this directory.

Environment

Defined in fuchsia.component.decl/environment.fidl

Declares an environment which configures a realm.

OrdinalFieldTypeDescription
name name

(Required) The name of this environment.

extends EnvironmentExtends

(Required) Specifies how the initial state of this environment is constructed.

runners vector<RunnerRegistration>

(Optional) List of runners available in this environment.

This list determines the total set of runners that are available for any component in the environment to use.

resolvers vector<ResolverRegistration>

(Optional) List of component resolvers and the URL schemes they are registered to resolve. These registrations determine how components are resolved in the realm. If the component URL scheme does not match any of these resolvers, URL resolution is delegated to the parent environment, if this environment extends from REALM.

debug_capabilities vector<DebugRegistration>

(Optional) Expose capabilities to debug section when component manager allows it.

These capabilities are accessible to any component in the environment with a use declaration with source == debug. Only capabilities intended to support development should be declared here, and they are only allowed if explicitly included in the component manager allowlist.

stop_timeout_ms uint32

(Optional) The duration in milliseconds that the component will have to stop before it is killed. Required if this environment extends from NONE.

EventStream

Defined in fuchsia.component.decl/capability.fidl

Declares an event_stream capability

This type cannot be used in fuchsia.component.decl.Component. It is only used for the framework's built-in capabilities declared in internal.Config.

Added: 8

OrdinalFieldTypeDescription
name name

(Required) The name of this event stream.

Must be unique among built-in capabilities.

EventSubscription

Defined in fuchsia.component.decl/events.fidl

Indicates the event name to subscribe to with a given event mode.

OrdinalFieldTypeDescription
event_name name

(Required) The event names to subscribe to.

ExposeConfiguration

Defined in fuchsia.component.decl/expose.fidl

Declares a configuration capability exposed to a component's containing realm, such as a capability exposed by the component or one of its children at runtime.

Added: HEAD

OrdinalFieldTypeDescription
source Ref

(Required) The provider of the capability relative to the component itself. Must be self or child, or void. If set to void, then the target must expose, offer, or use the capability with OPTIONAL or TRANSITIONAL availability.

source_name name

(Required) Name identifying the configuration, by which it was presented to this component.

target Ref

(Required) The destination to which the capability is exposed.

target_name name

(Required) The name by which the capability is being exposed.

availability Availability

(Optional, defaults to REQUIRED) The availability of this capability. See Availability.

ExposeDictionary

Defined in fuchsia.component.decl/expose.fidl

Declares a dictionary exposed to a component's containing realm, such as a dictionary exposed by the component or one of its children at runtime.

To learn more about dictionarys, see: https://fuchsia.dev/fuchsia-src/glossary#dictionary

Added: HEAD

OrdinalFieldTypeDescription
source Ref

(Required) The provider of the capability relative to the component itself. Must be self or child, or void. If set to void, then the target must expose, offer, or use the capability with OPTIONAL or TRANSITIONAL availability.

source_name name

(Required) Name identifying the dictionary, by which it was presented to this component.

target Ref

(Required) The destination to which the dictionary is exposed: either the component's realm or the framework.

target_name name

(Required) The name by which the capability is being exposed.

availability Availability

(Optional, defaults to REQUIRED) The availability of this capability. See Availability.

source_dictionary string[1024]

(Optional) Path in a dictionary offered by ref which contains source_name. If this field is absent, source_name identifies a capability directly routed by source. If set, source_name identifies a capability nested inside a dictionary. The name of the top-level dictionary is given by the first path segment of source_dictionary, and source is expected to route a dictionary capability with this name. The rest of the path (possibly empty) represents the path to a dictionary nested in the top-level dictionary which is expected to contain source_name.

Added: HEAD

ExposeDirectory

Defined in fuchsia.component.decl/expose.fidl

Declares a directory exposed to a component's containing realm, such as a directory exposed by the component or one of its children at runtime.

OrdinalFieldTypeDescription
source Ref

(Required) The provider of the capability relative to the component itself. Must be self or child, or void. If set to void, then the target must expose, offer, or use the capability with OPTIONAL or TRANSITIONAL availability.

source_name name

(Required) Name identifying the directory, by which it was presented to this component.

target Ref

(Required) The destination to which the directory is exposed: either the component's realm or the framework.

target_name name

(Required) The name by which the capability is being exposed.

rights fuchsia.io/Rights

(Optional) The maximum rights that can be set by a component using this directory. If unset, the rights are inherited from source.

subdir string[1024]

(Optional) The subdirectory of this directory to expose instead of the root.

availability Availability

(Optional, defaults to REQUIRED) The availability of this capability. See Availability.

Added: 11
source_dictionary string[1024]

(Optional) Path in a dictionary offered by ref which contains source_name. If this field is absent, source_name identifies a capability directly routed by source. If set, source_name identifies a capability nested inside a dictionary. The name of the top-level dictionary is given by the first path segment of source_dictionary, and source is expected to route a dictionary capability with this name. The rest of the path (possibly empty) represents the path to a dictionary nested in the top-level dictionary which is expected to contain source_name.

Added: HEAD

ExposeProtocol

Defined in fuchsia.component.decl/expose.fidl

Declares a protocol exposed to a component's containing realm, such as a protocol exposed by the component or one of its children at runtime.

To learn more about protocols, see: https://fuchsia.dev/fuchsia-src/glossary#protocol

OrdinalFieldTypeDescription
source Ref

(Required) The provider of the capability relative to the component itself. Must be self or child, or void. If set to void, then the target must expose, offer, or use the capability with OPTIONAL or TRANSITIONAL availability.

source_name name

(Required) Name identifying the protocol, by which it was presented to this component.

target Ref

(Required) The destination to which the protocol is exposed: either the component's realm or the framework.

target_name name

(Required) The name by which the capability is being exposed.

availability Availability

(Optional, defaults to REQUIRED) The availability of this capability. See Availability.

Added: 11
source_dictionary string[1024]

(Optional) Path in a dictionary offered by ref which contains source_name. If this field is absent, source_name identifies a capability directly routed by source. If set, source_name identifies a capability nested inside a dictionary. The name of the top-level dictionary is given by the first path segment of source_dictionary, and source is expected to route a dictionary capability with this name. The rest of the path (possibly empty) represents the path to a dictionary nested in the top-level dictionary which is expected to contain source_name.

Added: HEAD

ExposeResolver

Defined in fuchsia.component.decl/expose.fidl

Declares a resolver exposed to a component's containing realm, such as a resolver exposed by the component or one of its children at runtime.

OrdinalFieldTypeDescription
source Ref

(Required) The provider of the capability relative to the component itself. Must be self or child.

source_name name

(Required) The name of the resolver, by which it was presented to this component.

target Ref

(Required) The destination to which the resolver is exposed

target_name name

(Required) The name by which the capability is being exposed.

RESERVED
source_dictionary string[1024]

(Optional) Path in a dictionary offered by ref which contains source_name. If this field is absent, source_name identifies a capability directly routed by source. If set, source_name identifies a capability nested inside a dictionary. The name of the top-level dictionary is given by the first path segment of source_dictionary, and source is expected to route a dictionary capability with this name. The rest of the path (possibly empty) represents the path to a dictionary nested in the top-level dictionary which is expected to contain source_name.

Added: HEAD

ExposeRunner

Defined in fuchsia.component.decl/expose.fidl

Declares a runner exposed to a component's containing realm, such as a runner exposed by the component or one of its children at runtime.

OrdinalFieldTypeDescription
source Ref

(Required) The provider of the capability relative to the component itself. Must be self or child.

source_name name

(Required) The name of the runner, by which it was presented to this component.

target Ref

(Required) The destination to which the runner is exposed: either the component's realm or the framework.

target_name name

(Required) The name by which the capability is being exposed.

RESERVED
source_dictionary string[1024]

(Optional) Path in a dictionary offered by ref which contains source_name. If this field is absent, source_name identifies a capability directly routed by source. If set, source_name identifies a capability nested inside a dictionary. The name of the top-level dictionary is given by the first path segment of source_dictionary, and source is expected to route a dictionary capability with this name. The rest of the path (possibly empty) represents the path to a dictionary nested in the top-level dictionary which is expected to contain source_name.

Added: HEAD

ExposeService

Defined in fuchsia.component.decl/expose.fidl

Declares a service exposed to a component's containing realm, such as a service exposed by the component or one of its children at runtime.

To learn more about services, see: https://fuchsia.dev/fuchsia-src/glossary#service

OrdinalFieldTypeDescription
source Ref

(Required) The provider of the capability relative to the component itself. Must be self or child, or void. If set to void, then the target must expose, offer, or use the capability with OPTIONAL or TRANSITIONAL availability.

source_name name

(Required) Name identifying the service, by which it was presented to this component.

target Ref

(Required) The destination to which the service is exposed: either the component's realm or the framework.

target_name name

(Required) The name by which the capability is being exposed.

availability Availability

(Optional, defaults to REQUIRED) The availability of this capability. See Availability.

Added: 11
source_dictionary string[1024]

(Optional) Path in a dictionary provided by source which contains source_name. If this field is absent, source_name identifies a capability directly routed by source. If set, source_name identifies a capability nested inside this dictionary.

Added: HEAD

OfferConfiguration

Defined in fuchsia.component.decl/offer.fidl

Declares a configuration capability offered by a component to one of its children, which may have been offered by the component's containing realm, the component itself, or one of its other children.

Added: HEAD

OrdinalFieldTypeDescription
source Ref

(Required) The provider of the capability relative to the component itself. Must be parent, self, child, or void. If set to void, then the target must offer or use the capability with OPTIONAL or TRANSITIONAL availability.

source_name name

(Required) Name identifying the configuration being offered.

target Ref

(Required) Reference to the target. Must be child, or collection.

target_name name

(Required) The name by which the capability is being offered.

availability Availability

(Optional, defaults to REQUIRED) The availability of this capability. If set to required, the target may use or offer the capability with either required or optional availability. If set to optional, the target must use or offer the capability with optional availability. The same_as_target value causes this offer's availability to match the availability set in the target.

OfferDictionary

Defined in fuchsia.component.decl/offer.fidl

Declares a dictionary offered by a component to one of its children, which may have been offered by the component's containing realm, the component itself, or one of its other children.

To learn more about dictionaries, see: https://fuchsia.dev/fuchsia-src/glossary#dictionary

Added: HEAD

OrdinalFieldTypeDescription
source Ref

(Required) The provider of the capability relative to the component itself. Must be parent, self, child, or void. If set to void, then the target must offer or use the capability with OPTIONAL or TRANSITIONAL availability.

source_name name

(Required) Name identifying the dictionary being offered.

target Ref

(Required) Reference to the target. Must be child, collection, or a dictionary capability.

target_name name

(Required) The name by which the capability is being offered.

dependency_type DependencyType

(Required) The dependency type this offer represents. A component which receives a weak offer must support the offered capability being unavailable at any point.

availability Availability

(Optional, defaults to REQUIRED) The availability of this capability. If set to required, the target may use or offer the capability with either required or optional availability. If set to optional, the target must use or offer the capability with optional availability. The same_as_target value causes this offer's availability to match the availability set in the target.

source_dictionary dictionary_path

(Optional) Path in a dictionary provided by source which contains source_name. If this field is absent, source_name identifies a capability directly routed by source. If set, source_name identifies a capability nested inside this dictionary.

Added: HEAD

OfferDirectory

Defined in fuchsia.component.decl/offer.fidl

Declares a directory offered by a component to one of its children, which may have been offered by the component's containing realm, the component itself, or one of its other children.

OrdinalFieldTypeDescription
source Ref

(Required) The provider of the capability relative to the component itself. Must be parent, self, child, or void. If set to void, then the target must offer or use the capability with OPTIONAL or TRANSITIONAL availability.

source_name name

(Required) Name identifying the directory being offered.

target Ref

(Required) Reference to the target. Must be child, collection, or a dictionary capability.

target_name name

(Required) The name by which the capability is being offered.

rights fuchsia.io/Rights

(Optional) The maximum rights that can be set by a component using this directory. IF unset, the rights are inherited from source.

subdir string[1024]

(Optional) The subdirectory of this directory to offer instead of the root. Optional.

dependency_type DependencyType

(Required) The dependency type this offer represents. A component which receives a weak offer must support the offered capability being unavailable at any point.

availability Availability

(Optional, defaults to REQUIRED) The availability of this capability. If set to required, the target may use or offer the capability with either required or optional availability. If set to optional, the target must use or offer the capability with optional availability. The same_as_target value causes this offer's availability to match the availability set in the target.

source_dictionary dictionary_path

(Optional) Path in a dictionary provided by source which contains source_name. If this field is absent, source_name identifies a capability directly routed by source. If set, source_name identifies a capability nested inside this dictionary.

Added: HEAD

OfferEventStream

Defined in fuchsia.component.decl/offer.fidl

Declares an event stream offered by a component.

OrdinalFieldTypeDescription
source Ref

(Required) The provider of the capability relative to the component itself. Must be parent, framework, child, or void. If set to void, then the target must offer or use the capability with OPTIONAL or TRANSITIONAL availability.

source_name name

(Required) Name of the event being offered.

scope vector<Ref>

(Optional) When an event is offered from framework, the scope is required and allows one to define the child (or array of children) which the event is about. When the event is offered from parent, the scope can be used to downscope the event to a certain child scope, otherwise the event will carry the scope coming from the parent.

target Ref

(Required) The destination to which the event stream is offered.

target_name name

(Required) Name under which the event stream is being offered.

RESERVED
availability Availability

(Optional, defaults to REQUIRED) The availability of this capability. If set to required, the target may use or offer the capability with either required or optional availability. If set to optional, the target must use or offer the capability with optional availability. The same_as_target value causes this offer's availability to match the availability set in the target.

OfferProtocol

Defined in fuchsia.component.decl/offer.fidl

Declares a protocol offered by a component to one of its children, which may have been offered by the component's containing realm, the component itself, or one of its other children.

To learn more about protocols, see: https://fuchsia.dev/fuchsia-src/glossary#protocol

OrdinalFieldTypeDescription
source Ref

(Required) The provider of the capability relative to the component itself. Must be parent, self, child, or void. If set to void, then the target must offer or use the capability with OPTIONAL or TRANSITIONAL availability.

source_name name

(Required) Name identifying the protocol being offered.

target Ref

(Required) Reference to the target. Must be child, collection, or a dictionary capability.

target_name name

(Required) The name by which the capability is being offered.

dependency_type DependencyType

(Required) The dependency type this offer represents. A component which receives a weak offer must support the offered capability being unavailable at any point.

availability Availability

(Optional, defaults to REQUIRED) The availability of this capability. If set to required, the target may use or offer the capability with either required or optional availability. If set to optional, the target must use or offer the capability with optional availability. The same_as_target value causes this offer's availability to match the availability set in the target.

source_dictionary dictionary_path

(Optional) Path in a dictionary provided by source which contains source_name. If this field is absent, source_name identifies a capability directly routed by source. If set, source_name identifies a capability nested inside this dictionary.

Added: HEAD

OfferResolver

Defined in fuchsia.component.decl/offer.fidl

Declares a resolver capability offered by a component to one of its children, which may have been offered by the component's containing realm, the component itself, or one of its other children.

OrdinalFieldTypeDescription
source Ref

(Required) The provider of the capability relative to the component itself. Must be parent, self, child, or void. If set to void, then the target must offer or use the capability with OPTIONAL or TRANSITIONAL availability.

source_name name

(Required) Name of the resolver being offered.

target Ref

(Required) Reference to the target. Must be child, collection, or a dictionary capability.

target_name name

(Required) Name under which the capability is being offered.

source_dictionary dictionary_path

(Optional) Path in a dictionary provided by source which contains source_name. If this field is absent, source_name identifies a capability directly routed by source. If set, source_name identifies a capability nested inside this dictionary.

Added: HEAD

OfferRunner

Defined in fuchsia.component.decl/offer.fidl

Declares a runner offered by a component to one of its children, which may have been offered by the component's containing realm, the component itself, or one of its other children.

OrdinalFieldTypeDescription
source Ref

(Required) The provider of the capability relative to the component itself. Must be parent, self, child, or void. If set to void, then the target must offer or use the capability with OPTIONAL or TRANSITIONAL availability.

source_name name

(Required) Name of the runner being offered.

target Ref

(Required) Reference to the target. Must be child, collection, or a dictionary capability.

target_name name

(Required) Name under which the capability is being offered.

source_dictionary dictionary_path

(Optional) Path in a dictionary provided by source which contains source_name. If this field is absent, source_name identifies a capability directly routed by source. If set, source_name identifies a capability nested inside this dictionary.

Added: HEAD

OfferService

Defined in fuchsia.component.decl/offer.fidl

Declares a service offered by a component to one of its children, which may have been offered by the component's containing realm, the component itself, or one of its other children.

To learn more about services, see: https://fuchsia.dev/fuchsia-src/glossary#service

OrdinalFieldTypeDescription
source Ref

(Required) The provider of the capability relative to the component itself. Must be parent, self, child, or void. If set to void, then the target must offer or use the capability with OPTIONAL or TRANSITIONAL availability.

source_name name

(Required) Name identifying the service being offered.

target Ref

(Required) Reference to the target. Must be child, collection, or a dictionary capability.

target_name name

(Required) The name under which the capability is being offered.

source_instance_filter vector<string>

(Optional) The list of allowlisted instances to be offered. Instances of the service not in this list will not be accessible by the target component. If this is not set that means all instances from the source service are offered.

renamed_instances vector<NameMapping>

(Optional) The list of allowlisted instances to be offered, with renames.

If this is set and nonempty, the set of instances in the target service will be restricted to the instances in this list, renaming source_name to target_name.

If it is set and nonempty, source_instance_filter will further restrict the set of instances to those whose target_name appears in that list. There is generally no reason to set both, but we support it for compatibility.

availability Availability

(Optional, defaults to REQUIRED) The availability of this capability. If set to required, the target may use or offer the capability with either required or optional availability. If set to optional, the target must use or offer the capability with optional availability. The same_as_target value causes this offer's availability to match the availability set in the target.

source_dictionary dictionary_path

(Optional) Path in a dictionary provided by source which contains source_name. If this field is absent, source_name identifies a capability directly routed by source. If set, source_name identifies a capability nested inside this dictionary.

Added: HEAD

OfferStorage

Defined in fuchsia.component.decl/offer.fidl

Declares a storage capability offered by a component to one of its children, such as meta storage offered by the component's containing realm or cache storage offered by the component itself.

OrdinalFieldTypeDescription
source_name name

(Required) The name of the storage capability being offered

source Ref

(Required) The provider of the capability relative to the component itself. Must be parent, self, child, or void. If set to void, then the target must offer or use the capability with OPTIONAL or TRANSITIONAL availability.

target Ref

(Required) Reference to the target. Must be child, collection, or a dictionary capability.

target_name name

(Required) The name the storage capability is being offered as

availability Availability

(Optional, defaults to REQUIRED) The availability of this capability. If set to required, the target may use or offer the capability with either required or optional availability. If set to optional, the target must use or offer the capability with optional availability. The same_as_target value causes this offer's availability to match the availability set in the target.

Program

Defined in fuchsia.component.decl/program.fidl

A program declaration.

This declaration is set by executable components to designate the runner to use and pass runner-specific program information to it.

To learn more about runners, see: https://fuchsia.dev/fuchsia-src/glossary#runner

OrdinalFieldTypeDescription
runner name

The name of the runner to use to run the component. Must match a RunnerRegistration in the component's environment. If this value is not supplied, the component must 'use' a runner. If this value is supplied, the component may 'use' a runner, but it must be identical (matching name, from environment).

info fuchsia.data/Dictionary

(Required) Information about the program to run when the component is executed. The component manager provides the contents of this dictionary to the runner when executing this program.

For instance, this might contain a path to the program's executable image, or program arguments.

  • The keys represent namespaced properties, delimited by ".".
  • Properties may be nested in values, but only in the case of an object vector.

Protocol

Defined in fuchsia.component.decl/capability.fidl

Declares a protocol capability backed by this component.

To learn more about protocols, see: https://fuchsia.dev/fuchsia-src/glossary#protocol

OrdinalFieldTypeDescription
name name

(Required) The name of this protocol.

source_path string[1024]

(Optional) The path to the protocol in the component's outgoing directory.

Not set for built-in capabilities.

Resolver

Defined in fuchsia.component.decl/capability.fidl

Declares a resolver which is responsible for resolving component URLs to actual components. See fuchsia.component.resolution.Resolver for the protocol resolvers are expected to implement.

OrdinalFieldTypeDescription
name name

(Required) The name of this resolver.

Must be unique among resolvers declared in the same ComponentDecl.

source_path string[1024]

(Optional) The path to the resolver protocol in the component's outgoing directory

Not set for built-in capabilities.

ResolverRegistration

Defined in fuchsia.component.decl/environment.fidl

A mapping of URL scheme to resolver name.

OrdinalFieldTypeDescription
resolver name

(Required) The name of the resolver.

source Ref

(Required) The provider of the capability relative to the component itself. Must be parent, self, or child.

scheme url_scheme

(Required) The URL scheme the resolver is registered to handle. Only one resolver may be registered to a particular URL scheme. The URL scheme must start with a lowercase ASCII letter (a-z), and may contain lowercase ASCII letters, digits, +, -, and ..

Runner

Defined in fuchsia.component.decl/capability.fidl

Declares a runner capability backed by a service.

OrdinalFieldTypeDescription
name name

(Required) The name of this runner.

Must unique among runners declared in the same ComponentDecl.

source_path string[1024]

(Optional) The path to the runner protocol in the component's outgoing directory.

Not set for built-in capabilities.

RunnerRegistration

Defined in fuchsia.component.decl/environment.fidl

A repository of the runners available in an environment.

OrdinalFieldTypeDescription
source_name name

(Required) The name of the runner capability as it's exposed to, offered, or defined by this component.

source Ref

(Required) The provider of the capability relative to the component itself. Must be parent, self, or child.

target_name name

(Required) The name by which the runner is made available in this environment.

Service

Defined in fuchsia.component.decl/capability.fidl

Declares a service capability backed by this component.

To learn more about services, see: https://fuchsia.dev/fuchsia-src/glossary#service

OrdinalFieldTypeDescription
name name

(Required) The name of this service.

source_path string[1024]

(Optional) The path to the service in the component's outgoing directory.

Not set for built-in capabilities.

Storage

Defined in fuchsia.component.decl/capability.fidl

Declares a storage capability backed by a directory from which data, cache, or meta storage can be offered.

OrdinalFieldTypeDescription
name name

(Required) The name of this storage

source Ref

(Required) The provider of the backing directory capability relative to the component itself. Must be parent, self, or child.

backing_dir name

(Required) The name of the directory capability from source that backs the storage.

subdir string[1024]

(Optional) The subdirectory of the source directory that will back the storage

storage_id StorageId

(Required) This enum determines how to key a component's isolated storage directory. Each option corresponds to a different key'ing strategy.

UseConfiguration

Defined in fuchsia.component.decl/use.fidl

Added: HEAD

OrdinalFieldTypeDescription
source Ref

(Required) The provider of the configuration relative to the component itself. Must be parent, self, child.

source_name name

(Required) Name identifying the configuration, by which it was presented to this component.

target_name name

(Required) The name that the component sees for this configuration. This must match a key in the 'config' schema for this component. The matching config field's type must match this configuration type.

availability Availability

(Optional, defaults to REQUIRED) The availability of this capability. If set to required, the component is likely to malfunction if this capability is not provided. If set to optional, the component can handle the capability's absence.

UseDirectory

Defined in fuchsia.component.decl/use.fidl

Declares a directory used by a component, which was offered to it.

OrdinalFieldTypeDescription
source Ref

(Required) The provider of the directory relative to the component itself. Must be parent, framework, or child.

source_name name

(Required) Name identifying the directory, by which it was presented to this component.

target_path string[1024]

(Required) The path where the capability should be installed in the component's namespace.

Must be an absolute path starting with /.

rights fuchsia.io/Rights

(Required) The rights required by the component to use this directory.

subdir string[1024]

(Optional) The subdirectory of this directory to use instead of the root.

dependency_type DependencyType

(Required) The dependency type this use represents.

A component which offers a capability to a child from itself and uses a capability from the same child, must mark the dependency as weak. A weak dependency implies that the capability may become unavailable at any point. Taking a strong dependency on a child's capability will cause this the child to shut down before its parent. When using a weak dependency, the parent shuts down before the child.

availability Availability

(Optional, defaults to REQUIRED) The availability of this capability. If set to required, the component is likely to malfunction if this capability is not provided. If set to optional, the component can handle the capability's absence.

source_dictionary dictionary_path

(Optional) Path in a dictionary provided by source which contains source_name. If this field is absent, source_name identifies a capability directly routed by source. If set, source_name identifies a capability nested inside this dictionary.

Added: HEAD

UseEventStream

Defined in fuchsia.component.decl/use.fidl

Declares an EventStream used by a component.

OrdinalFieldTypeDescription
source_name name

(Required) The names of the event streams.

source Ref

(Required) The provider of the event. Must be parent, framework, or child.

scope vector<Ref>

(Optional) When an event is used from framework, the scope is required to specify the child (or array of children) which the event will be about. When the event is used from parent, the scope can be used to downscope the event to a certain child scope, otherwise the event will carry the scope coming from the parent.

target_path name

(Required) The path where the capability should be installed in the component's namespace. Must be an absolute path starting with /.

availability Availability

(Optional, defaults to REQUIRED) The availability of this capability. If set to required, the component is likely to malfunction if this capability is not provided. If set to optional, the component can handle the capability's absence.

filter fuchsia.data/Dictionary

(Optional) Filter for the event stream. The structure of the filter depends on the event stream type. Only supported for the DirectoryReady and CapabilityRequested event types.

Added: 9

UseProtocol

Defined in fuchsia.component.decl/use.fidl

Declares a protocol used by a component, which was offered to it.

A protocol is a service with a single instance, provided by a single FIDL protocol.

OrdinalFieldTypeDescription
source Ref

(Required) The provider of the protocol relative to the component itself. Must be parent, framework, debug, capability or child.

source_name name

(Required) Name identifying the protocol, by which it was presented to this component.

target_path string[1024]

(Required) The path where the capability should be installed in the component's namespace.

Must be an absolute path starting with /.

dependency_type DependencyType

(Required) The dependency type this use represents.

A component which offers a capability to a child from itself and uses a capability from the same child, must mark the dependency as weak. A weak dependency implies that the capability may become unavailable at any point. Taking a strong dependency on a child's capability will cause this the child to shut down before its parent. When using a weak dependency, the parent shuts down before the child.

availability Availability

(Optional, defaults to REQUIRED) The availability of this capability. If set to required, the component is likely to malfunction if this capability is not provided. If set to optional, the component can handle the capability's absence.

source_dictionary dictionary_path

(Optional) Path in a dictionary provided by source which contains source_name. If this field is absent, source_name identifies a capability directly routed by source. If set, source_name identifies a capability nested inside this dictionary.

Added: HEAD

UseRunner

Defined in fuchsia.component.decl/use.fidl

Declares runner used by a component.

Added: HEAD

OrdinalFieldTypeDescription
source Ref

(Required) The provider of the runner relative to the component. Must be parent, child, framework, or environment.

source_name name

(Required) Name identifying the runner, by which it was presented to this component.

source_dictionary dictionary_path

(Optional) Path in a dictionary provided by source which contains source_name. If this field is absent, source_name identifies a capability directly routed by source. If set, source_name identifies a capability nested inside this dictionary.

Added: HEAD

UseService

Defined in fuchsia.component.decl/use.fidl

Declares a service used by a component, which was offered to it.

To learn more about services, see: https://fuchsia.dev/fuchsia-src/glossary#service

OrdinalFieldTypeDescription
source Ref

(Required) The provider of the protocol relative to the component itself. Must be parent, framework, self, or child.

source_name name

(Required) Name identifying the service, by which it was presented to this component.

target_path string[1024]

(Required) The path where the capability should be installed in the component's namespace.

Must be an absolute path starting with /.

dependency_type DependencyType

(Required) The dependency type this use represents.

A component which offers a capability to a child from itself and uses a capability from the same child, must mark the dependency as weak. A weak dependency implies that the capability may become unavailable at any point. Taking a strong dependency on a child's capability will cause this the child to shut down before its parent. When using a weak dependency, the parent shuts down before the child.

availability Availability

(Optional, defaults to REQUIRED) The availability of this capability. If set to required, the component is likely to malfunction if this capability is not provided. If set to optional, the component can handle the capability's absence.

source_dictionary dictionary_path

(Optional) Path in a dictionary provided by source which contains source_name. If this field is absent, source_name identifies a capability directly routed by source. If set, source_name identifies a capability nested inside this dictionary.

Added: HEAD

UseStorage

Defined in fuchsia.component.decl/use.fidl

Declares storage used by a component, which was offered to it.

OrdinalFieldTypeDescription
source_name name

(Required) Name identifying the storage, by which it was presented to this component.

target_path string[1024]

(Required) The path where the capability should be installed in the component's namespace.

Must be an absolute path starting with /.

availability Availability

(Optional, defaults to REQUIRED) The availability of this capability. If set to required, the component is likely to malfunction if this capability is not provided. If set to optional, the component can handle the capability's absence.

UNIONS

Capability flexible

Defined in fuchsia.component.decl/capability.fidl

Declares a capability defined by this component.

OrdinalVariantTypeDescription
service Service
protocol Protocol
directory Directory
storage Storage
runner Runner
resolver Resolver
event_stream EventStream
Added: 8
dictionary Dictionary
Added: HEAD
config Configuration
Added: HEAD

ConfigChecksum flexible

Defined in fuchsia.component.decl/config.fidl

The checksum produced for a configuration interface. Two configuration interfaces are the same if their checksums are the same.

OrdinalVariantTypeDescription
sha256 uint8[32]

A SHA-256 hash produced over a component's config interface.

ConfigSingleValue flexible

Defined in fuchsia.component.decl/config.fidl

A single configuration value.

Added: 12
OrdinalVariantTypeDescription
bool bool
uint8 uint8
uint16 uint16
uint32 uint32
uint64 uint64
int8 int8
int16 int16
int32 int32
int64 int64
string string

ConfigValue flexible

Defined in fuchsia.component.decl/config.fidl

A configuration value which can be provided to a component.

Used both for storing configuration at-rest and in runtime configuration APIs.

Added: 12
OrdinalVariantTypeDescription
single ConfigSingleValue
vector ConfigVectorValue

ConfigValueSource flexible

Defined in fuchsia.component.decl/config.fidl

Strategies available for resolving configuration values.

OrdinalVariantTypeDescription
package_path string

(Required) The path within the component's package at which to find config value files.

ConfigVectorValue flexible

Defined in fuchsia.component.decl/config.fidl

A vector configuration value.

Added: 12
OrdinalVariantTypeDescription
bool_vector vector<bool>
uint8_vector vector<uint8>
uint16_vector vector<uint16>
uint32_vector vector<uint32>
uint64_vector vector<uint64>
int8_vector vector<int8>
int16_vector vector<int16>
int32_vector vector<int32>
int64_vector vector<int64>
string_vector vector<string>

DebugRegistration flexible

Defined in fuchsia.component.decl/environment.fidl

Declares a capability registered in the debug section of an environment.

OrdinalVariantTypeDescription
protocol DebugProtocolRegistration

Expose flexible

Defined in fuchsia.component.decl/expose.fidl

Declares a capability exposed to either a component's containing realm or to the framework. For example, a legacy service exposed by the component at runtime.

OrdinalVariantTypeDescription
service ExposeService
protocol ExposeProtocol
directory ExposeDirectory
runner ExposeRunner
resolver ExposeResolver
dictionary ExposeDictionary
Added: HEAD
config ExposeConfiguration
Added: HEAD

LayoutConstraint flexible

Defined in fuchsia.component.decl/config.fidl

OrdinalVariantTypeDescription
max_size uint32

LayoutParameter flexible

Defined in fuchsia.component.decl/config.fidl

OrdinalVariantTypeDescription
nested_type ConfigType

Offer flexible

Defined in fuchsia.component.decl/offer.fidl

Declares a capability offered by a component to one of its children, which may have been offered by the component's containing realm, the component itself, or one of its other children.

OrdinalVariantTypeDescription
service OfferService
protocol OfferProtocol
directory OfferDirectory
storage OfferStorage
runner OfferRunner
resolver OfferResolver
dictionary OfferDictionary
Added: HEAD
event_stream OfferEventStream
config OfferConfiguration
Added: HEAD

Ref flexible

Defined in fuchsia.component.decl/relative_refs.fidl

A reference to a capability source or destination relative to this component.

OrdinalVariantTypeDescription
parent ParentRef
self SelfRef
child ChildRef
collection CollectionRef
framework FrameworkRef
capability CapabilityRef
debug DebugRef
void_type VoidRef
environment EnvironmentRef
Added: HEAD

Use flexible

Defined in fuchsia.component.decl/use.fidl

Declares a capability used by a component, which was offered to it.

OrdinalVariantTypeDescription
service UseService
protocol UseProtocol
directory UseDirectory
storage UseStorage
event_stream UseEventStream
runner UseRunner
Added: HEAD
config UseConfiguration
Added: HEAD

BITS

ConfigMutability flexible

Type: uint32

Defined in fuchsia.component.decl/config.fidl

Allowed sources for runtime overrides of a config field's value.

Added: 12

NameValueDescription
1

Allow parent components to provide overrides for the configuration field.

CONSTANTS

NameValueTypeDescription
CONFIG_KEY_MAX_SIZE 64 uint32

Config keys can only consist of these many bytes

MAX_CHILD_NAME_LENGTH 1024 uint32
MAX_MONIKER_LENGTH 4096 uint32
MAX_NAME_LENGTH 100 uint32
MAX_NUM_EVENT_STREAM_SUBSCRIPTIONS 100 uint64

The maximum number of EventSubscriptions in an EventStream.

MAX_PATH_LENGTH 1024 uint32
MAX_URL_SCHEME_LENGTH 100 uint32

ALIASES

NameValueDescription
ConfigKey string[CONFIG_KEY_MAX_SIZE]

The string identifier for a config field.

child_name string[MAX_CHILD_NAME_LENGTH]
dictionary_path string[MAX_PATH_LENGTH]

Path in a dictionary. The format is similar to a directory path, except no . or ... is allowed and each path segment must conform to the format of the name type.

The "dirname" (first to the penultimate segment, or empty if there is one segment) represents a sequence of nested dictionaries. The "basename" (last segment) identifies a capability in the last nested dictionary.

Added: HEAD
name string[MAX_NAME_LENGTH]
url_scheme string[MAX_URL_SCHEME_LENGTH]