Skip to content
FutureBlitz

    Install

    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 colors
    Output
          Adding colors v1.4.2
          Adding palette v0.3.0
           Added colors v1.4.2 to dependencies

    fb 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 rangesWhat colors = "1.4" means, and how fb picks one version of each package
    The indexWhat fb reads to learn a package’s versions, and where it downloads them from
    Registries and mirrorsUsing a company’s registry, a mirror, or one on disk
    The package policyWhat may be published, and what happens to what may not

    The registry’s addresses

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