GithubHelp home page GithubHelp logo

qpc-github / goluago Goto Github PK

View Code? Open in Web Editor NEW

This project forked from shopify/goluago

1.0 2.0 0.0 195 KB

Lua wrappers for the Go standard library

License: MIT License

Shell 0.32% Lua 25.24% Go 74.44%

goluago's Introduction

GoDoc

Lua wrappers for the Go standard library

Wraps Go's standard libraries so they can be used with the go-lua Lua VM implementation.

Most of the packages under pkg expose a single function Open(l *lua.State) that makes the corresponding Go package available to Lua scripts. For example:

import "github.com/Shopify/goluago/pkg/strings"
...
strings.Open(l)
...

allows Lua scripts loaded by l to:

require("goluago/strings")
strings.trim("loll ")
strings.split("cat,dog,elephant,walrus", ",")
strings.replace("oink oink oink", "k", "ky", 2)

To make all supported APIs available to Lua:

import "github.com/Shopify/goluago"
...
goluago.Open(l)
...

The "github.com/Shopify/goluago/util" package provides helper functions to push Go values onto the Lua stack, pull tables of string->string or string->value from the Lua stack to Go, and support variadic arguments.

License

goluago is licensed under the MIT license.

goluago's People

Contributors

aybabtme avatar fbogsany avatar dianadevasia avatar etiennemartin avatar simon-shopify avatar pierluc-codes avatar graemej avatar cursedcoder avatar aleksi avatar jpcaissy avatar maximebedard avatar tmlayton avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.