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
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
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>
Moss is an experimental bytecode interpreter for rust.
For simplification moss only uses two kinds of integers: 64bit unsigned and 64 bit signed.
The stack is implemented as a vector. We need one continues stack since references into the stack are possible.
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.