Giter Club home page Giter Club logo

lit's Introduction

Luvit 2.0 - Node.JS for the Lua Inventor

Linux Build Status Windows Build status Coverage Status

Welcome to the source code for Luvit 2.0. This repo contains the luvit/luvit metapackage and all luvit/* packages as published to lit.

This collection of packages and modules implements a node.js style API for the luvi/lit runtime. It can be used as both a library or a standalone executable.

See the main project webpage for more details. https://luvit.io/

Need Help?

Ask questions here through issues, on Discord or the mailing list.

Binary Modules

Luvit supports FFI and Lua based binary modules. There is a wiki entry explaining how to manage and include a binary module within a bundled application. Publishing Compiled Code

Hacking on Luvit Core

First you need to clone and build luvit, this is easy and works cross-platform thanks to Makefile and make.bat.

git clone https://github.com/luvit/luvit.git
cd luvit
make

If you want to test luvit without constantly building, use luvi.

luvi . 

Always make sure to run make test before submitting a PR.

Notes to Maintainers

  • Use luvi /path/to/luvit to test changes without rebuilding the binary.
  • To run the test suite, run make test to build a luvit and use that.
  • If you want to test a custom built luvi, run luvi . -- tests/run.lua
  • If you want to run a specific test file with a custom built luvi, run luvi . -- tests/test-<name-of-test>.lua (e.g. luvi . -- tests/test-http.lua)
  • There is a wiki page on making new luvit releases at https://github.com/luvit/luvit/wiki/Making-a-luvit-release.

The packages in deps live primarily in this repo, but some are duplicated in luvit/lit to ease lit bootstrapping. Updates can be pushed from either repo to lit, just make sure to keep them in sync. One way to do this is to rm -rf deps && lit install. This will install the latest version of all the packages from lit. Check the diff carefully to make sure you're not undoing any work. There might have been unpublished changes locally in luvit that aren't in the lit central database yet.

lit's People

Contributors

aiverson avatar bilal2453 avatar bjorn avatar bjornbytes avatar creationix avatar duckwhale avatar gabrielnicolasavellaneda avatar james2doyle avatar joerg-krause avatar johnnymorganz avatar kaustavha avatar mei-rune avatar philips avatar rphillips avatar sinisterrectus avatar sousoux avatar squeek502 avatar ta-noshii avatar takase1121 avatar tbmale avatar truemedian avatar yaa110 avatar zhaozg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lit's Issues

Implement `lit serve`

Implement the network protocols for the server to allow a lit database to be shared across the network or internet.

Depends on #6

lit selfupdate

It would be nice if lit could update itself, or even just notify that there is an update available.

Even having something like a update-notifier approach, that's just a simple message, would be nice. Bower, the package manager, gives you a notice when you run bower install with an outdated version.

Does this resonate with anyone else?

Implement TLS client

This is needed for the lit protocol to be able to work over wss:// and also so we don't spawn curl to use the github API to fetch public keys.

Add feature to build luvi apps from lit

This feature would allow pointing lit to a package.lua file in a luvi app's source tree and build the binary including all dependencies.

> git clone git://github.com/luvit/luvit.git
# git clones down the luvit repo
> lit package luvit/app
# lit reads luvit/app/package.lua and downloads all dependencies
# lit combines dependencies with files on disk relative to package.lua into an in-memory zip
# lit appends zip to it's own binary half to create a new file in cwd.  Name is specified in package.lua
> ./luvit
# luvit is run from the newly created binary.

The app field in package.lua determines the generated binary's name.

Implement org accounts for shared prefixes.

Implement a feature where collaborators can be added to a package by adding their username in the message part of the annotated tag.

TODO: find a way to use non-user prefixes like luvit and start a package with multiple collaborators.

Implement websocket version of protocol

Many users are behind firewalls that prevent speaking the lit protocol on port 4821. We can proxy the protocol over wss on port 433 using the lit.luvit.io hostname as a virtual server.

Lit search package command

It would be nice to have a lit search command, wouldn't it ?

For now, it's pretty obscure for a new guy like me to have a look about packages available for luvit 2.0. So, I think a search command and a website like npm will be awesome to recruit new enthousiast for this tool :)

ENOENT on saving github keys on windows

When doing lit auth on windows it downloads the ssh keys of the corresponding github account as it should, but can't save it, since windows does not allow filenames to contain ":", thus resulting in lit auth failing.

Error stack:

fail: [string "bundle:/libs/storage.lua"]:86: ENOENT: no such file or directory:
%APPDATA%\litdb.git\keys\IZEDx\0d:a7:0a:13:de:d1:b0:12:92
:28:6b:14:b5:33:0a:d9
stack traceback:
        [C]: in function 'assert'
        [string "bundle:/libs/storage.lua"]:86: in function 'putKey'
        [string "bundle:/libs/core.lua"]:193: in function 'importKeys'
        [string "bundle:/libs/core.lua"]:212: in function 'authUser'
        [string "bundle:/commands/auth.lua"]:46: in function 'fn'
        [string "bundle:deps/require.lua"]:174: in function 'require'
        [string "bundle:main.lua"]:14: in function <[string "bundle:main.lua"]:9
        [C]: in function 'xpcall'
        [string "bundle:main.lua"]:9: in function <[string "bundle:main.lua"]:7>

Windows build failing: No such module 'openssl' in 'bundle:/deps/coro-tls.lua'

H:\Programming\Lua\lit>PowerShell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://github.com/luvit/lit/raw/master/get-lit.ps1'))"
Downloading https://github.com/luvit/luvi/releases/download/v1.0.0/luvi-static-Windows-amd64.exe to luvi.exe
Downloading https://github.com/luvit/lit/archive/1.0.0.zip to lit.zip
lit version: 1.0.0
command: make lit.zip
fail: [string "bundle:deps/require.lua"]:154: No such module 'openssl' in 'bundle:/deps/coro-tls.lua'
stack traceback:
        [C]: in function 'error'
        [string "bundle:deps/require.lua"]:154: in function 'require'
        [string "bundle:/deps/coro-tls.lua"]:4: in function 'fn'
        [string "bundle:deps/require.lua"]:174: in function 'require'
        [string "bundle:/deps/coro-http.lua"]:12: in function 'fn'
        [string "bundle:deps/require.lua"]:174: in function 'require'
        [string "bundle:/libs/github-request.lua"]:4: in function 'fn'
        [string "bundle:deps/require.lua"]:174: in function 'require'
        [string "bundle:/libs/core.lua"]:14: in function 'fn'
        [string "bundle:deps/require.lua"]:174: in function 'require'
        [string "bundle:/libs/autocore.lua"]:5: in function 'fn'
        [string "bundle:deps/require.lua"]:174: in function 'require'
        [string "bundle:/commands/make.lua"]:1: in function 'fn'
        [string "bundle:deps/require.lua"]:174: in function 'require'
        [string "bundle:main.lua"]:14: in function <[string "bundle:main.lua"]:9>
        [C]: in function 'xpcall'
        [string "bundle:main.lua"]:9: in function <[string "bundle:main.lua"]:7>

Allow pre/post-install scripts

npm allows a scripts property in the package metadata, containing commands to be executed at various points in a package's lifecycle, e.g. before publishing or after installation (see npm-scripts). Such scripts are commonly used to compile native code. Should this be added as a feature to lit?

Allow package aliases in dependencies

The idea is to allow dependencies to specify where they get installed. So instead of creationix/git.lua I might want it at just git.lua.

This will be particularly useful to getting luvit itself using lit for all it's modules.

Implement JSON HTTP server

As documented in lib/README in the cleanup branch. This will replace the bare-bones HTML rendering server in the serve command.

Missing dll dependency for the Windows installer

Hello everyone,

I tested the powershell installer on a freshly installed computer running Windows 8.1

The installation failed, because the the luvi.exe requires the msvcr120.dll that is provided by Microsoft Visual Studio 2013 Runtime package. Putting the missing dll on the same folder path solved the installation issue.

lit install luvit

fails with:

# lit install luvit
load config: /Users/ryan.phillips/.litconfig
fail: [string "bundle:lib/rdb.lua"]:99: attempt to concatenate local 'name' (a nil value)
stack traceback:
    [string "bundle:lib/rdb.lua"]:99: in function 'match'

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.