Skip to content

Commit

Permalink
Add justfiles for several crates
Browse files Browse the repository at this point in the history
  • Loading branch information
bigspider committed Dec 16, 2024
1 parent 1bbb5c7 commit 016d32d
Show file tree
Hide file tree
Showing 6 changed files with 116 additions and 0 deletions.
14 changes: 14 additions & 0 deletions app-sdk/justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

# build for both native and riscv targets
build:
cargo build --release --target=x86_64-unknown-linux-gnu
cargo build --release --target=riscv32i-unknown-none-elf

# build for native target
build-native:
cargo build --release --target=x86_64-unknown-linux-gnu

# build for riscv target
build-riscv:
cargo build --release --target=riscv32i-unknown-none-elf

23 changes: 23 additions & 0 deletions apps/bitcoin/app/justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
run:
cargo run

# build for both native and riscv targets
build:
cargo build --release --target=x86_64-unknown-linux-gnu
cargo build --release --target=riscv32i-unknown-none-elf

# build for native target
build-native:
cargo build --release --target=x86_64-unknown-linux-gnu

# build for riscv target
build-riscv:
cargo build --release --target=riscv32i-unknown-none-elf

# disassembles the riscv binary
disassemble:
riscv64-linux-gnu-objdump -d target/riscv32i-unknown-none-elf/release/vnd-bitcoin

# show the sections of the riscv binary
show-sections:
readelf -S target/riscv32i-unknown-none-elf/release/vnd-bitcoin
23 changes: 23 additions & 0 deletions apps/sadik/app/justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
run:
cargo run

# build for both native and riscv targets
build:
cargo build --release --target=x86_64-unknown-linux-gnu
cargo build --release --target=riscv32i-unknown-none-elf

# build for native target
build-native:
cargo build --release --target=x86_64-unknown-linux-gnu

# build for riscv target
build-riscv:
cargo build --release --target=riscv32i-unknown-none-elf

# disassembles the riscv binary
disassemble:
riscv64-linux-gnu-objdump -d target/riscv32i-unknown-none-elf/release/vnd-test

# show the sections of the riscv binary
show-sections:
readelf -S target/riscv32i-unknown-none-elf/release/vnd-test
5 changes: 5 additions & 0 deletions apps/sadik/client/justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

# build for both native and riscv targets
integration-tests:
cargo test --features speculos-tests

23 changes: 23 additions & 0 deletions apps/test/app/justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
run:
cargo run

# build for both native and riscv targets
build:
cargo build --release --target=x86_64-unknown-linux-gnu
cargo build --release --target=riscv32i-unknown-none-elf

# build for native target
build-native:
cargo build --release --target=x86_64-unknown-linux-gnu

# build for riscv target
build-riscv:
cargo build --release --target=riscv32i-unknown-none-elf

# disassembles the riscv binary
disassemble:
riscv64-linux-gnu-objdump -d target/riscv32i-unknown-none-elf/release/vnd-test

# show the sections of the riscv binary
show-sections:
readelf -S target/riscv32i-unknown-none-elf/release/vnd-test
28 changes: 28 additions & 0 deletions vm/justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
run:
speculos build/nanos2/bin/app.elf

run-nanox:
speculos build/nanox/bin/app.elf

run-nanosplus:
speculos build/nanos2/bin/app.elf

run-flex:
speculos build/flex/bin/app.elf

run-stax:
speculos build/stax/bin/app.elf


load-nanosplus:
python3 -m ledgerblue.runScript --scp --fileName build/nanos2/bin/app.apdu --elfFile build/nanos2/bin/app.elf

load-nanox:
python3 -m ledgerblue.runScript --scp --fileName build/nanox/bin/app.apdu --elfFile build/nanox/bin/app.elf

load-flex:
python3 -m ledgerblue.runScript --scp --fileName build/flex/bin/app.apdu --elfFile build/flex/bin/app.elf

load-stax:
python3 -m ledgerblue.runScript --scp --fileName build/stax/bin/app.apdu --elfFile build/stax/bin/app.elf

0 comments on commit 016d32d

Please sign in to comment.