Code Monkey home page Code Monkey logo

stratum's Introduction

Stratum

crates.io license rustc build status CII Best Practices codecov

Rust library for building out stratum servers. Think what Tide or Actix are to building HTTP APIs on Rust, this library is that for stratum servers.

  • Support for 2 connection models. (TCP and Websockets)
  • Used in practice to support multiple various strstum protocol versions including:
    • Stratum V1
    • Stratum v2
    • BTCAgent

Table of Contents:

Usage

@todo coming soon

Basic usage

@todo coming soon

Installation

@todo coming soon

Development

Opening and Using Documentation

To run all of the rustdocs associated with stratum, it is recommended to run the following command: cargo doc --open --document-private-items --no-deps

This will compile the documentation for every module in this crate, including private code. Important to note that it will not compile the dependency documenation. If you would like to have that documentation compiled, then drop the --no-deps flag from the above command.

@todo link to the tests readme

Testing

Due to the nature of some of the tests in this library (Mainly signal testing), cargo test will not work out of the box unless we skip those steps.

To Mitigate that process, we use a next-generation test runner called cargo-nextest

The quickest way to install is to run the following command: cargo install cargo-nextest

Further installation methods can be found at the official website Nextest.

After installing, to run our test suite simply run: cargo nextest run

Test Coverage

Testing coverage is generated automatically on every Pull Request - In order to generate the coverage data locally you first need to follow the setup instructions here: https://github.com/taiki-e/cargo-llvm-cov

This library provides us with source-based coverage data which is an improved method of detecting testing coverage.

Once you have install llvm-cov, run the following command for the coverage data to be generated to stdout (further configuration can be found in their docs):

cargo llvm-cov nextest

Testing for Memory Leaks

We currently use MacOS's new tooling Instruments for testing memory leaks. Along with this we use cargo instruments.

In order to install cargo instruments, you need to install from a separate branch until the master branch has been updated. To do this, run: cargo install --branch update-cargo --git https://github.com/cmyr/cargo-instruments.git.

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

stratum's People

Contributors

renovate[bot] avatar bors[bot] avatar kilpatty avatar dependabot[bot] 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.