Skip to content

Building


Before building your application, you must configure your project at the very least.

After you have done that, your application can be built using a local copy of this repository or via installation with Cargo.

Tip

For a more streamlined workflow, consider using the built-in app build target of Hatch.

Local repository

The recommended method of downloading the repository is via the source asset archives attached to each release.

The latest release can always be downloaded at the following URLs:

Specific releases may be downloaded at the following URLs, replacing X.Y.Z with the desired version:

After unpacking the repository, enter the directory and run:

cargo build --release

The executable will be located at target/release/pyapp.exe if on Windows or target/release/pyapp otherwise. If a particular target has been set (or when cross compiling since one will always be set), then the release directory will be nested one level deeper under target/<TARGET>.

Installation

Select the directory in which to build the executable with the --root option and run:

cargo install pyapp --force --root <DIR>

The executable will be located at <DIR>/bin/pyapp.exe if on Windows or <DIR>/bin/pyapp otherwise.

Specific versions may be chosen with the --version flag.

Note: If you want to cross compile, this method of building is currently unsupported.

Cross compilation

Configuration for cross is validated by CI to ensure all known environment variable options are passed through to the containers.

When embedding the project or the distribution using a local path, you must use the local repository way of building and ensure that the configured files to embed reside within the repository and the options refer to relative paths.