Add initial project structure and implement async main for Pico W
This commit is contained in:
@@ -1,14 +1,21 @@
|
|||||||
|
DIRENV := $(shell command -v direnv 2> /dev/null)
|
||||||
|
ifdef DIRENV
|
||||||
|
EXEC := direnv exec .
|
||||||
|
else
|
||||||
|
EXEC :=
|
||||||
|
endif
|
||||||
|
|
||||||
build:
|
build:
|
||||||
cargo build
|
$(EXEC) cargo build
|
||||||
|
|
||||||
run:
|
run:
|
||||||
cargo run
|
$(EXEC) cargo run
|
||||||
|
|
||||||
test:
|
test:
|
||||||
cargo test
|
$(EXEC) cargo test
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
cargo clean
|
$(EXEC) cargo clean
|
||||||
|
|
||||||
.PHONY: build run test clean
|
.PHONY: build run test clean
|
||||||
|
|
||||||
@@ -16,4 +23,4 @@ clean:
|
|||||||
# Flatpak build target
|
# Flatpak build target
|
||||||
.PHONY: flatpak-build
|
.PHONY: flatpak-build
|
||||||
flatpak-build:
|
flatpak-build:
|
||||||
flatpak-builder --force-clean build-flatpak flatpak/app.flatpak.json
|
$(EXEC) flatpak-builder --force-clean build-flatpak flatpak/app.flatpak.json
|
||||||
|
|||||||
@@ -2,6 +2,18 @@
|
|||||||
|
|
||||||
This project is an embedded Rust application for the Raspberry Pi Pico W, utilizing the Embassy async framework.
|
This project is an embedded Rust application for the Raspberry Pi Pico W, utilizing the Embassy async framework.
|
||||||
|
|
||||||
|
## Build Commands
|
||||||
|
|
||||||
|
This project uses a `Makefile` to simplify common tasks. The `Makefile` is configured to automatically use `direnv` to load the Nix environment if `direnv` is installed on your system. This ensures that the correct Rust toolchain and dependencies are available even if you haven't manually run `nix develop` or `direnv allow`.
|
||||||
|
|
||||||
|
| Command | Description |
|
||||||
|
|---------|-------------|
|
||||||
|
| `make build` | Build the project using `cargo build` |
|
||||||
|
| `make run` | Run the project using `cargo run` |
|
||||||
|
| `make test` | Run tests using `cargo test` |
|
||||||
|
| `make clean` | Clean build artifacts |
|
||||||
|
| `make flatpak-build` | Build the Flatpak package |
|
||||||
|
|
||||||
## LLM Agent Guidelines
|
## LLM Agent Guidelines
|
||||||
|
|
||||||
This project uses LLM agents for configuration and housekeeping. Please refer to [agents.md](agents.md) for the rules and guidelines governing their use.
|
This project uses LLM agents for configuration and housekeeping. Please refer to [agents.md](agents.md) for the rules and guidelines governing their use.
|
||||||
|
|||||||
Reference in New Issue
Block a user