Skip to content

Commit 487ac0f

Browse files
committed
Add a getting_started page
Most devs know how to do the cargo stuff, its good to have but no need to be front and centre. Move the basic cargo stuff to its own page so as not to clutter the intro. While we move it, change the text to mention that "rand-std" is useful for playing around because one can generate keys. Production devs should probably know what they are doing with secrets anyways.
1 parent 93efdca commit 487ac0f

3 files changed

Lines changed: 15 additions & 13 deletions

File tree

cookbook/src/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
[Introduction](./intro.md)
44

5+
- [Getting started](getting_started.md)
56
- [Constructing and Signing Transactions](tx.md)
67
- [SegWit V0](tx_segwit-v0.md)
78
- [Taproot](tx_taproot.md)

cookbook/src/getting_started.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Getting Started
2+
3+
To add `rust-bitcoin` to your project, run:
4+
5+
```bash
6+
cargo add bitcoin
7+
```
8+
9+
If you are just exploring you probably want to use the "rand-std" feature so you can generate random keys:
10+
11+
```bash
12+
cargo add bitcoin --features=rand-std
13+
```

cookbook/src/intro.md

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,6 @@
44
It contains Bitcoin network protocol and associated primitives.
55
You can find more by reading the [documentation](https://docs.rs/bitcoin).
66

7-
To add `rust-bitcoin` to your project, run:
8-
9-
```bash
10-
cargo add bitcoin
11-
```
12-
13-
Additionally, you can add flags to enable features.
14-
Here's an example:
15-
16-
```bash
17-
cargo add bitcoin --features=rand-std
18-
```
19-
207
This cookbook provides straightforward examples that showcase effective approaches
218
for accomplishing typical Bitcoin-related programming tasks,
229
and utilizing the Rust ecosystem's crates.
@@ -29,6 +16,7 @@ and constructing and signing transactions.
2916

3017
This book contains:
3118

19+
1. [Getting Started](getting_started.md)
3220
1. [Constructing and Signing Transactions](tx.md)
3321
1. [SegWit V0](tx_segwit-v0.md)
3422
1. [Taproot](tx_taproot.md)

0 commit comments

Comments
 (0)