calcula

Crates.iocalcula
lib.rscalcula
version0.1.0
created_at2025-04-02 20:59:59.457349+00
updated_at2025-04-02 20:59:59.457349+00
descriptionA simple calculator library and command-line app
homepage
repositoryhttps://github.com/caydenlund/calcula
max_upload_size
id1617189
size26,178
Cayden Lund (caydenlund)

documentation

README

calcula

A simple calculator library and command-line app.

Gets input with rustyline, so emacs-style shortcuts are supported (Ctrl-A to move to the beginning of the line, Ctrl-E to move to the end of the line, Ctrl-U to clear, etc.). See their linked GitHub page for more information.

Planned Features

  • Interactive REPL mode or performing a single calculation as an argument
  • Rust-style variable bindings and number types (i32, u8, f64, etc.)
  • Functions
  • Built-in math library for constants like pi and operations like sin(2.0) sqrt(7.0)
  • Number literals in various bases (0xFF, 0b1010, 0o777 etc.)
  • Meta commands: :binary for printing as binary, :hex for printing as hex, :type for printing a variable's type, etc.
  • Bitfield operations ((0b1010 << 2) | 0b11)
  • Error handling: warning on overflow of datatypes

License

Licensed under Apache 2.

Commit count: 4

cargo fmt