Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
210 changes: 210 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ members = [
"aimdb-core",
"aimdb-connectors",
"aimdb-adapters",
"aimdb-embassy-adapter",
"tools/aimdb-cli",
"examples",
]
Expand Down Expand Up @@ -45,6 +46,15 @@ clap = { version = "4.0", features = ["derive"] }
# Development dependencies
tokio-test = "0.4"

# Embassy ecosystem for embedded async
embassy-executor = { version = "0.9.1" }
embassy-time = "0.5"

# Embedded HAL for peripheral abstractions
embedded-hal = "1.0"
embedded-hal-async = "1.0"
embedded-hal-nb = "1.0"

[workspace.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
85 changes: 61 additions & 24 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,55 +1,92 @@
# AimDB Makefile
# Simple automation for common development tasks

.PHONY: help build test clean fmt clippy doc all
.PHONY: help build test clean fmt clippy doc all check test-embedded
.DEFAULT_GOAL := help

# Colors for output
GREEN := \033[0;32m
YELLOW := \033[0;33m
BLUE := \033[0;34m
RED := \033[0;31m
NC := \033[0m # No Color

## Show available commands
help:
@echo "$(GREEN)AimDB Development Commands$(NC)"
@echo ""
@echo " build Build the project"
@echo " test Run all tests"
@echo " fmt Format code"
@echo " clippy Run linter"
@echo " doc Generate docs"
@echo " clean Clean build artifacts"
@echo " check Quick development check (fmt + clippy + test)"
@echo " all Build everything"
@printf "$(GREEN)AimDB Development Commands$(NC)\n"
@printf "\n"
@printf " $(YELLOW)Core Commands:$(NC)\n"
@printf " build Build all components (std + embedded)\n"
@printf " test Run all tests (std + embedded)\n"
@printf " fmt Format code\n"
@printf " clippy Run linter\n"
@printf " doc Generate docs\n"
@printf " clean Clean build artifacts\n"
@printf "\n"
@printf " $(YELLOW)Testing Commands:$(NC)\n"
@printf " check Comprehensive development check (fmt + clippy + all tests)\n"
@printf " test-embedded Test embedded/MCU cross-compilation compatibility\n"
@printf "\n"
@printf " $(YELLOW)Convenience:$(NC)\n"
@printf " all Build everything\n"

## Core commands
build:
@echo "$(GREEN)Building AimDB...$(NC)"
cargo build --all-features
@printf "$(GREEN)Building AimDB (all combinations)...$(NC)\n"
@printf "$(YELLOW) → Building default (no_std)$(NC)\n"
cargo build
@printf "$(YELLOW) → Building std components with all features$(NC)\n"
cargo build --workspace --exclude aimdb-embassy-adapter --all-features
@printf "$(YELLOW) → Building embassy adapter (no_std only)$(NC)\n"
cd aimdb-embassy-adapter && cargo build

test:
@echo "$(GREEN)Running tests...$(NC)"
cargo test --all-features
@printf "$(GREEN)Running all tests (all combinations)...$(NC)\n"
@printf "$(YELLOW) → Testing default (no_std)$(NC)\n"
cargo test
@printf "$(YELLOW) → Testing std components with all features$(NC)\n"
cargo test --workspace --exclude aimdb-embassy-adapter --all-features
@printf "$(YELLOW) → Testing embassy adapter (no_std only)$(NC)\n"
cd aimdb-embassy-adapter && cargo test

fmt:
@echo "$(GREEN)Formatting code...$(NC)"
@printf "$(GREEN)Formatting code...$(NC)\n"
cargo fmt --all

clippy:
@echo "$(GREEN)Running clippy...$(NC)"
cargo clippy --all-targets --all-features -- -D warnings
@printf "$(GREEN)Running clippy...$(NC)\n"
@printf "$(YELLOW) → Clippy on default (no_std)$(NC)\n"
cargo clippy --all-targets -- -D warnings
@printf "$(YELLOW) → Clippy on std components with all features$(NC)\n"
cargo clippy --workspace --exclude aimdb-embassy-adapter --all-targets --all-features -- -D warnings
@printf "$(YELLOW) → Clippy on embassy adapter$(NC)\n"
cd aimdb-embassy-adapter && cargo clippy --all-targets -- -D warnings

doc:
@echo "$(GREEN)Generating documentation...$(NC)"
cargo doc --all-features --no-deps --open
@printf "$(GREEN)Generating documentation...$(NC)\n"
cargo doc --workspace --exclude aimdb-embassy-adapter --all-features --no-deps --open

clean:
@echo "$(GREEN)Cleaning...$(NC)"
@printf "$(GREEN)Cleaning...$(NC)\n"
cargo clean

## Testing commands
test-embedded:
@printf "$(BLUE)Testing embedded/MCU cross-compilation compatibility...$(NC)\n"
@printf "$(YELLOW) → Checking aimdb-core on thumbv7em-none-eabihf target$(NC)\n"
cd aimdb-core && cargo check --target thumbv7em-none-eabihf --no-default-features
@printf "$(YELLOW) → Checking aimdb-embassy-adapter on thumbv7em-none-eabihf target$(NC)\n"
cd aimdb-embassy-adapter && cargo check --target thumbv7em-none-eabihf

## Convenience commands
check: fmt clippy test
@echo "$(GREEN)Development checks completed!$(NC)"
check: fmt clippy test test-embedded
@printf "$(GREEN)Comprehensive development checks completed!$(NC)\n"
@printf "$(BLUE)✓ Code formatted$(NC)\n"
@printf "$(BLUE)✓ Linter passed$(NC)\n"
@printf "$(BLUE)✓ All feature combinations tested$(NC)\n"
@printf "$(BLUE)✓ Embedded target compatibility verified$(NC)\n"



all: build test
@echo "$(GREEN)Build and test completed!$(NC)"
@printf "$(GREEN)Build and test completed!$(NC)\n"
Loading