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: README.md
+30-30Lines changed: 30 additions & 30 deletions
Original file line number
Diff line number
Diff line change
@@ -28,52 +28,52 @@ The tags not mentioning the build version always point to the latest one. In the
28
28
29
29
There are a few other helpers you may want to check out when using `srtool`:
30
30
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.
32
32
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.
34
34
35
35
-[srtool-actions](https://github.com/chevdor/srtool-actions): This Github actions makes it much easier to integrate `srtool` in your CI.
36
36
37
37
- … and more to come
38
38
39
39

40
40
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.
42
42
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`.
44
44
45
45
## History
46
46
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.
49
49
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.
51
51
52
52
## Install
53
53
54
54
### Install the srtool-cli
55
55
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.
57
57
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).
59
59
60
60
### Using an alias
61
61
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`.
63
63
64
64
Creating an alias helps hiding the docker complexity behind one simple command. We will see more powerful options but this one is simple enough.
65
65
66
66
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'
67
67
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.
69
69
70
70
If you want to check what your alias is, use `type srtool`
71
71
72
72
The command to invoke a build will then be `srtool build`.
73
73
74
74
## Use
75
75
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:
77
77
78
78
**See the help**
79
79
@@ -85,7 +85,7 @@ Now that you defined the srtool alias, you can use it as shown below:
85
85
86
86
**Typical run**
87
87
88
-
Invoking `srtool build` with:
88
+
Invoking `srtool build` with
89
89
90
90
$ srtool build
91
91
@@ -100,7 +100,7 @@ will output something that looks like this:
100
100
101
101
Finished release [optimized] target(s) in 37.43s
102
102
103
-
some times later …
103
+
and finally …
104
104
105
105
✨ Your Substrate WASM Runtime is ready! ✨
106
106
Summary:
@@ -131,7 +131,7 @@ If you prefer a json output, srtool has you covered:
131
131
132
132
$ srtool build --json
133
133
134
-
Will give you such an output:
134
+
The output will look something like:
135
135
136
136
{
137
137
"gen": "srtool v0.9.18",
@@ -239,7 +239,7 @@ Will give you such an output:
239
239
240
240
### Outdated repo
241
241
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:
243
243
244
244
Then run the following commands:
245
245
@@ -258,11 +258,11 @@ Run the following command:
258
258
alias srtool
259
259
260
260
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 (').
262
262
263
263
### Other cases
264
264
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.
266
266
267
267
## Proposal field
268
268
@@ -273,23 +273,23 @@ What is important in the output of srtool is the `Proposal` field:
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.
277
277
278
278
## IPFS Hash
279
279
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.
281
281
282
282
**Advanced usage**
283
283
284
-
if you feel fancy, you may also run:
284
+
If you’re feeling fancy, you may also run:
285
285
286
286
srtool bash
287
287
288
-
and look around the `/srtool` folder
288
+
and look around the `/srtool` folder.
289
289
290
290
## ZSH/ Zinit users
291
291
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).
293
293
294
294
To do so, add the following to your `zshconfig`:
295
295
@@ -321,22 +321,22 @@ So say you want to build a builder for rustc 1.56.1:
321
321
322
322
You can see the list of available scripts in the `/scripts` folder:
323
323
324
-
-`help`: Show some help
324
+
-`help`: Show some help.
325
325
326
326
-`version`: Show some version.
327
327
328
-
-`info`: Show systems infos that are available before running a build
328
+
-`info`: Show available system info before running a build.
329
329
330
-
-`build`: Run the actual build
330
+
-`build`: Run the actual build.
331
331
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.
333
333
334
334
## Build your custom chain / parachain
335
335
336
336
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.
338
338
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:
340
340
341
341
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'
342
342
@@ -346,7 +346,7 @@ Using `srtool-cli` makes the above much easier…
346
346
347
347
## Export the runtime
348
348
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.
350
350
If you mount this docker volume, you will find the wasm on your local filesystem once the run is complete.
0 commit comments