https://github.com/code-ape/rust_length_arithmetic_example
The code to go along with blog post on creating a arithmetic system for units of length in Rust
https://github.com/code-ape/rust_length_arithmetic_example
Last synced: 9 months ago
JSON representation
The code to go along with blog post on creating a arithmetic system for units of length in Rust
- Host: GitHub
- URL: https://github.com/code-ape/rust_length_arithmetic_example
- Owner: code-ape
- License: apache-2.0
- Created: 2017-03-08T21:50:06.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-03-08T22:25:42.000Z (over 9 years ago)
- Last Synced: 2025-04-07T17:11:45.270Z (about 1 year ago)
- Language: Rust
- Size: 6.84 KB
- Stars: 7
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Rust Length Arithmetic Example
This repo holds the code related to my article on creating an arithmetic system for lengths in Rust to guarantee safety and correctness of computation along with clean code without adding overhead. To read the article please visit:
[ferrisellis.com/posts/rust-implementing-units-for-types/](ferrisellis.com/posts/rust-implementing-units-for-types/)
This code was tested on Rustc 1.15.1 stable.
To run this code do:
```bash
rustc example.rs
./example
```