- Rust 1.70 or higher
- Cargo (comes with Rust)
The easiest way to install RustX:
cargo install rustx-langThis will install the rustx_lang binary to your Cargo bin directory (usually ~/.cargo/bin).
If you want the latest development version:
git clone https://github.com/GrandpaEJx/RustX.git
cd RustX
cargo build --releaseThe compiled binary will be at target/release/rustx_lang.
rustx_lang --versionCreate a file hello.rsx:
name = "World"
print(`Hello, {name}!`)
Run it:
# If installed via cargo install
rustx_lang hello.rsx
# If built from source
cargo run --bin rustx_lang -- hello.rsxOutput:
Hello, World!
Start the REPL (Read-Eval-Print Loop):
cargo run --bin rustx_lang replTry some commands:
>>> x = 10
>>> y = 20
>>> x + y
30
>>> name = "Alice"
>>> `Hello, {name}!`
Hello, Alice!
>>> :exit
:help- Show help message:clear- Clear screen:vars- Show all variables:exitorCtrl+D- Exit REPLCtrl+C- Cancel current inputUp/Down arrows- Navigate command history
cargo run --bin rustx_lang -- script.rsxView AST (Abstract Syntax Tree):
cargo run --bin rustx_lang -- --ast script.rsxView Tokens:
cargo run --bin rustx_lang -- --tokens script.rsxMeasure Execution Time:
cargo run --bin rustx_lang -- --time script.rsxVerbose Output:
cargo run --bin rustx_lang -- --verbose script.rsxCombine Flags:
cargo run --bin rustx_lang -- --ast --time --verbose script.rsxYou can compile your RustX scripts into standalone, native executables using the build command.
# Basic compilation
cargo run --bin rustx_lang build script.rsx
# Specify output filename
cargo run --bin rustx_lang build script.rsx --output my_appThis transpiles your RustX code to Rust and compiles it with cargo build --release.
Note: You must have the rustx_core crate available for this to work.
- Language Reference - Learn the syntax
- Built-in Functions - Explore available functions
- Examples Guide - See practical examples
- Rust Integration - Use RustX in Rust code
Navigation: 📚 Docs Home | ⬅️ Main README | ➡️ Language Reference