-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
414 additions
and
3 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
week-2/Lesson 3 - Concurrency with Rust/rayon-challenge/Cargo.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[package] | ||
name = "rayon-challenge" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] | ||
rayon = "1.5.3" | ||
num_cpus = "1.13.1" |
39 changes: 39 additions & 0 deletions
39
week-2/Lesson 3 - Concurrency with Rust/rayon-challenge/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
SHELL := /bin/bash | ||
.PHONY: help clean lint format test doc build run bump | ||
|
||
help: | ||
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' | ||
|
||
clean: ## Remove all build artifacts | ||
cargo clean | ||
|
||
lint: ## Lint code | ||
@rustup component add rustfmt 2> /dev/null | ||
cargo clippy | ||
|
||
format: ## Format code | ||
@rustup component add rustfmt 2> /dev/null | ||
cargo fmt | ||
|
||
test: ## Run tests | ||
cargo test | ||
|
||
doc: ## Generate documentation | ||
cargo doc --no-deps | ||
|
||
bench: ## Run benchmarks | ||
cargo bench | ||
|
||
build: ## Build | ||
cargo build | ||
|
||
all: clean lint format test doc build ## Build and run | ||
|
||
run: ## Run | ||
cargo run | ||
|
||
bump: ## Bump version | ||
@echo "Current version: $$(cargo pkgid | grep -o '#.*' | cut -d# -f2)" | ||
@read -p "Enter new version: " new_version && \ | ||
sed -i "s/version = \".*\"/version = \"$$new_version\"/" Cargo.toml && \ | ||
echo "Updated to new version: $$(cargo pkgid | grep -o '#.*' | cut -d# -f2)" |
Oops, something went wrong.