blob: dfeb99cf4dc5cb4d78b236f5506c51901312c8e3 [file] [log] [blame] [view]
# Component URLs {#component-urls}
A component URL is a [URL][wiki-url] that locates a component, including its
declaration, program, and assets. Component URLs are resolved to
[component declarations][doc-manifests-declaration] by a
## Usage
The primary use of component URLs is to identify a component in the definition
of a component instance, as part of a
[child declaration][doc-manifests-children].
You should not use component URLs to identify component *instances*, as multiple
component instances can share the same URL. For that purpose, instead use
## Format
A component URL can, in principle, have any [scheme][rfc-uri-scheme]. Some
common schemes you may encounter are:
- [fuchsia-pkg](#fuchsia-pkg)
- [fuchsia-boot](#fuchsia-boot)
- [http(s)](#http)
### fuchsia-pkg {#fuchsia-pkg}
A `fuchsia-pkg` component URL is a [package URL][doc-package-url] that locates a
component distributed in a [Fuchsia package][doc-package].
It has the same format as [package URL][doc-package-url], with a
[resource path][doc-package-url-resource-path] relative to the package root that
locates a [component manifest][doc-manifests]. This path is usually of the form
### fuchsia-boot {#fuchsia-boot}
A `fuchsia-boot` component URL locates a component in the system boot image.
This scheme is used to identify components that must be resolved during early
boot before a [`fuchsia-pkg`](#fuchsia-pkg) [resolver][doc-resolvers] is
available. It has the following format:
### http(s) {#http}
An `http(s)` component URL identifies a web page as a component. Such a
component could be executed as a web page in a web [runner][doc-runners], for
[doc-package]: /docs/concepts/packages/
[doc-package-url]: /docs/concepts/packages/
[doc-package-url-resource-path]: /docs/concepts/packages/