Skip to content

Commit beb3156

Browse files
committed
chore: artifact -> package
1 parent 9ae9b6f commit beb3156

File tree

3 files changed

+57
-57
lines changed

3 files changed

+57
-57
lines changed

docs/concepts/manifest-builds.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
22
title: "Builds"
3-
description: How to use Flox environments to build artifacts
3+
description: Understanding how to build packages with Flox
44
---
55

66
The typical development lifecycle involves a step where your source code and
7-
potentially some other assets are bundled together into an artifact.
7+
potentially some other assets are bundled together into a package.
88
That could be a compiled executable, an archive containing source files, or
99
something else entirely.
1010
A Flox environment ensures that the same set of tools, dependencies, and
@@ -17,18 +17,18 @@ during your builds as you do during development.
1717

1818
Builds are defined in the `[build]` section of the manifest.
1919
Each build specified in the `[build]` section corresponds to a different
20-
artifact.
21-
This allows you to produce multiple artifacts from a given set of sources,
20+
package.
21+
This allows you to produce multiple packages from a given set of sources,
2222
for example to produce different versions of a compiled binary both with
2323
and without debug symbols.
2424

2525
Configuring a build mostly entails providing a short Bash script containing the
26-
instructions to build the artifact.
26+
instructions to build the package.
2727
This script often contains the same commands you would normally run to build
28-
the artifact in your shell e.g. `make`, `cargo build`, etc.
28+
the package in your shell e.g. `make`, `cargo build`, etc.
2929
Flox runs this script inside an activation of the environment so that the tools
3030
used to develop the software are available during the build.
31-
The script must also place the artifact into a directory called `$out`,
31+
The script must also place the package into a directory called `$out`,
3232
but we'll provide more details on that aspect in just a moment.
3333

3434
An example build definition for a Rust project called `myproject` looks like
@@ -45,7 +45,7 @@ command = '''
4545

4646
As you can see, it's very simple.
4747

48-
### Where to put artifacts
48+
### Where to put packages
4949

5050
To keep the output of a build separate from the source files,
5151
every build is supplied with a directory whose path is stored in a variable
@@ -106,10 +106,10 @@ obvious.
106106

107107
At the end of the day, a "build" is just a script that runs in your activated
108108
environment and places one or more files into a predefined directory.
109-
Once that build is done, the artifact can be [published][publish-concept] so
109+
Once that build is done, the package can be [published][publish-concept] so
110110
that your or anyone else in your organization can install it into their environment.
111111
This can be a very convenient method of distributing files.
112-
Sharing artifacts with other users is only possible with an organization.
112+
Sharing packages with other users is only possible with an organization.
113113
See the [organizations][organizations-concept] page for more details on organizations.
114114

115115
In short, if you have a file that can be copied into the `$out` directory,
@@ -143,35 +143,35 @@ Say that your organization uses [grpc][grpc] to communicate between services.
143143
You could vendor the `.proto` files in your project's repository, or store
144144
the `.proto` files in a separate repository.
145145
However, you could also write a build that copies these `.proto` files and
146-
publish the artifact.
146+
publish the package.
147147
This allows you to version and attach metadata to the `.proto` files,
148-
and any team that "installs" the artifact would have access to them.
148+
and any team that "installs" the package would have access to them.
149149

150150
Furthermore, since these `.proto` files are installed as a package,
151151
any environment that installs them would be notified when there are updates
152152
available.
153153

154154
## Limiting the package size
155155

156-
Your artifact likely has dependencies,
156+
Your package likely has dependencies,
157157
and those dependencies have their own dependencies,
158158
all the way down to `libc`.
159159
We call this complete set of dependencies the "transitive closure",
160-
or simply "the closure", of your artifact.
161-
A large closure for your artifact has no direct impact on runtime performance,
162-
but it means that your artifact requires more disk space to install and requires
160+
or simply "the closure", of your package.
161+
A large closure for your package has no direct impact on runtime performance,
162+
but it means that your package requires more disk space to install and requires
163163
more bandwidth to copy from one place to another.
164164

165165
By default all of the packages in the default [package group][pkg-groups] are
166-
included as dependencies of your artifacts,
167-
but these packages may only be needed by your artifact at _build_ time or _development_ time,
166+
included as dependencies of your packages,
167+
but these packages may only be needed by your package at _build_ time or _development_ time,
168168
not _run_ time.
169169
As a reminder, the default package group is called `toplevel`,
170170
and all packages installed to an environment without an explicit `pkg-group`
171171
are placed into this package group.
172172

173173
The `runtime-packages` option allows you to trim down the packages from the `toplevel`
174-
package group that are included as runtime dependencies of your artifact.
174+
package group that are included as runtime dependencies of your package.
175175
This option is a list of `install-id`s from the `toplevel` package group.
176176
As a reminder, the `install-id` is the part of the package descriptor that
177177
comes before `pkg-path` e.g. `myhello` in `myhello.pkg-path = "hello"`.
@@ -206,7 +206,7 @@ not the name of the package itself (`hello-go`).
206206

207207
The script that you specify in `command` is run on your host machine by default.
208208
This means that it may build against dependencies that are outside of your
209-
environment and the artifact may not function correctly when executed or rebuilt
209+
environment and the package may not function correctly when executed or rebuilt
210210
on another machine.
211211

212212
In order to improve the reproducibility of your build you can specify that it is
@@ -231,14 +231,14 @@ network.
231231
## Cross-platform builds
232232

233233
Currently when you build a package, it is only built for the system (`aarch64-darwin`, `x86_64-linux`, etc) that the build is being run on.
234-
This means that if you want artifacts built for multiple platforms, you need to run the build on multiple platforms.
234+
This means that if you want packages built for multiple platforms, you need to run the build on multiple platforms.
235235
One way to accomplish this is to run your builds in CI.
236236

237237
## Examples
238238

239239
We've compiled a list of example commands to demonstrate how to use Flox to
240-
build artifacts in various ecosystems.
241-
Each language guide in the Languages section of the Cookbook contains an example of building an artifact with Flox.
240+
build packages in various ecosystems.
241+
Each language guide in the Languages section of the Cookbook contains an example of building a package with Flox.
242242
For example, [this section][go-example] contains an example build for the Go language.
243243

244244
[services-concept]: ./services.md

docs/concepts/publishing.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
---
22
title: "Publishing"
3-
description: How to use Flox environments to build artifacts
3+
description: Understanding how to publish packages with Flox
44
---
55

6-
Once you've built an artifact with the [`flox build`][flox-build] command, you likely want to _use_ it somewhere.
7-
The [`flox publish`][flox-publish] command gives you the ability to upload artifacts to your private catalog so that you can _install_ them into your environments.
6+
Once you've built a package with the [`flox build`][flox-build] command, you likely want to _use_ it somewhere.
7+
The [`flox publish`][flox-publish] command gives you the ability to upload packages to your private catalog so that you can _install_ them into your environments.
88
In order to share packages with other people you must create an organization.
99
See the [organizations][organizations-concept] page for more details.
1010

11-
## Uploading an artifact
11+
## Uploading a package
1212

13-
The `flox publish <name>` command allows you to upload an artifact built with the `flox build` command, where `<name>` is the name of any build listed in the `build` section of the manifest.
13+
The `flox publish <name>` command allows you to upload a package built with the `flox build` command, where `<name>` is the name of any build listed in the `build` section of the manifest.
1414

1515
```toml
1616
# manifest.toml
@@ -26,44 +26,44 @@ $ flox publish mypkg
2626

2727
## Publish process
2828

29-
In order to make sure that the uploaded artifact can be built reproducibly,
29+
In order to make sure that the uploaded package can be built reproducibly,
3030
Flox imposes some constraints on the build and publish process.
3131

3232
- The Flox environment performing the build must tracked in a git repository.
3333
- Tracked files in the git repository must be clean.
3434
- The git repository has a remote defined, and the current revision has been pushed to it.
3535
- The Flox environment must have at least one package installed to it.
3636

37-
All of this is there to ensure that the published artifact can be locked to a point in time in the Base Catalog and an upstream source revision.
37+
All of this is there to ensure that the published package can be locked to a point in time in the Base Catalog and an upstream source revision.
3838
As a reminder, the Base Catalog is the built-in [Catalog][catalog-concept] provided by Flox.
3939

4040
As part of the `flox publish` command, the CLI will clone the git repository to a temporary directory to ensure that any files referenced in the build are tracked by the repository.
4141
A clean `flox build` is then run in this directory.
4242

43-
If the build completes successfully, the artifact, its closure (all the software it depends on), and its metadata are uploaded to your Catalog.
43+
If the build completes successfully, the package, its closure (all the software it depends on), and its metadata are uploaded to your Catalog.
4444

4545
## The published payload
4646

47-
A published artifact consists of two parts:
47+
A published package consists of two parts:
4848

49-
- The artifact metadata
50-
- The artifact itself
49+
- The package metadata
50+
- The package itself
5151

52-
The artifact metadata is uploaded to Flox servers so that the Flox CLI can see that it's available via the [`flox search`][flox-search], [`flox show`][flox-show], and [`flox install`][flox-install] commands.
53-
The artifact itself is uploaded to a Catalog Store.
52+
The package metadata is uploaded to Flox servers so that the Flox CLI can see that it's available via the [`flox search`][flox-search], [`flox show`][flox-show], and [`flox install`][flox-install] commands.
53+
The package itself is uploaded to a Catalog Store.
5454

55-
A Catalog Store is effectively a cache for published artifacts, and Flox provides one by default.
55+
A Catalog Store is effectively a cache for published packages, and Flox provides one by default.
5656
An organization can choose to provide their own Catalog Store in the form of an S3-compatible storage provider.
57-
In this case, it means that your organization has complete control over your artifacts and they will never be stored by Flox.
57+
In this case, it means that your organization has complete control over your packages and they will never be stored by Flox.
5858
To pursue this option, contact Flox directly.
5959

60-
## Consuming published artifacts
60+
## Consuming published packages
6161

62-
Once you have uploaded an artifact via `flox publish`, the package becomes available in `flox search`, `flox show`, and `flox install`.
62+
Once you have uploaded a package via `flox publish`, the package becomes available in `flox search`, `flox show`, and `flox install`.
6363
To distinguish these packages from those provided by the Base Catalog, published packages are prefixed with the name of the user or organization.
64-
For example, if your user is called `myuser` and you publish an artifact named `hello`, the artifact will appear as `myuser/hello` in the Flox CLI.
64+
For example, if your user is called `myuser` and you publish a package named `hello`, the package will appear as `myuser/hello` in the Flox CLI.
6565

66-
When a user runs `flox install myuser/hello`, the artifact is downloaded directly from the Catalog Store that it was published to.
66+
When a user runs `flox install myuser/hello`, the package is downloaded directly from the Catalog Store that it was published to.
6767
If organizations configure their own Catalog Store (rather than using the default Catalog Store provided by Flox), it is never downloaded to or cached on Flox servers.
6868

6969
### Sharing

docs/tutorials/build-and-publish.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Build and publish packages
3-
description: Building and publishing software artifacts with Flox
3+
description: Building and publishing custom packages with Flox
44
---
55

66
# Building with Flox
@@ -86,16 +86,16 @@ Everything appears to be in working order, so now we can discuss what it looks l
8686
## Define a build
8787

8888
In order to define a Flox build, we add an entry to the `[build]` section of the manifest.
89-
Every name added to the `build` section creates a new artifact.
90-
In our case the artifact will be the compiled Go program, but you can use Flox to build all kinds of things.
89+
Every name added to the `build` section creates a new package.
90+
In our case the package will be the compiled Go program, but you can use Flox to build all kinds of things.
9191
See the [builds][build-concept] page for more examples of what you can build with Flox.
9292

9393
All that's necessary to define a build is a short script that does two things:
9494

9595
- Runs any commands necessary to build the program
9696
- Copies the program to a directory called `$out`
9797

98-
The `$out` shell variable holds the path to a temporary directory where your build artifact should be placed (again, "artifact" in our case means the compiled `hello` program).
98+
The `$out` shell variable holds the path to a temporary directory where your build package should be placed (again, "package" in our case means the compiled `hello` program).
9999
The `$out` directory adheres to the [Filesystem Hierarchy Standard (FHS)][fhs], which is just the formal name for the convention of placing executable files in `/bin`, libraries in `/lib`, etc.
100100
For this `hello` program we'll want to place it in `$out/bin` since `hello` is an executable program, and that's where the FHS says to put those types of files.
101101
Flox expects you to put executables there, and if you put them somewhere else you may experience unexpected behavior.
@@ -186,18 +186,18 @@ Completed build of hello-opt-unknown in local mode
186186
✨ Build completed successfully. Output created: ./result-hello-opt
187187
```
188188

189-
## Publish the artifact
189+
## Publish the package
190190

191191
--8<-- "paid-feature.md"
192192

193-
Now that the artifact is built, we can send it somewhere.
194-
Every user has a private catalog that they can publish artifacts to.
193+
Now that the package is built, we can send it somewhere.
194+
Every user has a private catalog that they can publish packages to.
195195
In order to share packages with other people you must create an organization.
196196
This is a paid feature, and if you would like access to it you should contact Flox directly.
197197
See the [organizations][organizations-concept] page for more details.
198198

199-
Now that you've built the artifact you can [publish][publish-concept] it to your private catalog via the `flox publish` command.
200-
This command has a few requirements to make sure that the artifact you're publishing can be built by other people reproducibly:
199+
Now that you've built the package you can [publish][publish-concept] it to your private catalog via the `flox publish` command.
200+
This command has a few requirements to make sure that the package you're publishing can be built by other people reproducibly:
201201

202202
- The Flox environment must be in a git repository.
203203
- All tracked files in the repository must be clean.
@@ -211,16 +211,16 @@ Let's say that we've done all of that so that we can publish our `hello` program
211211
flox [myproject] $ flox publish hello
212212
```
213213

214-
The `flox publish` command performs a clean build of the artifact in a temporary directory to ensure that the build doesn't depend on anything outside of the git repository.
214+
The `flox publish` command performs a clean build of the package in a temporary directory to ensure that the build doesn't depend on anything outside of the git repository.
215215

216-
In order to upload an artifact during the publish process (and not just upload metadata), you must provide a signing key via the `--signing-private-key` option.
217-
Attempting to upload an artifact without a signing key is an error because other users would not be able to install the artifact.
216+
In order to upload a package during the publish process (and not just upload metadata), you must provide a signing key via the `--signing-private-key` option.
217+
Attempting to upload a package without a signing key is an error because other users would not be able to install the package.
218218

219-
## Install the artifact
219+
## Install the package
220220

221-
Now that you've published the artifact, it will show up in [`flox search`][flox-search] and [`flox show`][flox-show], and can be installed via [`flox install`][flox-install].
221+
Now that you've published the package, it will show up in [`flox search`][flox-search] and [`flox show`][flox-show], and can be installed via [`flox install`][flox-install].
222222
The package will appear with your username or organization name prefixed to the package name.
223-
Let's say your username is `myuser` and the package name is `hello`, in which case the published artifact will appear as `myuser/hello` in `flox show`, `flox search`, and `flox install`.
223+
Let's say your username is `myuser` and the package name is `hello`, in which case the published package will appear as `myuser/hello` in `flox show`, `flox search`, and `flox install`.
224224
Let's see that in action with `flox search`:
225225

226226
```text

0 commit comments

Comments
 (0)