Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/abhimanyu003/qubit
A handy calculator, based on Rust and WebAssembly.
https://github.com/abhimanyu003/qubit
calculations calculator calculator-application conversion math maths rust rust-lang unit-conversion webassembly wsam yew
Last synced: 30 days ago
JSON representation
A handy calculator, based on Rust and WebAssembly.
- Host: GitHub
- URL: https://github.com/abhimanyu003/qubit
- Owner: abhimanyu003
- License: mit
- Created: 2021-11-04T17:04:09.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-01-17T12:19:26.000Z (almost 3 years ago)
- Last Synced: 2024-05-19T05:40:46.777Z (7 months ago)
- Topics: calculations, calculator, calculator-application, conversion, math, maths, rust, rust-lang, unit-conversion, webassembly, wsam, yew
- Language: Rust
- Homepage: https://abhimanyu003.github.io/qubit/
- Size: 2.7 MB
- Stars: 80
- Watchers: 3
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-pest - qubit - A handy calculator, based on Rust and WebAssembly. (Projects)
README
[![qubit](media/banner.png)](https://abhimanyu003.github.io/qubit/)
# qubit
**[💥 Visit Website To Use Calculator](https://abhimanyu003.github.io/qubit/)**
[![qubit](media/demo.gif)](https://abhimanyu003.github.io/qubit/)
## Example
**[💥 Visit Website To Use Calculator](https://abhimanyu003.github.io/qubit/)**
```
2 + 2sin( 90 ) + cos ( 120 )
sqrt(144) + 12
ceil ( 12.12 ) + 22
floor( 12.12) + 2225 % of 100
25 % on 100// Conversions
1024 kb to mb
22 kg to g
```## Operations
### Basic Math
```
add sub multiply
divide power modulus
rightShift leftShift
percentOf percentOn
```_Examples:_
```
2 + 2
2 plus 2
2 ^ 210 %of 100
10 %on 100100 >> 2
100 << 2
```### Constants
```
pi
e
tau
```### Functions
All trigonometric functions expect input in degrees.
```
sin cos tan
asin acos atan
sinh cosh tanhlog sqrt cbrt
round ceil floor
```_Examples:_
```
round ( 2.4 )
ceil ( 2.3 )sin ( 90 )
cos ( 90 )ceil ( 2.2 )
floor(3.3)
```## Supported Conversions
* Angle
* Area
* Digital Information
* Length
* Mass
* Speed
* Time
* Temperature# Development
### Stack qubit is using
* [Rust](https://www.rust-lang.org/) as programing language
* [Pest](https://pest.rs/) for parser + grammar
* [Yew](https://yew.rs/) for webassembly
* [Tailwind](https://tailwindcss.com/) for CSS styles### Local Development + Enhancement
* Clone the repo
* Pest Grammar is defined in `src/grammar.pest` file.
* Conversion chart is `src/convert_chart.rs`To start the project locally on `:8080` *run*
```
trunk serve
```Before creating pull request you can run sanity checks.
```
cargo fmt
cargo check
cargo test
```Final build ( Optional )
```
trunk build --release --public-url=qubit
```# Contribution
This project welcomes your PR and issues.
For example, refactoring, adding features, correcting English, etc.
If you need any help, you can contact me on [Twitter](https://twitter.com/abhimanyu003).Thanks to all the people who already contributed!
# License
[MIT](./LICENSE)