Refactor README and flake.nix for improved development environment setup; remove embedded Rust tooling references and add Cargo productivity tools

This commit is contained in:
2026-05-23 09:56:42 -05:00
parent 6a825d1e83
commit 5794b593fa
3 changed files with 28 additions and 61 deletions
+11 -28
View File
@@ -15,8 +15,6 @@ direnv allow
When you enter the devShell (via `direnv allow` or `nix develop`), the following happens automatically:
**Git Repository**: Initializes `.git` if not present
**Rust Targets**: Automatically adds common embedded Rust targets (ARM Cortex-M, RISC-V)
**Cargo Paths**: Sets up `$HOME/.cargo/bin` in PATH for cargo-installed binaries
**Welcome Banner**: Displays available tools and quick commands
No manual setup needed! Just start coding.
@@ -24,32 +22,17 @@ No manual setup needed! Just start coding.
## Quickstart
```sh
nix flake init -t path:../flakes#rust
nix develop
cargo build
```
## Embedded Rust Support
The devShell automatically installs common embedded Rust targets via `rustup`:
| Target | Platform | Use Case |
|--------|----------|----------|
| `thumbv6m-none-eabi` | ARM Cortex-M0/M0+ | RP2040 (Pico) |
| `thumbv7em-none-eabihf` | ARM Cortex-M4F/M7F | STM32, nRF52840 |
| `riscv32imc-unknown-none-elf` | RISC-V 32-bit | ESP32-C3 (basic) |
| `riscv32imac-unknown-none-elf` | RISC-V 32-bit (atomic) | ESP32-C3 (advanced) |
**Note:** ESP32 Xtensa targets require espup or custom toolchains (see [esp-rs](https://github.com/esp-rs)).
## Flatpak Packaging
This project supports building Flatpak packages for the FeDIY application.
### Build Flatpak Package
1. Ensure you have `flatpak-builder` installed.
2. Run:
1. Run:
```bash
make flatpak-build
@@ -80,14 +63,11 @@ flatpak run com.moturpin.fediy
| **rustfmt** | Rust code formatter |
| **rust-analyzer** | Language server for IDE integration |
| **rust-src** | Rust source code (for tools like rust-analyzer) |
| **probe-rs** | Embedded debugger/flasher for ARM targets |
| **espflash** | Flashing tool for ESP32 boards |
| **openocd** | JTAG/SWD debugger for ARM and other targets |
| **minicom** | Serial terminal for device output |
| **elf2uf2-rs** | Convert ELF to UF2 format (RP2040) |
| **picotool** | Pico-specific firmware operations |
| **avrdude** | AVR microcontroller programmer |
| **ravedude** | Rapid AVR development utility |
| **cargo-deny** | Audit dependencies for advisories and license policy |
| **cargo-edit** | Add/remove/upgrade Cargo dependencies from the CLI |
| **cargo-watch** | Auto-rebuild on file changes |
| **flatpak-builder** | Build Flatpak distribution packages |
| **pre-commit** | Run pre-commit hooks |
## Testing & Development Features
@@ -109,8 +89,11 @@ cargo clippy
# Format code
cargo fmt
# Build for embedded target
cargo build --target thumbv7em-none-eabihf --release
# Watch and rebuild on changes
cargo watch -x build
# Build a Flatpak
make flatpak-build
```
## Project Layout