Ontology Developer Center
DISCOVERCOMMUNITYSUPPORT
  • Introduction
  • Discover Ontology
  • Getting Started
  • Glossary
  • Decentralized Identity and Data
    • ONT ID
      • Decentralized Identifiers
        • Method Specification for Ontology
        • Method Specification for Ethereum
        • Method Specification for BSC
      • Verifiable Credentials
        • Anonymous Credentials
      • ONT Login
        • Scenarios
        • Protocol Specification
        • Front-end JavaScript SDK
          • Integration and Usage
          • API Reference
        • Front-end UI SDK
          • Integration and Usage
          • API Reference
        • Back-end Go SDK
          • Integration and Usage
          • API Reference
        • Back-end Java SDK
          • Integration and Usage
          • API Reference
      • ONT TAG
        • Workflow
        • API Reference
      • Mercury
      • OScore
    • DDXF
      • Components and Interfaces
      • GREP
      • Overall Scheme
      • Solutions
        • Marketplace
          • Deployment
          • Scenarios
          • SaaS Tenant
          • Java SDK
        • Data Storage
          • Deployment
          • Java SDK
        • Resource Auditor
        • Offline Judge
      • Use Cases
        • E-Shops
  • ONTOLOGY ELEMENTS
    • Smart Contracts
      • Types of smart contracts
    • Token Protocols
    • Consensus Mechanism
    • Ontology Oracle
      • Oracle Process Flow
  • GUIDES & TUTORIALS
    • Development Guides
      • dApp Development
        • Using the dAPI
        • Data Synchronization
      • Smart Contract Development
        • EVM Contract
          • Development Environment and Tools
          • Wallet Setup
          • Contract Development
          • How to Deploy a Smart Contract with GetBlock
        • NeoVM Contract
          • Development tools and environment
          • Launching the IDE
          • Writing and editing program logic
          • Deploying and testing on private net
        • WASM Contract
          • Development Environment
          • Project Initiation - Hello World
          • Creating your own project
          • Development using SmartX
          • Runtime API
          • Contract Fundamentals
          • Inter-contract Interaction
          • Developing Contracts in C++
        • Publish Contract Source Code
    • Integration Guides
      • dApp Integration
        • dAPI Integration
          • Chrome Plugin
          • Mobile wallet dApp
          • QR code mechanism
          • Wake call mechanism
        • Cocos 2D-x
        • Unity 3D applications
      • Mobile Wallet Integration
        • SDK integration
        • dAPI Integration
          • In-wallet applications
          • QR code mechanism
          • Wake call mechanism
        • Stake
      • Using ONT ID
      • Exchange Integration
        • Exchange Docking Guide
        • Exchange API
      • Ontology for dApp Stores
    • EVM & Token Decimals Upgrade
  • ONTOLOGY NODE
    • Abstract
    • Node Deployment
      • Standard Node
      • Rosetta Node
    • Interacting with a Public Node
  • DEVELOPER TOOLS
    • dApp Development Framework
      • Punica CLI
      • Punica boxes
      • Solo Chain
    • IDE
    • APIs
      • HTTP API
        • Restful
        • WebSocket
        • Remote Procedure Call (RPC)
      • Explorer v2 API
        • Block
        • Address
        • Contract
        • Token
        • Transactions
        • ONT ID
        • Summary
        • Node
      • Native Token API
        • ONT Contract API
        • ONG Contract API
      • ONT ID Contract API
      • Web3 API
      • OScore Open API
      • Rosetta Node API
        • Data API
        • Construction API
      • DToken Contract API
      • DDXF
        • Marketplace Contract API
        • Storage API
      • Governance API
    • Digital Wallet
      • Chrome Plugin provider
      • Chrome Plugin dAPI
      • Mobile version provider
      • Mobile version dAPI
    • SDKs
    • Signing Server
      • Installation
      • API reference
  • COMMUNITY
    • Ecosystem Programs
    • Community Libraries
    • Community Events
    • Community Channels
    • Core Contributors
  • SUPPORT
    • FAQ
      • Basic blockchain concepts
      • Ontology Nodes
      • Ontology token protocols
      • Smart contracts
      • SDKs and APIs
    • Contact Us
Powered by GitBook
On this page
  • Rust Development Environment
  • Integrated Development Environment (IDE) Software
  • Local Test Node Set-up

Was this helpful?

  1. GUIDES & TUTORIALS
  2. Development Guides
  3. Smart Contract Development
  4. WASM Contract

Development Environment

Setting up the required tools on the local machine

PreviousWASM ContractNextProject Initiation - Hello World

Last updated 4 years ago

Was this helpful?

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

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

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.

Rust Development Environment

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

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

Install the Rust compiler using this shell command.

rustup install nightly

Set the default compiler version to nightly by-

rustup default nightly

Install the wasm32 compiler target-

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-

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

Integrated Development Environment (IDE) Software

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

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.

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

When running the pre-built executable file, please set the log level to DEBUG mode. Debug information is more conveniently accessible in this mode.

For windows users, please follow link to directly download rustup from the official website. Install and add the respective PATH environment variables by following the directions provided.

For more details on ontio-wasm-build, please refer to link.

IntelliJ IDEA -

IntelliJ CLion -

Vim Editor -

Information and direction on how to build Ontology from the source code can be found by following link.

The executable for the latest release different operating systems can be downloaded from link.

this
this
https://www.jetbrains.com/idea/download
https://www.jetbrains.com/clion/download/
https://www.vim.org/download.php
this
this