You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 30, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: apps/nextra/pages/en/build/smart-contracts/compiler_v2.mdx
+18-7Lines changed: 18 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,15 +6,15 @@ title: "Move On Aptos Compiler (beta)"
6
6
7
7
The Move on Aptos compiler (codename 'compiler v2') is a new tool which translates Move source code into Move bytecode. It unifies the architectures of the Move compiler and the Move Prover, enabling faster innovation in the Move language. It also offers new tools for defining code optimizations which can be leveraged to generate more gas efficient code for Move programs.
8
8
9
-
The new compiler supports Move 2, the latest revision of the Move language. Head over to the [release page in the book](book/move-2.mdx) to learn more about the new features in Move 2. You can select both this language version and the new compiler by using `aptos move compile --move-2`.
9
+
The new compiler supports Move 2, the latest revision of the Move language. Head over to the [release page in the book](book/move-2.mdx) to learn more about the new features in Move 2. Starting at Aptos CLI v6.0.0, this language version and the new compiler are the default.
10
10
11
11
## Compiler v2 Release State
12
12
13
-
Compiler v2 is ready for production but not yet the default. You opt in to use compiler v2 and language Move 2 by using the `--move-2` flag passed to the Aptos CLI.
13
+
Compiler v2 is now the default.
14
14
15
15
## Bug Bounty
16
16
17
-
We award a bounty for each unique semantic bug identified in the compiler. Bugs need to surface as a difference of execution outcome of the v1 and v2 compilers, as demonstrated by a Move unit test. Try your existing Move tests with the new compiler, it is as easy as calling `aptos move test --compiler-version=2 --language-version=1`! Not all differences in the compiler behavior count for the program, [head over here](https://hackenproof.com/programs/move-on-aptos-compiler) for details of the bounty program. Even if a difference in behavior does not qualify for a bounty, we encourage you to open an issue using the link below.
17
+
We award a bounty for each unique semantic bug identified in the compiler. Bugs need to surface as a difference of execution outcome of the v1 and v2 compilers, as demonstrated by a Move unit test. Not all differences in the compiler behavior count for the program, [head over here](https://hackenproof.com/programs/move-on-aptos-compiler) for details of the bounty program. Even if a difference in behavior does not qualify for a bounty, we encourage you to open an issue using the link below.
18
18
19
19
## Reporting an Issue
20
20
@@ -31,10 +31,21 @@ aptos update aptos # on supported OS
31
31
brew upgrade aptos # on MacOS
32
32
```
33
33
34
-
To run compiler v2 and Move 2, pass the flag `--move-2` to the Aptos CLI. Examples:
34
+
Compiler v2 and Move 2 are now the default, requiring no changes to your usage. Examples:
35
35
36
36
```bash filename="Terminal"
37
-
aptos move compile --move-2
38
-
aptos move test --move-2
39
-
aptos move prove --move-2
37
+
aptos move compile
38
+
aptos move test
39
+
aptos move prove
40
+
```
41
+
42
+
## Using Compiler v1
43
+
44
+
Compiler v1 (i.e., the old compiler) is expected to be sunset soon, as it does not support any of the Move 2 features, and is thus not recommended for use. However, if you still want to use compiler v1 before it is sunset, on your project that does not use any Move 2 features, you can do so with the `--move-1` flag (eg., `aptos move compile --move-1` or `aptos move test --move-1`). You may need to specify the `aptos-release-v1.25` version of the Aptos framework in the dependencies (this is the last version of the Aptos framework that does not use any Move 2 features), as shown below.
0 commit comments