Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/blaumeise20/rust-type-fizzbuzz

FizzBuzz implemented using Rust's trait system.
https://github.com/blaumeise20/rust-type-fizzbuzz

Last synced: 5 days ago
JSON representation

FizzBuzz implemented using Rust's trait system.

Awesome Lists containing this project

README

        

# Type level FizzBuzz in Rust

Rust's trait system is so powerful that you can use it to implement FizzBuzz at the type level. I got inspired by [this talk](https://rustlab.it/talks/rust-s-trait-system-is-a-proof-engine-let-s-make-it-prove-us-an-abi) at RustLab 2023.

## How to run

```bash
cargo run
```
It will print out a debug-formatted array of 100 elements which have been fully computed at compile time using no `const fn`s.