Skip to content

Commit

Permalink
Verify_Proof
Browse files Browse the repository at this point in the history
  • Loading branch information
NICEGUYSATHYA committed Jun 13, 2024
1 parent 487b8e2 commit eaf8754
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 1 deletion.
11 changes: 11 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# This configuration file was automatically generated by Gitpod.
# Please adjust to your needs (see https://www.gitpod.io/docs/introduction/learn-gitpod/gitpod-yaml)
# and commit this file to your remote git repository to share the goodness with others.

# Learn more from ready-to-use templates: https://www.gitpod.io/docs/introduction/getting-started/quickstart

tasks:
- init: cargo build
command: cargo watch -x run


2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ members = [
"nova",
"spartan",
"api",
"jolt",
"jolt", "nexus-project",
]
default-members = [
"vm",
Expand Down
8 changes: 8 additions & 0 deletions nexus-project/.cargo/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[build]
target = "riscv32i-unknown-none-elf"

[target.riscv32i-unknown-none-elf]
rustflags = [
"-C", "link-arg=-Tlink.x",
]
runner="nexus-run"
20 changes: 20 additions & 0 deletions nexus-project/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[package]
name = "nexus-project"
edition.workspace = true
version.workspace = true
authors.workspace = true
homepage.workspace = true
repository.workspace = true
keywords.workspace = true
categories.workspace = true
publish.workspace = true

[dependencies]
nexus-rt = { git = "https://github.com/nexus-xyz/nexus-zkvm.git", version = "1.0.0" }

# Generated by nexus-tools, do not remove!
#
# This profile is used for generating proofs, as Nexus VM support for compiler optimizations is still under development.
[profile.release-unoptimized]
inherits = "release"
opt-level = 0
17 changes: 17 additions & 0 deletions nexus-project/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#![no_std]
#![no_main]

fn fib(n: u32) -> u32 {
match n {
0 => 0,
1 => 1,
_ => fib(n - 1) + fib(n - 2),
}
}

#[nexus_rt::main]
fn main() {
let n = 7;
let result = fib(n);
assert_eq!(result, 13);
}

0 comments on commit eaf8754

Please sign in to comment.