#binary #generic #heterogeneous #type-level #natural-numbers

nightly shoggoth

Generic and type-level programming for Rust

19 releases

Uses old Rust 2015

0.0.19 Feb 12, 2015
0.0.18 Feb 11, 2015
0.0.11 Jan 31, 2015

#7 in #heterogeneous

Download history 138/week @ 2022-06-03 2/week @ 2022-06-10 24/week @ 2022-06-17 3/week @ 2022-06-24 21/week @ 2022-07-01 41/week @ 2022-07-08 40/week @ 2022-07-15 22/week @ 2022-07-22 5/week @ 2022-07-29 24/week @ 2022-08-05 4/week @ 2022-08-12 22/week @ 2022-08-19 22/week @ 2022-08-26 5/week @ 2022-09-02 25/week @ 2022-09-09 4/week @ 2022-09-16

75 downloads per month
Used in 2 crates

MIT license

46KB
1.5K SLoC

shoggoth.rs

Generic and type-level programming for Rust

build status

It was a terrible, indescribable thing vaster than any subway train—a shapeless congeries of protoplasmic bubbles, faintly self-luminous, and with myriads of temporary eyes forming and un-forming as pustules of greenish light all over the tunnel-filling front that bore down upon us, crushing the frantic penguins and slithering over the glistening floor that it and its kind had swept so evilly free of all litter.

—H. P. Lovecraft, At The Mountains of Madness

Synopsis

This library implements generic and type-level programming functionality. It is heavily inspired by Miles Sabin's Shapeless for Scala.

Features

Current

  • heterogeneous lists
  • type-level operations (polyadic, curried, composable, higher-order)
  • type-level bits and booleans
  • type-level binary natural numbers and integers
  • type-level lists (mappable with type-level operations)
  • type-level list zippers
  • type-level lenses

Future

  • more functionality for working with hlists/tuples
  • coproducts
  • hlist/vinyl-style records
  • type-level binary rationals
  • type macros

Documentation

See the API documentation here.

Requirements

  1. Rust
  2. Cargo

You can install both with the following:

$ curl -s https://static.rust-lang.org/rustup.sh | sudo sh

See Installing Rust for further details.

Usage

$ cargo build       ## build library and binary
$ cargo test        ## run tests in ./tests
$ cargo bench       ## run benchmarks in ./benches

Discussion

There is an IRC channel on freenode (chat.freenode.net) at #epsilonz.

Dependencies