Skip to content
This repository has been archived by the owner on Dec 3, 2024. It is now read-only.

Latest commit

 

History

History
29 lines (17 loc) · 1.21 KB

README.md

File metadata and controls

29 lines (17 loc) · 1.21 KB

A random number guessing game on Valida

System requirements

This template supports x86-64 Linux. rustup is required. Arch Linux and Ubuntu are specifically supported, with other platforms possibly requiring some tinkering to make work.

Toolchain installation

To run this project in the Valida VM, you need the Valida toolchain installed. Go to LLVM Valida releases to find the latest release. Download the release tarball, extract it, cd into the extracted folder, and run sudo ./install.sh.

Entering the Valida shell

To put the Valida toolchain on your PATH, you can enter the Valida shell by running valida-shell in your shell. The above installation process should have resulted in valida-shell being on your PATH.

Usage

Build the project, from the root directory of this repo:

cargo +valida build --release

To run the program, in the Valida shell, from the root directory of this repo:

valida> valida run ./target/valida-unknown-baremetal-gnu/release/guessing_game log

The run command runs the program, and starts the game. The log of the game contains the game history.