lua2rust

0.5.2 • Public • Published

lua2rust

npm package npm downloads

A Lua to Rust transpiler.

Usage: npx lua2rust {lua file} {output function name} > {output}

Examples: example

Different from Lua5.*

  • no loadstring, metatable, user-defined iterator ...
  • table.insert #t for k,v in ipairs(t) ... Works correctly only on consecutive arrays starting at 1.
  • Behavior when modify the iterated object when iterating
  • tonumber (e [, base]): base not implemented
  • error (message [, level]): level not implemented
  • string.sub can only receive one string and two positive integers.
  • string.sub, #<a string>, ... use char, .chars(), not u8
  • <a string>[...] (Lua5.* : nil) (lua2rust : panic)
  • ...

/lua2rust/

    Package Sidebar

    Install

    npm i lua2rust

    Weekly Downloads

    10

    Version

    0.5.2

    License

    AGPL-3.0-or-later

    Unpacked Size

    89.4 kB

    Total Files

    18

    Last publish

    Collaborators

    • zaoqi