Skip to content
This repository was archived by the owner on Jul 30, 2025. It is now read-only.

Commit 6ecec2e

Browse files
committed
Making compiler v2 default
1 parent edf8bbe commit 6ecec2e

File tree

2 files changed

+23
-14
lines changed

2 files changed

+23
-14
lines changed

apps/nextra/pages/en/build/smart-contracts/compiler_v2.mdx

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ title: "Move On Aptos Compiler (beta)"
66

77
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.
88

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.
1010

1111
## Compiler v2 Release State
1212

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.
1414

1515
## Bug Bounty
1616

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.
1818

1919
## Reporting an Issue
2020

@@ -31,10 +31,21 @@ aptos update aptos # on supported OS
3131
brew upgrade aptos # on MacOS
3232
```
3333

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:
3535

3636
```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 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.
45+
46+
```toml filename="Move.toml"
47+
[dependencies.AptosFramework]
48+
git = "https://github.com/aptos-labs/aptos-framework.git"
49+
rev = "aptos-release-v1.25"
50+
subdir = "aptos-framework"
4051
```

packages/aptos-nextra-components/src/utils/mdast/mdast.test.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ test("keyRotation.md parse and fix AST", () => {
77
markdownToMdx(tree);
88
const markdown = astToMarkdown(tree);
99
expect(markdown).toEqual(
10-
astToMarkdown(
11-
readFileAsTree("./examples/keyRotation.expect.md"),
12-
).toString(),
10+
astToMarkdown(readFileAsTree("./examples/keyRotation.expect.md")).toString()
1311
);
1412
});
1513

@@ -20,8 +18,8 @@ test("account_snippet.md parse and fix AST", () => {
2018
const markdown = astToMarkdown(tree);
2119
expect(markdown).toEqual(
2220
astToMarkdown(
23-
readFileAsTree("./examples/account_snippet.expect.md"),
24-
).toString(),
21+
readFileAsTree("./examples/account_snippet.expect.md")
22+
).toString()
2523
);
2624
});
2725

@@ -31,8 +29,8 @@ test("vector_snippet.md parse and fix AST", () => {
3129
const markdown = astToMarkdown(tree);
3230
expect(markdown).toEqual(
3331
astToMarkdown(
34-
readFileAsTree("./examples/vector_snippet.expect.md"),
35-
).toString(),
32+
readFileAsTree("./examples/vector_snippet.expect.md")
33+
).toString()
3634
);
3735
});
3836

0 commit comments

Comments
 (0)