Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/JohnBSmith/moss

Moss interpreter (experimental implementation)
https://github.com/JohnBSmith/moss

Last synced: 3 months ago
JSON representation

Moss interpreter (experimental implementation)

Awesome Lists containing this project

README

        

[Home](https://johnbsmith.github.io/moss/home.htm)
| [Language](https://johnbsmith.github.io/moss/doc/moss/toc.htm)
| [Library](https://johnbsmith.github.io/moss/doc/lib/toc.htm)
| [Examples](https://johnbsmith.github.io/moss/doc/examples/toc.htm)
| [Rust-Moss examples](doc/md/rust-moss-examples.md)

# Moss interpreter

Moss is a dynamic programming language. Its interpreter kernel
is written in Rust.

Example of calling Moss code from Rust:

```rust
use moss::object::Object;

fn main() {
let i = moss::Interpreter::new();
i.rte.set("a",Object::from(vec![1,2,3,4]));

let v: Vec = i.eval_cast(r#"
a.map(|x| 2*x)
"#);

println!("{:?}",v);
}
```