Skip to content

Commit a0f6aac

Browse files
author
Sacha Lansky
authored
Update README_src.adoc (#36)
* Update README_src.adoc * Minor edits * Minor edits * Update md
1 parent e75586e commit a0f6aac

File tree

3 files changed

+60
-60
lines changed

3 files changed

+60
-60
lines changed

README.md

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -28,52 +28,52 @@ The tags not mentioning the build version always point to the latest one. In the
2828

2929
There are a few other helpers you may want to check out when using `srtool`:
3030

31-
- [srtool-cli](https://github.com/chevdor/srtool-cli): This Rust executable supersedes the preiviously recommended alias solution. It brings many benefits and is moreover much easier to use.
31+
- [srtool-cli](https://github.com/chevdor/srtool-cli): This Rust executable supersedes the previously recommended alias solution. It brings many benefits and is much easier to use.
3232

33-
- [srtool-app](https://gitlab.com/chevdor/srtool-app): The basic features of `srtool` as here available from a simple GUI accessible from a few clicks and available on multiple platforms.
33+
- [srtool-app](https://gitlab.com/chevdor/srtool-app): The basic features of `srtool` in a simple GUI, available on multiple platforms.
3434

3535
- [srtool-actions](https://github.com/chevdor/srtool-actions): This Github actions makes it much easier to integrate `srtool` in your CI.
3636

3737
- …​ and more to come
3838

3939
![Frame 1 256](resources/Frame%201_256.png)
4040

41-
`srtool` is a tool for chain builders, it is widely used in CI such as Github Actions, it can also be used by anyone who wants to indenpendantly check and audit the runtime of a chain or a parachain.
41+
`srtool` is a tool for chain builders, it is widely used in CI such as Github Actions, it can also be used by anyone who wants to independently check and audit the runtime of a chain or a parachain.
4242

43-
You may also want to have a look at [subwasm](https://github.com/chevdor/subwasm) as it is now part of the tooling included in `srtool`. `subwasm` can also be used independantly upon building your wasm with `srtool`.
43+
You may also want to have a look at [subwasm](https://github.com/chevdor/subwasm) as it is now part of the tooling included in `srtool`. `subwasm` can also be used independently upon building your wasm with `srtool`.
4444

4545
## History
4646

47-
The project was initially developped from <https://gitlab.com/chevdor>.
48-
It now moved to Github under the [Parity Technologies](https://www.github.com/paritytech) organisation to simplify the developement and the integration with other Parity products such as Polkadot and Kusama.
47+
The project was initially developed by <https://gitlab.com/chevdor>.
48+
It has now moved to Github under the [Parity Technologies](https://www.github.com/paritytech) organisation to simplify the developement and the integration with other Parity products such as Polkadot and Kusama.
4949

50-
The last version hosted on Gitlab has been built using Rust Stable 1.56.1. It is tagged as v0.9.18 and there is no plan on updating the Gitlab repository further. New versions will be available from <https://www.github.com/paritytech/srtool>. The functionnalities remain the same so you can (and should!) simply swap `chevdor/srtool` for `paritytech/srtool` in your workflows. The [srtool-actions](https://github.com/chevdor/srtool-actions) will remain available as `chevdor/srtool-actions@<version>` and will be updated to point at the paritytech image.
50+
The last version hosted on Gitlab has been built using Rust Stable 1.56.1. It is tagged as v0.9.18 and there is no plan on updating the Gitlab repository further. New versions will be available from [this repository](https://www.github.com/paritytech/srtool) only. The functionalities remain the same so you can (and should!) simply swap `chevdor/srtool` for `paritytech/srtool` in your workflows. The [srtool-actions](https://github.com/chevdor/srtool-actions) will remain available as `chevdor/srtool-actions@<version>` and will be updated to point at the paritytech image.
5151

5252
## Install
5353

5454
### Install the srtool-cli
5555

56-
Since the `srtool-cli` (<https://github.com/chevdor/srtool-cli>) exists, there is no reason to be using an alias anymore. Using the cli over the alias brings many advantages and will save you time.
56+
Since the [`srtool-cli`](https://github.com/chevdor/srtool-cli) exists, there is no reason to be using an alias anymore. Using the cli over the alias brings many advantages and will save you time.
5757

58-
The `srtool-cli` is a command line utility written in Rust, you can read more at [github.com/chevdor/srtool-cli](https://github.com/chevdor/srtool-cli), the installation process is described in more details there.
58+
The `srtool-cli` is a command line utility written in Rust. You can read more about the installation process [here](https://github.com/chevdor/srtool-cli).
5959

6060
### Using an alias
6161

62-
This method is legacy and deprecated, prefer the `srtool-cli` utility mentioned above. This information is left here however for documentation purpose but all the functions are now availabe in the `srtool-cli`.
62+
This method is legacy and deprecated. It is recommended to use the `srtool-cli` utility mentioned above. This information is left here for documentation purposes only — all the functions are now availabe in the `srtool-cli`.
6363

6464
Creating an alias helps hiding the docker complexity behind one simple command. We will see more powerful options but this one is simple enough.
6565

6666
export RUSTC_VERSION=1.56.1; export PACKAGE=kusama-runtime; alias srtool='docker run --rm -it -e PACKAGE=$PACKAGE -v $PWD:/build -v $TMPDIR/cargo:/cargo-home paritytech/srtool:$RUSTC_VERSION'
6767

68-
Note that defining the alias as done above will hardcode the runtime. Using `kusama-runtime` as show above means you will **always** check the kusama runtime. If you need more, check the next chapter.
68+
Note that defining the alias as done above will hardcode the runtime. Using `kusama-runtime` as shown above means you will **always** check the Kusama runtime. If you need more, check the next chapter.
6969

7070
If you want to check what your alias is, use `type srtool`
7171

7272
The command to invoke a build will then be `srtool build`.
7373

7474
## Use
7575

76-
Now that you defined the srtool alias, you can use it as shown below:
76+
Now that you have defined the srtool alias, you can use it as shown below:
7777

7878
**See the help**
7979

@@ -85,7 +85,7 @@ Now that you defined the srtool alias, you can use it as shown below:
8585

8686
**Typical run**
8787

88-
Invoking `srtool build` with:
88+
Invoking `srtool build` with
8989

9090
$ srtool build
9191

@@ -100,7 +100,7 @@ will output something that looks like this:
100100

101101
Finished release [optimized] target(s) in 37.43s
102102

103-
some times later …​
103+
and finally …​
104104

105105
✨ Your Substrate WASM Runtime is ready! ✨
106106
Summary:
@@ -131,7 +131,7 @@ If you prefer a json output, srtool has you covered:
131131

132132
$ srtool build --json
133133

134-
Will give you such an output:
134+
The output will look something like:
135135

136136
{
137137
"gen": "srtool v0.9.18",
@@ -239,7 +239,7 @@ Will give you such an output:
239239

240240
### Outdated repo
241241

242-
If you run into issues while running `srtool`, make sure you are using a decently recent version of Polkadot/Substrate:
242+
If you run into issues while running `srtool`, make sure you’re using a decently recent version of Polkadot/Substrate:
243243

244244
Then run the following commands:
245245

@@ -258,11 +258,11 @@ Run the following command:
258258
alias srtool
259259

260260
And make sure that you see `$PWD:/build/` and not `/home/your_name/:/build`.
261-
If you are running into this issue, your `.bash_profile` likely contains double quotes (") where you should have used single ones (').
261+
If you’re running into this issue, your `.bash_profile` likely contains double quotes (") where you should have used single ones (').
262262

263263
### Other cases
264264

265-
If you still run into troubles, please open a new issue and describe the error you see and the steps you took.
265+
If you still run into any trouble, please open a new issue and describe the error you see and the steps you took.
266266

267267
## Proposal field
268268

@@ -273,23 +273,23 @@ What is important in the output of srtool is the `Proposal` field:
273273
Proposal : 0x5931690e71e9d3d9f04a43d8c15e45e0968e563858dd87ad6485b2368a286a8f
274274
... more blabla ...
275275

276-
The `Proposal` field value should should match the value of the proposal you can see in the Polkadot UI.
276+
The `Proposal` field value should match the value of the proposal you can see in the Polkadot UI.
277277

278278
## IPFS Hash
279279

280-
Starting with version 0.9.8, the IPFS hash is computed and added to the output. `srtool` is only computing the hash. It does not publish the the file to IPFS nor connect to IPFS.
280+
Starting with version 0.9.8, the IPFS hash is computed and added to the output. `srtool` is only computing the hash. It neither publishes the file to IPFS nor connects to IPFS.
281281

282282
**Advanced usage**
283283

284-
if you feel fancy, you may also run:
284+
If you’re feeling fancy, you may also run:
285285

286286
srtool bash
287287

288-
and look around the `/srtool` folder
288+
and look around the `/srtool` folder.
289289

290290
## ZSH/ Zinit users
291291

292-
If you are using `zsh` and `zinit`, you may benefit from using the srtool snippet I am maintaining.
292+
If you’re using `zsh` and `zinit`, you may benefit from using the srtool snippet maintained [here](https://gitlab.com/chevdor/dotfiles/-/tree/master/zsh-plugins).
293293

294294
To do so, add the following to your `zshconfig`:
295295

@@ -321,22 +321,22 @@ So say you want to build a builder for rustc 1.56.1:
321321

322322
You can see the list of available scripts in the `/scripts` folder:
323323

324-
- `help`: Show some help
324+
- `help`: Show some help.
325325

326326
- `version`: Show some version.
327327

328-
- `info`: Show systems infos that are available before running a build
328+
- `info`: Show available system info before running a build.
329329

330-
- `build`: Run the actual build
330+
- `build`: Run the actual build.
331331

332-
The `info` and `version` scripts pass any arguments you pass to the script to `jq`. So you can play with `c` (compact), `-M`(monochrome), `-C` color output. For instance `docker run --rm -it -v $PWD:/build chevdor/srtool:1.56.1 info -cM` shows a monochrome output on a single line.
332+
The `info` and `version` scripts pass any arguments you pass to the script to `jq`. So you can play with `c` (compact), `-M` (monochrome), `-C` color output. For instance `docker run --rm -it -v $PWD:/build chevdor/srtool:1.56.1 info -cM` shows a monochrome output on a single line.
333333

334334
## Build your custom chain / parachain
335335

336336
Building the runtime for your custom chain may not work with the default used for Kusama, Polkadot and Co.
337-
You can however help `srtool` making the right choices using ENV VARs. You will need to make a new alias as shown below
337+
You can however help `srtool` make the right choices using ENV VARs. You will need to make a new alias as shown below.
338338

339-
Here is for instance how to build the runtime for the substrate-node-template:
339+
Here’s how to build the runtime for the substrate-node-template, for instance:
340340

341341
alias mysrtool='docker run --rm -it --name mysrtool -e RUNTIME_DIR=runtime -e BUILD_OPTS=" " -e PACKAGE=$PACKAGE -v $PWD:/build -v /tmp/cargo:/cargo-home chevdor/srtool:$RUSTC_VERSION'
342342

@@ -346,7 +346,7 @@ Using `srtool-cli` makes the above much easier…​
346346

347347
## Export the runtime
348348

349-
In order to easily export your runtime, it will be copied in the container into the `/out` folder.
349+
To easily export your runtime, it will be copied in the container into the `/out` folder.
350350
If you mount this docker volume, you will find the wasm on your local filesystem once the run is complete.
351351

352352
docker run ... -v /tmp/out:/out ...

0 commit comments

Comments
 (0)