Skip to content

Commit 89f8ef0

Browse files
feat: update compiler tutorial
1 parent 50f49c4 commit 89f8ef0

File tree

1 file changed

+5
-16
lines changed

1 file changed

+5
-16
lines changed

docs/src/compiler/is_prime_rust.md

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,11 @@ rustup update nightly
3030
rustup default nightly
3131
```
3232

33-
Clone the compiler repository:
33+
Install the `midenc` compiler and `cargo-miden` extension:
3434

3535
```bash
36-
git clone https://github.com/0xpolygonmiden/compiler
37-
cd compiler
38-
git checkout next
39-
```
40-
41-
Then install the compiler and cargo-miden extension:
42-
43-
```bash
44-
cargo install --path tools/cargo-miden
45-
cargo install --path midenc --locked
36+
cargo install cargo-miden
37+
cargo install midenc --locked
4638
```
4739

4840
## Step 2: Writing the Rust Program
@@ -143,15 +135,12 @@ The program returns `1` if the integer passed to the `is_prime` function is prim
143135
First cloning the Miden VM repository and install the Miden VM CLI:
144136

145137
```bash
146-
git clone git@github.com:0xPolygonMiden/miden-vm.git
147-
cd miden-vm/miden
148-
cargo install --path . --features concurrent,executable
138+
cargo install miden-vm --version 0.13.0 --features concurrent,executable
149139
```
150140

151141
After installation is complete, return to the `is_prime` directory.
152142

153143
The current input file format for the Miden VM differs slightly from that of the compiler. This means we need to create an `is_prime.inputs` file at the root of the `is_prime` directory:
154-
155144
```json
156145
{
157146
"operand_stack": ["29"]
@@ -178,7 +167,7 @@ Output: [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
178167
To verify the proof generated in the previous step, run the following:
179168

180169
```bash
181-
miden verify -p target/miden/release/is_prime.proof -i is_prime.inputs -x 79689b17ab6286cfde4651ef1f675cab19ad4efd9defd2c43001a06e7cbd8c40
170+
miden verify -p target/miden/release/is_prime.proof -i is_prime.inputs -x c6db9ccd205b2d5139d5a92869a2741a0a8982b8e269a36b7a16d173f467b0c8
182171
```
183172

184173
The output should look like this:

0 commit comments

Comments
 (0)