| Crates.io | link-calculator |
| lib.rs | link-calculator |
| version | 0.1.0 |
| created_at | 2026-01-25 14:23:59.432521+00 |
| updated_at | 2026-01-25 14:23:59.432521+00 |
| description | A Rust WebAssembly calculator with grammar-based expression parsing using links-notation |
| homepage | |
| repository | https://github.com/link-assistant/calculator |
| max_upload_size | |
| id | 2068830 |
| size | 915,758 |
A grammar-based expression calculator with DateTime and Currency support, built with Rust WebAssembly and React.
https://link-assistant.github.io/calculator/




+, -, *, / with proper operator precedence(2 + 3) * 4-5 + 3rust_decimalSupports multiple date and time formats:
2026-01-2201/22/202622/01/2026Jan 22, 2026, 22 Jan 20268:59am, 14:30, with timezone support (8:59am UTC)(Jan 27, 8:59am UTC) - (Jan 25, 12:51pm UTC)84 USD, 34 EUR100 USD + 50 EUR84 USD - 34 EUR at 22 Jan 2026All expressions are represented in links-notation format:
> 2 + 3
Result: 5
Links notation: ((2) + (3))
> (Jan 27, 8:59am UTC) - (Jan 25, 12:51pm UTC)
Result: 1 day, 20 hours, 8 minutes
Links notation: (((Jan 27, 8:59am UTC) - (Jan 25, 12:51pm UTC)))
> 84 USD - 34 EUR
Result: 47.042 USD
Links notation: (((84 USD)) - ((34 EUR)))
src/)grammar/ - Lexer and recursive descent parsertypes/ - Value, Decimal, DateTime, Currency, Unit typeslino/ - Links notation representationerror/ - Error types with thiserrorwasm.rs - WebAssembly bindingsweb/).github/workflows/)ci.yml - Tests, linting, formatting, WASM builddeploy.yml - GitHub Pages deploymentwasm32-unknown-unknown target# Clone the repository
git clone https://github.com/link-assistant/calculator.git
cd calculator
# Build the WASM package
wasm-pack build --target web --out-dir web/public/pkg
# Install web dependencies
cd web
npm install
# Start development server
npm run dev
# Run all Rust tests
cargo test
# Run tests with verbose output
cargo test --verbose
# Run Clippy lints
cargo clippy --all-targets --all-features
# Format code
cargo fmt
# Check formatting (CI style)
cargo fmt --check
# Build optimized WASM
wasm-pack build --target web --release --out-dir web/public/pkg
# Build web frontend
cd web
npm run build
.
├── .github/workflows/ # CI/CD pipeline configuration
├── data/ # Currency exchange rate databases
│ └── exchange_rates/ # Historical exchange rates (.lino files)
├── docs/ # Documentation and screenshots
├── src/ # Rust source code
│ ├── grammar/ # Lexer, parser, and grammar modules
│ ├── types/ # Core types (Value, DateTime, Currency, etc.)
│ ├── lino/ # Links notation module
│ ├── error.rs # Error types
│ ├── lib.rs # Library entry point
│ ├── main.rs # CLI entry point
│ └── wasm.rs # WASM bindings
├── tests/ # Integration tests
├── web/ # React frontend
│ ├── src/ # TypeScript source
│ └── public/ # Static assets
├── Cargo.toml # Rust project configuration
└── README.md # This file
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
git checkout -b feature/my-featurecargo fmt && cargo clippy && cargo testUnlicense - Public Domain
This is free and unencumbered software released into the public domain. See LICENSE for details.