From 2e2759a3185cf7a4c2b171922d120875357cfacd Mon Sep 17 00:00:00 2001 From: Raphael <81313171+Einliterflasche@users.noreply.github.com> Date: Tue, 20 May 2025 14:18:33 +0200 Subject: [PATCH] Add justfile (#335) --- dprint.json | 14 ++++++++--- justfile | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 81 insertions(+), 3 deletions(-) create mode 100644 justfile diff --git a/dprint.json b/dprint.json index c97d82ac..40989a70 100644 --- a/dprint.json +++ b/dprint.json @@ -8,12 +8,20 @@ "rustfmt": "rustfmt --edition 2021", "rustfmt.associations": "**/*.rs" }, - "includes": ["**/*.{md}", "**/*.{toml}", "**/*.{rs}"], - "excludes": ["target/", "src-tauri/Cargo.toml"], + "includes": [ + "**/*.{md}", + "**/*.{toml}", + "**/*.{rs}" + ], + "excludes": [ + "target/", + "src-tauri/Cargo.toml", + "monero-sys/monero/" + ], "plugins": [ "https://plugins.dprint.dev/markdown-0.13.1.wasm", "https://github.com/thomaseizinger/dprint-plugin-cargo-toml/releases/download/0.1.0/cargo-toml-0.1.0.wasm", "https://plugins.dprint.dev/exec-0.3.5.json@d687dda57be0fe9a0088ccdaefa5147649ff24127d8b3ea227536c68ee7abeab", "https://plugins.dprint.dev/prettier-0.26.6.json@0118376786f37496e41bb19dbcfd1e7214e2dc859a55035c5e54d1107b4c9c57" ] -} +} \ No newline at end of file diff --git a/justfile b/justfile new file mode 100644 index 00000000..ad8ed30b --- /dev/null +++ b/justfile @@ -0,0 +1,70 @@ +# Show help for each of the justfile recipes +help: + @just --list + +# Build Monero C++ Codebase (currently disabled) +# build_monero_cpp: +# just update_submodules +# cd monero-sys/monero && make -j8 release + +# Clean the Monero C++ Codebase +clean_monero_cpp: + rm -rf monero-sys/monero/ + just update_submodules + +# Builds the Rust bindings for Monero +monero_sys: + just update_submodules + cd monero-sys && cargo build + +# Start the Tauri app +tauri: + cd src-tauri && cargo tauri dev --no-watch -- -- --testnet + +# Install the GUI dependencies +gui_install: + cd src-gui && yarn install + +# Start the GUI Dev Server +gui: + cd src-gui && yarn dev + +# Build the GUI +gui_build: + cd src-gui && yarn build + +# Tests the Rust bindings for Monero +test_monero_sys: + cd monero-sys && cargo test + +# Builds the ASB and Swap binaries +swap: + cd swap && cargo build --bin asb --bin=swap + +# Updates our submodules (currently only Monero C++ codebase) +update_submodules: + cd monero-sys && git submodule update --init --recursive --force + +# Run clippy checks +clippy_check: + cargo clippy --workspace --all-targets --all-features -- -D warnings + +# Check the bindings for the Tauri API +check_bindings: + cd src-gui && yarn run check-bindings + +# Generate the bindings for the Tauri API +bindings: + cd src-gui && yarn run gen-bindings + +# Kill all instances of monero-wallet-rpc running in the background +kill_monero_wallet_rpc: + killall monero-wallet-rpc && pkill -f monero-wallet-rpc + +# Format the code +fmt: + dprint fmt + +# Sometimes you have to prune the docker network to get the integration tests to work +docker-prune-network: + docker network prune -f \ No newline at end of file