Skip to content

Instantly share code, notes, and snippets.

@ptdecker
Created August 8, 2024 18:45
Show Gist options
  • Save ptdecker/2b20d93f8df4d378c3c3b8db60165db2 to your computer and use it in GitHub Desktop.
Save ptdecker/2b20d93f8df4d378c3c3b8db60165db2 to your computer and use it in GitHub Desktop.
Justfile Receipts for Just Binary Builds
# Build production releases for all MacOS supported targets and documentation
[macos]
build-release: build-docs
@echo Cleaning...
@cargo clean {{cargo_args}}
@echo "Building all release binaries for 'aarch64-apple-darwin' architecture..."
@rustup target install aarch64-apple-darwin
@cargo install {{cargo_args}} --bin my-project --profile=release --target=aarch64-apple-darwin --root release/macos/aarch64 --force --path .
@echo "Building all release binaries for 'x86_64-apple-darwin' architecture..."
@rustup target install x86_64-apple-darwin
@cargo install {{cargo_args}} --bin my-project --profile=release --target=x86_64-apple-darwin --root release/macos/x86_64 --force --path .
# Build production release for linux supported targets
[linux]
build-release:
@cargo clean
@rustup target install x86_64-unknown-linux-gnu
@cargo install {{cargo_args}} --bin my-project --target=x86_64-unknown-linux-gnu --root release/linux/rhel8 --force --path .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment