fascia

Crates.iofascia
lib.rsfascia
version0.1.1
created_at2025-12-26 05:58:54.02145+00
updated_at2025-12-26 19:07:01.64261+00
descriptionlightweight repl on top of evalexpr for quick correct calculation
homepage
repositoryhttps://github.com/mcsamdev/fascia
max_upload_size
id2005302
size42,350
(mcsamdev)

documentation

README

fascia

Version: 0.1.1

fascia is a thin command-line REPL wrapper around the Rust crate evalexpr. It provides a simple interactive interface for evaluating expressions, defining variables, and creating functions.

The goal is to expose evalexpr functionality through a clean CLI without unnecessary abstractions.


Features

  • Interactive expression evaluation
  • Variable definitions (var / let)
  • User-defined functions
  • Built-in math, trigonometric, and logarithmic functions
  • Minimal overhead (delegates evaluation to evalexpr)
  • MIT licensed

Installation

Via Cargo

cargo install fascia

Via Git/Source

git clone <https://github.com/mcsamdev/fascia>
cd fascia
cargo install --path . --locked --force

Usage

To start the repl simply run fascia in the terminal.

Commands

Calculator Commands: ─────────────────────────────────────────────────────────────

  • <expression> Evaluate an expression directly
  • var <name> = <expr> Define a variable
  • let <name> = <expr> Define a variable (alias)
  • func <name>(<args>) -> <expr> Define a function
  • list Show all variables and functions
  • help Show this help message
  • quit / exit Exit the calculator

Built-in Functions

  • Math: abs, floor, round, ceil, pow(x, y), min(a, b), max(a, b)
  • Trig: sin, cos, tan, asin, acos, atan, sinh, cosh, tanh
  • Logs: sqrt, exp, ln, log2, log10
  • Constants: pi, e

Examples

sqrt(16)
sin(pi / 2)
pow(2, 8)

var x = 10
x * 3

func double(n) -> n * 2
double(5)

func sqr(x) -> sqrt(x)

Cli Flags

--help or -h or help Show help information --version or -v or version Show version information bench Time expression evaluation in microseconds

Commit count: 0

cargo fmt