Skip to content

Commit c1a61b6

Browse files
authored
Update README.md (#310)
1 parent 675f214 commit c1a61b6

File tree

1 file changed

+19
-12
lines changed

1 file changed

+19
-12
lines changed

README.md

+19-12
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ First, install Rust: https://www.rust-lang.org/tools/install.
3535

3636
Also, make sure you have a working version of [cmake](https://cmake.org/).
3737

38+
Note: cmake is a required dependency.
39+
3840
Next, install the RISC-V target:
3941

4042
```shell
@@ -61,6 +63,12 @@ This should print the available CLI commands.
6163
cargo nexus new nexus-project
6264
```
6365

66+
And change directory to the new project:
67+
68+
```shell
69+
cd nexus-project
70+
```
71+
6472
This will create a new Rust project directory with the following structure:
6573

6674
```shell
@@ -75,20 +83,12 @@ As an example, you can change the content of `./src/main.rs` to:
7583

7684
```rust
7785
#![cfg_attr(target_arch = "riscv32", no_std, no_main)]
78-
79-
fn fib(n: u32) -> u32 {
80-
match n {
81-
0 => 0,
82-
1 => 1,
83-
_ => fib(n - 1) + fib(n - 2),
84-
}
85-
}
86-
86+
87+
use nexus_rt::write_log;
88+
8789
#[nexus_rt::main]
8890
fn main() {
89-
let n = 7;
90-
let result = fib(n);
91-
assert_eq!(result, 13);
91+
write_log("Hello, World!\n");
9292
}
9393
```
9494

@@ -98,6 +98,11 @@ fn main() {
9898
cargo nexus run
9999
```
100100

101+
You should see the program print:
102+
```bash
103+
"Hello, World!"
104+
```
105+
101106
This command should run successfully. To print the full step-by-step execution trace on the NVM, run:
102107

103108
```bash
@@ -122,6 +127,8 @@ Finally, load and verify the proof:
122127
cargo nexus verify
123128
```
124129

130+
You should see the program print "Verifying Proof..." and finally "Finished" when complete.
131+
125132
## Learn More
126133

127134
Run `cargo nexus --help` to see all the available commands.

0 commit comments

Comments
 (0)