Project name
How Shuttle project names work
Your Shuttle Project Name determines which subdomain your project is hosted on (https://<project-name>.shuttleapp.rs/
).
Therefore, your project name has to be unique.
You might also want to use a name that is short and easy to remember.
Specifying Project Name
The name of your Shuttle project can be set up in three different ways.
They are listed below in the same order as cargo-shuttle
will prioritize them.
via the --name
option
When running commands, the project name can always be overridden with the --name
option, regardless of which directory you are in.
via Shuttle.toml
The next method to specify a project name is by creating a Shuttle.toml
file at the root level of the project’s workspace.
In this file, place a key-value pair like so:
via Cargo.toml
In the absence of either of the previous two options, the project will be named based on the content of the name =
field of the [package]
section in the Cargo.toml
configuration file.
A new Shuttle project can be named by passing in a project name with the --name
option, for example:
This will create a new Axum-based project in some-directory
and update the name field in Cargo.toml
accordingly.
Workspaces
If your project is a cargo workspace the name will be taken from a Shuttle.toml
in the root of the workspace, or
from the directory name of the workspace. See Project structure.
Was this page helpful?