Skip to content

maxmcguire/rocket

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rocket

Rocket is an alternative implementation of the Lua language. The core of the parser
and the VM are written from scratch, although they draw a lot of inspiration from
the Lua implementation. The implementation of the standard libraries is taken
directly from Lua.

It is currently in development and is not complete. See the TODO section for a list
of features that are still being worked on.

See COPYRIGHT for license information

Differences from Lua 5.1:

  Language:
  - Support for C++ style single line and block comments
  - break does not have to be the last statement in a block
  - More strict handling of invalid escape sequences in a string
  - Includes bit library

  API:
  - Added lua_setgchook function
  - Added lua_pushtypename function
  - IO library can be registered with callbacks for custom file system access
  
Building
-------------------------------------------------------------------------------

Rocket uses premake4 (requires at least version 4.4) to generate build files.
premake4 is available from http://industriousone.com/premake.

Garbage Collector
-------------------------------------------------------------------------------

The garbage collector in Rocket uses a combination of reference counting
and incremental mark and sweep. The purpose of this hybrid approach is to act as
a sort of generational garbage collector, where we can identify a subset of the
objects which are likely to be garbage and collect those first.

To avoid the overhead of pure reference counting, objects do not track references
from the stack. Instead the stack is scanned prior to releasing any objects which
have a reference count of 0 to ensure there are no references from the stack. 
Incremental mark and sweep is used to collect objects contained within cycles
which could overwise not be collected by the reference counting system.


TODO
-------------------------------------------------------------------------------

- Weak tables
- __gc metamethod
- Garbage collector controls
- Coroutines
- Constant folding for logic operations and conditionals
- Debug functions

About

Alternative Lua implementation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published