Skip to content

SaitoTech/saito-rust-workspace

Repository files navigation

Welcome to Saito

Rust

This distribution contains an implementation of Saito Consensus in the Rust programming language. It includes the core code needed to run Saito in any language. It contains three main components organized by three main sub-directories: saito-core, saito-rust, and saito-wasm.

Saito-Core

This is the place to start if you are interested in understanding Saito Consensus. The code in this directory is used by all versions of Saito. It constitutes the basic classes (blocks, transactions, mempool) that process the blockchain as well as the universal local for processing the events that run the blockchain and keep the network in sync.

Saito-Rust

The Saito Rust directory contains the code needed to provide storage and network services in the Rust language. These handlers are passed into Saito-Core, where the core software will occasionally call them in order to process network or storage requests such as saving blocks to disk or sending messages to other peers on the network.

You should only need to modify these files if you are developing features that affect storage or network functionality in the Rust-only client.

Saito-Wasm

Saito provides a way to compile our shared library into WASM, a type of binary code that can be executed in many other languages and other platforms. An example of this is compiling Saito into WASM for deployment in a browser -- allowing the network and browser code to run lite-clients that use the same underlying code so as to prevent accidental forks.

API Guide

https://saitotech.github.io/saito-rust-workspace/

Saito Rust Workspace Setup Guide

This guide provides step-by-step instructions for setting up the Saito Rust workspace on a Linux and mac environment. Follow these steps to clone the repository, prepare the environment, and run the application.

Requirements

Setup Instructions

Step 1: Clone the Repository

First, clone the Saito Rust workspace repository from GitHub using the following command:

git clone https://github.com/saitotech/saito-rust-workspace 

Step 2: Initialize the Environment

Navigate to the cloned directory and run the bootstrap script to prepare your environment:

For Linux Run the bootstrap_linux.sh script to prepare your Linux environment:

cd saito-rust-workspace
bash scripts/bootstrap_linux.sh

For macOS If you are on a macOS device, use the bootstrap_mac.sh script instead:

cd saito-rust-workspace
bash scripts/bootstrap_mac.sh

Step 3: Configure the Application

Change to the saito-rust directory:

cd saito-rust

Copy the configuration template to create your own configuration file:

cp configs/config.template.json configs/config.json

for explaination of the configuration file, click here

Step 4: Prepare Data Directories

Copy the issuance template to the appropriate directory:

cp data/issuance/issuance.template data/issuance/issuance

Create a directory for blockchain blocks:

mkdir data/blocks

Step 5: Run the Application

Finally, start the Saito application with Rust's cargo tool, enabling debug logging:

RUST_LOG=debug cargo run

After completing these steps, the Saito Rust workspace should be up and running on your system. You can modify the configs/config.json file as needed to customize your setup. For further assistance, consult the official Saito documentation or reach out to the Saito community.

About

Cargo workspace which contains all the rust projects for Saito

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published