Packages
Packages
How FutureBlitz programs use packages from a registry, and where the registry is.
A package is a folder of FutureBlitz code with a project.toml.
A library package is one other programs use, by naming it in their [dependencies]. Packages
are published to a registry, and futureblitz.dev’s is the default, at the
package site.
Using one
fb add colorsOutput
Adding colors v1.4.2
Adding palette v0.3.0
Added colors v1.4.2 to dependenciesfb add writes the dependency into project.toml, resolves its version
and those of what it needs, records them in fb.lock, and downloads
them. Then Import colors uses it. A build downloads what fb.lock names and isn’t in the cache
yet, and works offline after that.
How it fits together
| Versions and ranges | What colors = "1.4" means, and how fb picks one version of each package |
| The index | What fb reads to learn a package’s versions, and where it downloads them from |
| Registries and mirrors | Using a company’s registry, a mirror, or one on disk |
| The package policy | What may be published, and what happens to what may not |
The registry’s addresses
| Address | What it is |
|---|---|
| https://pkg.futureblitz.dev/ | The package site: search, each package’s page and docs, accounts, and tokens |
| https://index.futureblitz.dev/ | The index fb reads, one file a package |
| https://dl.futureblitz.dev/ | The packages’ archives |
| https://pkg.futureblitz.dev/api/v1/ | The API that fb publish, fb yank, fb owner, and fb login use |
To publish a package of your own, see Writing a package.
Report an issue with this page or with FutureBlitz on GitHub.