Post
Share your knowledge.

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:
- Visit https://rust-lang.org and follow the platform-specific installation instructions.
- 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:
- Install the Sui CLI:
curl --fail --location --progress-bar https://install.suiet.dev | sh - 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:
- Open VSCode.
- Go to the Extensions view (
Ctrl+Shift+XorCmd+Shift+Xon macOS). - Search for mysten.move and click Install .
Step 3: Configure Your Workspace
- Open your Move project folder in VSCode (
File > Open Folder). - 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
- Open the terminal in VSCode (
Terminal > New Terminal). - Compile the module using the Move CLI:
This generates bytecode for deployment on a blockchain.move build
Step 2: Deploy and Test
For platforms like Sui:
- Deploy the module:
sui client publish --gas-budget 10000 - Call the
set_messagefunction:sui client call --package <PACKAGE_ID> --module HelloMove --function set_message --args "Hello, Move!" --gas-budget 10000 - Retrieve the message:
sui client call --package <PACKAGE_ID> --module HelloMove --function get_message --gas-budget 10000
- Sui
- SDKs and Developer Tools
- Move
Sui is a Layer 1 protocol blockchain designed as the first internet-scale programmable blockchain platform.
- How to Maximize Profit Holding SUI: Sui Staking vs Liquid Staking616
- Why does BCS require exact field order for deserialization when Move structs have named fields?65
- Multiple Source Verification Errors" in Sui Move Module Publications - Automated Error Resolution55
- Sui Move Error - Unable to process transaction No valid gas coins found for the transaction419
- Sui Transaction Failing: Objects Reserved for Another Transaction410