Sui.

Post

Share your knowledge.

article banner.
Owen.
Owen4662
Jul 21, 2025
Article

How to Install and Use the Move with VScode

Originally created by Meta (formerly Facebook) for the Diem blockchain, Move emphasizes safety, efficiency, and flexibility, making it ideal for decentralized applications (dApps) and transaction logic. VSCode, a versatile open-source editor, provides robust support for Move through extensions and integrations, enabling developers to write, debug, and deploy code seamlessly.

Installing the Move Programming Language

Step 1: Install Rust and Cargo

Move development often relies on Rust tooling. Begin by installing Rust and its package manager Cargo:

  1. Visit https://rust-lang.org and follow the platform-specific installation instructions.
  2. Verify the installation by running:
    rustc --version  
    cargo --version  
    

Step 2: Clone the Move Repository

The Move language is hosted on GitHub. Clone the official repository to access the compiler and tools:

git clone https://github.com/move-language/move.git  
cd move  

Follow the repository’s installation instructions to build Move using Cargo .

Step 3: Install Move-Specific Tools

For blockchain platforms like Sui or Aptos, additional tools are required. For example, Sui developers can install the Sui Move CLI:

  1. Install the Sui CLI:
    curl --fail --location --progress-bar https://install.suiet.dev | sh  
    
  2. Verify the installation:
    sui --version  
    

Setting Up Visual Studio Code for Move Development

Step 1: Install VSCode

Download and install VSCode from https://code.visualstudio.com. Follow the installation prompts for your operating system.

Step 2: Install the Move Analyzer Extension

VSCode’s Move Analyzer extension provides syntax highlighting, error checking, and code navigation for Move projects:

  1. Open VSCode.
  2. Go to the Extensions view (Ctrl+Shift+X or Cmd+Shift+X on macOS).
  3. Search for mysten.move and click Install .

Step 3: Configure Your Workspace

  1. Open your Move project folder in VSCode (File > Open Folder).
  2. Create a new Move file (e.g., hello.move) to start coding.

Writing and Running Move Code in VSCode

Create a basic Move module to store and retrieve a value:

address 0x1 {  
    module HelloMove {  
        use 0x1::Storage;  

        struct Message has key {  
            content: String  
        }  

        public fun set_message(sender: &signer, content: String) {  
            Storage::put(&Message { content });  
        }  

        public fun get_message(): String {  
            Storage::get<Message>().content  
        }  
    }  
}  

Save this as hello.move in your project directory.

Step 1: Compile the Module

  1. Open the terminal in VSCode (Terminal > New Terminal).
  2. Compile the module using the Move CLI:
    move build  
    
    This generates bytecode for deployment on a blockchain.

Step 2: Deploy and Test

For platforms like Sui:

  1. Deploy the module:
    sui client publish --gas-budget 10000  
    
  2. Call the set_message function:
    sui client call --package <PACKAGE_ID> --module HelloMove --function set_message --args "Hello, Move!" --gas-budget 10000  
    
  3. Retrieve the message:
    sui client call --package <PACKAGE_ID> --module HelloMove --function get_message --gas-budget 10000  
    
  • Sui
  • SDKs and Developer Tools
  • Move
5
Share
Comments
.