Code Monkey home page Code Monkey logo

cargo-cartesi's Introduction

Cargo Cartesi

Rust-specific toolkit for building DApps on Cartesi.

Motivation

The Cartesi ecosystem on its own is self-sufficient. It, however, requires learning some domain knowledge. To smooth-out the learning curve, we developed a toolkit that allows Rust developer of any level to build DApps on Cartesi using a high-level interface.

Requirements

Installation

Clone this repository, then run

cargo build -p cargo-cartesi

And put directory target/debug in your $PATH.

Usage

Create new DApp

Use the following command to create hello world DApp and build from there.

cargo cartesi new my-dapp

Creates a new DApp in my-dapp/ directory.

Build binary

In the DApp directory run:

cargo cartesi build

To build RISC-V specific binary. Cartesi machine is built on RISC-V architecture so that's the target we need.

Create file-system

Cartesi machine uses ext2 file-system. To embed the binary in an image that the machine can mount, run:

cargo cartesi create-fs

Build machine

To create Cartesi machine in an initial state, in the DApp directory run:

rm -rf pwd
mkdir pwd
cargo cartesi create-machine

The initial state is when the DApp runs on Cartesi machine until first yield. It will be stored in pwd/machine directory.

Run (one-shot)

To run binary on a Cartesi machine without rollups, in the DApp directory run:

cargo cartesi run

This is an experimental feature, the app runs on Cartesi machine but is not able to yield or do any other operation using MachineIo.

cargo-cartesi's People

Contributors

romanhodulak avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.