Giter Club home page Giter Club logo

t1-runtime's Introduction

[UNMAINTAINED] This library does not have a maintainer. The source code and repository will be kept at this URL indefinitely. If you'd like to help maintain this codebase, create an issue on this repo explaining why you'd like to become a maintainer and tag @tessel/maintainers in the body.

Tessel Runtime

This is the runtime and JavaScript engine that runs on Tessel, built on Lua's VM. It can be run independently on PC or embedded.

Building the firmware requires gyp, and ninja, and gcc-arm-embedded when building for embedded.

OS X

To install quickly on a Mac with Brew:

brew tap tessel/tools
brew install gyp ninja
brew install gcc-arm # to build for embedded

Ubuntu 14.04

All dependencies are in the Ubuntu 14.04 repositories:

sudo apt-get install git nodejs npm nodejs-legacy gyp ninja-build
sudo apt-get install gcc-arm-none-eabi # to build for embedded

Building (PC or Embedded)

git clone https://github.com/tessel/runtime.git
cd runtime
make update
make colony
make test

To link globally, run npm link --local. You can now run code on your PC using colony from your command line (e.g. colony hello-world.js). For building firmware, please see the firmware building instructions.

Troubleshooting: If you're updating and have the error fatal: destination path 'deps/colony-luajit' already exists and is not an empty directory., run rm -rf deps/colony-luajit && make update.

Documentation for C

Colony

Colony has support for interacting with the Lua API for handling basic JavaScript primitives. These are included via colony.h.

# void  colony_createarray ( lua_State*  L, int  size )
Creates a new JavaScript array of length size. This sets the object prototype as well as the initial length of the array.

# void  colony_createobj ( lua_State*  L, int  size, int  proto )
Creates a new JavaScript object with an expected (but not required) allocation of size keys. This sets the object prototype as well. If proto is not zero (an invalid stack pointer), it points to an object on the stack to be used as the prototype for the newly created object.

License

MIT or Apache 2.0, at your option.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.