Coder Social home page Coder Social logo

natfoam / lib Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 204 KB

Rust libraries

License: Apache License 2.0

Rust 99.59% Shell 0.27% HTML 0.14%
rust sha2 uint rust-crate functional-programming iterator bit-vector rust-workspace lazy-lists lazy-evaluation

lib's Introduction

lib

Netlify Status CircleCI

Documentation:

Rust libraries:

  • fixed-array is a trait for fixed-size arrays.
  • uints are traits and extensions for different unsigned integer types.
  • list-fn is a lazy-list as an alternative to the standard Rust iterator.
  • bit-list is an LSB-first list of bits.
  • sha2-compress is an SHA2 compress function.
  • u144 is an unsigned integer 144 bit. For example, to store 137 bit blocks ๐Ÿ™„.
  • publish-ws is a tool for publishing all workspace packages.

Conventions

  • a Fn suffix is used for traits. For example, ListFn.
  • a name of an extension function is used for its trait. For example
    trait Fold: ListFn {
        fn fold(self) -> Self::End { ... }
    }
    impl<T: ListFn> Fold for T {}
    An alternative is to use Sugar suffix:
    trait FoldSugar: ListFn {
        fn fold(self) -> Self::End { ... }
    }
    impl<T: ListFn> FoldSugar for T {}

Rust Wish List

  • const fn in traits. For example
    trait X {
        const fn x() -> X;
    }
  • default types in traits
    trait X {
        type M = u8
    }
  • impl Type in traits almost like dyn.
    trait X {
        type M = impl R;
    }
  • defining arrays in traits using parameters
    trait X<const N: usize> {
        fn x() -> [u8; N];
    }
  • Generators. See genawaiter as an example.

lib's People

Contributors

sergey-shandar avatar

Stargazers

 avatar  avatar  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.