of GitHub's "assignee" field. First check that no one is assigned and then
comment suggesting that you're working on it. If someone is already assigned,
don't hesitate to ask if the assigned party or previous commenter are still
-working on it if it has been awhile.
+working on it if it has been a while.
Deprecation policy
------------------
------------------
This codebase uses spaces, not tabs.
-Use `cargo fmt` with the default settings to format code before committing.
+Run `just check` to check formatting, linting, compilation and commit signing, `just fmt` to format code before commiting, and `just test` to run tests for all crates.
This is also enforced by the CI.
All public items must be documented. We adhere to the [Rust API Guidelines](https://rust-lang.github.io/api-guidelines/about.html) with respect to documentation.
is no special handling of security issues. Please simply open an issue on
Github.
+BDK requires all commits to be signed using PGP. Refer to
+[this guide](https://git-scm.com/book/en/v2/Git-Tools-Signing-Your-Work)
+if you don't have a PGP key set up with `git` yet.
+
Testing
-------
First Time Contributors
-----------------------
-If it is your first time contributing to the BDK family of libraries, welcome! We're glad to have you with us. If your
-first (or few first) PRs are focused on very small fixes to documentation, however, they might not meet our threshold
+If it is your first time contributing to the BDK family of libraries, welcome! We're glad to have you with us. If your
+first (or few first) PRs are focused on very small fixes to documentation, however, they might not meet our threshold
for acceptance for first time contributors.
-Minor grammar and punctuation fixes aren't a good way to start contributing to a project, and instead we suggest you
-start with something a little more substantial. It's better to find an issue where you can demonstrate some knowledge
-of bitcoin or the code base, such as improving the substance of documentation, testing, or fixing some small issue
+Minor grammar and punctuation fixes aren't a good way to start contributing to a project, and instead we suggest you
+start with something a little more substantial. It's better to find an issue where you can demonstrate some knowledge
+of bitcoin or the code base, such as improving the substance of documentation, testing, or fixing some small issue
even if it's considered low priority.
-This being said we are always looking forward to working with new folks interested in contributing to our libraries.
+This being said we are always looking forward to working with new folks interested in contributing to our libraries.
If you are looking for issues to work on, check out the good first issue label and join our Discord server!
Going further
| [`bitcoind_rpc`](./crates/bitcoind_rpc) | Extends [`bitcoincore-rpc`] for emitting blockchain data from the `bitcoind` RPC interface in the form that [`bdk_chain`] and `Wallet` can consume. |   |
| [`file_store`](./crates/file_store) | Persistence backend for storing chain data in a single file. Intended for testing and development purposes, not for production. |   |
-The [`bdk_wallet`] repository and crate contains a higher level `Wallet` type that depends on the above lower-level mechanism crates.
+The [`bdk_wallet`] repository and crate contains a higher level `Wallet` type that depends on the above lower-level mechanism crates.
Fully working examples of how to use these components are in `/examples`:
The MSRV of the `bdk_electrum` crate is 1.75.0.
+## Just
+
+This project has a [`justfile`](/justfile) for easy command running. You must have [`just`](https://github.com/casey/just) installed.
+
+To see a list of available recipes: `just`
+
## License
Licensed under either of
--- /dev/null
+alias b := build
+alias c := check
+alias f := fmt
+alias t := test
+alias p := pre-push
+
+_default:
+ @just --list
+
+# Build the project
+build:
+ cargo build
+
+# Check code: formatting, compilation, linting, and commit signature
+check:
+ cargo +nightly fmt --all -- --check
+ cargo check --workspace --all-features
+ cargo clippy --all-features --all-targets -- -D warnings
+ @[ "$(git log --pretty='format:%G?' -1 HEAD)" = "N" ] && \
+ echo "\n⚠️ Unsigned commit: BDK requires that commits be signed." || \
+ true
+
+# Format all code
+fmt:
+ cargo +nightly fmt
+
+# Run all tests for all crates with all features enabled
+test:
+ @just _test-bitcoind_rpc
+ @just _test-chain
+ @just _test-core
+ @just _test-electrum
+ @just _test-esplora
+ @just _test-file_store
+ @just _test-testenv
+
+_test-bitcoind_rpc:
+ cargo test -p bdk_bitcoind_rpc --all-features
+
+_test-chain:
+ cargo test -p bdk_chain --all-features
+
+_test-core:
+ cargo test -p bdk_core --all-features
+
+_test-electrum:
+ cargo test -p bdk_electrum --all-features
+
+_test-esplora:
+ cargo test -p bdk_esplora --all-features
+
+_test-file_store:
+ cargo test -p bdk_file_store --all-features
+
+_test-testenv:
+ cargo test -p bdk_testenv --all-features
+
+# Run pre-push suite: format, check, and test
+pre-push: fmt check test