#scripting-language #scripting #script #language

nightly bin+lib umbra-lang

A simple macro-based scripting language

8 releases (breaking)

0.21.0 Oct 22, 2021
0.20.0 Jul 17, 2021
0.19.0 Jun 5, 2021
0.18.0 May 27, 2021
0.14.4 May 16, 2021

#531 in Programming languages

MIT license

425KB
10K SLoC

Copyright (c) 2018-21 Louise Montalvo louanmontalvo@gmail.com

The Umbra Programming Language

This is a simple macro-based language inspired by Rust and Python. It is in early development and undergoing changes quite quickly so please do not expect stability.

Do to the nature of the language, it has to be interpreted but I'm trying to make it as efficient as possible. Current unofficial benchmarks put it around 2-4x slower than Python to compute fib(12).

Direct Usage

To run the REPL simply use cargo run. To see examples of possible code constructs look at the scripts in test/. You can run scripts by providing the name as an argument as follows: cargo run -- scriptname. You can also run modules with cargo run -- modname. This is the same as running cargo run -- modname/main.um. One such module is test.

Embedded Usage

This crate can be added to your dependencies by adding the following to your project's Cargo.toml:

[dependencies]
umbra_lang = "0.21.0"

To use the library, call the desired run*() functions. For example:

let env = Env::prelude();
let (vars, val) = run_path("script.um", &env, true);

Dependencies

~3–5MB
~92K SLoC