Coder Social home page Coder Social logo

risc0 / risc0-rust-starter Goto Github PK

View Code? Open in Web Editor NEW
82.0 19.0 24.0 71 KB

This repository has been deprecated in favor of the `cargo risczero` tool. (Previously: A template for starting projects with the RISC Zero zkVM.)

License: Apache License 2.0

Rust 100.00%

risc0-rust-starter's Introduction

RISC Zero Rust Starter Template

(This repository has been deprecated in favor of the cargo risczero tool's new command.)

Welcome to the RISC Zero Rust Starter Template! This template is intended to give you a starting point for building a project using the RISC Zero zkVM. Throughout the code are comments labelled TODO in places where we expect projects will need to modify the code.

TODO: Replace this README with a README for your project TODO: Verify whether the included .gitignore, LICENSE, and rust-toolchain files are appropriate to your project

Quick Start

First, make sure rustup is installed. This project uses a nightly version of Rust. The rust-toolchain file will be used by cargo to automatically install the correct version.

To build all methods and execute the method within the zkVM, run the following command:

cargo run

This is an empty template, and so there is no expected output (until you modify the code).

How to create a project based on this template

Search this template for the string TODO, and make the necessary changes to implement the required feature described by the TODO comment. Some of these changes will be complex, and so we have a number of instructional resources to assist you in learning how to write your own code for the RISC Zero zkVM:

Stable Versions

By default, this template depends on the latest version of RISC Zero: the main branch of our main repository. This gives you access to our latest features and improvements. If you would prefer to use our more stable published crates, we have tags matching those crates that you can use, e.g. v0.11.1.

Contributor's Guide

We welcome contributions to documentation and code via PRs and GitHub Issues on our main repository, this repository, or any of our other repositories.

Video Tutorial

For a walk-through of how to build with this template, check out this excerpt from our workshop at ZK HACK III.

Questions, Feedback, and Collaborations

We'd love to hear from you on Discord or Twitter.

risc0-rust-starter's People

Contributors

ever0de avatar flaub avatar ianklatzco avatar intoverflow avatar jbruestle avatar pdg744 avatar rlukata avatar spaugh avatar tzerrell avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

risc0-rust-starter's Issues

Build failing on MacOS 12.1

Cloned the repo and followed the README instructions, but struggling to get a successful build.
Fairly sure I have the nightly version of rust installed correctly.
Anyone know what's going on here?

 risc0-rust-starter % cargo run --release      
   Compiling time v0.3.11
   Compiling ring v0.16.20
   Compiling zstd-sys v1.6.3+zstd.1.5.2
   Compiling bzip2-sys v0.1.11+1.0.8
   Compiling cxx v1.0.71
   Compiling link-cplusplus v1.0.6
   Compiling tbb-sys v1.1.0+2021.5.0
thread 'rustc' panicked at 'index out of bounds: the len is 1 but the index is 2', compiler/rustc_builtin_macros/src/format.rs:1001:28
stack backtrace:
   0:        0x1031837c4 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h1c2741f3639f8442
   1:        0x1031d05c4 - core::fmt::write::hd51b6cc8cbbb2d76
   2:        0x103176658 - std::io::Write::write_fmt::hc9ded5809aaf3e84
   3:        0x1031862c8 - std::panicking::default_hook::{{closure}}::hb686467fd129f7fd
   4:        0x103185fec - std::panicking::default_hook::h374f7ad2587e4e90
   5:        0x10a8aa810 - rustc_driver[843cff54cb2a6a29]::DEFAULT_HOOK::{closure#0}::{closure#0}
   6:        0x10318698c - std::panicking::rust_panic_with_hook::h0273f27f2a26388b
   7:        0x103186834 - std::panicking::begin_panic_handler::{{closure}}::ha1d4b8f12c432807
   8:        0x103183cd0 - std::sys_common::backtrace::__rust_end_short_backtrace::h885b9c34658026d1
   9:        0x10318658c - _rust_begin_unwind
  10:        0x1031fb8e0 - core::panicking::panic_fmt::hdd7c48a0735d10d5
  11:        0x1031fb850 - core::panicking::panic_bounds_check::h89e78927cd2dbf90
  12:        0x10cd5830c - rustc_builtin_macros[21aaf7c1c8a86395]::format::expand_preparsed_format_args
  13:        0x10cd52bd8 - rustc_builtin_macros[21aaf7c1c8a86395]::format::expand_format_args_impl
  14:        0x10df61a00 - <rustc_expand[67cbb5af8ae82f3b]::expand::MacroExpander>::fully_expand_fragment
  15:        0x10df60eac - <rustc_expand[67cbb5af8ae82f3b]::expand::MacroExpander>::expand_crate
  16:        0x10a954f74 - <rustc_session[d32ca5c8f23e28cf]::session::Session>::time::<core[76aedcf376f9405f]::result::Result<rustc_ast[d814f561615e8264]::ast::Crate, rustc_errors[da0bffa66a78e669]::ErrorGuaranteed>, rustc_interface[76bb12a5aed877e9]::passes::configure_and_expand::{closure#1}>
  17:        0x10a94d468 - <rustc_interface[76bb12a5aed877e9]::passes::boxed_resolver::BoxedResolver>::access::<<rustc_interface[76bb12a5aed877e9]::queries::Queries>::expansion::{closure#0}::{closure#0}, core[76aedcf376f9405f]::result::Result<rustc_ast[d814f561615e8264]::ast::Crate, rustc_errors[da0bffa66a78e669]::ErrorGuaranteed>>
  18:        0x10a9319b0 - <rustc_interface[76bb12a5aed877e9]::queries::Queries>::expansion
  19:        0x10a831b84 - <rustc_interface[76bb12a5aed877e9]::interface::Compiler>::enter::<rustc_driver[843cff54cb2a6a29]::run_compiler::{closure#1}::{closure#2}, core[76aedcf376f9405f]::result::Result<core[76aedcf376f9405f]::option::Option<rustc_interface[76bb12a5aed877e9]::queries::Linker>, rustc_errors[da0bffa66a78e669]::ErrorGuaranteed>>
  20:        0x10a828294 - rustc_span[f1e1ed43b4dfa0e8]::with_source_map::<core[76aedcf376f9405f]::result::Result<(), rustc_errors[da0bffa66a78e669]::ErrorGuaranteed>, rustc_interface[76bb12a5aed877e9]::interface::create_compiler_and_run<core[76aedcf376f9405f]::result::Result<(), rustc_errors[da0bffa66a78e669]::ErrorGuaranteed>, rustc_driver[843cff54cb2a6a29]::run_compiler::{closure#1}>::{closure#1}>
  21:        0x10a84e6bc - rustc_interface[76bb12a5aed877e9]::interface::create_compiler_and_run::<core[76aedcf376f9405f]::result::Result<(), rustc_errors[da0bffa66a78e669]::ErrorGuaranteed>, rustc_driver[843cff54cb2a6a29]::run_compiler::{closure#1}>
  22:        0x10a8256f8 - <scoped_tls[63e3ead55651ead4]::ScopedKey<rustc_span[f1e1ed43b4dfa0e8]::SessionGlobals>>::set::<rustc_interface[76bb12a5aed877e9]::interface::run_compiler<core[76aedcf376f9405f]::result::Result<(), rustc_errors[da0bffa66a78e669]::ErrorGuaranteed>, rustc_driver[843cff54cb2a6a29]::run_compiler::{closure#1}>::{closure#0}, core[76aedcf376f9405f]::result::Result<(), rustc_errors[da0bffa66a78e669]::ErrorGuaranteed>>
  23:        0x10a82e570 - std[dfd43a7567f77540]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[76bb12a5aed877e9]::util::run_in_thread_pool_with_globals<rustc_interface[76bb12a5aed877e9]::interface::run_compiler<core[76aedcf376f9405f]::result::Result<(), rustc_errors[da0bffa66a78e669]::ErrorGuaranteed>, rustc_driver[843cff54cb2a6a29]::run_compiler::{closure#1}>::{closure#0}, core[76aedcf376f9405f]::result::Result<(), rustc_errors[da0bffa66a78e669]::ErrorGuaranteed>>::{closure#0}, core[76aedcf376f9405f]::result::Result<(), rustc_errors[da0bffa66a78e669]::ErrorGuaranteed>>
  24:        0x10a84f55c - <<std[dfd43a7567f77540]::thread::Builder>::spawn_unchecked_<rustc_interface[76bb12a5aed877e9]::util::run_in_thread_pool_with_globals<rustc_interface[76bb12a5aed877e9]::interface::run_compiler<core[76aedcf376f9405f]::result::Result<(), rustc_errors[da0bffa66a78e669]::ErrorGuaranteed>, rustc_driver[843cff54cb2a6a29]::run_compiler::{closure#1}>::{closure#0}, core[76aedcf376f9405f]::result::Result<(), rustc_errors[da0bffa66a78e669]::ErrorGuaranteed>>::{closure#0}, core[76aedcf376f9405f]::result::Result<(), rustc_errors[da0bffa66a78e669]::ErrorGuaranteed>>::{closure#1} as core[76aedcf376f9405f]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  25:        0x10318ec3c - std::sys::unix::thread::Thread::new::thread_start::h9600449bcd2797eb
  26:        0x1b72bd240 - __pthread_deallocate

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.64.0-nightly (23e21bdd2 2022-07-15) running on aarch64-apple-darwin

note: compiler flags: --crate-type lib -C embed-bitcode=no -C debug-assertions=off

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
end of query stack
error: could not compile `time`
warning: build failed, waiting for other jobs to finish...

(Issue opened by mistake - please delete)

The following simple example illustrates how this Metamath implementation fails to respect the scoping of $e statements.

$( The type of propositions $)
$c prop $.
$c |- true false $.
$v P $.

$( P, true and false are propositions $)
P-prop     $f prop P $.
true-prop  $a prop true $.
false-prop $a prop false $.

$( ex falso quodlibet $)
${
    hyp $e |- false $.
    p   $a |- P $.
$}

$( Proof of false via reference to out-of-scope hypothesis $)
proof-of-false $p |- false $= P-hyp $. 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.