Post
Share your knowledge.
Is there a reference for all auto-imported MoveStdlib items?
I know of sui::object, sui::object::ID, sui::object::UID, std::option, etc, from experience. But I wonder if there's an authoritative source on that
- Sui
Answers
5290697tz. 290697tz 1170 Jul 22 2025, 16:08 In Move (especially when developing on the Sui Network), some modules like sui::object, sui::transfer, std::option, and others are frequently used and feel “auto-imported” because they’re part of the standard framework and are often pre-declared or commonly used in examples and templates. However, there’s no strict auto-import system like in some high-level languages—you still have to explicitly use any module or struct unless the framework or template does it for you.
That said, there is a reliable reference for all standard and framework modules you can import in Sui. The authoritative source is the Sui Framework repo on GitHub, which holds all modules provided by sui:: and std::. These include things like:
sui::object::{UID, ID}
sui::transfer::public_transfer
std::option::{Option, some, none}
std::vector
std::string
std::table
sui::balance
sui::coin
sui::tx_context::TxContext
You can browse or search all available modules and their public APIs here: https://github.com/MystenLabs/sui/tree/main/crates/sui-framework/packages
Each folder represents a Move package like sui-framework, move-stdlib, or sui-system. Inside each, you'll find the actual .move files you can import and use.
If you're using the Sui CLI or IDEs with Move plugin support (like Move Analyzer in VS Code), auto-completion often suggests these modules because they’re part of the dependency graph declared in your Move.toml file.
Best practice: always check your Move.toml to ensure you're importing the right dependencies. For example, to use standard types like Option or Vector, make sure move-stdlib is declared like this:
[dependencies] MoveStdlib = { git = "https://github.com/move-language/move", rev = "..." }
To avoid confusion, just remember: nothing is truly “auto-imported.” You must explicitly use what you reference, and the only reason some modules feel built-in is because they're declared early and used often.
You can read more on available modules and usage here: https://docs.sui.io/build/move/crates/sui-framework
3
Comments
0xduckmove. Write a comment...
shamueely. shamueely 987 Jul 22 2025, 01:44 You don’t get a full list of auto-imported items in one official reference, but understanding how Move works in Sui helps clarify this. In Sui, certain modules from the Move Standard Library (std) and Sui Framework (sui) are automatically in scope for every module—this means you don’t have to manually import commonly used modules like sui::object, sui::transfer, std::option, or types like ID, UID, Option, etc.
These auto-imports include foundational items like object management (sui::object), type utilities (std::option, std::vector, etc.), and coin and transfer logic (sui::coin, sui::transfer). However, there’s no single official list in the docs explicitly outlining all of them—you typically discover them through development, IDE support, or reading the Sui Framework codebase directly.
If you want a reliable reference, the best way is to browse the actual source code for the Sui Framework and Move Standard Library, which is public. This gives you a clear idea of what’s available and used without explicit import statements.
You can explore them here: Official Sui Framework GitHub Move Standard Library
This helps you see which modules and types are universally accessible, and which need manual importing.
The most authoritative source is the Sui Framework's own source code itself, particularly the modules within the sui and std packages. The official Sui documentation, specifically the Move-related sections, also thoroughly explains these core types and concepts.
In Move (especially when developing on the Sui Network), some modules like sui::object, sui::transfer, std::option, and others are frequently used and feel “auto-imported” because they’re part of the standard framework and are often pre-declared or commonly used in examples and templates. However, there’s no strict auto-import system like in some high-level languages—you still have to explicitly use any module or struct unless the framework or template does it for you.
That said, there is a reliable reference for all standard and framework modules you can import in Sui. The authoritative source is the Sui Framework repo on GitHub, which holds all modules provided by sui:: and std::. These include things like:
sui::object::{UID, ID}
sui::transfer::public_transfer
std::option::{Option, some, none}
std::vector
std::string
std::table
sui::balance
sui::coin
sui::tx_context::TxContext
You can browse or search all available modules and their public APIs here: https://github.com/MystenLabs/sui/tree/main/crates/sui-framework/packages
Each folder represents a Move package like sui-framework, move-stdlib, or sui-system. Inside each, you'll find the actual .move files you can import and use.
If you're using the Sui CLI or IDEs with Move plugin support (like Move Analyzer in VS Code), auto-completion often suggests these modules because they’re part of the dependency graph declared in your Move.toml file.
Best practice: always check your Move.toml to ensure you're importing the right dependencies. For example, to use standard types like Option or Vector, make sure move-stdlib is declared like this:
[dependencies] MoveStdlib = { git = "https://github.com/move-language/move", rev = "..." }
To avoid confusion, just remember: nothing is truly “auto-imported.” You must explicitly use what you reference, and the only reason some modules feel built-in is because they're declared early and used often.
You can read more on available modules and usage here: https://docs.sui.io/build/move/crates/sui-framework
You don’t get a full list of auto-imported items in one official reference, but understanding how Move works in Sui helps clarify this. In Sui, certain modules from the Move Standard Library (std) and Sui Framework (sui) are automatically in scope for every module—this means you don’t have to manually import commonly used modules like sui::object, sui::transfer, std::option, or types like ID, UID, Option, etc.
These auto-imports include foundational items like object management (sui::object), type utilities (std::option, std::vector, etc.), and coin and transfer logic (sui::coin, sui::transfer). However, there’s no single official list in the docs explicitly outlining all of them—you typically discover them through development, IDE support, or reading the Sui Framework codebase directly.
If you want a reliable reference, the best way is to browse the actual source code for the Sui Framework and Move Standard Library, which is public. This gives you a clear idea of what’s available and used without explicit import statements.
You can explore them here: Official Sui Framework GitHub Move Standard Library
This helps you see which modules and types are universally accessible, and which need manual importing.
Do you know the answer?
Please log in and share it.
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