Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
This file is marked [CC0 1.0](https://creativecommons.org/publicdomain/zero/1.0/).

## AI guidelines

This project does not take contributions substantially or wholly generated by AI.

The definition of a contribution must be taken as very broad.
It includes the code in PRs, but also the text written in issues and the like.

---

Limited use of AI is permitted in these situations:
- No artifact generated by an AI is submitted to the repo
- For example: You may use an agent to ask questions about the codebase
- Though, AI code reviews are not permitted as that would be a wholly AI generated contribution
- Artifacts inspired by AI are submitted to the project
- For example: You may use a chat as rubber duck or to ask for inspiration
- Artifacts contain small obvious snippets suggested by AI
- For example, you may ask an AI something you would otherwise typically use StackOverflow for
- But, normal StackOverflow principles apply: make sure the snippet is good and that it doesn't infringe on anyone's copyright
- This means very limited use of tab-completion style AI is allowed, though frowned upon

---

These restrictions are there to:
- keep the project a human project
- empathic
- inviting
- intriguing
- keep the project maintainable
- enjoyable
- quality
- limit the harms of AI, while not shutting the door for some of the useful sides of AI
- assure the provenance of the project and having no doubts over the copyright status

---

Any person (or bot) not following these guidelines may get muted or banned from the project if said person is deemed to act not in good faith.

These guidelines may evolve over time as the technology and the thinking around it changes.
25 changes: 25 additions & 0 deletions LICENSE-MIT
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Copyright (c) 2015-2025 The rust-measurements Authors

Permission is hereby granted, free of charge, to any
person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the
Software without restriction, including without
limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software
is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice
shall be included in all copies or substantial portions
of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
23 changes: 18 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@

[![Build Status](https://github.com/rust-embedded-community/rust-measurements/workflows/Build/badge.svg)](https://github.com/rust-embedded-community/rust-measurements/actions?query=workflow%3ABuild)

### Why should I care? I already have numbers...
## Why should I care? I already have numbers...

Working with units can be very error prone.
If one person is working in feet and one person is working in meters, what happens?

Doing all of your math in raw numerical types can be unsafe and downright confusing.
What can we do to help?

### Typed measurements to the rescue!
## Typed measurements to the rescue!

Working in typed measurements increases safety by dealing with what you really care about: units of measure.

Conversions to and from different units are simple, and operator overrides allow you to work with the measurements directly.

### Currently available measurement types
## Currently available measurement types

- Acceleration
- Angle
Expand All @@ -40,7 +40,7 @@ Conversions to and from different units are simple, and operator overrides allow
- Voltage
- Volume

### Examples
## Examples

In your Cargo.toml add the dependency...

Expand Down Expand Up @@ -83,7 +83,7 @@ fn main() {
}
```

### Features
## Features

The crate contains few features to disable or enable certain functionalities:

Expand All @@ -92,6 +92,19 @@ The crate contains few features to disable or enable certain functionalities:
* from_str
* Allows creating measurement units from string input

## Licence

This project is licensed under the MIT license ([LICENSE-MIT](LICENSE-MIT) or <http://opensource.org/licenses/MIT>).

## Contribution

Unless you explicitly state otherwise, any contribution intentionally
submitted for inclusion in the work by you, as defined in the Apache-2.0

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
submitted for inclusion in the work by you, as defined in the Apache-2.0
submitted for inclusion in the work by you, as defined in the MIT

license, shall be licensed as above, without any additional terms or
conditions.

Contributions must be in accordance with the notices in [CONTRIBUTING.md](./CONTRIBUTING.md).

--------------------------------------

**References**
Expand Down
Loading