Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/blaumeise20/rust-type-fizzbuzz
- Owner: blaumeise20
- Created: 2023-11-23T17:39:48.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2023-11-23T17:39:49.000Z (about 1 year ago)
- Last Synced: 2023-11-23T20:22:59.171Z (about 1 year ago)
- Language: Rust
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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.