Skip to content

Temporary repository for the co-processor cli tool to simplify template generation and deployment.

Notifications You must be signed in to change notification settings

Mugen-Builders/co-processor-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cartesi Co-Processor CLI Tool

Overview

The Cartesi Co-Processor CLI Tool simplifies bootstrapping, registering, and deploying Cartesi co-processor programs. This tool streamlines the development workflow for Cartesi-based applications, allowing developers to focus on building their logic instead of wrestling with setup and deployment processes.

Features

  • Bootstrap Projects: Quickly initialize a Cartesi project with a simple Foundry project inheriting the co-processor base contracts.
  • Simplified Registration: Easily build, generate .car files and finally update the co-processor task issuer with your program/machine details.
  • Simplified Deployment: Automate the deployment and registration of co-processor programs.

Installation

Using Cargo

Ensure you have Rust and Cargo installed. You can then install the CLI tool directly from crates.io:

cargo install cartesi-coprocessor

From Source

Clone the repository and build the tool manually:

git clone https://github.com/Mugen-Builders/co-processor-cli
cd co-processor-cli
cargo install --path .

Note:

  • You need to have all the necessary dependencies installed and running before you can use this tool.
    • Nonodo.
    • Docker.
    • Cartesi machine.
    • Carize.
    • W3 (web3 storage CLI).
    • foundry.
  • You need to clone and build the Carize tool manually also before calling any of the commands.

Usage

Run the CLI tool with:

cartesi-coprocessor [COMMAND] [OPTIONS]

Commands

Bootstrap a Project

Initialize a new Foundry project with Cartesi base contracts:

cartesi-coprocessor create --dapp-name <project_name> --template <language template>

Register a Co-Processor Program

Register your Cartesi co-processor program:

cartesi-coprocessor register --email <w3 storage account email>

Example Workflow

  1. Bootstrap a Project
cartesi-coprocessor create --dapp-name my-cartesi-project --template rust
cd my-cartesi-project
  1. Add Logic to the Child Contract Edit the pre-generated child contract in the src folder to implement your business logic.

  2. Register the Program

cartesi-coprocessor register --email [email protected]

Contributing

We welcome contributions! To get started:

  1. Fork the repository.
  2. Create a new branch: git checkout -b feature-name
  3. Make your changes and test them.
  4. Submit a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Support

If you encounter issues or have feature requests, please open an issue on GitHub. Or drop a message on Cartesi discord under the Co-Procesor thread.


About

Temporary repository for the co-processor cli tool to simplify template generation and deployment.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published