Skip to content
/ risc0 Public
forked from risc0/risc0

RISC Zero is a zero-knowledge verifiable general computing platform based on zk-STARKs and the RISC-V microarchitecture.

License

Notifications You must be signed in to change notification settings

shkoo/risc0

Repository files navigation

Risc0

Risc0 is a zero-knowledge verifiable general computing platform based on zk-STARKs and the RISC-V microarchitecture.

Building Risc0

We use Bazel for its strong multi-language multi-platform features and performance.

We recommend using Bazelisk to make bazel version management seamless.

In order to build Risc0 executables you'll need a RISC-V toolchain. See the platform specific instructions below.

Note: to configure the location of the RISC-V toolchain on your system, add a .bazelrc.local file to the root of the project with this line:

build --riscv_root=/<path>/<to>/<riscv>/<toolchain>

macOS

Rust development on macOS requires a full install of Xcode.

Using Brew:

Your .bazelrc.local file should contain a line like this (check your exact path):

build --riscv_root=/usr/local/Cellar/riscv-gnu-toolchain/main

Once the prerequisites are installed you should be able to build and run all of the tests:

bazelisk test ...

Running the 'Battleship' Examples

'Battleship' is a 2-player hidden information game implemented in C++ & Rust.

Players produce proofs of game-state and the result of their actions to enable two players to play fairly with no intermediaries.

The best way to understand how the game works currently is to read the code and run the tests with debug logging enabled:

CPP

RISC0_LOG=1 bazelisk run //examples/cpp/battleship:test --test_output=streamed

Rust

RISC0_LOG=1 bazelisk run //examples/rust/battleship:test --test_output=streamed

bazelisk run //examples/rust/battleship:test

About

RISC Zero is a zero-knowledge verifiable general computing platform based on zk-STARKs and the RISC-V microarchitecture.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 76.2%
  • Starlark 10.4%
  • Rust 9.4%
  • C 2.6%
  • Assembly 1.1%
  • Python 0.3%