2 releases
Uses new Rust 2024
| 0.1.1 | Dec 26, 2025 |
|---|---|
| 0.1.0 | Dec 26, 2025 |
#1300 in Command line utilities
41KB
1K
SLoC
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 directlyvar <name> = <expr>Define a variablelet <name> = <expr>Define a variable (alias)func <name>(<args>) -> <expr>Define a functionlistShow all variables and functionshelpShow this help messagequit / exitExit 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
Dependencies
~255KB