Git Product home page Git Product logo

luasm's Introduction

luasm

A Lua 5.1-5.3/JIT module assembler that combines multiple modules into a single module.

This project was quickly hacked together using large portions of the WindSeed compiler. It probably has many bugs!

Dependencies

luasm itself requires Lua 5.3 to work. It can accept code written for any of Lua 5.1-5.3/JIT as input. Output is compatible with Lua 5.1-5.3/JIT depending on the syntax features used in the input.

Ensure lpeglabel is available in a Lua CPATH i.e. in the current directory or /usr/lib/lua/5.3/ for Linux.

Building

This assembler can assemble itself. Just clone the repository and assemble the assembler.

git clone '[email protected]:chiyadev/luasm.git'
cd luasm

# option 1: assemble as a module
lua5.3 main.lua -o luasm.lua

# option 2: assemble as an executable (Linux only)
lua5.3 main.lua -eo luasm
chmod +x luasm
mv luasm /usr/local/bin

You can place luasm in any convenient directory of your liking, preferably in a PATH like /usr/local/bin.

How to use

Create a package.lua file in your project, returning a table of modules to assemble. For example,

return {
  "main" = "src/main.lua",
  "utils" = "src/utils.lua"
}

Then run the assembler in your project directory.

luasm -o out.lua

Options

See all available command line options using the --help flag.

License

luasm is licensed under the MIT License.

luasm's People

Contributors

luaneko avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

kaiuri

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.