Run Swift Executables#
Noctule supports executing executables of a Swift Package project.
Run Configuration#
The dedicated “Run Swift Package” run configuration allows you to execute Swift executables.
This run configuration executes swift run commands with an optional build step.
Settings#
- Swift toolchain
- The toolchain used execute the
swift runcommand. - Package directory
- The Swift Package directory. The
swift runcommand is executed in this directory. Only packages with executable products are listed here. - Product
- Choose the executable product to run.
- Program arguments
- If you would like to pass additional arguments to the
swift runcommand, then enter them here. - Environment variables
- Here, you can define environment variables which are passed to the
swift buildcommand. - Build Settings
- This section allows configuring the fine-grained build settings. If you don’t change them, then the default values from Noctule’s directory settings are used.
Before Launch#
By default, the build step “Run Swift Build” is added in this section.
This will build only the executable product before executing it.
You can remove it to skip the build step of swift run.
Swift will only be able to run the executable if it was built before.