Skip to content

Commit 1998ad5

Browse files
committed
[doc] improvements to install and contributing pages
* Explain what each CLI does * Recommend vscode + move-analyzer plugin for IDE * Move Sui Core contributor-specific content to from install to contributing * Adjust structure of contributing to put most frequent contribution types (issues, docs) first
1 parent 1234d8b commit 1998ad5

File tree

2 files changed

+28
-63
lines changed

2 files changed

+28
-63
lines changed

doc/src/build/install.md

Lines changed: 8 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -7,52 +7,21 @@ dependencies. As a prerequisite, you will need to [install
77
Cargo](https://doc.rust-lang.org/cargo/getting-started/installation.html)
88
version 1.59.0 or higher in order to build and install Sui on your machine.
99

10-
## Set up
10+
### CLIs
1111

12-
Although you may create whatever directory structure you desire, both our
13-
[Wallet Quick Start](wallet.md) and [end-to-end tutorial](../explore/tutorials.md)
14-
assume Sui is installed in a directory found by a `$SUI_ROOT` environment variable.
15-
16-
To set this up, run the following commands and substitute in your path and
17-
desired directory name:
18-
19-
```shell
20-
mkdir some-dir
21-
export SUI_ROOT=/path/to/some-dir
22-
```
23-
24-
## Download
25-
26-
Navigate to your desired install location, for example:
27-
28-
```shell
29-
cd "$SUI_ROOT"
30-
```
31-
32-
### Binaries only
33-
34-
If you'd like to install only Sui binaries (`sui`, `wallet`,
35-
`sui-move`, and `rest_server`), use the following command:
12+
After installing `cargo`, run:
3613

3714
```shell
3815
cargo install --git https://github.com/MystenLabs/sui.git
3916
```
4017

41-
### Whole repository
42-
43-
Alternatively, clone the [Sui
44-
GitHub](https://github.com/MystenLabs/sui) repository and then `cargo
45-
install` with the repository clone:
46-
47-
```shell
48-
git clone https://github.com/MystenLabs/sui.git
49-
cargo install --path sui/sui
50-
```
51-
52-
## Use
18+
This will put three binaries in your `PATH`:
19+
* [`sui-move`](move.md): Build and test Move packages.
20+
* [`wallet`](wallet.md): Run a local Sui network and gateway service accessible via the wallet CLI. The wallet CLI manage keypairs to sign/send transactions.
21+
* [`rest_server`](rest-api.md): Run a local Sui network and gateway service accessible via a REST interface.
5322

54-
Either method will install `sui`, `wallet`, `sui-move`, and `rest_server`
55-
binaries in a `~/.cargo/bin` directory that can be executed directly.
23+
### IDE
24+
For Move development, the best IDE is vscode with [this](https://marketplace.visualstudio.com/items?itemName=move.move-analyzer) plugin. Some alternative IDE options are [here]( https://github.com/MystenLabs/awesome-move#ide).
5625

5726
## Next steps
5827

doc/src/contribute/index.md

Lines changed: 20 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,6 @@
22
title: Contributing to Sui
33
---
44

5-
Now that you understand Sui, consider helping the project. To contribute to Sui, ensure you have the latest version of the codebase.
6-
7-
To clone the repository, run the following:
8-
```bash
9-
git clone https://github.com/mystenlabs/sui.git
10-
cd sui
11-
cargo build --all --all-targets
12-
cargo test
13-
```
14-
15-
See [Install Sui](../build/install.md) for installation instructions and our [end-to-end tutorial](../explore/tutorials.md) to work with Sui immediately.
16-
17-
## Pull requests
18-
19-
To submit your pull request:
20-
21-
1. Fork the `sui` repository and create your branch from `main`.
22-
2. If you have added code that should be tested, add unit tests.
23-
3. If you have made changes to APIs, update the relevant documentation, and build and test the developer site.
24-
4. Verify and ensure that the test suite passes.
25-
5. Make sure your code passes both linters.
26-
6. Complete the Contributor License Agreement (CLA), if you haven't already done so.
27-
7. Submit your pull request.
28-
295
## File issues
306

317
Report bugs and make feature requests in the [Sui GitHub](https://github.com/MystenLabs/sui/issues) repository
@@ -40,6 +16,26 @@ You may also suggest changes to the docs directly in GitHub right here using the
4016

4117
Simply edit the file in question and generate a pull request. We will get back to you shortly.
4218

19+
## Send pull requests
20+
21+
Start by creating your own fork of the repo:
22+
```bash
23+
gh fork https://github.com/mystenlabs/sui.git # or alternatively, clone your fork
24+
cargo install --path sui/sui # put Sui CLI's in your PATH
25+
cd sui
26+
cargo build --all --all-targets # check that build works
27+
cargo test # check that tests pass
28+
```
29+
30+
To submit your pull request:
31+
32+
1. Make your changes in a descriptively named branch.
33+
2. If you have added code that should be tested, add unit tests.
34+
3. Ensure your code builds and passes the tests: `cargo test`
35+
4. Make sure your code passes the linters and autoformatter: `cargo clippy --all --all-targets && cargo fmt --all`
36+
5. If you have made changes to APIs, update the relevant documentation, and build and test the developer site.
37+
6. Run `git push -f origin <branch_name>`, then open a pull request from the Sui GitHub site.
38+
4339
## Further reading
4440

4541
* Learn [about Mysten Labs](https://mystenlabs.com/) the company on our public site.

0 commit comments

Comments
 (0)