Minimal scripting language inspired by lua and rust
MIT License
Icelang is a minimal, dynamically-typed scripting language inspired by Lua and Rust. It is my first attempt at writing a tree-walking interpreter and also my first Rust project. As you might expect, it was not intended for serious use. It is not fast or efficient, but it is decent enough for basic computation.
Check out the website for more details about the language specifications. Icelang is also available online through a Web Assembly port of the interpreter, try it now here.
See examples to see some of the features in action.
Download icelang from release or build it from source.
icelang # no arguments for REPL mode
icelang script.ic # to run a file
NB: You must have the rust tool chain installed.
To build the icelang executable you have to clone the repository then enter the following commands:
cargo install --path . # build and install in ~/.cargo/bin
# or
cargo build --release # build inside target/release
To build the website you must have npm and wasm-pack installed.
cd wasm/
wasm-pack build --target web --out-dir ../website/pkg # build the wasm binaries
cd ../website/
npm install # install dependencies
npm run build # vite build
You can run npm run dev
to start a local server at https://localhot:5173
You can run the tests by running:
cargo test --workspace --lib
Some add-ons not directly related to the project itself:
WASM Playground, https://luckasranarison.github.io/icelang
Tree-sitter grammar, https://github.com/luckasRanarison/tree-sitter-icelang
Language server and Vscode client, https://github.com/luckasRanarison/icelang-ls
Bytecode interpreter