#jit #cranelift #compilation #lua #just-in-time

moonlift

A pure-rust implementation of Lua (5.4) with just-in-time (JIT) compilation using cranelift

1 unstable release

0.1.0-alpha.0 Aug 16, 2023

#1047 in Programming languages

MIT/Apache

1.5MB
34K SLoC

C 19K SLoC // 0.2% comments Lua 13K SLoC // 0.1% comments Rust 2K SLoC // 0.0% comments

moonlift

license: MIT/Apache 2.0 Rust CI

A pure-rust implementation of lua (5.4) with just-in-time (JIT) compilation using cranelift.

WARNING

This project is in a very early development stage.

Differences to the original C implementation of Lua 5.4

  • All string operations are UTF-8 by default. The original C implementation is encoding-transparent.
  • Unicode-Escape Sequences (\uXXX) must produce valid unicode scalar values / code-points. The original C implementation only requires the code-point to be less then 2^31
  • ...

License

This project is licensed under either of

at your option

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~8–18MB
~228K SLoC