Add Justfile #1

Merged
psajna merged 7 commits from just-add-justfile into main 2026-06-24 19:17:50 -07:00
Collaborator

I tried creating a fancier Justfile but things weren't working so... this works :)

I tried creating a fancier Justfile but things weren't working so... this works :)
byron force-pushed just-add-justfile from 0ab53eb09e to 670524b46f 2026-05-25 22:01:30 -07:00 Compare
Justfile Outdated
@ -0,0 +6,4 @@
# TODO: Find a better way to bring in the env vars. Just can work with dotenv files but that requires manually syncing with the esp export script.
twatch:
source "$HOME/export-esp.sh" && cargo run --release --features=twatch -Zbuild-std="core,alloc" --target=xtensa-esp32-none-elf
Owner

the quotes around "core,alloc" are inconsistent with the command for waveshare, which one is right?

the quotes around "core,alloc" are inconsistent with the command for waveshare, which one is right?
Author
Collaborator

Actually they were all copies lazily from the README... It shouldn't matter but maybe let's remove the quotes for consistency.

Actually they were all copies lazily from the README... It shouldn't matter but maybe let's remove the quotes for consistency.
psajna marked this conversation as resolved
Justfile Outdated
@ -0,0 +12,4 @@
source "$HOME/export-esp.sh" && cargo build --release --no-default-features --features=waveshare-c6 -Zbuild-std=core,alloc --target=riscv32imac-unknown-none-elf
waveshare: build-waveshare
source "$HOME/export-esp.sh" && cargo run --release --features=waveshare-c6 -Zbuild-std=core,alloc --target=riscv32imac-unknown-none-elf
Owner

I'm not sure if waveshare needs export-esp.sh, I think that's just for xtensa.

I'm not sure if waveshare needs export-esp.sh, I think that's just for xtensa.
Author
Collaborator

Seems like you're right. I updated that.

Seems like you're right. I updated that.
psajna marked this conversation as resolved
Justfile Outdated
@ -0,0 +18,4 @@
probe-rs run --chip esp32c6 --binary-format idf --preverify target/riscv32imac-unknown-none-elf/release/rust-dumbwatch
simulate:
source "$HOME/export-esp.sh" && cargo run --release --features=simulator --no-default-features
Owner

simulate doesn't need this either.

simulate doesn't need this either.
byron marked this conversation as resolved
psajna force-pushed just-add-justfile from da8b3450d4 to 5aac62ccbc 2026-05-26 19:08:48 -07:00 Compare
Justfile Outdated
@ -0,0 +14,4 @@
waveshare: build-waveshare
cargo run --release --features=waveshare-c6 -Zbuild-std=core,alloc --target=riscv32imac-unknown-none-elf
probe-waveshare:
Owner

maybe add a gdb-waveshare if you want?
probe-rs gdb --chip esp32c6 target/riscv32imac-unknown-none-elf/release/rust-dumbwatch
might also want a build-waveshare-debug then make that a dep and switch the path from target/release to target/debug

maybe add a gdb-waveshare if you want? `probe-rs gdb --chip esp32c6 target/riscv32imac-unknown-none-elf/release/rust-dumbwatch` might also want a `build-waveshare-debug` then make that a dep and switch the path from `target/release` to `target/debug`
Owner

actually the dep should be probe-waveshare: build-waveshare, and the dep waveshare: build-waveshare can be removed, because that's just running cargo build before cargo run (which is unneccessary)

actually the dep should be `probe-waveshare: build-waveshare`, and the dep `waveshare: build-waveshare` can be removed, because that's just running cargo build before cargo run (which is unneccessary)
Author
Collaborator

You're right, it's not C and it's not a makefile haha...

You're right, it's not C and it's not a makefile haha...
byron marked this conversation as resolved
psajna requested review from psajna 2026-05-26 19:35:11 -07:00
Author
Collaborator

I also added a build-twatch since sometimes I want to just see if it builds without running.

I also added a `build-twatch` since sometimes I want to just see if it builds without running.
Justfile Outdated
@ -0,0 +21,4 @@
cargo build --features=waveshare-c6 -Zbuild-std=core,alloc --target=riscv32imac-unknown-none-elf
gdb-waveshare: build-waveshare-debug
probe-rs gdb --chip esp32c6 target/riscv32imac-unknown-none-elf/release/rust-dumbwatch
Owner

path should be debug

path should be debug
psajna marked this conversation as resolved
Justfile Outdated
@ -0,0 +15,4 @@
cargo run --release --features=waveshare-c6 -Zbuild-std=core,alloc --target=riscv32imac-unknown-none-elf
probe-waveshare:
probe-rs run --chip esp32c6 --binary-format idf --preverify target/riscv32imac-unknown-none-elf/release/rust-dumbwatch
Owner

same here ideally

same here ideally
Owner

and dep for build added

and dep for build added
README.md Outdated
@ -21,3 +20,4 @@
cargo run --release --features=twatch -Zbuild-std=core,alloc --target=xtensa-esp32-none-elf
```
### Waveshare
Owner

might wanna update these build instructions to reference the justfile or at least mention it's existence.

might wanna update these build instructions to reference the justfile or at least mention it's existence.
byron force-pushed just-add-justfile from 2cd76d06a0 to 2ca23a42e9 2026-06-07 20:46:19 -07:00 Compare
Justfile Outdated
@ -0,0 +14,4 @@
waveshare:
cargo run --release --features=waveshare-c6 -Zbuild-std=core,alloc --target=riscv32imac-unknown-none-elf
probe-waveshare:
Owner
probe-waveshare: build-waveshare-debug
```suggestion probe-waveshare: build-waveshare-debug ```
byron force-pushed just-add-justfile from 6b4e0eaac8 to 5f7ca5cdbc 2026-06-22 21:51:43 -07:00 Compare
psajna approved these changes 2026-06-24 19:17:20 -07:00
psajna merged commit 5b2a653da6 into main 2026-06-24 19:17:50 -07:00
psajna referenced this pull request from a commit 2026-06-24 19:17:50 -07:00
byron deleted branch just-add-justfile 2026-06-24 21:10:14 -07:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
psajna/SAMwise-GamWatch!1
No description provided.