target_dir := "target" repo_name := file_name(justfile_directory()) project_name := repo_name # Build the default variant of this package, its doc and perform all available # checks default: build doc check # Build all variants of this package, its doc and perform all available checks all: build-all doc check # Clean all products of this justfile clean: clean-build #---------- # Building #---------- # Build all variants of this package. build-all: build-debug # Build the default variant of this package. build: build-debug # Clean any products of the 'build' task clean-build: cargo clean # Build the debug version of this package. build-debug: cargo build #---------- # Checks #---------- # Run all available checks check: check-static check-test # Run cargo test with all features enabled check-test: cargo test --all-features # Run cargo test check-test-quick: cargo test # Run all static checks (i.e.: all checks but without any tests). check-static: check-formatting check-clippy # Check the formatting check-formatting: cargo fmt --all -- --check # Check clippy check-clippy: cargo clippy --all -- -D warnings #------ # Docs #------ # Build this package's documentation doc: doc-package # Clean any doc related build products clean-doc: clean-doc-package # Generates this package's full doc (including that of all its # dependencies) doc-package: cargo doc --all-features # Generates this package's full doc and launch a browser to it doc-package-preview: cargo doc --all-features --open # Generates only this package's doc (without any dependencies) doc-package-only: cargo doc --all-features --no-deps # Clean this package's doc clean-doc-package: cargo clean --doc #--------------- # Misc actions #--------------- # Format the rust code base format: cargo fmt --all #---------- # Publish #---------- # Publish this package to crates.io publish: echo ${CARGO_REGISTRY_TOKEN} | cargo login cargo publish