softdevteam/moss

Name: moss

Owner: Software Development Team

Description: null

Created: 2016-04-28 12:02:14.0

Updated: 2016-04-28 14:26:08.0

Pushed: 2017-02-09 17:59:23.0

Homepage: null

Size: 42

Language: Rust

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

moss

Usage

Using moss requires the nightly toolchain.

Build:

o build

Run:

o run -- --sysroot ~/.multirust/toolchains/nightly <target.rs>

ernativly
et/debug/mossc --sysroot ~/.multirust/toolchains/nightly <target.rs>
About

Moss is an experimental bytecode interpreter for rust.

Differences to Rust

For simplification moss only uses two kinds of integers: 64bit unsigned and 64 bit signed.

Stack

The stack is implemented as a vector. We need one continues stack since references into the stack are possible.

Memory Model

When normally compiled fixed size variables are stored on the stack. This includes tuples and structs. Objects which can grow in size (e.g. vectors) have to be stored on the heap and only a reference (pointer) to the object can be stored on the stack.

For simplicity we now just store primitive values on the stack. Composed values are encapsulated into their own wrapper type and just the pointer to it is stored on the stack.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.