Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ of the PR were done in a specific way -->

#### All Submissions:

* [ ] I've signed all my commits
* [ ] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)
* [ ] I ran `cargo +nightly fmt` and `cargo clippy` before committing

#### New Features:

Expand Down
20 changes: 12 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ To facilitate communication with other contributors, the project is making use
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
------------------
Expand Down Expand Up @@ -87,7 +87,7 @@ Coding Conventions
------------------

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.

Expand All @@ -105,6 +105,10 @@ Note that BDK is currently considered "pre-production" during this time, there
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
-------

Expand All @@ -117,16 +121,16 @@ effort.
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
Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ The workspace in this repository contains several crates in the `/crates` direct
| [`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. | ![BitcoinD RPC Crate Info](https://img.shields.io/crates/v/bdk_bitcoind_rpc.svg) ![BitcoinD RPC API Docs](https://img.shields.io/badge/docs.rs-bdk_bitcoind_rpc-green) |
| [`file_store`](./crates/file_store) | Persistence backend for storing chain data in a single file. Intended for testing and development purposes, not for production. | ![File Store Crate Info](https://img.shields.io/crates/v/bdk_file_store.svg) ![File Store API Docs](https://img.shields.io/badge/docs.rs-bdk_file_store-green) |

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`:

Expand Down Expand Up @@ -68,6 +68,12 @@ The following BDK crates maintains a MSRV of 1.63.0. To build these crates with

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
Expand Down
59 changes: 59 additions & 0 deletions justfile
Comment thread
luisschwab marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
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
Loading