Skip to content

Commit 1d8a6ad

Browse files
committed
The first version
1 parent cc25589 commit 1d8a6ad

39 files changed

+1361
-840
lines changed

.github/workflows/build_linux.yml

Lines changed: 0 additions & 38 deletions
This file was deleted.

.github/workflows/build_macos.yml

Lines changed: 0 additions & 37 deletions
This file was deleted.

.github/workflows/build_windows.yml

Lines changed: 0 additions & 37 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 0 additions & 134 deletions
This file was deleted.

Cargo.toml

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,36 @@
11
[package]
2-
name = "template-rust-project"
3-
version = "0.2.3"
4-
description = "A template for Rust projects"
5-
repository = "https://github.com/habedi/template-rust-project"
2+
name = "vq"
3+
version = "0.1.0"
4+
description = "A vector quantization library for Rust"
5+
repository = "https://github.com/habedi/vq"
66
license = "MIT OR Apache-2.0"
77
readme = "README.md"
8-
keywords = ["project-template", "rust", "library", "application"]
8+
keywords = ["vq", "vector-quantization", "clustering", "nearest-neighbor", "data-compression"]
99
authors = ["Hassan Abedi <[email protected]>"]
10-
homepage = "https://github.com/habedi/template-rust-project"
11-
documentation = "https://docs.rs/template-rust-project"
10+
homepage = "https://github.com/habedi/vq"
11+
documentation = "https://docs.rs/vq"
1212
#categories = ["development-tools"]
1313
edition = "2021"
1414

1515
[lib]
16-
name = "template_rust_project"
16+
name = "vq"
1717
path = "src/lib.rs"
1818

1919
[[bin]]
20-
name = "template-rust-project"
20+
name = "vq"
2121
path = "src/main.rs"
2222

2323
[dependencies]
24-
clap = "4.5.27"
25-
log = "0.4.25"
2624
tracing = "0.1.41"
25+
tracing-subscriber = "0.3.19"
26+
ctor = "0.2.9"
27+
rand = "0.9.0"
28+
half = "2.4.1"
29+
nalgebra = "0.33.2"
2730

28-
[dev-dependencies]
31+
[dev-dependencies]
32+
criterion = { version = "0.5", features = ["html_reports"] }
33+
34+
[[bench]]
35+
name = "my_benchmarks"
36+
harness = false

Makefile

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# Variables
2-
PKG = github.com/habedi/template-rust-project
2+
PKG = github.com/habedi/vq
33
BINARY_NAME = $(or $(PROJ_BINARY), $(notdir $(PKG)))
44
BINARY = target/release/$(BINARY_NAME)
55
PATH := /snap/bin:$(PATH)
6+
CARGO_TERM_COLOR = always
7+
DEBUG_VQ = 0
68

79
# Default target
810
.DEFAULT_GOAL := help
@@ -19,22 +21,22 @@ format: ## Format Rust files
1921
.PHONY: test
2022
test: format ## Run tests
2123
@echo "Running tests..."
22-
cargo test -- --nocapture
24+
DEBUG_VQ=$(DEBUG_VQ) cargo test -- --nocapture
2325

2426
.PHONY: coverage
2527
coverage: format ## Generate test coverage report
2628
@echo "Generating test coverage report..."
27-
cargo tarpaulin --out Xml --out Html
29+
DEBUG_VQ=$(DEBUG_VQ) cargo tarpaulin --out Xml --out Html
2830

2931
.PHONY: build
3032
build: format ## Build the binary for the current platform
3133
@echo "Building the project..."
32-
cargo build --release
34+
DEBUG_VQ=$(DEBUG_VQ) cargo build --release
3335

3436
.PHONY: run
3537
run: build ## Build and run the binary
3638
@echo "Running the $(BINARY) binary..."
37-
./$(BINARY)
39+
DEBUG_VQ=$(DEBUG_VQ) ./$(BINARY)
3840

3941
.PHONY: clean
4042
clean: ## Remove generated and temporary files
@@ -54,13 +56,24 @@ install-deps: install-snap ## Install development dependencies
5456
@echo "Installing dependencies..."
5557
rustup component add rustfmt clippy
5658
cargo install cargo-tarpaulin
59+
cargo install cargo-audit
5760

5861
.PHONY: lint
5962
lint: format ## Run linters on Rust files
6063
@echo "Linting Rust files..."
61-
cargo clippy -- -D warnings
64+
DEBUG_VQ=$(DEBUG_VQ) cargo clippy -- -D warnings
6265

6366
.PHONY: publish
6467
publish: ## Publish the package to crates.io (requires CARGO_REGISTRY_TOKEN to be set)
6568
@echo "Publishing the package to Cargo registry..."
66-
cargo publish --token $(CARGO_REGISTRY_TOKEN)
69+
cargo publish --token $(CARGO_REGISTRY_TOKEN)
70+
71+
.PHONY: bench
72+
bench: ## Run benchmarks
73+
@echo "Running benchmarks..."
74+
DEBUG_VQ=$(DEBUG_VQ) cargo bench
75+
76+
.PHONY: audit
77+
audit: ## Run security audit on Rust dependencies
78+
@echo "Running security audit..."
79+
cargo audit

0 commit comments

Comments
 (0)