You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/copilot-instructions.md
+14-2Lines changed: 14 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,23 +7,27 @@
7
7
Stellar CLI is a Rust-based command-line tool for interacting with the Stellar network. It's organized as a Cargo workspace with multiple crates and uses both Cargo and Make for build automation.
- Build main CLI: `cargo build --bin stellar` -- takes 45 seconds. NEVER CANCEL.
14
15
- Install CLI: `make install` -- takes 3 minutes with potential network timeouts. NEVER CANCEL. Set timeout to 10+ minutes.
15
16
16
17
### Core Development Commands
18
+
17
19
- Format code: `make fmt` -- takes 2 seconds
18
20
- Run linting: `make check` -- takes 7 minutes. NEVER CANCEL. Set timeout to 15+ minutes.
19
21
- Build main CLI only: `cargo build --bin stellar` -- takes 45 seconds. Use this for quick iterations.
20
22
21
23
### Testing
24
+
22
25
- Test main soroban-cli library: `cargo test --package soroban-cli --lib` -- takes 52 seconds. NEVER CANCEL.
23
26
- Test individual crates: `cargo test --package <crate-name>` -- typically takes 40 seconds per crate.
24
27
-**WARNING**: Full test suite via `make test` requires building WebAssembly test fixtures and consumes significant memory and disk space. It may fail with "No space left on device" in constrained environments.
25
28
26
29
### CLI Usage and Validation
30
+
27
31
- Test CLI installation: `stellar --version`
28
32
- Basic CLI validation: `stellar --help`
29
33
- Generate test keys: `stellar keys generate <name>`
@@ -39,6 +43,7 @@ Stellar CLI is a Rust-based command-line tool for interacting with the Stellar n
39
43
## Common Tasks
40
44
41
45
### Repository Structure
46
+
42
47
```
43
48
/home/runner/work/stellar-cli/stellar-cli/
44
49
├── cmd/
@@ -55,6 +60,7 @@ Stellar CLI is a Rust-based command-line tool for interacting with the Stellar n
55
60
```
56
61
57
62
### Key Commands Reference
63
+
58
64
```bash
59
65
# Development workflow
60
66
cargo build --bin stellar # Quick build (45s)
@@ -74,6 +80,7 @@ stellar keys address test # Test key operations
74
80
```
75
81
76
82
### Build Time Expectations
83
+
77
84
-**NEVER CANCEL** any build or test command before these timeouts:
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+38-51Lines changed: 38 additions & 51 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,84 +2,76 @@
2
2
3
3
Thanks for taking the time to improve stellar-cli!
4
4
5
-
The following is a set of guidelines for contributions and may change over time.
6
-
Feel free to suggest improvements to this document in a pull request.We want to make it as easy as possible to contribute changes that help the Stellar network grow and
7
-
thrive. There are a few guidelines that we ask contributors to follow so that we can merge your
8
-
changes quickly.
5
+
The following is a set of guidelines for contributions and may change over time. Feel free to suggest improvements to this document in a pull request.We want to make it as easy as possible to contribute changes that help the Stellar network grow and thrive. There are a few guidelines that we ask contributors to follow so that we can merge your changes quickly.
9
6
10
7
## Getting Started
11
8
12
-
* Make sure you have a [GitHub account](https://github.com/signup/free).
13
-
* Create a GitHub issue for your contribution, assuming one does not already exist.
14
-
* Clearly describe the issue including steps to reproduce if it is a bug.
15
-
* Fork the repository on GitHub.
9
+
- Make sure you have a [GitHub account](https://github.com/signup/free).
10
+
- Create a GitHub issue for your contribution, assuming one does not already exist.
11
+
- Clearly describe the issue including steps to reproduce if it is a bug.
12
+
- Fork the repository on GitHub.
16
13
17
14
## Setting up development environment
18
15
19
16
There are 2 ways to begin developing stellar-cli:
20
17
21
-
### Installing all required dependencies
18
+
### Installing all required dependencies
22
19
23
-
You may want to install all required dependencies locally. This includes installing `rustup`, `make`, `libudev`, `jq` from your package manager. After all dependencies are installed, you can start with running `make install` to build `stellar-cli` and install it!
20
+
You may want to install all required dependencies locally. This includes installing `rustup`, `make`, `libudev`, `jq` from your package manager. After all dependencies are installed, you can start with running `make install` to build `stellar-cli` and install it!
24
21
25
22
### Using `nix`
26
23
27
24
If you don't want to install necessary dependencies from above, you can run development shell using [nix](https://nixos.org/guides/how-nix-works/) (make sure to [install](https://nixos.org/download/) version above 2.20). After installing `nix`, simply run `nix develop` that will start new `bash` session in your current terminal. If you want to use different shell (e.g. `zsh`) you can run `nix develop -c zsh`
28
25
29
26
This session will have:
27
+
30
28
1. All required dependencies installed
31
29
2.`stellar` alias (overwriting your existing `stellar` installed via cargo, if any)
32
30
3. Configured auto-complete for the working git branch
33
31
34
32
You can add extra configuration in your `local.sh` file (for example, if you want to export some extra variables for your devshell you can put following in your `local.sh`:
33
+
35
34
```shell
36
35
#!/usr/bin/env bash
37
36
export STELLAR_NETWORK=testnet
38
37
```
39
-
Note that all of dependencies and configurations mentioned above is available only in your local development shell, not outside of it.
40
38
39
+
Note that all of dependencies and configurations mentioned above is available only in your local development shell, not outside of it.
41
40
42
41
### Minor Changes
43
42
44
43
#### Documentation
45
44
46
-
For small changes to comments and documentation, it is not
47
-
always necessary to create a new GitHub issue. In this case, it is
48
-
appropriate to start the first line of a commit with 'doc' instead of
49
-
an issue number.
45
+
For small changes to comments and documentation, it is not always necessary to create a new GitHub issue. In this case, it is appropriate to start the first line of a commit with 'doc' instead of an issue number.
50
46
51
47
## Finding things to work on
52
48
53
-
The first place to start is always looking over the current GitHub issues for the project you are
54
-
interested in contributing to. Issues marked with [help wanted][help-wanted] are usually pretty
55
-
self-contained and a good place to get started.
49
+
The first place to start is always looking over the current GitHub issues for the project you are interested in contributing to. Issues marked with [help wanted][help-wanted] are usually pretty self-contained and a good place to get started.
56
50
57
-
Stellar.org also uses these same GitHub issues to keep track of what we are working on. If you see
58
-
any issues that are assigned to a particular person or have the `in progress` label, that means
59
-
someone is currently working on that issue this issue in the next week or two.
51
+
Stellar.org also uses these same GitHub issues to keep track of what we are working on. If you see any issues that are assigned to a particular person or have the `in progress` label, that means someone is currently working on that issue this issue in the next week or two.
60
52
61
53
Of course, feel free to create a new issue if you think something needs to be added or fixed.
62
54
63
-
64
55
## Making Changes
65
56
66
-
* Fork the stellar-cli repo to your own Github account
57
+
- Fork the stellar-cli repo to your own Github account
58
+
59
+
- List the current configured remote repository for your fork. Your git remote should initially look like this.
* Add git hooks for commits and pushes so that checks run before pushing:
83
+
- Add git hooks for commits and pushes so that checks run before pushing:
84
+
92
85
```
93
86
./install_githooks.sh
94
87
```
95
88
96
-
* Create a topic branch for your changes in your local repo. When you push you should be able
97
-
to create PR based on upstream stellar/stellar-cli.
98
-
99
-
* Make sure you have added the necessary tests for your changes and make sure all tests pass.
89
+
- Create a topic branch for your changes in your local repo. When you push you should be able to create PR based on upstream stellar/stellar-cli.
100
90
91
+
- Make sure you have added the necessary tests for your changes and make sure all tests pass.
101
92
102
93
## Submitting Changes
103
94
104
-
* All content, comments, pull requests and other contributions must comply with the
105
-
[Stellar Code of Conduct][coc].
106
-
* Push your changes to a topic branch in your fork of the repository.
107
-
* Submit a pull request to the repo in the Stellar organization.
108
-
* Include a descriptive [commit message][commit-msg].
109
-
* Changes contributed via pull request should focus on a single issue at a time.
110
-
* Rebase your local changes against the master branch. Resolve any conflicts that arise.
111
-
95
+
- All content, comments, pull requests and other contributions must comply with the [Stellar Code of Conduct][coc].
96
+
- Push your changes to a topic branch in your fork of the repository.
97
+
- Submit a pull request to the repo in the Stellar organization.
98
+
- Include a descriptive [commit message][commit-msg].
99
+
- Changes contributed via pull request should focus on a single issue at a time.
100
+
- Rebase your local changes against the master branch. Resolve any conflicts that arise.
112
101
113
-
At this point you're waiting on us. We like to at least comment on pull requests within three
114
-
business days (typically, one business day). We may suggest some changes, improvements or
115
-
alternatives.
102
+
At this point you're waiting on us. We like to at least comment on pull requests within three business days (typically, one business day). We may suggest some changes, improvements or alternatives.
116
103
117
104
# Additional Resources
118
105
119
-
* #dev-discussion channel on [Discord](https://discord.gg/BYPXtmwX)
106
+
- #dev-discussion channel on [Discord](https://discord.gg/BYPXtmwX)
0 commit comments