-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Binaries guide #480
base: main
Are you sure you want to change the base?
Add Binaries guide #480
Conversation
Signed-off-by: Dmitry Balashov <[email protected]>
Signed-off-by: Dmitry Balashov <[email protected]>
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
src/guide/misc-using-binaries.md
Outdated
When working with Iroha, certain components (e.g., `iroha_client_cli`) are delivered as binary files that could not only be built and installed as standalone tools locally, but also come prepackaged with any of the official versions of Iroha 2 (`dev`, `lts`, or `stable`). | ||
|
||
::: info | ||
|
||
For details on the differences between the versions of Iroha 2, see [Get Started > Install Iroha 2: Choose Version](guide/get-started/install.md#choose-version). | ||
|
||
::: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would say, this all doesn't make sense and seem extra.
When working with Iroha, certain components (e.g., `iroha_client_cli`) are delivered as binary files that could not only be built and installed as standalone tools locally, but also come prepackaged with any of the official versions of Iroha 2 (`dev`, `lts`, or `stable`). | |
::: info | |
For details on the differences between the versions of Iroha 2, see [Get Started > Install Iroha 2: Choose Version](guide/get-started/install.md#choose-version). | |
::: |
src/guide/misc-using-binaries.md
Outdated
The Iroha 2 project provides the following binary executables: | ||
|
||
- [`iroha`](https://github.com/hyperledger/iroha/tree/iroha2-dev/cli) — the main Iroha CLI that is used to instantiate a peer and bootstrap an Iroha-based network. | ||
- [`iroha_client_cli`](https://github.com/hyperledger/iroha/tree/iroha2-dev/client_cli) — Iroha Client CLI that is used to interact with the Iroha Peers Web API (Q: certain operations within Torii? (i.e., submmitting transactions with ISI, query requests)), and serves as a reference for using the features of the [iroha_client](https://github.com/hyperledger/iroha/tree/iroha2-dev/client) crate. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- [`iroha_client_cli`](https://github.com/hyperledger/iroha/tree/iroha2-dev/client_cli) — Iroha Client CLI that is used to interact with the Iroha Peers Web API (Q: certain operations within Torii? (i.e., submmitting transactions with ISI, query requests)), and serves as a reference for using the features of the [iroha_client](https://github.com/hyperledger/iroha/tree/iroha2-dev/client) crate. | |
- [`iroha_client_cli`](https://github.com/hyperledger/iroha/tree/iroha2-dev/client_cli) — Iroha Client CLI that is used to interact with an Iroha peer (Q: certain operations within Torii? (i.e., submmitting transactions with ISI, query requests)). |
src/guide/misc-using-binaries.md
Outdated
|
||
The Iroha 2 project provides the following binary executables: | ||
|
||
- [`iroha`](https://github.com/hyperledger/iroha/tree/iroha2-dev/cli) — the main Iroha CLI that is used to instantiate a peer and bootstrap an Iroha-based network. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- [`iroha`](https://github.com/hyperledger/iroha/tree/iroha2-dev/cli) — the main Iroha CLI that is used to instantiate a peer and bootstrap an Iroha-based network. | |
- [`iroha`](https://github.com/hyperledger/iroha/tree/iroha2-dev/cli) — the main Iroha CLI that is used to start a peer. |
src/guide/misc-using-binaries.md
Outdated
First, install the following Docker prerequisites: | ||
|
||
- [Docker](https://docs.docker.com/get-docker/) | ||
- [Docker Compose](https://docs.docker.com/compose/install/) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this specific guide, there is no need for Docker Compose.
- [Docker Compose](https://docs.docker.com/compose/install/) |
src/guide/misc-using-binaries.md
Outdated
::: info | ||
|
||
Listed examples only reference the `dev` versions of the Docker images. | ||
|
||
For a list of all available Docker images for Iroha 2, see the [Iroha 2 Docker Hub](https://hub.docker.com/r/hyperledger/iroha2) page. | ||
|
||
::: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's omit this for now. There will be no dev
/stable
/lts
channels in future.
::: info | |
Listed examples only reference the `dev` versions of the Docker images. | |
For a list of all available Docker images for Iroha 2, see the [Iroha 2 Docker Hub](https://hub.docker.com/r/hyperledger/iroha2) page. | |
::: |
src/guide/misc-using-binaries.md
Outdated
|
||
::: tip | ||
|
||
For more details on `cargo install` and its `[options]`, see [The Cargo Book > cargo install](https://doc.rust-lang.org/cargo/commands/cargo-install.html). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For more details on `cargo install` and its `[options]`, see [The Cargo Book > cargo install](https://doc.rust-lang.org/cargo/commands/cargo-install.html). | |
For more details on `cargo install` and its `[options]`, see [The Cargo Book > `cargo install`](https://doc.rust-lang.org/cargo/commands/cargo-install.html). |
src/guide/misc-using-binaries.md
Outdated
|
||
### Running from Cloned GitHub Repository {#source-run} | ||
|
||
First, clone the [hyperledger / iroha](https://github.com/hyperledger/iroha.git) GitHub repository, then checkout the required branch (`dev`, `lts`, or `stable`): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is usually written without spaces. (I mean, any repo on GitHub)
First, clone the [hyperledger / iroha](https://github.com/hyperledger/iroha.git) GitHub repository, then checkout the required branch (`dev`, `lts`, or `stable`): | |
First, clone the [hyperledger/iroha](https://github.com/hyperledger/iroha.git) GitHub repository: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think for now we need to mention the branch checkout (it's part of the code below anyway)
src/guide/misc-using-binaries.md
Outdated
::: code-group | ||
|
||
```shell [Command structure] | ||
cargo run [options] [binary name] -- [arguments for the binary] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cargo run [options] [binary name] -- [arguments for the binary] | |
cargo run [options] --bin [binary name] -- [arguments for the binary] |
src/guide/misc-using-binaries.md
Outdated
```shell [Iroha] | ||
cargo run -p iroha --release -- --help | ||
``` | ||
|
||
```shell [Client CLI] | ||
cargo run -p iroha_client_cli --release -- --help | ||
``` | ||
|
||
```shell [Kagami] | ||
cargo run -p kagami --release -- --help | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
```shell [Iroha] | |
cargo run -p iroha --release -- --help | |
``` | |
```shell [Client CLI] | |
cargo run -p iroha_client_cli --release -- --help | |
``` | |
```shell [Kagami] | |
cargo run -p kagami --release -- --help | |
``` | |
```shell [Iroha] | |
cargo run --release --bin iroha -- --help | |
``` | |
```shell [Client CLI] | |
cargo run --release --bin iroha_client_cli -- --help | |
``` | |
```shell [Kagami] | |
cargo run --release --bin kagami -- --help | |
``` |
src/guide/misc-using-binaries.md
Outdated
Q: | ||
1. Бинарниками считаются только `iroha`, `iroha_client_cli` & `kagami`? | ||
Крейты отсюда -- https://github.com/hyperledger/iroha/blob/iroha2-dev/README.md#integration -- нельзя use from source repo? (В Докере их точно нет раздельно) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some other binaries too, but let's stick to these three for now.
Also, why Vercel fails:
|
src/guide/misc-using-binaries.md
Outdated
@@ -0,0 +1,173 @@ | |||
# Working with Iroha Binaries | |||
|
|||
When working with Iroha, certain components (e.g., `iroha_client_cli`) are delivered as binary files that could not only be built and installed as standalone tools locally, but also come prepackaged with any of the official versions of Iroha 2 (`dev`, `lts`, or `stable`). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When working with Iroha, certain components (e.g., `iroha_client_cli`) are delivered as binary files that could not only be built and installed as standalone tools locally, but also come prepackaged with any of the official versions of Iroha 2 (`dev`, `lts`, or `stable`). | |
When working with Iroha, certain components (e.g., `iroha_client_cli`) are delivered as binary files that can be built and installed locally as standalone tools and come prepackaged with any of the official versions of Iroha 2 (`dev`, `lts`, or `stable`). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When working with Iroha, certain components (e.g., `iroha_client_cli`) are delivered as binary files that could not only be built and installed as standalone tools locally, but also come prepackaged with any of the official versions of Iroha 2 (`dev`, `lts`, or `stable`). | |
When working with Iroha, certain components (e.g., `iroha_client_cli`) are delivered as binary files that can be built and installed as standalone tools locally, or come prepackaged with any of the official versions of Iroha 2 (`dev`, `lts`, or `stable`). |
src/guide/misc-using-binaries.md
Outdated
|
||
::: | ||
|
||
The Iroha 2 project provides the following binary executables: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Iroha 2 project provides the following binary executables: | |
Iroha 2 provides the following binary executables: |
src/guide/misc-using-binaries.md
Outdated
|
||
- [`iroha`](https://github.com/hyperledger/iroha/tree/iroha2-dev/cli) — the main Iroha CLI that is used to instantiate a peer and bootstrap an Iroha-based network. | ||
- [`iroha_client_cli`](https://github.com/hyperledger/iroha/tree/iroha2-dev/client_cli) — Iroha Client CLI that is used to interact with the Iroha Peers Web API (Q: certain operations within Torii? (i.e., submmitting transactions with ISI, query requests)), and serves as a reference for using the features of the [iroha_client](https://github.com/hyperledger/iroha/tree/iroha2-dev/client) crate. | ||
- [`kagami`](https://github.com/hyperledger/iroha/tree/iroha2-dev/tools/kagami) — a tool that is used to generate and validate various types of data (e.g., cryptographic keys, genesis blocks, default client and peer configuration files). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- [`kagami`](https://github.com/hyperledger/iroha/tree/iroha2-dev/tools/kagami) — a tool that is used to generate and validate various types of data (e.g., cryptographic keys, genesis blocks, default client and peer configuration files). | |
- [`kagami`](https://github.com/hyperledger/iroha/tree/iroha2-dev/tools/kagami) — a tool that is used to generate and validate various data types (e.g., cryptographic keys, genesis blocks, default client and peer configuration files). |
src/guide/misc-using-binaries.md
Outdated
|
||
## Using the Source GitHub Repository {#source} | ||
|
||
To perform any of the actions with the GitHub repository (i.e., [building & installing](#source-install), or [running](#source-run) binaries), the [Rust toolchain](https://www.rust-lang.org/) must first be installed. The toolchain is delivered with the package manager—[Cargo](https://doc.rust-lang.org/cargo/index.html)—that allows for installation of Rust crates from different sources, including GitHub. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To perform any of the actions with the GitHub repository (i.e., [building & installing](#source-install), or [running](#source-run) binaries), the [Rust toolchain](https://www.rust-lang.org/) must first be installed. The toolchain is delivered with the package manager—[Cargo](https://doc.rust-lang.org/cargo/index.html)—that allows for installation of Rust crates from different sources, including GitHub. | |
To perform any of the actions using the GitHub repository (i.e., [building & installing](#source-install), or [running](#source-run) binaries), the [Rust toolchain](https://www.rust-lang.org/tools/install) must be installed first. The toolchain is delivered with the —[Cargo](https://doc.rust-lang.org/cargo/index.html) package manager— which allows for installing Rust crates from different sources, including GitHub. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incorporated Dima's suggestion here as well
src/guide/misc-using-binaries.md
Outdated
|
||
To perform any of the actions with the GitHub repository (i.e., [building & installing](#source-install), or [running](#source-run) binaries), the [Rust toolchain](https://www.rust-lang.org/) must first be installed. The toolchain is delivered with the package manager—[Cargo](https://doc.rust-lang.org/cargo/index.html)—that allows for installation of Rust crates from different sources, including GitHub. | ||
|
||
The recommended way to install the Rust toolchain is through a Rust installer and version management tool—[Rustup](https://rust-lang.github.io/rustup/) (See also: [Install Rust](https://www.rust-lang.org/tools/install))—by executing the following command in your terminal: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The recommended way to install the Rust toolchain is through a Rust installer and version management tool—[Rustup](https://rust-lang.github.io/rustup/) (See also: [Install Rust](https://www.rust-lang.org/tools/install))—by executing the following command in your terminal: | |
The recommended way to install the Rust toolchain is through the Rust installer and version management tool—[Rustup](https://rust-lang.github.io/rustup/) (See also: [Install Rust](https://www.rust-lang.org/tools/install))—by executing the following command in your terminal: |
src/guide/misc-using-binaries.md
Outdated
|
||
Depending on the operating system that you are using or other limitations, you may want to opt for a different installation method. | ||
|
||
For all available installation methods, see the [Rust Forge: Other Rust Installation Methods](https://forge.rust-lang.org/infra/other-installation-methods.html) article. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For all available installation methods, see the [Rust Forge: Other Rust Installation Methods](https://forge.rust-lang.org/infra/other-installation-methods.html) article. | |
For all available installation methods, see this [Rust Forge: Other Rust Installation Methods](https://forge.rust-lang.org/infra/other-installation-methods.html) article. |
src/guide/misc-using-binaries.md
Outdated
@@ -0,0 +1,173 @@ | |||
# Working with Iroha Binaries | |||
|
|||
When working with Iroha, certain components (e.g., `iroha_client_cli`) are delivered as binary files that could not only be built and installed as standalone tools locally, but also come prepackaged with any of the official versions of Iroha 2 (`dev`, `lts`, or `stable`). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When working with Iroha, certain components (e.g., `iroha_client_cli`) are delivered as binary files that could not only be built and installed as standalone tools locally, but also come prepackaged with any of the official versions of Iroha 2 (`dev`, `lts`, or `stable`). | |
When working with Iroha, certain components (e.g., `iroha_client_cli`) are delivered as binary files that can be built and installed as standalone tools locally, or come prepackaged with any of the official versions of Iroha 2 (`dev`, `lts`, or `stable`). |
src/guide/misc-using-binaries.md
Outdated
|
||
To perform any of the actions with the GitHub repository (i.e., [building & installing](#source-install), or [running](#source-run) binaries), the [Rust toolchain](https://www.rust-lang.org/) must first be installed. The toolchain is delivered with the package manager—[Cargo](https://doc.rust-lang.org/cargo/index.html)—that allows for installation of Rust crates from different sources, including GitHub. | ||
|
||
The recommended way to install the Rust toolchain is through a Rust installer and version management tool—[Rustup](https://rust-lang.github.io/rustup/) (See also: [Install Rust](https://www.rust-lang.org/tools/install))—by executing the following command in your terminal: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't we already have the instructions about rust/rustup in the installation guide?
src/guide/misc-using-binaries.md
Outdated
|
||
### Running from Cloned GitHub Repository {#source-run} | ||
|
||
First, clone the [hyperledger / iroha](https://github.com/hyperledger/iroha.git) GitHub repository, then checkout the required branch (`dev`, `lts`, or `stable`): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think for now we need to mention the branch checkout (it's part of the code below anyway)
src/guide/misc-using-binaries.md
Outdated
|
||
::: tip | ||
|
||
For more details on `cargo run` and its `[options]`, see [The Cargo Book > cargo run](https://doc.rust-lang.org/cargo/commands/cargo-run.html). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For more details on `cargo run` and its `[options]`, see [The Cargo Book > cargo run](https://doc.rust-lang.org/cargo/commands/cargo-run.html). | |
For more details on `cargo run` and its `[options]`, see [The Cargo Book > `cargo run`](https://doc.rust-lang.org/cargo/commands/cargo-run.html). |
Signed-off-by: yamkovoy <[email protected]>
@@ -0,0 +1,143 @@ | |||
# Working with Iroha Binaries | |||
|
|||
When working with Iroha, certain components (e.g., `iroha_client_cli`) are delivered as binary files that can be built and installed as standalone tools locally, and also come prepackaged with Iroha 2. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When working with Iroha, certain components (e.g., `iroha_client_cli`) are delivered as binary files that can be built and installed as standalone tools locally, and also come prepackaged with Iroha 2. | |
When working with Iroha, certain components (e.g., `iroha`) are delivered as binary files that can be built and installed as standalone tools locally, and also come prepackaged with Iroha 2. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sentence is a bit confusing. It should just say that working with Iroha involves using several binaries, and this is how.
|
||
Iroha 2 provides the following binary executables: | ||
|
||
- [`iroha`](https://github.com/hyperledger/iroha/tree/iroha2-dev/cli) — the main Iroha CLI that is used to start a peer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- [`iroha`](https://github.com/hyperledger/iroha/tree/iroha2-dev/cli) — the main Iroha CLI that is used to start a peer. | |
- [`irohad`](https://github.com/hyperledger/iroha/tree/main/cli) — the main Iroha CLI that is used to start a peer. |
Iroha 2 provides the following binary executables: | ||
|
||
- [`iroha`](https://github.com/hyperledger/iroha/tree/iroha2-dev/cli) — the main Iroha CLI that is used to start a peer. | ||
- [`iroha_client_cli`](https://github.com/hyperledger/iroha/tree/iroha2-dev/client_cli) — Iroha Client CLI that is used to interact with an Iroha peer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- [`iroha_client_cli`](https://github.com/hyperledger/iroha/tree/iroha2-dev/client_cli) — Iroha Client CLI that is used to interact with an Iroha peer. | |
- [`iroha`](https://github.com/hyperledger/iroha/tree/main/client_cli) — Iroha Client CLI that is used to interact with an Iroha peer. |
|
||
- [`iroha`](https://github.com/hyperledger/iroha/tree/iroha2-dev/cli) — the main Iroha CLI that is used to start a peer. | ||
- [`iroha_client_cli`](https://github.com/hyperledger/iroha/tree/iroha2-dev/client_cli) — Iroha Client CLI that is used to interact with an Iroha peer. | ||
- [`kagami`](https://github.com/hyperledger/iroha/tree/iroha2-dev/tools/kagami) — a tool that is used to generate and validate various types of data (e.g., cryptographic keys, genesis blocks, default client and peer configuration files). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- [`kagami`](https://github.com/hyperledger/iroha/tree/iroha2-dev/tools/kagami) — a tool that is used to generate and validate various types of data (e.g., cryptographic keys, genesis blocks, default client and peer configuration files). | |
- [`kagami`](https://github.com/hyperledger/iroha/tree/main/tools/kagami) — a tool that is used to generate and validate various types of data (e.g., cryptographic keys, genesis blocks, default client and peer configuration files). |
|
||
::: | ||
|
||
Iroha 2 provides the following binary executables: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
irohad
and kagami
are mandatory for running Iroha peers, and together with iroha
(one of the ways of interacting with Iroha peers) they are bundled in the Docker image.
There are also the tool binaries: iroha_swarm
, kura_inspector
, iroha_wasm_builder
, iroha_wasm_test_runner
, parity_scale_cli
. They are not part of the Docker image, and are not required.
|
||
### Installing from Source GitHub Repository {#source-install} | ||
|
||
To perform a system-wide installation of an Iroha 2 binary with `cargo install`, execute one of the following commands in your terminal: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To perform a system-wide installation of an Iroha 2 binary with `cargo install`, execute one of the following commands in your terminal: | |
Iroha binaries may be installed system-wide using `cargo install`: |
::: | ||
|
||
### Running from Cloned GitHub Repository {#source-run} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You may want to run the binaries without installing them system-wide. This will involve cloning Iroha's source code and using `cargo run`. | |
``` | ||
|
||
```shell [Iroha] | ||
cargo run --release --bin iroha -- --help |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cargo run --release --bin iroha -- --help | |
cargo run --release --bin irohad -- --help |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add a comment that --release
will result in better performance due to the project being built in the optimized release mode.
``` | ||
|
||
```shell [Client CLI] | ||
cargo run --release --bin iroha_client_cli -- --help |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cargo run --release --bin iroha_client_cli -- --help | |
cargo run --release --bin iroha -- --help |
```shell | ||
git clone https://github.com/hyperledger/iroha.git <clone-folder> | ||
cd <clone-folder> | ||
git checkout iroha2-dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
git checkout iroha2-dev |
No description provided.