ralix 0.2.0

A simple, type-safe, tree walking interpreter
docs.rs failed to build ralix-0.2.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: ralix-0.1.0

Ralix

Ralix is a lightweight, mid-level interpreter written in Rust. It combines the familiarity of C-like syntax with the flexibility of optional semicolons and high-level type-system features.

Features

  • First-Class Types: Types are treated as values, allowing for flexible type-level logic.
  • Flexible Syntax: C-inspired curly-brace style, but with optional semicolons for a cleaner look.
  • Pointer Power: Full support for pointer arithmetic and dereferencing operations (Raw/Unsafe).
  • Hybrid Expressions: Supports both standard Infix (1 + 2) and Prefix (-3) math evaluations.
  • Built-in REPL: An interactive Read-Eval-Print Loop for testing snippets on the fly.

Installation

Ensure you have the Rust toolchain installed.

git clone https://github.com/devRals/ralix
cd ralix
cargo install --path .

Then you should be able have an access to the Ralix Cli in your terminal

Usage

Interactive Mode (REPL)

To start the interactive shell:

ralix repl

Language Cheat-Sheet

Math & Expressions

Ralix is flexible with how it parses math:

// Let binding definition
let x = 10 + 5;

// C like definition
int *y = &x;  // 50

Pointers

Direct memory manipulation is possible:

int a = 42;
int* ptr = &a;    // Reference
let value = *ptr; // Dereference

Types as Values

type[int] myType = int;
myType == typeof 1 + 1; // true

For more examples you can check out the official Ralix website

Roadmap

  • Scope Expressions: Blocks that return values.
  • Function Definitions: Standard function declarations.
  • Memory Safety: Optional safe-wrappers for pointer operations.
  • File Modules: Accessing every ralix file modules from one.
  • Standard Library: Basic I/O and string manipulation.

Contributing

This is a personal project by devRals. Feel free to open an issue or submit a pull request if you have ideas for the language specification!

License

MIT