# Development Environment

![](https://1077617372-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LvPXC4l2V4Z8gRDNIoZ%2F-LvPYTBbYX4L3mHx0vBh%2F-LvPYWzAAGreDq_eL0E0%2Frust_logo.jpg?generation=1575624779490755\&alt=media)

To make the development process as smooth and as efficient as possible, we recommend confirming that all the tools mentioned below are installed and configured properly on your local machine.

* **Rust** development environment
* An **Integrated Development Environment** (IDE) software
* Ontology's **WASM** contract testing **private node**&#x20;

Let us look at the installation process for the above mentioned tools one by one.

{% hint style="warning" %}
For this tutorial, we will be setting up a private test node for testing our `WASM` contract. This will allows us to add `debug` information to the contract and monitor the contract's run-time information in the logs section. In case you feel that node setup is complicated, you can always use the testnet to deploy and invoke contracts, something that we are working on at Ontology and hope to make available very soon.
{% endhint %}

## Rust Development Environment

**Non-windows** platforms can use the following shell command to install **rustup**.

```bash
curl https://sh.rustup.rs -sSf | sh
```

For **windows** users, please follow [**this**](https://www.rust-lang.org/tools/install) link to directly download rustup from the official website. Install and add the respective PATH environment variables by following the directions provided.

Install the Rust compiler using this shell command.

```bash
rustup install nightly
```

Set the default compiler version to nightly by-

```bash
rustup default nightly
```

Install the `wasm32` compiler target-

```bash
rustup target add wasm32-unknown-unknown
```

Later when we write our Rust code, we will be compiling it and converting it to bytecode using the `cargo` tool. But, the file that `cargo` generates is relatively large in size. Therefore, to compress the bytecode file, as well as to check and optimize it for deploying on the blockchain, we will be using the **ontio-wasm-build** tool.

`ontio-wasm-build` can be installed using the following shell command-

```bash
cargo install --git=https://github.com/ontio/ontio-wasm-build
```

For more details on ontio-wasm-build, please refer to [**this**](https://github.com/ontio/ontio-wasm-build) link.

## Integrated Development Environment (IDE) Software

Since we will be using rust, there are certain IDEs that work well. The following IDEs can be used-

* **IntelliJ IDEA** - <https://www.jetbrains.com/idea/download>
* **IntelliJ CLion** - <https://www.jetbrains.com/clion/download/>
* **Vim Editor** - <https://www.vim.org/download.php>

## Local Test Node Set-up

A private node can be set up on the local machine and run using Ontology's CLI.

In order to realize this, we must first download and configure the implementation of Ontology's core software.

{% hint style="info" %}
Information and direction on how to build Ontology from the source code can be found by following [**this**](https://github.com/ontio/ontology#build-from-source-code) link.
{% endhint %}

The executable for the latest release different operating systems can be downloaded from [**this**](https://github.com/ontio/ontology/releases/) link.

After download and installing Ontology, we don't have to build it from the source code and can directly proceed with the development process.

{% hint style="warning" %}
When running the pre-built executable file, please set the log level to **DEBUG** mode. Debug information is more conveniently accessible in this mode.
{% endhint %}
