Dash - A lightweight scripting programming language in Rust

โš“ Rust    ๐Ÿ“… 2025-10-15    ๐Ÿ‘ค surdeus    ๐Ÿ‘๏ธ 2      

surdeus

I've been working on a small interpreted language called Dash, written entirely in Rust. It's designed to be simple, expressive, and easy to embed or extend โ€” a scripting language in the spirit of Python, but powered by Rust. Dash makes it easy to prototype ideas quickly while benefiting from Rustโ€™s performance and safety.

It supports variables, arithmetic, control flow (if, while, break, continue), functions with parameters and return values, and a basic CLI for running .dash files.

It uses Pest for parsing, and the interpreter is modular and documented. Scripts can be run from the command line or embedded as part of a Rust project.

Features

  • Variables and arithmetic
  • Control flow: if, while, break, continue
  • Functions with return values
  • CLI runner and examples
  • Modular architecture (parser.rs, eval.rs, ast.rs)
  • Easy to extend and test

Crate

Available on crates.io:
:backhand_index_pointing_right: dash-lang

Repository

GitHub: https://github.com/Pjdur/dash-lang

Example

fn add(a, b) {
  return a + b
}

let result = add(3, 4)
print(result)

Roadmap

  • Booleans and logical operators
  • Arrays/lists
  • REPL mode
  • Built-in functions (len, input)
  • Improved error diagnostics

Feedback, suggestions, and contributions are welcome. If you're interested in interpreters, scripting languages, or Rust tooling, feel free to take a look.

1 post - 1 participant

Read full topic

๐Ÿท๏ธ Rust_feed