Creating a new Project
In this guide, you will learn how to create a new project or example using CrabRolls! This guide will help you set up your environment and create a new project or example.
Prerequisites
To start and run a new project or example using CrabRolls, you need a few tools and dependencies. This guide will help you set up your environment and create a new project or example using CrabRolls.
- Unix-like operating system or Windows Subsystem for Linux (WSL)
- Rust
- Docker
- Foundry
- node.js and npm
- Cartesi CLI
- Nonodo CLI (optional, but recommended for development)
From template
Current we have a template to create a new project or example using CrabRolls, available in the CrabRolls template repository, this template are a echo
example, and you can see more information about it in the Echo example documentation. To use the template, you can follow the steps below:
-
Clone the template repository:
-
Enter the template directory:
-
Now you can use the Cartesi CLI to run the application:
Firts you need to build the project:
And then you can run the project:
The terminal will show the output of the application like:
Now you can test the Examples or create your own project based on the template!
From scratch
If you want to create a new project or example from scratch, you can follow the steps below:
-
Create a new cargo project:
-
Add the CrabRolls dependencies to your
Cargo.toml
file: -
Follow the Environment setup guide to set up your environment and how to use the Cartesi CLI to run the application.
Using examples
This project has a collection of examples that demonstrate how to use high-level features of CrabRolls. Each example is a standalone project that can be run independently. All the examples code is available in the CrabRolls repository and the use of each example is documented in the examples
section of this documentation. Current available examples are: