Socket
Book a DemoInstallSign in
Socket

lua-compile

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lua-compile

Compile lua to a single file

1.0.2
latest
Source
npmnpm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Compiled Require

This compiler strives to emulate the native require method as accurately as possible, while exposing an api that allows modules to mutate imports

A compiler designed to compile multiple files into one with full lua support. Specifically for Tabletop Simulator

Also, due to the lack of a runtime, all paths have to be parsed by the compiler. (Though a custom compiler could be made to target a specific runtime) This means require statements must be passed a string literal. Alternatively, the file can use #include headers to specify paths to the compiler

Ideal compiler

  • Can be decompiled with full accuracy
    • For simplicity's sake, it would be nice to leave source intact
  • require is always local to the contents of the file
    • Obviously this isn't really 'perfect' - real require doesn't follow packages. But thats dumb. So we will.
  • All require statements will resolve properly. string literal or not
  • require statements found in the file will be used for discovery.
    • It's not even close to practical to resolve require statements without string literals, so instead the compiler will provide a warning to allow the user to add it manually.
      • This could be done with file headers like --## require "os"

FAQs

Package last updated on 17 Jan 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.