Sui.

Post

Share your knowledge.

harry phan.
Jul 28, 2025
Expert Q&A

is this a known issue?

I feel like sui move build --dump-bytecode-as-base64 is not working with implicit SuiFramework dep, whereas I don't have the problem with sui move build

is this a known issue?

  • Sui
0
8
Share
Comments
.

Answers

8
0xduckmove.
Jul 31 2025, 09:59

Yes, this is a known issue with --dump-bytecode-as-base64 when using implicit Sui Framework dependencies.

Workaround: Explicitly declare the Sui dependency in Move.toml:


[dependencies]
Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework", rev = "framework/testnet" }
Use raw sui move build if you only need the bytecode (without base64 dump).

Verify Fix: sui move build --dump-bytecode-as-base64 # Should work after explicit dep

3
Best Answer
Comments
.
Owen.
Owen4662
Jul 30 2025, 03:19

The sui move build --dump-bytecode-as-base64 command may fail when the Sui Framework is implicitly included because the flag expects explicit module dependencies and direct compilation output. Implicit framework dependencies can interfere with bytecode extraction, as the build process for Sui includes automatic linking of the framework, which is not always compatible with the bytecode dumping pipeline. This is a known limitation. To work around it, ensure you are using an explicit, compatible version of the Sui SDK and consider building the package without implicit framework injection by vendoring required modules. Check the Sui GitHub issues for ongoing discussions on this behavior.

7
Comments
.
Benjamin XDV.
Jul 30 2025, 09:43

Yes, this appears to be a known issue with sui move build --dump-bytecode-as-base64 when implicitly depending on SuiFramework. The command works correctly with explicit dependencies but fails when framework dependencies are implicit. Some developers have reported similar behavior, suggesting it may be a bug in the compiler's handling of implicit framework dependencies. As a temporary workaround, try explicitly listing SuiFramework in your Move.toml dependencies. The Sui team is likely aware of this issue, so checking GitHub issues or Discord for updates is recommended.

6
Comments
.
Arnold.
Arnold3036
Jul 30 2025, 08:26

Yes, this is a known issue with --dump-bytecode-as-base64 when using implicit Sui Framework dependencies.

Workaround:

  1. Explicitly declare the Sui dependency in Move.toml:

    [dependencies]
    Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework", rev = "framework/testnet" }
    
  2. Use raw sui move build if you only need the bytecode (without base64 dump).

Verify Fix:

sui move build --dump-bytecode-as-base64  # Should work after explicit dep
5
Comments
.
Alya.
Alya-14
Jul 31 2025, 06:23

Yes, sui move build --dump-bytecode-as-base64 may fail with implicit Sui Framework deps due to missing resolution; explicitly add dependencies = { "Sui" = { address = "0x2" } } in Move.toml — known issue in some versions.

4
Comments
.
Bekky.
Bekky1762
Jul 29 2025, 13:30

Yes, this is a known issue with sui move build --dump-bytecode-as-base64 when implicitly depending on the Sui Framework. Current Workaround:

  1. Explicitly declare Sui dependency in your Move.toml:
[dependencies]
Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework", rev = "framework/mainnet" }
  1. Alternative command (works without the flag):
sui move build && cat build/YOUR_PACKAGE/bytecode_modules/*.base64

Status:

Temporary Fix:

# Build normally first
sui move build
# Then dump bytecode separately
sui move dump-bytecode --module YOUR_MODULE --base64
2
Comments
.
theking.
Jul 28 2025, 11:32

Yes, you're likely encountering a known quirk in the sui move build --dump-bytecode-as-base64 command related to implicit dependencies, particularly the SuiFramework.

While sui move build successfully compiles your package by auto-including the Sui standard library (SuiFramework), the --dump-bytecode-as-base64 flag seems to require a more explicit project structure. This means if your Move.toml does not explicitly declare SuiFramework under [dependencies], the --dump-bytecode-as-base64 command may fail silently or produce incorrect outputs.

To resolve this, ensure your Move.toml includes:

[dependencies]
Sui = { git = "https://github.com/MystenLabs/sui", subdir = "crates/sui-framework/packages/sui-framework", rev = "main" }

And in your Move.toml, also set address = "0x2" or appropriate alias mapping if needed.

This forces the build system to treat the SuiFramework as an explicit dependency, which can stabilize behavior across all build commands, including bytecode dumps.

1
Comments
.

Do you know the answer?

Please log in and share it.