Nexus instructions added

This commit is contained in:
Oleksandr Pravdyvyi 2024-09-25 13:57:50 +03:00
parent 8fb52362fc
commit e4cf01e763
3 changed files with 16 additions and 10 deletions

16
nexus/README.md Normal file
View File

@ -0,0 +1,16 @@
# Test run instructions
Firstly there is requirements
- [Nexus](https://github.com/nexus-xyz/nexus-zkvm?tab=readme-ov-file#quick-start)
Next, we assume, that one is in `nexus` folder.
To prove execution we need to build one of the tests, let`s use [simple_arithmetic_test](./tests/simple_arithmetic_test/) as an example.
To generate a proof, run the following commands:
```sh
cd simple_arithmetic_test
cargo nexus prove
```

View File

@ -50,5 +50,4 @@ pub fn vec_alloc(n: u32) -> u32 {
fn main() {
let n = 7;
let result = vec_alloc(n);
assert_eq!(result, 13);
}

View File

@ -1,13 +1,5 @@
#![cfg_attr(target_arch = "riscv32", no_std, no_main)]
fn fib(n: u32) -> u32 {
match n {
0 => 0,
1 => 1,
_ => fib(n - 1) + fib(n - 2),
}
}
pub fn hept(n: u32) -> u32 {
for i in 0..100 {
@ -20,5 +12,4 @@ pub fn hept(n: u32) -> u32 {
fn main() {
let n = 7;
let result = hept(n);
assert_eq!(result, 13);
}