Code Monkey home page Code Monkey logo

fuels-rs's Introduction

fuels-rs

build crates.io docs discord

Rust SDK for Fuel. It can be used for a variety of things, including but not limited to:

  • Compiling, deploying, and testing Sway contracts;
  • Launching a local Fuel network;
  • Crafting and signing transactions with hand-crafted scripts or contract calls;
  • Generating type-safe Rust bindings of contract methods;
  • And more, fuels-rs is still in active development.

Documentation

See the fuels-rs book

Features

  • Launch Fuel nodes
  • Deploy contracts
  • Interact with deployed contracts
  • Type-safe Sway contracts bindings code generation
  • Run Sway scripts
  • CLI for common operations
  • Local test wallets
  • Wallet integration
  • Events querying/monitoring

FAQ

What dependencies do I need?

How can I run the SDK tests?

First, build the test projects using forc:

forc build --path packages/fuels

Then you can run the SDK tests with:

cargo test

You can also run specific tests. The following example will run all integration tests in types.rs whose names contain in_vector and show their outputs:

cargo test --test types in_vector -- --show-output

How to run WASM tests?

You need to have wasm32 as a target, if you don't already:

 rustup target add wasm32-unknown-unknown

You also need wasm-pack, if you don't already:

cargo install wasm-pack

Navigate to packages/wasm-tests and run wasm-pack test.

What to do if my tests are failing on master

Before doing anything else, try all these commands:

cargo clean
rm Cargo.lock
forc build --path packages/fuels
cargo test

Why is the prefix fuels and not fuel?

In order to make the SDK for Fuel feel familiar with those coming from the ethers.js ecosystem, this project opted for an s at the end. The fuels-* family of SDKs is inspired by The Ethers Project.

How can I run the docs locally?

Install mdbook by running:

cargo install mdbook

Next, navigate to the docs folder and run the command below to start a local server and open a new tab in you browser.

mdbook serve --open

You can build the book by running:

mdbook build

fuels-rs's People

Contributors

digorithm avatar hal3e avatar iqdecay avatar mujkica avatar salka1988 avatar segfault-magnet avatar adlerjohn avatar br1ght0ne avatar voxelot avatar sarahschwartz avatar tjsharp1 avatar mitchmindtree avatar mohammadfawaz avatar xgreenx avatar kayagokalp avatar anton-trunov avatar joshuabatty avatar thdaraujo avatar rakita avatar tedbyron avatar igi-111 avatar paplo75 avatar hattizai avatar cold-briu avatar mpoplavkov avatar matt-user avatar luizstacio avatar k1-r1 avatar alicanc avatar dentosal 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.